/* ============================================================
   🌸 文档小窝 · 2026 少女设计系统
   设计语言：纯色柔粉 · 圆角柔影 · 可爱动态表情 · 精致排版
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Nunito:wght@400;500;600;700&display=swap');

/* ---------- 设计令牌 ---------- */
:root {
    /* 背景 - 纯色，无渐变 */
    --bg-base: #FFF5F9;
    --bg-soft: #FFFBFD;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-solid: #FFFFFF;

    /* 主色 - 柔粉薰衣草（纯色） */
    --pink: #F8A5C2;
    --pink-soft: #FFE0EC;
    --pink-deep: #E888B0;
    --lavender: #B5A8E8;
    --lavender-soft: #E8E0FB;
    --mint: #B5EAD7;
    --mint-deep: #7FD8BE;
    --peach: #FFD49E;

    /* 文字 */
    --text-1: #6B5A7E;      /* 主文字 - 深薰衣草 */
    --text-2: #9B8AAD;     /* 次要文字 */
    --text-3: #C4B8D4;     /* 弱化文字 */
    --text-on-accent: #FFFFFF;

    /* 边框与阴影 */
    --border: rgba(184, 158, 213, 0.18);
    --border-strong: rgba(184, 158, 213, 0.32);
    --shadow-xs: 0 1px 3px rgba(184, 158, 213, 0.06);
    --shadow-sm: 0 2px 10px rgba(184, 158, 213, 0.08);
    --shadow-md: 0 6px 24px rgba(184, 158, 213, 0.10);
    --shadow-lg: 0 12px 40px rgba(232, 136, 176, 0.16);
    --shadow-glow: 0 8px 30px rgba(248, 165, 194, 0.22);

    /* 圆角 */
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --r-xl: 28px;
    --r-full: 999px;

    /* 纯色块（替代渐变） */
    --solid-sidebar: #FFE5F0;
    --solid-accent: #F8A5C2;
    --solid-accent-soft: #FFF0F6;
    --solid-mint: #B5EAD7;

    /* 缓动 */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- 重置 ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: 'Nunito', 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
    color: var(--text-1);
    line-height: 1.65;
    min-height: 100vh;
    background: var(--bg-base);
    overflow-x: hidden;
    position: relative;
}

/* ---------- 可爱漂浮表情背景装饰 ---------- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(255, 196, 214, 0.35) 0%, transparent 22%),
        radial-gradient(circle at 88% 72%, rgba(196, 167, 235, 0.30) 0%, transparent 24%),
        radial-gradient(circle at 55% 90%, rgba(181, 234, 215, 0.22) 0%, transparent 26%);
    z-index: -2;
    pointer-events: none;
}

/* 漂浮的小表情装饰层 */
body::after {
    content: '🌸  ✿  ♡  🎀  ✿  🌷  ♡  🌸  ✿  🎀';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 22px;
    color: rgba(248, 165, 194, 0.16);
    letter-spacing: 80px;
    line-height: 200px;
    z-index: -1;
    pointer-events: none;
    animation: floatEmojis 40s linear infinite;
    white-space: nowrap;
    overflow: hidden;
}

@keyframes floatEmojis {
    0%   { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-200px) rotate(8deg); }
}

/* ---------- 布局 ---------- */
.container {
    display: flex;
    min-height: 100vh;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
    width: 268px;
    flex-shrink: 0;
    background: var(--solid-sidebar);
    padding: 28px 20px;
    overflow-y: auto;
    position: relative;
    box-shadow: 4px 0 30px rgba(196, 167, 235, 0.18);
    z-index: 10;
}

.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.25);
    pointer-events: none;
}

.sidebar > * { position: relative; }

.sidebar h2 {
    font-family: 'Quicksand', sans-serif;
    font-size: 21px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: 0.5px;
    padding-bottom: 22px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(184, 158, 213, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar h2 .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    font-size: 18px;
}

/* 侧边栏分区 */
.sidebar-section { margin-bottom: 26px; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 0 4px;
}

.section-header h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-2);
}

