:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    /* 整体背景调淡一些 */
    background-color: #fbfcfe;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
    transition: all 0.3s ease;
}

body.fullscreen-mode {
    background-color: #1a1a1a;
    color: #fff;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    gap: 15px;
}

/* 旧的行向弹性布局已移至 .view-panel.active */

/* 左侧面板容器 */
.left-panels {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 0 0 250px;
}

/* 全屏模式下的容器样式 */
body.fullscreen-mode .container {
    max-width: none;
    padding: 0;
    gap: 0;
}

body.fullscreen-mode .view-panel.active {
    max-width: none;
    padding: 20px;
}

body.fullscreen-mode .left-panels {
    display: none;
}

/* 分类管理区域 */
.categories-panel {
    flex: 0 0 250px;
    background: white;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
    height: fit-content;
    transition: all 0.3s ease;
}

body.fullscreen-mode .categories-panel {
    display: none;
}

/* 最新记录面板 */
.recent-notes-panel {
    flex: 0 0 250px;
    background: white;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
    height: fit-content;
    transition: all 0.3s ease;
}

body.fullscreen-mode .recent-notes-panel {
    display: none;
}

/* 暗色模式 - 最新记录框 */
body.fullscreen-mode .recent-notes-header h3 {
    color: white;
}

body.fullscreen-mode .recent-note-item:hover {
    background-color: rgba(76, 201, 240, 0.1);
}

body.fullscreen-mode .recent-note-title {
    color: white;
}

body.fullscreen-mode .recent-note-time {
    color: #aaa;
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.categories-header h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.add-category-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.categories-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}

.recent-notes-header {
    margin-bottom: 8px;
}

.recent-notes-header h3 {
    font-size: 1rem;
    color: #333;
    margin: 0;
}

.recent-notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 460px;
    overflow-y: auto;
}

.recent-note-item {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    margin-bottom: 3px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.82rem;
    line-height: 1.25;
}

.recent-note-item:hover {
    background-color: #f0f4ff;
}

.recent-note-content {
    display: block;
    min-width: 0;
}

.recent-note-title {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.recent-note-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.recent-note-category {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.7rem;
    white-space: nowrap;
    line-height: 1.2;
}

.recent-note-time {
    margin-left: auto;
    color: #999;
    font-size: 0.72rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.recent-note-empty {
    text-align: center;
    color: #999;
    padding: 15px 8px;
    font-size: 0.85rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: var(--border-radius);
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.category-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.category-name-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-note-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 22px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1;
    color: #3f37c9;
    border: 1px solid rgba(67, 97, 238, 0.35);
    background: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}

.category-item:hover .category-note-count {
    border-color: rgba(67, 97, 238, 0.55);
    background: rgba(67, 97, 238, 0.06);
}

.category-item.active .category-note-count {
    border-color: rgba(67, 97, 238, 0.75);
    background: rgba(67, 97, 238, 0.10);
}

.category-item:hover {
    background-color: #f0f4ff;
}

.category-item.active {
    background-color: #e0e7ff;
    font-weight: bold;
}

.category-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.category-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.category-actions button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.85rem;
}

.category-actions button:hover {
    color: var(--primary-color);
}

/* 记录管理区域 */
.notes-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
}

body.fullscreen-mode .notes-panel {
    width: 100%;
    max-width: none;
    padding: 20px;
}

.notes-header {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.header-left {
    flex: 0 0 auto;
}

.header-search {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.search-btn:hover {
    color: var(--primary-color);
}

.header-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
}

body.fullscreen-mode .notes-header {
    background: #2d2d2d;
    color: white;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid #444;
}

body.fullscreen-mode .search-input {
    background: #1a1a1a;
    border-color: #444;
    color: white;
}

body.fullscreen-mode .search-input:focus {
    border-color: #4cc9f0;
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.1);
}

body.fullscreen-mode .search-input::placeholder {
    color: #666;
}

body.fullscreen-mode .search-btn {
    color: #666;
}

body.fullscreen-mode .search-btn:hover {
    color: #4cc9f0;
}

.notes-header h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 0;
}

