/* ========== notes.css ========== */
/**
 * 便签笔记本模块样式 - Nebula 暗色设计语言
 * 玻璃拟态 · 多彩卡片 · 瀑布流布局 · 微光发光 · 高级质感
 *
 * 主题变量: --primary #6366f1 · --accent #06b6d4 · --bg-base #0a0c1e
 *
 * 实现说明:
 *   便签由 JS 通过内联 style 渲染颜色 (background/border-color/color)，
 *   且未添加颜色 class 或 data 属性。本文件使用 CSS 属性选择器
 *   [style*="<bg-hex>" i] 精确匹配每种颜色的内联背景值，配合 !important
 *   覆盖浅色内联样式，呈现暗色半透明卡片效果 —— 纯 CSS 实现，无需改动 JS。
 *   同时定义 .note-yellow 等 class 选择器作为语义化备用。
 */

/* ============================================================
   1. 页面头部
   ============================================================ */
.notes-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.notes-page-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary, #e2e8f0) 0%, var(--primary-light, #a5b4fc) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* ============================================================
   2. 搜索框 (玻璃拟态 · 聚焦发光)
   ============================================================ */
.notes-page-header .search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.notes-page-header .search-box::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    opacity: 0.55;
    pointer-events: none;
    z-index: 1;
    transition: opacity var(--transition, 0.3s);
}

.notes-page-header .search-box input {
    width: 260px;
    padding: 12px 18px 12px 42px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-full, 999px);
    color: var(--text-primary, #e2e8f0);
    font-size: 14px;
    transition: all var(--transition, 0.3s);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.notes-page-header .search-box input:focus {
    outline: none;
    border-color: var(--primary, #6366f1);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18),
                0 0 24px rgba(99, 102, 241, 0.28);
}

.notes-page-header .search-box input:focus + ::before,
.notes-page-header .search-box:focus-within::before {
    opacity: 1;
}

.notes-page-header .search-box input::placeholder {
    color: var(--text-muted, #64748b);
}

/* ============================================================
   3. 按钮 (新建渐变发光 · 次级玻璃)
   ============================================================ */
.notes-page-header .btn-primary,
.empty-state .btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--accent, #06b6d4) 100%);
    border: none;
    border-radius: var(--radius-full, 999px);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition, 0.3s);
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4),
                inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}

.notes-page-header .btn-primary:hover,
.empty-state .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.55),
                0 0 24px rgba(6, 182, 212, 0.35);
}

.notes-page-header .btn-primary:active,
.empty-state .btn-primary:active {
    transform: translateY(0);
}

.notes-page-header .btn-secondary {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-full, 999px);
    color: var(--text-secondary, #94a3b8);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition, 0.3s);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    white-space: nowrap;
}

.notes-page-header .btn-secondary:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--border-glow, rgba(99, 102, 241, 0.4));
    color: var(--primary-light, #a5b4fc);
    transform: translateY(-2px);
}

/* ============================================================
   4. 筛选标签 (彩色 pill)
   ============================================================ */
.notes-filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 9px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-full, 999px);
    color: var(--text-secondary, #94a3b8);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition, 0.3s);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.filter-tab:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--border-glow, rgba(99, 102, 241, 0.4));
    color: var(--primary-light, #a5b4fc);
    transform: translateY(-2px);
}

.filter-tab.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.15));
    border-color: var(--border-glow, rgba(99, 102, 241, 0.4));
    color: var(--text-primary, #e2e8f0);
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.35);
}

.filter-tab .count {
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 8px;
    border-radius: var(--radius-full, 999px);
    font-size: 11px;
    font-weight: 600;
}