.add-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-2);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--ease);
    backdrop-filter: blur(6px);
}

.add-btn:hover {
    background: var(--pink-soft);
    color: var(--pink-deep);
    transform: rotate(90deg) scale(1.12);
}

.add-input {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-1);
    font-size: 13px;
    font-family: inherit;
    margin-bottom: 12px;
    outline: none;
    box-shadow: 0 4px 14px rgba(150, 100, 180, 0.18);
}

.add-input:focus { background: #fff; }

.add-input.hidden { display: none; }

/* 分类/标签列表 */
.category-list, .tag-list { list-style: none; }

.category-list li, .tag-list li {
    position: relative;
    padding: 11px 36px 11px 16px;
    margin: 4px 0;
    cursor: pointer;
    border-radius: var(--r-full);
    transition: all 0.28s var(--ease);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: var(--text-1);
    font-size: 14px;
    font-weight: 500;
}

.category-list li .item-name,
.tag-list li .item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-list li:hover, .tag-list li:hover {
    background: rgba(255, 255, 255, 0.75);
    transform: translateX(4px);
    box-shadow: 0 4px 14px rgba(150, 100, 180, 0.2);
}

.category-list li.active, .tag-list li.active {
    background: #fff;
    color: var(--pink-deep);
    font-weight: 700;
    border-color: var(--pink-soft);
}

.count {
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-2);
    padding: 2px 10px;
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
}

.category-list li.active .count,
.tag-list li.active .count {
    background: var(--pink-deep);
    color: #fff;
}

.item-delete {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    color: var(--pink-deep);
    font-size: 13px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease);
    line-height: 1;
}

.category-list li:hover .item-delete,
.tag-list li:hover .item-delete { display: flex; }

.item-delete:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
    color: #E85A8A;
}

/* ---------- 主内容区 ---------- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* 顶部栏 */
.header {
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 22px 36px;
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header h1 {
    font-family: 'Quicksand', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

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

/* 搜索栏 */
.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--r-full);
    padding: 6px 6px 6px 18px;
    border: 1.5px solid var(--border);
    transition: all 0.3s var(--ease);
    flex: 1;
    max-width: 420px;
}

.search-bar:focus-within {
    border-color: var(--pink);
    background: #fff;
    box-shadow: var(--shadow-glow);
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 4px;
    font-size: 14px;
    background: transparent;
    color: var(--text-1);
    font-family: inherit;
}

.search-bar input::placeholder { color: var(--text-3); }

.search-bar button {
    background: var(--solid-accent);
    border: none;
    border-radius: var(--r-full);
    padding: 9px 18px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s var(--ease);
}

.search-bar button:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow-glow);
}

/* ---------- 按钮 ---------- */
.btn {
    padding: 11px 22px;
    border-radius: var(--r-full);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s var(--ease);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--solid-accent);
    color: var(--text-on-accent);
    box-shadow: 0 4px 16px rgba(248, 165, 194, 0.36);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-1);
    border: 1.5px solid var(--border-strong);
}

.btn-secondary:hover {
    background: #fff;
    border-color: var(--lavender);
    color: var(--lavender);
}

.btn-danger {
    background: #F06B96;
    color: #fff;
    box-shadow: 0 4px 14px rgba(232, 90, 138, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 90, 138, 0.4);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: var(--r-full);
}

/* ---------- 文档表格布局 ---------- */
.table-wrap {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow-x: auto;
    animation: gridIn 0.5s var(--ease);
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

.doc-table thead th {
    font-family: 'Quicksand', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-2);
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1.5px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.doc-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.25s var(--ease);
    cursor: pointer;
}

.doc-table tbody tr:hover {
    background: var(--solid-accent-soft);
}

.doc-table tbody tr:last-child {
    border-bottom: none;
}

.doc-table td {
    padding: 14px 18px;
    vertical-align: middle;
    font-size: 13px;
    color: var(--text-1);
}

/* 文件名称列：徽章+标题+文件名 */
.name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.doc-table .file-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0;
    font-size: 10px;
    border-radius: var(--r-sm);
    flex-shrink: 0;
}