/* 排序下拉框 */
.sort-select {
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-select:hover {
    border-color: var(--primary-color);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

body.fullscreen-mode .sort-select {
    background: #1a1a1a;
    border-color: #444;
    color: white;
}

body.fullscreen-mode .sort-select:hover {
    border-color: #4cc9f0;
}

body.fullscreen-mode .sort-select:focus {
    border-color: #4cc9f0;
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.1);
}

body.fullscreen-mode .notes-header h2 {
    color: #4cc9f0;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.add-note-btn, .toggle-fullscreen-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 6px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.toggle-fullscreen-btn {
    background: #6c757d;
}

.toggle-fullscreen-btn:hover {
    background: #5a6268;
}

.add-note-btn:hover, .toggle-fullscreen-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 导入导出按钮样式 */
.import-export-btn {
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 6px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.import-export-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    background: #138496;
}

body.fullscreen-mode .import-export-btn {
    background: #4cc9f0;
}

body.fullscreen-mode .add-note-btn {
    background: #4cc9f0;
}

.notes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

/* 搜索结果：改为类似 Google/百度 的列表布局 */
.notes-list.search-results {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.search-result-item:hover {
    background: rgba(67, 97, 238, 0.06);
    border-bottom-color: rgba(67, 97, 238, 0.15);
}

.search-result-main {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    color: #1a0dab;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 6px;
    word-break: break-word;
}

.search-result-meta {
    margin-top: 8px;
    color: #8a8f95;
    font-size: 0.85rem; /* 比标题小两号 */
    line-height: 1.2;
    word-break: break-word;
}

.search-result-item:hover .search-result-title {
    text-decoration: underline;
}

.search-result-snippet {
    color: #3c4043;
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-side {
    flex: 0 0 auto;
}

.search-result-thumb {
    width: 100px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f3f4;
    display: block;
}

body.fullscreen-mode .search-result-item {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.fullscreen-mode .search-result-item:hover {
    background: rgba(76, 201, 240, 0.10);
    border-bottom-color: rgba(76, 201, 240, 0.25);
}

body.fullscreen-mode .search-result-title {
    color: #8ab4f8;
}

body.fullscreen-mode .search-result-meta {
    color: #aab0b6;
}

body.fullscreen-mode .search-result-snippet {
    color: #bdc1c6;
}

@media (max-width: 480px) {
    .search-result-item {
        flex-direction: column;
    }

    .search-result-thumb {
        width: 100px;
        height: 70px;
    }
}

/* 分组样式 */
.notes-group {
    grid-column: 1 / -1;
    margin-bottom: 14px;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    margin-bottom: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
}

.group-title-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.group-title-text {
    flex: 1;
}

.group-title-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background-color: #f0f0f0;
    border-radius: 14px;
    font-size: 0.85rem;
    padding: 0 8px;
}

body.fullscreen-mode .group-title {
    color: white;
    border-bottom-color: #444;
}

body.fullscreen-mode .group-title-count {
    background-color: #3d3d3d;
    color: #ccc;
}

.group-notes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.note-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    transition: transform 0.2s;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.note-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

body.fullscreen-mode .note-card {
    background: #2d2d2d;
    color: white;
    border: 1px solid #444;
}

.note-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--dark-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.fullscreen-mode .note-title {
    color: white;
}

.note-content {
    color: #444;
    font-size: 0.9rem;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-all; /* 修复长字符串溢出问题 */
}

body.fullscreen-mode .note-content {
    color: #ccc;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
    margin-top: 8px;
}

body.fullscreen-mode .note-footer {
    color: #aaa;
}

.note-category {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    border: 1px solid currentColor;
    font-weight: 500;
}

.note-date {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    background: #e9ecef;
    border: 1px solid #ced4da;
    color: #495057;
    font-size: 0.75rem;
    font-weight: 500;
}

body.fullscreen-mode .note-date {
    background: #444;
    border-color: #666;
    color: #eee;
}

/* 详情页 */
.note-detail {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    display: none;
    position: relative;
    transition: all 0.3s ease;
    min-height: 400px;
    resize: both;
    overflow: auto;
    max-width: 100%;
    max-height: 100%;
}

.note-detail.resizable {
    border: 2px solid #10B981;
}

.note-detail.resizing {
    border-color: var(--primary-color);
}

.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 50%, #ccc 50%);
    z-index: 10;
}

.resize-handle:hover {
    background: linear-gradient(135deg, transparent 50%, var(--primary-color) 50%);
}

body.fullscreen-mode .note-detail {
    background: #2d2d2d;
    color: white;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #444;
    max-width: none;
    max-height: none;
    width: 100%;
    height: calc(100vh - 100px);
    position: fixed;
    top: 80px;
    left: 0;
    z-index: 1000;
}

.note-detail-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

body.fullscreen-mode .note-detail-header {
    border-bottom-color: #444;
}

.note-detail-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

body.fullscreen-mode .note-detail-title {
    color: white;
}

.note-detail-content {
    font-size: 1rem;
    line-height: 1.5;
    color: #444;
    min-height: 250px;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 10px 10px 10px 26px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

/* 与 Quill 编辑器保持一致：段落无外边距，行距由 lineheight 格式控制 */
.note-detail-content p,
.note-detail-content ol,
.note-detail-content ul,
.note-detail-content pre,
.note-detail-content blockquote,
.note-detail-content h1,
.note-detail-content h2,
.note-detail-content h3,
.note-detail-content h4,
.note-detail-content h5,
.note-detail-content h6 {
    margin: 0;
    padding: 0;
}

.note-detail-content.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 0;
    padding: 40px;
    font-size: 1.1rem;
    overflow: auto;
}

body.fullscreen-mode .note-detail-content {
    background: #3d3d3d;
    color: white;
    border-color: #555;
}

.content-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 10px;
}

.content-toolbar button {
    background: #8FBC8F;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.content-toolbar button:hover {
    background: #e0e0e0;
}

body.fullscreen-mode .content-toolbar button {
    background: #444;
    border-color: #666;
    color: white;
}

body.fullscreen-mode .content-toolbar button:hover {
    background: #555;
}

.note-detail-footer {
    display: flex;
    flex-direction: column;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 0.85rem;
    gap: 5px;
}

body.fullscreen-mode .note-detail-footer {
    border-top-color: #444;
    color: #aaa;
}

.detail-actions {
    display: flex;
    justify-content: space-between; /* 左右分开 */
    align-items: center; /* 垂直居中 */
    gap: 20px;
    margin: 15px 0;
}

.actions-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

.actions-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 确保按钮样式一致 */
.btn {
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    color: white;
}

/* 按钮颜色 */
.btn-edit { background: #4CAF50; }
.btn-delete { background: #f44336; }
.btn-resize { background: #FF9800; }
.btn-fullscreen { background: #8B5CF6; }

/* 悬停效果 */
.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn {
    padding: 8px 12px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-edit {
    background: var(--success-color, #4CAF50); /* 添加默认值 */
    color: white;
}

.btn-delete {
    background: var(--danger-color, #f44336); /* 添加默认值 */
    color: white;
}

.btn-back {
    background: #fff;
    color: #111;
    border: 1px solid var(--primary-color);
}

.btn-back:hover {
    background: rgba(67, 97, 238, 0.08);
}

body.fullscreen-mode .btn-back {
    background: transparent;
    color: #fff;
    border-color: #8ab4f8;
}

body.fullscreen-mode .btn-back:hover {
    background: rgba(138, 180, 248, 0.12);
}

.btn-fullscreen {
    background: #8B5CF6;
    color: white;
}

.btn-resize {
    background: #17a2b8;
    color: white;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

.modal.fullscreen {
    background: #1a1a1a;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 70%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: all 0.3s ease;
}

.modal.fullscreen .modal-content {
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

.modal-content.resizable {
    resize: both;
    overflow: auto;
    min-width: 300px;
    min-height: 200px;
    border: 2px solid #e0e0e0;
}

.modal-content.resizing {
    border-color: var(--primary-color);
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    cursor: move;
}

.modal.fullscreen .modal-header {
    background: #2d2d2d;
    border-bottom-color: #444;
    color: white;
}

.modal-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.modal-fullscreen-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
}

.modal-fullscreen-btn:hover {
    background: #5a6268;
}

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.modal.fullscreen .modal-header h3 {
    color: #4cc9f0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal.fullscreen .close-btn {
    color: #ccc;
}

.modal-body {
    padding: 15px;
    position: relative; /* 确保 sticky 工具栏相对于此定位 */
}

.modal.fullscreen .modal-body {
    background: #1a1a1a;
    color: white;
    height: calc(100vh - 120px);
    overflow-y: auto;
    position: relative;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.modal.fullscreen .form-group label {
    color: #ccc;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal.fullscreen .form-control {
    background: #2d2d2d;
    border-color: #444;
    color: white;
}

.modal.fullscreen .form-control:focus {
    border-color: #4cc9f0;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.modal-footer {
    padding: 12px 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal.fullscreen .modal-footer {
    border-top-color: #444;
    background: #2d2d2d;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.empty-state i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 8px;
}

.empty-state p {
    color: #888;
    margin-bottom: 15px;
}

body.fullscreen-mode .empty-state {
    background: #2d2d2d;
    color: white;
}

body.fullscreen-mode .empty-state h3 {
    color: white;
}

body.fullscreen-mode .empty-state p {
    color: #ccc;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 20px;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 错误提示 */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    text-align: center;
    display: none;
    font-size: 0.9rem;
}

body.fullscreen-mode .error-message {
    background: #442222;
    color: #ff6b6b;
}

/* 成功提示样式 */
.success-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #4caf50;
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    display: none;
    font-size: 1rem;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* 颜色选择器优化 */
.color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.color-preset-item {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.color-preset-item:hover {
    transform: scale(1.1);
}

.color-preset-item.active {
    border-color: #333;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

.custom-color-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-color-wrapper input[type="color"] {
    width: 40px;
    height: 30px;
    padding: 0;
    border: 1px solid #ddd;
    cursor: pointer;
}

.custom-color-wrapper span {
    font-size: 0.9rem;
    color: #666;
}

/* 响应式设计 - 移动设备 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }

    .left-panels {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .categories-panel {
        flex: 0 0 auto;
        width: 100%;
        margin-bottom: 15px;
    }

    .recent-notes-panel {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .notes-list {
        grid-template-columns: 1fr;
    }
    
    .group-notes-list {
        grid-template-columns: 1fr !important;
    }
    
    .note-card {
        height: auto;
        min-height: 120px;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 95vh;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .form-control {
        font-size: 0.85rem;
        padding: 8px;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .note-detail-title {
        font-size: 1.3rem;
    }
    
    .note-detail-content {
        font-size: 0.95rem;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .toggle-fullscreen-btn, .add-note-btn {
        width: 100%;
        justify-content: center;
    }
    
    .header-search {
        width: 100%;
    }
}

/* 响应式设计 - 小屏幕设备 */
@media (max-width: 480px) {
    .notes-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .header-left {
        width: 100%;
    }
    
    .header-left h2 {
        margin: 0;
        font-size: 1.1rem;
    }
    
    .header-search {
        width: 100%;
        order: -1;
    }
    
    .search-input {
        width: 100%;
        font-size: 0.85rem;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
        gap: 8px;
    }
    
    .group-title {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 1rem;
    }
    
    .group-notes-list {
        grid-template-columns: 1fr !important;
    }
    
    .add-note-btn {
        width: 100%;
        justify-content: center;
    }
    
    .detail-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 5px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .content-toolbar {
        flex-direction: column;
    }
    
    .content-toolbar button {
        width: 100%;
        justify-content: center;
    }
}

/* Quill 富文本编辑器样式 */
#noteContentEditor {
    background: white;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}

#noteContentEditor .ql-toolbar {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    background: #f8f9fa;
}

#noteContentEditor .ql-container {
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    font-size: 16px;
    min-height: 400px;
}

#noteContentEditor .ql-editor {
    min-height: 400px;
    max-height: 70vh;
    overflow-y: auto;
}

/* 全屏模式下的 Quill 编辑器 */
body.fullscreen-mode #noteContentEditor .ql-toolbar {
    background: #2d2d2d;
    border-color: #444;
    color: white;
}

body.fullscreen-mode #noteContentEditor .ql-container {
    background: #1a1a1a;
    border-color: #444;
    color: white;
}

body.fullscreen-mode #noteContentEditor .ql-editor {
    color: white;
}

body.fullscreen-mode #noteContentEditor .ql-picker-label {
    color: white;
}

body.fullscreen-mode #noteContentEditor .ql-stroke {
    stroke: white;
}

body.fullscreen-mode #noteContentEditor .ql-fill {
    fill: white;
}

/* Quill 工具栏按钮样式 - 仅用于字体和大小选择框 */
.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-label,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label {
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-width: 80px;
    padding: 2px 8px;
    color: #333;
    line-height: normal;
}

.ql-toolbar.ql-snow .ql-picker-options {
    border-radius: 4px;
}

/* Font picker: 用 data-label 覆盖 Quill 默认文字 */
.ql-snow .ql-picker.ql-font .ql-picker-label::before {
    content: attr(data-label) !important;
    display: inline-block !important;
    line-height: 22px;
    color: #333;
    font-size: 14px;
}

.ql-snow .ql-picker.ql-font .ql-picker-label svg {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Size picker: 用 data-label 覆盖 Quill 默认文字 */
.ql-snow .ql-picker.ql-size .ql-picker-label::before {
    content: attr(data-label) !important;
    display: inline-block !important;
    line-height: 22px;
    color: #333;
    font-size: 14px;
}

.ql-snow .ql-picker.ql-size .ql-picker-label svg {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 下拉选项样式 */
.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-item,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item {
    text-indent: 0;
    color: #333;
    padding: 4px 8px;
    line-height: normal;
    font-size: 13px;
}

/* 自定义一键复制标记按钮 */
.ql-toolbar.ql-snow .copyable-mark-btn {
    width: auto;
    padding: 3px 10px;
    font-size: 13px;
    line-height: 1.4;
    color: #4361ee;
    background: #f0f4ff;
    border: 1px solid #4361ee;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 500;
}

.ql-toolbar.ql-snow .copyable-mark-btn:hover {
    background: #e0e7ff;
    color: #3f37c9;
    border-color: #3f37c9;
}

.ql-toolbar.ql-snow .copyable-mark-btn:active {
    background: #d0d7ff;
}

body.fullscreen-mode .ql-toolbar.ql-snow .copyable-mark-btn {
    color: #4cc9f0;
    background: rgba(76, 201, 240, 0.1);
    border-color: #4cc9f0;
}

body.fullscreen-mode .ql-toolbar.ql-snow .copyable-mark-btn:hover {
    background: rgba(76, 201, 240, 0.2);
}

/* 代码块样式 */
.ql-editor pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin: 10px 0;
}

/* 表格样式 */
.ql-editor table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
}

.ql-editor table td,
.ql-editor table th {
    border: 1px solid #ccc;
    padding: 10px;
    min-width: 50px;
}

.ql-editor table td:focus,
.ql-editor table th:focus {
    outline: 2px solid var(--primary-color);
}

/* 图片样式 */
.ql-editor img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

/* 编辑器中可复制区块样式 */
.ql-editor .copyable-segment.copyable-block {
    display: block;
    margin: 10px 0;
    padding: 8px 12px;
    border: 2px dashed #4361ee;
    border-radius: 6px;
    background-color: #eef1ff;
    position: relative;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: normal;
    color: inherit;
}

.ql-editor .copyable-segment.copyable-block::before {
    content: "可复制区块";
    position: absolute;
    top: -9px;
    left: 10px;
    background: #4361ee;
    color: #fff;
    font-size: 10px;
    padding: 0 6px;
    border-radius: 3px;
    font-family: sans-serif;
    line-height: 16px;
}

body.fullscreen-mode .ql-editor .copyable-segment.copyable-block {
    border-color: #4cc9f0;
    background-color: rgba(76, 201, 240, 0.08);
}

body.fullscreen-mode .ql-editor .copyable-segment.copyable-block::before {
    background: #4cc9f0;
}

/* 一键复制功能样式 */
.copyable-segment {
    position: relative;
    display: inline;
    padding: 2px 0;
    border-radius: 4px;
    transition: all 0.2s;
    background-color: #e0f7fa;
    border-bottom: 2px dashed #4361ee;
}

.copyable-segment:hover {
    background-color: #b2ebf2 !important;
}

.copyable-segment.copyable-block {
    display: block;
    margin: 10px 0;
    padding: 42px 14px 14px;
    border: 1px solid #333;
    border-radius: 16px;
    background: #1e1e1e;
    border-bottom: 1px solid #333;
    font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: #d4d4d4;
}

.copyable-segment.copyable-block.copyable-block-compact {
    padding: 34px 12px 10px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.copyable-segment.copyable-block::before {
    content: "</>";
    position: absolute;
    top: 13px;
    left: 14px;
    color: #9ca3af;
    font-size: 12px;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-weight: 700;
}

.copyable-segment.copyable-block::after {
    content: attr(data-code-lang);
    position: absolute;
    top: 10px;
    left: 42px;
    color: #9ca3af;
    font-size: 14px;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-weight: 700;
}

.copyable-segment.copyable-block.copyable-block-compact::before {
    top: 11px;
}

.copyable-segment.copyable-block.copyable-block-compact::after {
    top: 8px;
}

.copyable-segment.copyable-block:hover {
    background: #2a2a2a !important;
}

.inline-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white !important;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    margin-left: 5px;
    cursor: pointer;
    font-size: 12px;
    vertical-align: middle;
    transition: all 0.2s;
    opacity: 0.6;
    text-decoration: none;
    display: none;
}

.copyable-segment.copyable-block .inline-copy-btn {
    display: inline-flex;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    margin-left: 0;
    background: transparent;
    color: #d4d4d4 !important;
    border: 1px solid #555;
    font-size: 16px;
    opacity: 1;
}

.copyable-segment.copyable-block.copyable-block-compact .inline-copy-btn {
    top: 7px;
    right: 8px;
    width: 28px;
    height: 28px;
}

.copyable-segment.copyable-block:hover .inline-copy-btn {
    display: inline-flex;
}

.copyable-segment.copyable-block .inline-copy-btn:hover {
    background: #3a3a3a;
    border-color: #666;
    transform: none;
    opacity: 1;
}

.copyable-segment:hover .inline-copy-btn {
    display: inline-flex;
}

.copyable-segment:hover .inline-copy-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background: var(--secondary-color);
}

.inline-copy-btn.copied {
    background: #4CAF50 !important;
    opacity: 1 !important;
    display: inline-flex !important;
}


.modal.fullscreen .editor-toolbar {
    top: 0;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
}

.editor-toolbar button,
.editor-toolbar select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
}

.table-tools {
    display: inline-flex;
    gap: 5px;
    padding: 0 5px;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.table-tools button {
    font-size: 12px !important;
    padding: 2px 5px !important;
}

.editor-toolbar button:hover {
    background: #e9ecef;
}

.color-picker-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

.color-picker-wrapper span {
    font-weight: bold;
    font-size: 16px;
}

.color-picker-wrapper input[type="color"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.editor-toolbar button.active {
    background: var(--primary-color);
    color: white;
}

/* 编辑器源代码区域样式 */
.editor-source {
    min-height: 400px; /* 增加最小高度 */
    width: 100%;
    height: auto; /* 允许根据内容自动撑开 */
    font-family: 'Courier New', Courier, monospace;
    background: #272822;
    color: #f8f8f2;
    line-height: 1.5;
    padding: 10px;
    resize: vertical;
}

/* 编辑器内容区域样式 */
.editor-content {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    min-height: 200px;
    overflow-y: auto;
    background: white;
    white-space: pre-wrap;
}

.editor-content pre {
    background-color: #f4f4f4;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    font-family: monospace;
    overflow-x: auto;
    margin: 10px 0;
}

.note-detail-content pre,
.sub-record-body pre,
.sub-record-window-body pre,
.devlog-subrecord-content pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    overflow-x: auto;
    margin: 15px 0;
    white-space: pre-wrap;
    word-break: break-word;
}

body.fullscreen-mode .sub-record-window-body pre,
body.fullscreen-mode .devlog-subrecord-content pre {
    background-color: #2a2a3e;
    border-left-color: #4cc9f0;
    color: #ddd;
}

.editor-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

.editor-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    table-layout: fixed;
}

.editor-content table td,
.editor-content table th {
    border: 1px solid #ccc;
    padding: 10px;
    min-width: 20px;
}

/* 即使在非编辑状态下，详情页也应该能正确显示这些内容 */
.note-detail-content img {
    max-width: 100%;
    height: auto;
}

.note-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.note-detail-content table td {
    border: 1px solid #ccc;
    padding: 10px;
}

/* 全屏模式下的编辑器样式 */
body.fullscreen-mode .editor-toolbar {
    background: #2d2d2d;
    border-color: #444;
}

body.fullscreen-mode .editor-toolbar button,
body.fullscreen-mode .editor-toolbar select,
body.fullscreen-mode .color-picker-wrapper {
    background: #3d3d3d;
    border-color: #555;
    color: white;
}

body.fullscreen-mode .editor-toolbar button:hover {
    background: #4d4d4d;
}

body.fullscreen-mode .editor-content {
    background: #1a1a1a;
    color: white;
    border-color: #444;
}

body.fullscreen-mode .editor-content table td,
body.fullscreen-mode .editor-content table th {
    border-color: #555;
}

/* image-resize.js Styles */
.resizable-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.resizable-image-wrapper:hover .image-resize-handle {
    opacity: 1;
}

.resizable-image-wrapper img {
    display: block;
    max-width: 100%;
    height: auto;
}

.image-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background: #4361ee;
    border: 2px solid white;
    border-radius: 50%;
    cursor: se-resize;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

/* 一键复制功能样式 */
.copyable-segment {
    position: relative;
    display: inline;
    padding: 2px 0; /* 减少内边距防止影响行高 */
    border-radius: 4px;
    transition: all 0.2s;
    background-color: #e0f7fa;
    border-bottom: 2px dashed #4361ee;
}

.copyable-segment:hover {
    background-color: #b2ebf2 !important;
}

.copyable-segment.copyable-block {
    display: block;
    margin: 10px 0;
    padding: 42px 14px 14px;
    border: 1px solid #333;
    border-radius: 16px;
    background: #1e1e1e;
    border-bottom: 1px solid #333;
    font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    color: #d4d4d4;
}

.copyable-segment.copyable-block.copyable-block-compact {
    padding: 34px 12px 10px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.copyable-segment.copyable-block::before {
    content: "</>";
    position: absolute;
    top: 13px;
    left: 14px;
    color: #9ca3af;
    font-size: 12px;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-weight: 700;
}

.copyable-segment.copyable-block::after {
    content: attr(data-code-lang);
    position: absolute;
    top: 10px;
    left: 42px;
    color: #9ca3af;
    font-size: 14px;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-weight: 700;
}

.copyable-segment.copyable-block.copyable-block-compact::before {
    top: 11px;
}

.copyable-segment.copyable-block.copyable-block-compact::after {
    top: 8px;
}

.copyable-segment.copyable-block:hover {
    background: #2a2a2a !important;
}

.inline-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white !important;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    margin-left: 5px;
    cursor: pointer;
    font-size: 12px;
    vertical-align: middle;
    transition: all 0.2s;
    opacity: 0.6;
    text-decoration: none;
    display: none; /* 默认隐藏 */
}

.copyable-segment.copyable-block .inline-copy-btn {
    display: inline-flex;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    margin-left: 0;
    background: transparent;
    color: #d4d4d4 !important;
    border: 1px solid #555;
    font-size: 16px;
    opacity: 1;
}

.copyable-segment.copyable-block.copyable-block-compact .inline-copy-btn {
    top: 7px;
    right: 8px;
    width: 28px;
    height: 28px;
}

.copyable-segment.copyable-block:hover .inline-copy-btn {
    display: inline-flex;
}

.copyable-segment.copyable-block .inline-copy-btn:hover {
    background: #3a3a3a;
    border-color: #666;
    transform: none;
    opacity: 1;
}

.copyable-segment:hover .inline-copy-btn {
    display: inline-flex; /* 悬停显示 */
}

.copyable-segment:hover .inline-copy-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background: var(--secondary-color);
}