.filter-tab.active .count {
    background: var(--primary, #6366f1);
    color: #fff;
}

/* 颜色筛选 pill —— 预留：当筛选栏含颜色标签时自动生效，选中态对应颜色背景 */
.filter-tab.filter-yellow.active { background: rgba(251, 191, 36, 0.22); border-color: rgba(251, 191, 36, 0.5); color: #fde68a; box-shadow: 0 0 18px rgba(251, 191, 36, 0.35); }
.filter-tab.filter-green.active  { background: rgba(52, 211, 153, 0.22); border-color: rgba(52, 211, 153, 0.5); color: #6ee7b7; box-shadow: 0 0 18px rgba(52, 211, 153, 0.35); }
.filter-tab.filter-blue.active   { background: rgba(96, 165, 250, 0.22); border-color: rgba(96, 165, 250, 0.5); color: #93c5fd; box-shadow: 0 0 18px rgba(96, 165, 250, 0.35); }
.filter-tab.filter-pink.active   { background: rgba(244, 114, 182, 0.22); border-color: rgba(244, 114, 182, 0.5); color: #f9a8d4; box-shadow: 0 0 18px rgba(244, 114, 182, 0.35); }
.filter-tab.filter-purple.active { background: rgba(167, 139, 250, 0.22); border-color: rgba(167, 139, 250, 0.5); color: #c4b5fd; box-shadow: 0 0 18px rgba(167, 139, 250, 0.35); }
.filter-tab.filter-orange.active { background: rgba(251, 146, 60, 0.22); border-color: rgba(251, 146, 60, 0.5); color: #fdba74; box-shadow: 0 0 18px rgba(251, 146, 60, 0.35); }

/* ============================================================
   5. 便签网格 (瀑布流 / Masonry)
   ============================================================ */
.notes-grid {
    column-count: auto;
    column-width: 280px;
    column-gap: 20px;
    max-height: min(62vh, 740px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 8px;
}

/* ============================================================
   6. 便签卡片 基础样式
   ============================================================ */
.note-card {
    position: relative;
    box-sizing: border-box;
    display: block;
    width: 100%;
    margin: 0 0 20px 0;
    padding: 18px 20px 16px;
    background: var(--bg-card, rgba(20, 22, 48, 0.6));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-left-width: 4px;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--transition, 0.3s),
                box-shadow var(--transition, 0.3s),
                border-color var(--transition, 0.3s),
                background var(--transition, 0.3s),
                opacity var(--transition, 0.3s);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    /* 瀑布流：禁止卡片被分栏截断 */
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

/* 顶部微光高亮条 (hover 显现) */
.note-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    opacity: 0;
    transition: opacity var(--transition, 0.3s);
}

.note-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5),
                0 0 0 1px var(--border-glow, rgba(99, 102, 241, 0.3));
}

.note-card:hover::before {
    opacity: 1;
}

.note-card.dragging {
    opacity: 0.4;
    transform: scale(0.98) rotate(1.5deg);
    cursor: grabbing;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   7. 多颜色主题 (6 种)
      属性选择器匹配 JS 内联背景值，!important 覆盖浅色内联样式
   ============================================================ */

/* ---- 黄色 · 温暖提醒 (#fbbf24) ---- */
.note-card.note-yellow,
.note-card[style*="FEF3C7" i] {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.04)) !important;
    border-color: rgba(251, 191, 36, 0.18) !important;
    border-left-color: #fbbf24 !important;
    color: #fde68a !important;
}
.note-card.note-yellow:hover,
.note-card[style*="FEF3C7" i]:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.20), rgba(251, 191, 36, 0.08)) !important;
    border-color: rgba(251, 191, 36, 0.45) !important;
    border-left-color: #fbbf24 !important;
    box-shadow: 0 16px 40px -8px rgba(251, 191, 36, 0.4),
                0 0 24px rgba(251, 191, 36, 0.25) !important;
}

/* ---- 绿色 · 完成事项 (#34d399) ---- */
.note-card.note-green,
.note-card[style*="D1FAE5" i] {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(52, 211, 153, 0.04)) !important;
    border-color: rgba(52, 211, 153, 0.18) !important;
    border-left-color: #34d399 !important;
    color: #6ee7b7 !important;
}
.note-card.note-green:hover,
.note-card[style*="D1FAE5" i]:hover {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.20), rgba(52, 211, 153, 0.08)) !important;
    border-color: rgba(52, 211, 153, 0.45) !important;
    border-left-color: #34d399 !important;
    box-shadow: 0 16px 40px -8px rgba(52, 211, 153, 0.4),
                0 0 24px rgba(52, 211, 153, 0.25) !important;
}