.name-info {
    min-width: 0;
    flex: 1;
}

.doc-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

.doc-filename {
    font-size: 11px;
    color: var(--text-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
    margin-top: 2px;
}

/* 列宽 */
.col-cat { width: 110px; }
.col-tags { width: 160px; }
.col-note { width: 180px; }
.col-size { width: 88px; white-space: nowrap; }
.col-time { width: 120px; white-space: nowrap; }
.col-actions { width: 180px; text-align: right; }

/* 备注文字 */
.note-text {
    font-size: 12px;
    color: var(--text-2);
    display: block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 大小 / 时间文字 */
.size-text, .time-text {
    font-size: 12px;
    color: var(--text-2);
    font-weight: 500;
    white-space: nowrap;
}

.time-text {
    color: var(--text-2);
    font-family: 'Quicksand', sans-serif;
    font-size: 12px;
}

/* 标签列 */
.doc-table .tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.doc-table .tag {
    background: var(--solid-accent-soft);
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 600;
    color: var(--pink-deep);
    border: 1px solid var(--border);
}

.muted { color: var(--text-3); }

/* 行内操作按钮 */
.row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* ---------- 批量操作栏 ---------- */
.batch-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.batch-check-all {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    user-select: none;
}

.batch-check-all input,
.row-check {
    width: 18px;
    height: 18px;
    accent-color: var(--pink-deep);
    cursor: pointer;
}

.batch-info {
    flex: 1;
    font-size: 13px;
    color: var(--text-2);
    min-width: 160px;
}

.batch-actions {
    display: flex;
    gap: 8px;
}

.batch-actions .btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* 复选框列 */
.col-check {
    width: 48px;
    text-align: center;
}

.doc-table .col-check input {
    margin: 0;
}

.doc-table thead .col-check {
    background: transparent;
}

/* 选中行高亮 */
.doc-row:has(.row-check:checked) {
    background: var(--solid-accent-soft) !important;
}

/* ---------- 内容区 ---------- */
.content {
    padding: 32px 36px;
    overflow-y: auto;
    flex: 1;
}

/* 文件网格 */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    animation: gridIn 0.5s var(--ease);
}

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

/* 文件卡片 */
.file-card {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.35s var(--ease);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
}

.file-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--solid-accent);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.file-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.9);
}

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

/* 文件类型徽章 */
.file-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--r-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(150, 100, 180, 0.2);
}