.inline-copy-btn.copied {
    background: #4CAF50 !important;
    opacity: 1 !important;
    display: inline-flex !important;
}



/* 编辑器内标记的预览样式（仅编辑状态） */
.editor-content .copyable-segment {
    position: relative;
    display: inline;
    padding: 2px 4px;
    border-radius: 4px;
    background-color: rgba(67, 97, 238, 0.08);
    border-bottom: 2px dashed #4361ee;
    transition: background-color 0.15s;
}

.editor-content .copyable-segment:hover {
    background-color: rgba(67, 97, 238, 0.18);
}

/* ================================================
   导航标签
   ================================================ */
.nav-tabs {
    display: flex;
    gap: 0;
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 0;
}

.nav-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    text-align: center;
}

.nav-tab:hover {
    background: #f0f4ff;
    color: var(--primary-color);
}

.nav-tab.active {
    color: var(--primary-color);
    background: #f0f4ff;
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

body.fullscreen-mode .nav-tabs {
    display: none;
}

/* ================================================
   视图切换
   ================================================ */
.view-panel {
    display: none;
    flex: 1;
    min-height: 0;
}

.view-panel.active {
    display: flex;
    width: 100%;
    gap: 15px;
}

/* ================================================
   开发日志列表
   ================================================ */
.devlog-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.devlog-entry {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

/* 展开/收起按钮 */
.devlog-toggle-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0 4px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.devlog-toggle-btn:hover {
    color: var(--primary-color);
}

/* 可折叠内容区域 */
.devlog-collapsible {
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.devlog-collapsible.collapsed {
    max-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

body.fullscreen-mode .devlog-entry {
    background: #2d2d2d;
    border: 1px solid #444;
    color: white;
}

.devlog-entry-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.devlog-project-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
}

body.fullscreen-mode .devlog-project-badge {
    border-color: #555;
}

.devlog-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.devlog-entry-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    flex: 1;
    min-width: 0;
}

.devlog-entry-title .devlog-title-input {
    width: 100%;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 8px;
    background: #fff;
    outline: none;
    box-sizing: border-box;
}

.devlog-entry-title .devlog-title-input:focus {
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.15);
}

body.fullscreen-mode .devlog-entry-title {
    color: white;
}

body.fullscreen-mode .devlog-entry-title .devlog-title-input {
    color: white;
    background: #2d2d2d;
    border-color: #555;
}

.devlog-project-select {
    padding: 2px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.82rem;
    color: #555;
    background: #fff;
    cursor: pointer;
    outline: none;
    max-width: 160px;
}

.devlog-project-select:focus {
    border-color: #4a90d9;
    box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.15);
}