/* ---- 蓝色 · 信息记录 (#60a5fa) ---- */
.note-card.note-blue,
.note-card[style*="DBEAFE" i] {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.12), rgba(96, 165, 250, 0.04)) !important;
    border-color: rgba(96, 165, 250, 0.18) !important;
    border-left-color: #60a5fa !important;
    color: #93c5fd !important;
}
.note-card.note-blue:hover,
.note-card[style*="DBEAFE" i]:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.20), rgba(96, 165, 250, 0.08)) !important;
    border-color: rgba(96, 165, 250, 0.45) !important;
    border-left-color: #60a5fa !important;
    box-shadow: 0 16px 40px -8px rgba(96, 165, 250, 0.4),
                0 0 24px rgba(96, 165, 250, 0.25) !important;
}

/* ---- 粉色 · 重要标记 (#f472b6) ---- */
.note-card.note-pink,
.note-card[style*="FCE7F3" i] {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.12), rgba(244, 114, 182, 0.04)) !important;
    border-color: rgba(244, 114, 182, 0.18) !important;
    border-left-color: #f472b6 !important;
    color: #f9a8d4 !important;
}
.note-card.note-pink:hover,
.note-card[style*="FCE7F3" i]:hover {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.20), rgba(244, 114, 182, 0.08)) !important;
    border-color: rgba(244, 114, 182, 0.45) !important;
    border-left-color: #f472b6 !important;
    box-shadow: 0 16px 40px -8px rgba(244, 114, 182, 0.4),
                0 0 24px rgba(244, 114, 182, 0.25) !important;
}

/* ---- 紫色 · 创意灵感 (#a78bfa) ---- */
.note-card.note-purple,
.note-card[style*="EDE9FE" i] {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(167, 139, 250, 0.04)) !important;
    border-color: rgba(167, 139, 250, 0.18) !important;
    border-left-color: #a78bfa !important;
    color: #c4b5fd !important;
}
.note-card.note-purple:hover,
.note-card[style*="EDE9FE" i]:hover {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.20), rgba(167, 139, 250, 0.08)) !important;
    border-color: rgba(167, 139, 250, 0.45) !important;
    border-left-color: #a78bfa !important;
    box-shadow: 0 16px 40px -8px rgba(167, 139, 250, 0.4),
                0 0 24px rgba(167, 139, 250, 0.25) !important;
}

/* ---- 橙色 · 紧急任务 (#fb923c) ---- */
.note-card.note-orange,
.note-card[style*="FFEDD5" i] {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.12), rgba(251, 146, 60, 0.04)) !important;
    border-color: rgba(251, 146, 60, 0.18) !important;
    border-left-color: #fb923c !important;
    color: #fdba74 !important;
}
.note-card.note-orange:hover,
.note-card[style*="FFEDD5" i]:hover {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.20), rgba(251, 146, 60, 0.08)) !important;
    border-color: rgba(251, 146, 60, 0.45) !important;
    border-left-color: #fb923c !important;
    box-shadow: 0 16px 40px -8px rgba(251, 146, 60, 0.4),
                0 0 24px rgba(251, 146, 60, 0.25) !important;
}

/* ============================================================
   8. 归档便签 (半透明降饱和)
   ============================================================ */
.note-card.archived {
    opacity: 0.5;
    filter: saturate(0.6) brightness(0.85);
}

.note-card.archived:hover {
    opacity: 0.78;
    filter: saturate(0.8) brightness(0.95);
}

/* ============================================================
   9. 便签头部 · 颜色选择器 · 操作按钮
   ============================================================ */
.note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    min-height: 26px;
}

.note-color-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* 圆形色块选择器 */
.color-dot {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: all var(--transition, 0.3s);
    position: relative;
}

.color-dot:hover {
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.55);
}

/* 选中态：放大 + 外圈发光 */
.color-dot.active {
    transform: scale(1.18);
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(10, 12, 30, 0.85),
                0 0 0 4px var(--primary, #6366f1),
                0 0 14px var(--primary, #6366f1);
}

.note-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0.55;
    transition: opacity var(--transition, 0.3s);
}

.note-card:hover .note-actions {
    opacity: 1;
}

.note-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: inherit;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition, 0.3s);
}

.note-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.note-btn:active {
    transform: translateY(0) scale(0.94);
}

/* ============================================================
   10. 便签内容 (首行加粗作标题 · 自适应高度)
   ============================================================ */
.note-content {
    font-size: 14px;
    line-height: 1.7;
    color: inherit;
    min-height: 24px;
    padding: 4px 0 12px;
    word-break: break-word;
    white-space: pre-wrap;
    outline: none;
    transition: color var(--transition, 0.3s);
}