.file-icon.pdf     { background: #F8A5C2; }
.file-icon.word    { background: #B5A8E8; }
.file-icon.excel   { background: #7FD8BE; }
.file-icon.text    { background: #FFD49E; }
.file-icon.image   { background: #F9C6D1; }
.file-icon.slide   { background: #FFB7A0; }
.file-icon.archive { background: #C9A7EB; }
.file-icon.audio   { background: #A6D8F0; }
.file-icon.video   { background: #F5A3B7; }
.file-icon.website { background: #B5A8E8; color: #fff; font-weight: 700; }
.doc-row.is-website .doc-title::before {
    content: '🌐 ';
    margin-right: 4px;
}
.file-icon.code    { background: #9BA8E8; }
.file-icon.default { background: #C9A7EB; }

/* 卡片信息 */
.file-card .file-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    color: var(--text-1);
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-card .file-meta {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 16px;
    display: flex;
    gap: 6px 12px;
    flex-wrap: wrap;
    align-items: center;
}

.file-card .file-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.file-card .tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.file-card .tag {
    background: var(--solid-accent-soft);
    padding: 4px 12px;
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 600;
    color: var(--pink-deep);
    border: 1px solid var(--border);
}

/* 卡片操作按钮 */
.file-card .actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.3s var(--ease);
}

.file-card:hover .actions {
    opacity: 1;
    transform: translateY(0);
}

.file-card .action-btn,
.file-card .actions .btn {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.file-card .actions .btn:hover {
    transform: scale(1.08);
}

.file-card .actions .btn-danger {
    background: #F06B96;
    color: #fff;
    border-color: transparent;
}

/* ---------- 加载与空状态 ---------- */
.loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-2);
    font-size: 15px;
    font-weight: 500;
}

.loading::after {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    margin: 18px auto 0;
    border: 3px solid var(--pink-soft);
    border-top-color: var(--pink);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.empty-state {
    text-align: center;
    padding: 70px 30px;
    background: var(--surface);
    backdrop-filter: blur(16px);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    max-width: 460px;
    margin: 40px auto;
}

.empty-state .icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: var(--solid-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.empty-state h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 20px;
    color: var(--text-1);
    margin-bottom: 8px;
    font-weight: 700;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 22px;
}

.empty-state.error {
    border-color: rgba(232, 90, 138, 0.3);
}

.empty-state.error .icon {
    background: rgba(232, 90, 138, 0.12);
}

/* ---------- 分页 ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 36px;
    padding: 16px;
}

.pagination button {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    padding: 10px 22px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    font-family: inherit;
}

.pagination button:hover:not(:disabled) {
    background: #fff;
    border-color: var(--pink);
    color: var(--pink-deep);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
}

/* ---------- 上传区 ---------- */
.upload-zone {
    border: 2px dashed var(--border-strong);
    border-radius: var(--r-xl);
    padding: 56px 30px;
    text-align: center;
    background: var(--surface);
    backdrop-filter: blur(14px);
    cursor: pointer;
    transition: all 0.3s var(--ease);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--pink);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-md);
}

.upload-zone.drag-over {
    border-color: var(--pink);
    background: var(--solid-accent-soft);
    transform: scale(1.01);
}

.upload-zone .upload-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: var(--r-lg);
    background: var(--solid-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.upload-zone h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 19px;
    color: var(--text-1);
    margin-bottom: 8px;
    font-weight: 700;
}

.upload-zone p {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 4px;
}

.upload-zone p.hint {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 12px;
}

/* 已选文件卡片 */
.selected-file {
    background: var(--solid-accent-soft);
    padding: 18px 22px;
    border-radius: var(--r-md);
    margin-bottom: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.selected-file p {
    margin: 5px 0;
    font-size: 14px;
    color: var(--text-1);
}

.selected-file strong {
    color: var(--pink-deep);
    font-weight: 700;
}

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 22px; }

.form-group label {
    display: block;
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 18px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-md);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s var(--ease);
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-1);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--pink);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(248, 165, 194, 0.12);
}

/* 标签输入容器 */
.tag-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.8);
    min-height: 50px;
    align-items: center;
    transition: all 0.3s var(--ease);
}

.tag-input-container:focus-within {
    border-color: var(--pink);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(248, 165, 194, 0.12);
}

.tag-input-container .tag {
    background: var(--solid-accent);
    color: #fff;
    padding: 5px 8px 5px 14px;
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: tagPop 0.3s var(--ease-bounce);
}

@keyframes tagPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.tag-input-container .tag button {
    background: rgba(255, 255, 255, 0.35);
    border: none;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease);
}

.tag-input-container .tag button:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.15);
}

.tag-input-container input {
    flex: 1;
    min-width: 130px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-1);
    font-family: inherit;
    padding: 5px 0;
}

.tag-input-container input::placeholder { color: var(--text-3); }

.existing-tags-container { margin-top: 14px; }

.existing-tags-container h4 {
    font-family: 'Quicksand', sans-serif;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tag-option {
    display: inline-block;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 14px;
    margin: 3px;
    border-radius: var(--r-full);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    border: 1px solid var(--border);
    transition: all 0.3s var(--ease);
}

.tag-option:hover {
    background: var(--solid-accent);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xs);
}

/* ---------- 详情页 ---------- */
.detail-container {
    max-width: 860px;
    margin: 0 auto;
    animation: gridIn 0.5s var(--ease);
}