body.fullscreen-mode .devlog-project-select {
    color: #ddd;
    background: #2d2d2d;
    border-color: #555;
}

.devlog-pin-btn {
    padding: 3px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #888;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.devlog-pin-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.devlog-pin-btn.pinned {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

body.fullscreen-mode .devlog-pin-btn {
    background: #3d3d3d;
    border-color: #555;
    color: #ccc;
}

body.fullscreen-mode .devlog-pin-btn.pinned {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.devlog-time {
    color: #999;
    font-size: 0.82rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

body.fullscreen-mode .devlog-time {
    color: #aaa;
}

/* 日志内容显示区域 */
.devlog-content-display {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f9f9f9;
    min-height: 60px;
    word-break: break-word;
    overflow: hidden;
}

body.fullscreen-mode .devlog-content-display {
    background: #3d3d3d;
    color: #ddd;
    border-color: #555;
}

/* 日志内联编辑器容器 */
.devlog-editor-container {
    display: none;
    margin-bottom: 10px;
}

.devlog-editor-container.active {
    display: block;
}

.devlog-quill-wrap {
    background: white;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

body.fullscreen-mode .devlog-quill-wrap {
    background: #2d2d2d;
    border-color: #4cc9f0;
}

.devlog-quill-wrap .ql-toolbar {
    border: none;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 5;
}

body.fullscreen-mode .devlog-quill-wrap .ql-toolbar {
    background: #2d2d2d;
    border-bottom-color: #444;
    color: white;
}

body.fullscreen-mode .devlog-quill-wrap .ql-stroke {
    stroke: white;
}

body.fullscreen-mode .devlog-quill-wrap .ql-fill {
    fill: white;
}

body.fullscreen-mode .devlog-quill-wrap .ql-picker-label {
    color: white;
}

.devlog-quill-wrap .ql-container {
    border: none;
    font-size: 15px;
}

.devlog-quill-wrap .ql-editor {
    min-height: 200px;
    max-height: 60vh;
    overflow-y: auto;
}

body.fullscreen-mode .devlog-quill-wrap .ql-container {
    background: #1a1a1a;
    color: white;
}

body.fullscreen-mode .devlog-quill-wrap .ql-editor {
    color: white;
}

/* 日志操作按钮行 */
.devlog-entry-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

body.fullscreen-mode .devlog-entry-actions {
    border-top-color: #444;
}

.devlog-action-btn {
    padding: 5px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #555;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
}

.devlog-action-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.devlog-action-btn.btn-devlog-edit {
    display: inline-flex;
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.devlog-action-btn.btn-devlog-save {
    display: inline-flex;
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.devlog-action-btn.btn-devlog-cancel {
    display: inline-flex;
    background: white;
    color: #666;
    border-color: #ddd;
}

.devlog-action-btn.btn-devlog-delete {
    display: inline-flex;
    background: #f44336;
    color: white;
    border-color: #f44336;
}

body.fullscreen-mode .devlog-action-btn {
    background: #3d3d3d;
    border-color: #555;
    color: #ccc;
}

body.fullscreen-mode .devlog-action-btn.btn-devlog-edit {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

body.fullscreen-mode .devlog-action-btn.btn-devlog-save {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

body.fullscreen-mode .devlog-action-btn.btn-devlog-cancel {
    background: #3d3d3d;
    color: #ccc;
    border-color: #555;
}

body.fullscreen-mode .devlog-action-btn.btn-devlog-delete {
    background: #f44336;
    color: white;
    border-color: #f44336;
}

/* 开发日志 - 项目列表面板宽度更大 */
#devlogsView .left-panels {
    flex: 0 0 300px;
}

#devlogsView .categories-panel {
    flex: 0 0 auto;
    width: 100%;
}

#devlogsView .category-item {
    font-size: 1rem;
}

#devlogsView .categories-header h2 {
    font-size: 1.35rem;
}

/* 日志空状态 */
.devlog-empty {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

body.fullscreen-mode .devlog-empty {
    background: #2d2d2d;
    color: white;
}

/* 开发日志主面板 */
.devlog-main-panel {
    flex: 1;
}

/* ====== 日志标题列表面板 ====== */
.devlog-title-list-panel {
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.devlog-title-list-header {
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
    flex-shrink: 0;
}

.devlog-title-list-header h3 {
    margin: 0;
    font-size: 1rem;
}

.devlog-title-list {
    flex: 1;
    overflow-y: auto;
    min-height: 80px;
    max-height: 40vh;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    margin: 0 8px 8px 8px;
    background: #fff;
}

body.fullscreen-mode .devlog-title-list {
    background: #1e1e1e;
    border-color: #444;
}

.devlog-title-item {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.88rem;
    color: #444;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    transition: background .15s;
    word-break: break-word;
    line-height: 1.4;
}

.devlog-title-item:last-child {
    border-bottom: none;
}

.devlog-title-item:hover {
    background: #e8f0fe;
}

.devlog-title-item.active {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 500;
}

.devlog-title-pin {
    font-size: 11px;
    flex-shrink: 0;
}

.devlog-title-checkbox {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color, #4a6cf7);
}

.devlog-title-text {
    flex: 1;
}

/* ====== 日志内容区 ====== */
.devlog-content-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0;
    flex: 1;
    overflow-y: auto;
}

.devlog-content-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

body.fullscreen-mode .devlog-content-card {
    background: #1e1e1e;
    border-color: #444;
}

.devlog-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    gap: 8px;
    flex-wrap: wrap;
}

body.fullscreen-mode .devlog-card-header {
    background: #2d2d2d;
    border-color: #444;
}

.devlog-card-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.devlog-card-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: #333;
}

body.fullscreen-mode .devlog-card-title {
    color: #ddd;
}

.devlog-card-time {
    font-size: 0.78rem;
    color: #999;
}

.devlog-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.devlog-card-content {
    padding: 16px 16px 16px 32px;
    min-height: 60px;
}

/* 查看模式下内容段落的间距 */
.devlog-card-content p {
    margin: 0 0 0.6em 0;
}

.devlog-card-content p:last-child {
    margin-bottom: 0;
}

/* 查看模式下保留 Quill 缩进样式 */
.devlog-card-content .ql-indent-1:not(.ql-direction-rtl),
.note-detail-content .ql-indent-1:not(.ql-direction-rtl) { padding-left: 3em; }
.devlog-card-content .ql-indent-2:not(.ql-direction-rtl),
.note-detail-content .ql-indent-2:not(.ql-direction-rtl) { padding-left: 6em; }
.devlog-card-content .ql-indent-3:not(.ql-direction-rtl),
.note-detail-content .ql-indent-3:not(.ql-direction-rtl) { padding-left: 9em; }
.devlog-card-content .ql-indent-4:not(.ql-direction-rtl),
.note-detail-content .ql-indent-4:not(.ql-direction-rtl) { padding-left: 12em; }
.devlog-card-content .ql-indent-5:not(.ql-direction-rtl),
.note-detail-content .ql-indent-5:not(.ql-direction-rtl) { padding-left: 15em; }
.devlog-card-content .ql-indent-6:not(.ql-direction-rtl),
.note-detail-content .ql-indent-6:not(.ql-direction-rtl) { padding-left: 18em; }
.devlog-card-content .ql-indent-7:not(.ql-direction-rtl),
.note-detail-content .ql-indent-7:not(.ql-direction-rtl) { padding-left: 21em; }
.devlog-card-content .ql-indent-8:not(.ql-direction-rtl),
.note-detail-content .ql-indent-8:not(.ql-direction-rtl) { padding-left: 24em; }
.devlog-card-content .ql-indent-9:not(.ql-direction-rtl),
.note-detail-content .ql-indent-9:not(.ql-direction-rtl) { padding-left: 27em; }

.devlog-edit-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    margin-top: 2px;
    position: relative;
}

.auto-save-tip {
    position: absolute;
    left: 16px;
    bottom: 12px;
    font-size: 0.78rem;
    color: #888;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.devlog-action-btn.btn-devlog-pin {
    display: inline-flex;
    background: #ff9800;
    color: white;
    border-color: #ff9800;
    font-size: 0.78rem;
}

.devlog-action-btn.btn-devlog-pin.pinned {
    background: #ffc107;
    border-color: #ffc107;
    color: #333;
}

body.fullscreen-mode .devlog-action-btn.btn-devlog-pin {
    background: #ff9800;
    color: white;
    border-color: #ff9800;
}

/* ====== 响应式 ====== */
@media (max-width: 768px) {
    .view-panel.active {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav-tab {
        padding: 10px 12px;
        font-size: 0.88rem;
    }

    .devlog-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .devlog-card-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .devlog-action-btn {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
}

/* ====== 数据备份管理 ====== */

.backup-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.backup-header {
    margin-bottom: 24px;
}

.backup-header h2 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.backup-desc {
    color: #888;
    font-size: 0.9rem;
}

.backup-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
}

.backup-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.2s;
}

.backup-action-btn:hover {
    border-color: var(--primary-color, #4a6cf7);
    background: #f0f4ff;
}

.backup-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.backup-action-icon {
    font-size: 1.2rem;
}

.backup-section h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.backup-auto-info {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 12px;
}

.backup-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.backup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.backup-item:hover {
    border-color: #b0b8c1;
}

.backup-item-info {
    flex: 1;
}

.backup-item-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: #333;
    font-family: 'Consolas', monospace;
}

.backup-item-meta {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}

.backup-item-actions {
    display: flex;
    gap: 6px;
}

.backup-btn {
    padding: 5px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.backup-btn-download {
    background: var(--primary-color, #4a6cf7);
    color: white;
    border-color: var(--primary-color, #4a6cf7);
}

.backup-btn-download:hover {
    opacity: 0.85;
}

.backup-btn-delete {
    background: #fff;
    color: #666;
}

.backup-btn-delete:hover {
    background: #f44336;
    color: white;
    border-color: #f44336;
}

.backup-loading,
.backup-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 0.9rem;
}

/* ====== 开发日志二级记录 ====== */
.devlog-action-btn.btn-devlog-add-sub {
    display: inline-flex;
    background: #fff;
    color: var(--primary-color, #4361ee);
    border-color: var(--primary-color, #4361ee);
}

.devlog-action-btn.btn-devlog-add-sub:hover {
    background: var(--primary-color, #4361ee);
    color: #fff;
}

.devlog-subrecords-section {
    margin-top: 10px;
    border-top: 1px solid #eceff4;
    padding-top: 10px;
}

.devlog-subrecords-header {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.devlog-subrecords-title {
    color: #666;
}

.devlog-subrecords-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.devlog-subrecord-item {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fafbfc;
    overflow: hidden;
}

.devlog-subrecord-item.expanded {
    border-color: var(--primary-color, #4361ee);
    background: #fff;
}

.devlog-subrecord-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
}

.devlog-subrecord-arrow {
    font-size: 11px;
    color: #999;
    width: 12px;
    flex-shrink: 0;
}

.devlog-subrecord-time {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}

.devlog-subrecord-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.devlog-subrecord-snippet {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.devlog-subrecord-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.devlog-subrecord-actions .devlog-action-btn {
    padding: 4px 8px;
    font-size: 12px;
}

.devlog-subrecord-content {
    padding: 12px 14px;
    border-top: 1px solid #eceff4;
    line-height: 1.6;
    color: #333;
    max-height: 400px;
    overflow-y: auto;
}

.devlog-subrecord-body-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.devlog-subrecord-content img {
    max-width: 100%;
}

body.fullscreen-mode .devlog-subrecord-item {
    background: #232323;
    border-color: #444;
}

body.fullscreen-mode .devlog-subrecord-item.expanded {
    background: #1f1f1f;
    border-color: #6c8cff;
}

body.fullscreen-mode .devlog-subrecords-header,
body.fullscreen-mode .devlog-subrecords-title {
    color: #ccc;
}

body.fullscreen-mode .devlog-subrecord-snippet {
    color: #ddd;
}

body.fullscreen-mode .devlog-subrecord-title,
body.fullscreen-mode .devlog-subrecord-body-title {
    color: #fff;
}

body.fullscreen-mode .devlog-subrecord-content {
    border-top-color: #3d3d3d;
    color: #ddd;
}

/* ====== 二级记录区域 ====== */
.sub-records-section {
    margin-top: 16px;
    border-top: 2px solid #e8e8e8;
    padding-top: 12px;
}

.sub-records-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.sub-records-title {
    font-size: 15px;
    font-weight: 600;
    color: #555;
}

.sub-records-count {
    font-size: 13px;
    color: #999;
}

.sub-records-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sub-record-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #fafbfc;
    transition: border-color 0.15s;
}

.sub-record-item:hover {
    border-color: #b0c4de;
}

.sub-record-item.expanded {
    border-color: var(--primary-color, #4361ee);
    background: #fff;
}

.sub-record-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
}

.sub-record-toggle {
    font-size: 10px;
    color: #999;
    width: 14px;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.sub-record-date {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}

.sub-record-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-record-snippet {
    font-size: 13px;
    color: #555;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sub-record-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.sub-record-actions button {
    padding: 2px 10px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}

.sub-record-actions .sub-record-edit:hover {
    background: var(--primary-color, #4361ee);
    color: #fff;
    border-color: var(--primary-color, #4361ee);
}

.sub-record-actions .sub-record-delete:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.sub-record-body {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    max-height: 500px;
    overflow-y: auto;
}

.sub-record-body-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.sub-record-body p { margin: 0 0 8px 0; }
.sub-record-body img { max-width: 100%; }

/* 「添加二级记录」按钮 */
.btn-add-sub {
    background: #fff;
    color: var(--primary-color, #4361ee);
    border-color: var(--primary-color, #4361ee);
}

.btn-add-sub:hover {
    background: var(--primary-color, #4361ee);
    color: #fff;
}

/* 新窗口打开按钮 */
.devlog-action-btn.btn-devlog-open-new {
    display: inline-flex;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
    background: #4cc9f0;
    color: #fff;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.devlog-action-btn.btn-devlog-open-new:hover {
    background: #3a8fd4;
    color: #fff;
}

body.fullscreen-mode .devlog-action-btn.btn-devlog-open-new {
    background: #2b7ab5;
    color: #eee;
}

body.fullscreen-mode .devlog-action-btn.btn-devlog-open-new:hover {
    background: #1e5f8f;
}

/* 二级记录新窗口弹层 */
.sub-record-window-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

.sub-record-window {
    background: #fff;
    border-radius: 12px;
    width: 90vw;
    max-width: 860px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
    animation: slideUp 0.2s ease;
    overflow: hidden;
}

body.fullscreen-mode .sub-record-window {
    background: #1e1e2e;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.sub-record-window-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #eee;
    position: relative;
    flex-shrink: 0;
}

body.fullscreen-mode .sub-record-window-header {
    border-bottom-color: #333;
}

.sub-record-window-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 6px;
    word-break: break-word;
}

body.fullscreen-mode .sub-record-window-title {
    color: #eee;
}

.sub-record-window-meta {
    font-size: 12px;
    color: #999;
}

body.fullscreen-mode .sub-record-window-meta {
    color: #666;
}

.sub-record-window-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 18px;
    color: #888;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sub-record-window-close:hover {
    background: #f0f0f0;
    color: #333;
}

body.fullscreen-mode .sub-record-window-close:hover {
    background: #333;
    color: #eee;
}

.sub-record-window-body {
    padding: 20px 24px 28px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.8;
    font-size: 15px;
    color: #333;
}

body.fullscreen-mode .sub-record-window-body {
    color: #ddd;
}

.sub-record-window-body img {
    max-width: 100%;
    border-radius: 6px;
    margin: 8px 0;
}

.sub-record-window-body p {
    margin: 0 0 10px;
}

@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); }
}