/* 首行加粗，营造标题感 */
.note-content::first-line {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.note-content:focus {
    outline: none;
}

/* ============================================================
   11. 便签底部 · 时间戳 · 徽章
   ============================================================ */
.note-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.note-date {
    opacity: 0.85;
}

.note-badge {
    padding: 2px 8px;
    border-radius: var(--radius-full, 999px);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

.note-badge.pinned {
    background: rgba(251, 191, 36, 0.18);
    color: #fde68a;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.note-badge.archived {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ============================================================
   12. 空状态 (大号图标 · 虚线边框区域)
   ============================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 70px 30px;
    margin: 20px auto;
    max-width: 480px;
    text-align: center;
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.empty-state .empty-icon {
    font-size: 72px;
    line-height: 1;
    margin-bottom: 20px;
    opacity: 0.75;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.45));
    animation: notesFloat 3s ease-in-out infinite;
}

@keyframes notesFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state p {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    margin: 0 0 8px 0;
}

.empty-state .empty-hint {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    margin-bottom: 4px;
}

/* ============================================================
   13. 颜色筛选弹窗 (玻璃拟态 Modal)
   ============================================================ */
.notes-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 30, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: notesFadeIn 0.2s ease;
}

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

.notes-modal-content {
    background: rgba(20, 22, 48, 0.88);
    border: 1px solid var(--border-glow, rgba(99, 102, 241, 0.4));
    border-radius: 20px;
    padding: 24px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    animation: notesModalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #e2e8f0);
    margin: 0;
}

.btn-close {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 50%;
    color: var(--text-secondary, #94a3b8);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition, 0.3s);
}

.btn-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    transform: rotate(90deg);
}

/* 颜色筛选网格 */
.color-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.color-filter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 14px;
    color: var(--text-secondary, #94a3b8);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition, 0.3s);
}

.color-filter-item:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: var(--border-glow, rgba(99, 102, 241, 0.4));
    color: var(--text-primary, #e2e8f0);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.color-preview {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   14. 便签编辑器 (新建/编辑时使用)
   ============================================================ */
.note-editor {
    background: var(--bg-card, rgba(20, 22, 48, 0.6));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.note-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.note-editor-title {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    color: var(--text-primary, #e2e8f0);
    font-size: 16px;
    font-weight: 600;
    transition: all var(--transition, 0.3s);
}

.note-editor-title:focus {
    outline: none;
    border-color: var(--primary, #6366f1);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.note-editor textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 200px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    color: var(--text-primary, #e2e8f0);
    font-size: 14px;
    line-height: 1.8;
    resize: vertical;
    font-family: inherit;
    transition: all var(--transition, 0.3s);
}

.note-editor textarea:focus {
    outline: none;
    border-color: var(--primary, #6366f1);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.note-editor-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.note-tags-input {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.note-tags-input input {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 8px;
    color: var(--text-primary, #e2e8f0);
    font-size: 13px;
    width: 150px;
    transition: all var(--transition, 0.3s);
}

.note-tags-input input:focus {
    outline: none;
    border-color: var(--primary, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.editor-btns {
    display: flex;
    gap: 12px;
}

.btn-cancel {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-light, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    color: var(--text-secondary, #94a3b8);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition, 0.3s);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary, #e2e8f0);
}

.btn-save {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--accent, #06b6d4) 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition, 0.3s);
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.55),
                0 0 20px rgba(6, 182, 212, 0.3);
}

/* ============================================================
   15. 标签 (便签内 tag)
   ============================================================ */
.note-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.note-tag {
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-full, 999px);
    font-size: 11px;
    color: var(--primary-light, #a5b4fc);
}

/* ============================================================
   16. 响应式适配
   ============================================================ */
@media (max-width: 768px) {
    .notes-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .notes-page-header .search-box input {
        width: 100%;
    }

    .header-actions {
        justify-content: stretch;
    }

    .header-actions .search-box {
        flex: 1;
    }

    .notes-grid {
        column-width: 100%;
    }

    .color-filter-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .notes-grid {
        column-count: 1;
    }
}

/* ============================================================
   17. 滚动条美化
   ============================================================ */
.notes-grid::-webkit-scrollbar {
    width: 6px;
}

.notes-grid::-webkit-scrollbar-track {
    background: transparent;
}

.notes-grid::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.notes-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}