.detail-header {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: var(--r-xl);
    padding: 36px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.detail-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: #F8A5C2;
    background-size: 200% 100%;
    animation: shimmer 5s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.detail-header .icon {
    width: 72px;
    height: 72px;
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin: 0 auto 22px;
    box-shadow: var(--shadow-md);
}

.detail-header .meta {
    background: var(--solid-accent-soft);
    border-radius: var(--r-md);
    padding: 22px 26px;
}

.detail-header .meta p {
    margin: 9px 0;
    font-size: 14px;
    color: var(--text-1);
    display: flex;
    gap: 8px;
}

.detail-header .meta strong {
    color: var(--text-2);
    font-weight: 700;
    min-width: 84px;
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
}

.detail-header .tags {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-header .tags .tag {
    background: var(--solid-accent);
    color: #fff;
    padding: 6px 16px;
    border-radius: var(--r-full);
    font-size: 12px;
    font-weight: 600;
}

.detail-content {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-radius: var(--r-xl);
    padding: 32px 36px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.detail-content h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 18px;
    color: var(--text-1);
    margin-bottom: 18px;
    font-weight: 700;
    padding-bottom: 14px;
    border-bottom: 2px dashed var(--border-strong);
}

.content-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.85;
    color: var(--text-1);
    font-size: 14px;
    background: var(--solid-accent-soft);
    padding: 22px 26px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
}

.content-text mark {
    background: var(--solid-accent);
    color: #fff;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
}

/* ---------- 搜索信息条 ---------- */
.search-info {
    background: var(--surface);
    backdrop-filter: blur(14px);
    padding: 16px 24px;
    margin-bottom: 24px;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-2);
    box-shadow: var(--shadow-xs);
}

.search-info strong {
    color: var(--pink-deep);
    font-weight: 700;
}

.snippet {
    background: var(--solid-accent-soft);
    padding: 14px 18px;
    margin-top: 14px;
    border-radius: var(--r-md);
    font-size: 13px;
    color: var(--text-2);
    border: 1px solid var(--border);
    line-height: 1.7;
}

.snippet mark {
    background: var(--solid-accent);
    color: #fff;
    padding: 1px 5px;
    border-radius: 5px;
    font-weight: 600;
}

/* ---------- 消息提示 ---------- */
.message {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--r-full);
    background: #fff;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: msgIn 0.35s var(--ease-bounce), msgOut 0.3s var(--ease) 2.4s forwards;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.message.success {
    background: var(--solid-mint);
    color: #fff;
    border-color: transparent;
}

.message.error {
    background: #F06B96;
    color: #fff;
    border-color: transparent;
}

@keyframes msgIn {
    from { transform: translateX(120px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes msgOut {
    to { transform: translateX(120px); opacity: 0; }
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--pink-soft);
    border-radius: var(--r-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--pink);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   弹窗系统（查看 / 编辑）
   ============================================================ */

/* 遮罩 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(92, 74, 107, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 弹窗主体 */
.modal {
    background: var(--bg-soft);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-strong);
    width: 100%;
    max-width: 720px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.94) translateY(12px);
    transition: transform 0.35s var(--ease-bounce);
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

.modal.modal-lg { max-width: 920px; }

/* 弹窗头部 */
.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 26px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(14px);
    flex-shrink: 0;
}

.modal-header h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-1);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 55%;
    min-width: 0;
}

.modal-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-2);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease);
    flex-shrink: 0;
    line-height: 1;
    margin-left: auto;
}

.modal-close:hover {
    background: var(--pink-soft);
    color: var(--pink-deep);
    transform: rotate(90deg);
}

/* 弹窗内容区 */
.modal-body {
    padding: 26px;
    overflow-y: auto;
    flex: 1;
}

/* 预览页内搜索栏 */
.preview-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border);
    flex-wrap: nowrap;
}

.preview-search-bar input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--r-full);
    padding: 7px 14px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    color: var(--text-1);
    background: var(--bg-base);
}

.preview-search-bar input:focus {
    border-color: var(--pink);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(248, 165, 194, 0.15);
}

.preview-search-bar .search-count {
    font-size: 12px;
    color: var(--text-2);
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    min-width: 56px;
    text-align: center;
    user-select: none;
}

.preview-search-bar .btn-sm {
    padding: 6px 10px;
    min-width: 32px;
    font-size: 12px;
}

/* 标题后的外部预览提示 */
.preview-header-tip {
    display: none;
    align-items: center;
    margin-left: 10px;
    padding: 4px 12px;
    font-size: 11px;
    color: #E888B0;
    background: rgba(255, 224, 236, 0.8);
    border-radius: var(--r-full);
    font-weight: 600;
    border: 1px solid rgba(248, 165, 194, 0.3);
    flex-shrink: 0;
    animation: tipFadeIn 0.3s var(--ease);
}

@keyframes tipFadeIn {
    from { opacity: 0; transform: translateX(-4px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 搜索高亮 */
mark.preview-highlight {
    background: #FFF3B0;
    color: inherit;
    border-radius: 3px;
    padding: 0 2px;
    box-shadow: 0 0 0 1px rgba(232, 136, 176, 0.2);
}

mark.preview-highlight.current {
    background: #FFB7A0;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 0 2px var(--pink-deep);
}

/* ---------- 猫咪桌宠（动漫风格） ---------- */
#follow-cat {
    position: fixed;
    width: 64px;
    height: 64px;
    pointer-events: none;
    z-index: 9999;
    will-change: left, top, transform;
    filter: drop-shadow(0 4px 12px rgba(248, 165, 194, 0.4));
    transition: transform 0.15s var(--ease);
}

#follow-cat.face-left {
    transform: scaleX(-1);
}

.cat-svg-wrap {
    width: 100%;
    height: 100%;
}

.cat-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* 尾巴摆动 */
.cat-tail {
    transform-origin: 48px 38px;
    animation: catTailSwing 1.2s ease-in-out infinite;
}

.cat-tail-curl {
    transform-origin: 48px 46px;
    animation: catTailSleep 3.5s ease-in-out infinite;
}

@keyframes catTailSwing {
    0%, 100% { transform: rotate(-6deg); }
    50% { transform: rotate(10deg); }
}

@keyframes catTailSleep {
    0%, 100% { transform: rotate(-15deg); }
    50% { transform: rotate(-8deg); }
}

/* 走路时身体上下抖动 */
.cat-bob {
    animation: catWalkBob 0.36s ease-in-out infinite;
}

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

/* 走路时腿交替摆动 */
.cat-bob .leg-a {
    animation: legSwingA 0.36s ease-in-out infinite;
    transform-origin: center top;
}

.cat-bob .leg-b {
    animation: legSwingB 0.36s ease-in-out infinite;
    transform-origin: center top;
}

@keyframes legSwingA {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(3px) rotate(8deg); }
}

@keyframes legSwingB {
    0%, 100% { transform: translateY(3px) rotate(-8deg); }
    50% { transform: translateY(0) rotate(0deg); }
}

/* 呼吸动画（睡觉/坐着时身体微微起伏） */
.cat-breathe .cat-svg {
    animation: catBreathe 3s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes catBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04, 1.06); }
}

/* 睡觉时多个 Zzz 飘动 */
.zzz {
    fill: #9B8AAD;
    font-family: 'Quicksand', sans-serif;
}

.zzz-1 {
    animation: zzzFloat 2.5s ease-in-out infinite;
    transform-origin: 42px 12px;
}

.zzz-2 {
    animation: zzzFloat 2.5s ease-in-out infinite 0.8s;
    transform-origin: 48px 8px;
}

.zzz-3 {
    animation: zzzFloat 2.5s ease-in-out infinite 1.6s;
    transform-origin: 54px 4px;
}

@keyframes zzzFloat {
    0% { opacity: 0; transform: translate(0, 4px) scale(0.6); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translate(6px, -8px) scale(1.2); }
}

/* 猫窝（圆形篮子） */
#cat-bed {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    animation: bedBreathe 5s ease-in-out infinite;
}

.cat-bed-svg {
    filter: drop-shadow(0 8px 16px rgba(216, 139, 176, 0.3));
}

@keyframes bedBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* 移动端隐藏 */
@media (max-width: 768px) {
    #follow-cat, #cat-bed { display: none; }
}

.modal-footer {
    padding: 16px 26px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    backdrop-filter: blur(14px);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* ============================================================
   🌸 少女感动效系统
   ============================================================ */

/* ---------- 花瓣飘落装饰 ---------- */
.petal-deco {
    position: fixed;
    top: -30px;
    pointer-events: none;
    z-index: -1;
    color: var(--pink-soft);
    font-size: 20px;
    animation: petalFall 14s linear infinite;
    opacity: 0;
}

@keyframes petalFall {
    0% { transform: translateY(-30px) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

.petal-deco:nth-child(1) { left: 8%; animation-delay: 0s; }
.petal-deco:nth-child(2) { left: 22%; animation-delay: 3s; content: '🌸'; }
.petal-deco:nth-child(3) { left: 40%; animation-delay: 6s; }
.petal-deco:nth-child(4) { left: 58%; animation-delay: 9s; content: '🌸'; }
.petal-deco:nth-child(5) { left: 75%; animation-delay: 4s; }
.petal-deco:nth-child(6) { left: 92%; animation-delay: 11s; content: '🌸'; }

/* ---------- 元素淡入动画 ---------- */
.doc-table tbody tr {
    animation: rowFadeIn 0.4s var(--ease) backwards;
}

.doc-table tbody tr:nth-child(1) { animation-delay: 0.02s; }
.doc-table tbody tr:nth-child(2) { animation-delay: 0.06s; }
.doc-table tbody tr:nth-child(3) { animation-delay: 0.1s; }
.doc-table tbody tr:nth-child(4) { animation-delay: 0.14s; }
.doc-table tbody tr:nth-child(5) { animation-delay: 0.18s; }
.doc-table tbody tr:nth-child(6) { animation-delay: 0.22s; }
.doc-table tbody tr:nth-child(7) { animation-delay: 0.26s; }
.doc-table tbody tr:nth-child(8) { animation-delay: 0.3s; }
.doc-table tbody tr:nth-child(9) { animation-delay: 0.34s; }
.doc-table tbody tr:nth-child(10) { animation-delay: 0.38s; }

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

/* ---------- 侧边栏分类项可爱动画 ---------- */
.category-list li:hover,
.tag-list li:hover {
    transform: translateX(6px) scale(1.02);
}

.category-list li.active,
.tag-list li.active {
    animation: activePulse 2.4s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(248, 165, 194, 0.25); }
    50% { box-shadow: 0 6px 20px rgba(248, 165, 194, 0.5); }
}

/* ---------- 标题装饰 ---------- */
.sidebar h2 .brand-mark {
    animation: brandWiggle 4s ease-in-out infinite;
}

@keyframes brandWiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

/* ---------- 按钮按下效果 ---------- */
.btn:active:not(:disabled) {
    transform: scale(0.94);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

/* ---------- 头部 logo 心跳 ---------- */
.header h1::before {
    content: '🌸';
    display: inline-block;
    margin-right: 8px;
    animation: heartbeat 1.6s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    20% { transform: scale(1.15); }
    40% { transform: scale(1); }
}

/* ---------- 空状态表情动画 ---------- */
.empty-state .icon {
    animation: floatY 3s ease-in-out infinite;
}

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

/* ---------- 弹窗淡入 ---------- */
.modal-overlay.show .modal {
    animation: modalIn 0.35s var(--ease-bounce);
}

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

/* ---------- 标签悬停动画 ---------- */
.tag {
    transition: all 0.25s var(--ease);
}

.tag:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 4px 12px rgba(248, 165, 194, 0.4);
}

/* ---------- 加载文字动画 ---------- */
.loading {
    position: relative;
}

.loading::after {
    content: '🌸';
    display: inline-block;
    margin-left: 6px;
    animation: spin 1.2s linear infinite;
}

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

/* ---------- 上传区域 hover ---------- */
.upload-zone:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 30px rgba(248, 165, 194, 0.3);
}

/* ---------- 全屏 iframe 样式 ---------- */
.preview-frame-wrap iframe:fullscreen,
.modal-body iframe:fullscreen {
    width: 100vw;
    height: 100vh;
    background: #fff;
}

/* 预览 iframe 容器 */
.preview-frame-wrap {
    background: #fff;
    border-radius: var(--r-md);
    overflow: hidden;
    height: 68vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.preview-fallback {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-2);
}

.preview-fallback .icon {
    font-size: 48px;
    margin-bottom: 14px;
}

.preview-fallback p {
    margin-bottom: 16px;
    font-size: 14px;
}

/* 编辑表单 */
.edit-form .form-group { margin-bottom: 20px; }

.edit-form label {
    display: block;
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.edit-form input,
.edit-form select,
.edit-form textarea {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-md);
    font-size: 14px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-1);
    transition: all 0.3s var(--ease);
}

.edit-form input:focus,
.edit-form select:focus,
.edit-form textarea:focus {
    outline: none;
    border-color: var(--pink);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(248, 165, 194, 0.12);
}

.edit-form textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* 手机端弹窗适配 */
@media (max-width: 900px) {
    .modal-overlay { padding: 12px; }
    .modal { max-height: 92vh; border-radius: var(--r-lg); }
    .modal-header { padding: 16px 18px; }
    .modal-header h3 { font-size: 16px; }
    .modal-body { padding: 18px; }
    .modal-footer { padding: 14px 18px; }
    .preview-frame-wrap { height: 60vh; }
}

/* ---------- 响应式 ---------- */
/* 手机端汉堡菜单按钮（默认隐藏，手机端显示） */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: var(--r-md);
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 30;
    transition: all 0.3s var(--ease);
}

.menu-toggle:hover {
    background: #fff;
    border-color: var(--pink);
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-1);
    border-radius: 2px;
    position: relative;
    transition: all 0.3s var(--ease);
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--text-1);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

/* 激活时变 × */
.menu-toggle.active span { background: transparent; }
.menu-toggle.active span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.active span::after { top: 0; transform: rotate(-45deg); }

/* 遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(92, 74, 107, 0.4);
    backdrop-filter: blur(2px);
    z-index: 25;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ---------- 手机端 (< 900px) ---------- */
@media (max-width: 900px) {
    .container { flex-direction: column; }

    /* 汉堡按钮显示 */
    .menu-toggle { display: flex !important; }

    /* 侧边栏默认收起，滑出式 */
    .sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%) !important;
        transition: transform 0.35s var(--ease);
        z-index: 100;
        padding-top: 60px;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0) !important;
        box-shadow: 4px 0 40px rgba(0, 0, 0, 0.25);
    }

    .header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .header h1 {
        font-size: 17px;
        flex: 1;
        min-width: 0;
        order: 2;
    }

    /* 搜索栏独占一行 */
    .search-bar {
        max-width: none;
        order: 4;
        flex-basis: 100%;
    }

    .content { padding: 20px 12px; }

    /* 表格横向滚动 */
    .table-wrap { border-radius: var(--r-md); }

    .detail-header, .detail-content {
        padding: 22px 18px;
        border-radius: var(--r-lg);
    }

    .detail-header .meta strong { min-width: 70px; }

    .upload-container { padding: 18px; }

    .upload-zone { padding: 36px 20px; }

    .header-actions { order: 3; }
}

/* ---------- 超小屏 (< 480px) ---------- */
@media (max-width: 480px) {
    .header { padding: 12px; gap: 10px; }
    .header h1 { font-size: 15px; }
    .btn { padding: 9px 16px; font-size: 13px; }
    .btn-sm { padding: 6px 10px; font-size: 11px; }
    .empty-state { padding: 50px 20px; margin: 20px auto; }
    .empty-state .icon { width: 64px; height: 64px; font-size: 28px; }
    /* 表格行内操作按钮更紧凑 */
    .row-actions { flex-wrap: wrap; }
    .name-cell { min-width: 160px; }
}
