/* ========== CSS 变量 ========== */
:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --primary-bg: #EEF2FF;

    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --surface-hover: #F1F5F9;
    --surface-2: #F8FAFC;
    --border: #E2E8F0;
    --border-dark: #CBD5E1;

    --text: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;

    --sidebar-bg: #1E1B4B;
    --sidebar-text: #C7D2FE;
    --sidebar-active: #4F46E5;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    --sidebar-width: 240px;
    --sidebar-collapsed: 64px;
    --topbar-height: 60px;
}

/* ========== Reset ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; }
textarea { resize: vertical; }

/* ========== 布局 ========== */
#app { display: flex; height: 100vh; overflow: hidden; }

/* ========== 侧边栏 ========== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    flex-shrink: 0;
    z-index: 100;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-group-title,
.sidebar.collapsed .status-text { display: none; }

.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    width: 32px; height: 32px; background: var(--primary);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: white;
}
.logo-text { font-size: 18px; font-weight: 600; color: white; }
.sidebar-toggle { color: var(--sidebar-text); opacity: 0.6; }
.sidebar-toggle:hover { opacity: 1; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 8px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.nav-group-title {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
    color: rgba(199,210,254,0.4); padding: 12px 12px 6px; font-weight: 600;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 8px; cursor: pointer;
    transition: all 0.2s; margin-bottom: 2px; color: var(--sidebar-text);
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active { background: var(--sidebar-active); color: white; }
.nav-item svg { flex-shrink: 0; opacity: 0.8; }
.nav-text { font-size: 13px; font-weight: 500; }

.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.status-badge { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }

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

/* ========== 顶栏 ========== */
.topbar {
    height: var(--topbar-height); background: var(--surface);
    border-bottom: 1px solid var(--border); display: flex;
    align-items: center; justify-content: space-between;
    padding: 0 24px; flex-shrink: 0;
}
.topbar-left { display: flex; align-items: baseline; gap: 12px; }
.page-title { font-size: 18px; font-weight: 600; }
.breadcrumb { font-size: 13px; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 12px; width: 240px;
}
.search-box svg { color: var(--text-muted); }
.search-box input { border: none; background: none; width: 100%; font-size: 13px; }
.icon-btn {
    position: relative; width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); transition: all 0.2s;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.badge {
    position: absolute; top: 4px; right: 4px;
    min-width: 16px; height: 16px; background: var(--danger);
    color: white; border-radius: 8px; font-size: 10px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ========== 页面内容 ========== */
.page-content { flex: 1; overflow-y: auto; padding: 24px; }

/* ========== 卡片 ========== */
.card {
    background: var(--surface); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    padding: 20px; transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow); }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.card-desc { font-size: 13px; color: var(--text-secondary); }

/* ========== 统计卡片 ========== */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.stat-card {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 20px;
    display: flex; align-items: center; gap: 16px;
}
.stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.stat-info { flex: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.stat-value { font-size: 24px; font-weight: 700; }

/* ========== 模块网格 ========== */
.module-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px;
}
.module-card {
    background: var(--surface); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 24px 20px;
    cursor: pointer; transition: all 0.2s; text-align: center;
}
.module-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow); transform: translateY(-2px); }
.module-icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 26px;
}
.module-card .card-title { font-size: 14px; margin-bottom: 6px; }
.module-card .card-desc { font-size: 12px; line-height: 1.5; }

/* ========== 表格 ========== */
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left; font-size: 12px; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.table tr:hover td { background: var(--surface-hover); }

/* ========== 状态标签 ========== */
.tag {
    display: inline-flex; align-items: center; padding: 2px 10px;
    border-radius: 6px; font-size: 12px; font-weight: 500;
}
.tag-success { background: #D1FAE5; color: #065F46; }
.tag-warning { background: #FEF3C7; color: #92400E; }
.tag-danger { background: #FEE2E2; color: #991B1B; }
.tag-info { background: #DBEAFE; color: #1E40AF; }
.tag-neutral { background: #F1F5F9; color: #475569; }

/* ========== 进度条 ========== */
.progress-bar {
    height: 6px; background: var(--border); border-radius: 3px;
    overflow: hidden; width: 100px;
}
.progress-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.3s; }

/* ========== 按钮 ========== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; transition: all 0.2s;
    border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-hover); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #DC2626; }
.btn-ghost { color: var(--text-secondary); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* ========== 抽屉 ========== */
.drawer-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.3);
    opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 200;
}
.drawer-overlay.active { opacity: 1; pointer-events: auto; }
.drawer {
    position: fixed; top: 0; right: 0; width: 400px; height: 100%;
    background: var(--surface); box-shadow: -4px 0 24px rgba(0,0,0,0.1);
    transform: translateX(100%); transition: transform 0.3s; z-index: 201;
    display: flex; flex-direction: column;
}
.drawer.active { transform: translateX(0); }
.drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; }

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }
.empty-state-text { font-size: 14px; }

/* ========== 页面标题区 ========== */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}

/* ========== 行布局 ========== */
.row { display: flex; gap: 16px; }
.col { flex: 1; }
.row-gap-sm { gap: 8px; }
.row-gap-lg { gap: 24px; }

/* ========== 构建中提示 ========== */
.placeholder-page { text-align: center; padding: 80px 20px; }
.placeholder-icon {
    width: 80px; height: 80px; margin: 0 auto 24px;
    border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 36px;
}
.placeholder-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.placeholder-desc { font-size: 14px; color: var(--text-secondary); max-width: 400px; margin: 0 auto 24px; }
.placeholder-features {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center; max-width: 600px; margin: 0 auto;
}
.feature-chip {
    background: var(--primary-bg); color: var(--primary-dark);
    padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 500;
}

/* ===================================================== */
/* ========== 表单控件 ========== */
/* ===================================================== */

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 14px; color: var(--text);
    background: var(--surface); transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.form-textarea { min-height: 120px; line-height: 1.6; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }

/* Input with icon */
.input-group { position: relative; }
.input-group .form-input { padding-left: 36px; }
.input-group .input-icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 16px;
}

/* Select */
.form-select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    padding-right: 32px;
}

/* Checkbox & Radio */
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"], .form-check input[type="radio"] {
    width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer;
}
.form-check label { font-size: 13px; cursor: pointer; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--border-dark); border-radius: 12px; transition: 0.3s;
}
.toggle-slider::before {
    content: ""; position: absolute; height: 18px; width: 18px;
    left: 3px; top: 3px; background: white; border-radius: 50%; transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Range slider */
.range-group { display: flex; align-items: center; gap: 12px; }
.range-group input[type="range"] {
    flex: 1; height: 6px; -webkit-appearance: none; appearance: none;
    background: var(--border); border-radius: 3px; accent-color: var(--primary);
}
.range-value { font-size: 13px; font-weight: 600; min-width: 50px; text-align: right; color: var(--primary); }

/* ===================================================== */
/* ========== 标签页 ========== */
/* ===================================================== */

.tabs {
    display: flex; gap: 4px; border-bottom: 2px solid var(--border);
    margin-bottom: 20px; overflow-x: auto;
}
.tab {
    padding: 10px 16px; font-size: 14px; font-weight: 500;
    color: var(--text-secondary); cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all 0.2s; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Segmented control */
.segmented {
    display: inline-flex; background: var(--surface-hover);
    border-radius: var(--radius-sm); padding: 3px; gap: 2px;
}
.segmented-item {
    padding: 6px 14px; font-size: 13px; font-weight: 500;
    border-radius: 6px; cursor: pointer; transition: all 0.2s;
    color: var(--text-secondary);
}
.segmented-item.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ===================================================== */
/* ========== 步骤条 ========== */
/* ===================================================== */

.steps {
    display: flex; align-items: center; margin-bottom: 32px; position: relative;
}
.step {
    display: flex; align-items: center; gap: 10px;
    flex: 1; position: relative;
}
.step:not(:last-child)::after {
    content: ""; flex: 1; height: 2px;
    background: var(--border); margin: 0 12px;
}
.step.completed:not(:last-child)::after { background: var(--success); }
.step.active:not(:last-child)::after { background: linear-gradient(to right, var(--primary), var(--border)); }
.step-num {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; flex-shrink: 0;
    background: var(--surface-hover); color: var(--text-muted);
    border: 2px solid var(--border); transition: all 0.3s;
}
.step.active .step-num { background: var(--primary); color: white; border-color: var(--primary); }
.step.completed .step-num { background: var(--success); color: white; border-color: var(--success); }
.step-label { font-size: 13px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.step.active .step-label { color: var(--text); font-weight: 600; }
.step.completed .step-label { color: var(--text-secondary); }

/* ===================================================== */
/* ========== 模态框 / 弹窗 ========== */
/* ===================================================== */

.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 300; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
    background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); width: 90%; max-width: 560px;
    max-height: 85vh; display: flex; flex-direction: column;
    transform: scale(0.95); transition: transform 0.2s;
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-lg { max-width: 720px; }
.modal-sm { max-width: 400px; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 17px; font-weight: 600; }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 12px;
    padding: 16px 24px; border-top: 1px solid var(--border);
}

/* ===================================================== */
/* ========== Toast 通知 ========== */
/* ===================================================== */

.toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 999;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 20px; border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500;
    animation: toastIn 0.3s ease; max-width: 400px;
}
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-success { background: #D1FAE5; color: #065F46; }
.toast-error { background: #FEE2E2; color: #991B1B; }
.toast-info { background: #DBEAFE; color: #1E40AF; }
.toast-warning { background: #FEF3C7; color: #92400E; }

/* ===================================================== */
/* ========== 上传区 ========== */
/* ===================================================== */

.upload-zone {
    border: 2px dashed var(--border-dark); border-radius: var(--radius);
    padding: 40px 20px; text-align: center; cursor: pointer;
    transition: all 0.2s; background: var(--surface-2);
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary); background: var(--primary-bg);
}
.upload-zone-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.upload-zone-text { font-size: 14px; color: var(--text-secondary); }
.upload-zone-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* 声音卡片 */
.voice-card { transition: all 0.15s; }
.voice-card:hover { background: var(--surface-2); }
.voice-card.voice-selected { border-color: var(--primary) !important; background: var(--primary-bg); }
.play-btn {
    width: 36px; height: 36px; border-radius: 50%; background: var(--primary-bg);
    color: var(--primary); display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; font-size: 14px; transition: all 0.15s;
}
.play-btn:hover { background: var(--primary); color: white; }

/* ===================================================== */
/* ========== 文件/素材网格 ========== */
/* ===================================================== */

.file-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.file-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); overflow: hidden; cursor: pointer;
    transition: all 0.2s; position: relative;
}
.file-card:hover { box-shadow: var(--shadow); border-color: var(--primary-light); }
.file-thumb {
    width: 100%; aspect-ratio: 16/9; background: var(--surface-hover);
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; position: relative; overflow: hidden;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-info { padding: 8px 10px; }
.file-name { font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.file-badge {
    position: absolute; top: 6px; right: 6px;
    padding: 2px 8px; border-radius: 4px; font-size: 10px;
    font-weight: 600; color: white;
}
.file-actions {
    position: absolute; top: 6px; left: 6px;
    display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s;
}
.file-card:hover .file-actions { opacity: 1; }
.file-action-btn {
    width: 26px; height: 26px; border-radius: 6px;
    background: rgba(255,255,255,0.9); display: flex;
    align-items: center; justify-content: center;
    font-size: 13px; cursor: pointer;
}
.file-action-btn:hover { background: white; }

/* ===================================================== */
/* ========== 时间线 ========== */
/* ===================================================== */

.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
    display: flex; gap: 16px; padding-bottom: 20px;
    position: relative;
}
.timeline-item:not(:last-child)::before {
    content: ""; position: absolute; left: 11px; top: 24px;
    bottom: 0; width: 2px; background: var(--border);
}
.timeline-dot {
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0; z-index: 1;
    background: var(--surface-hover); border: 2px solid var(--border);
}
.timeline-dot.active { background: var(--primary); border-color: var(--primary); color: white; }
.timeline-dot.success { background: var(--success); border-color: var(--success); color: white; }
.timeline-dot.error { background: var(--danger); border-color: var(--danger); color: white; }
.timeline-content { flex: 1; padding-top: 2px; }
.timeline-title { font-size: 14px; font-weight: 500; }
.timeline-desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.timeline-time { font-size: 12px; color: var(--text-muted); }

/* ===================================================== */
/* ========== 标签芯片 ========== */
/* ===================================================== */

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 500;
    background: var(--surface-hover); color: var(--text-secondary);
    border: 1px solid var(--border);
}
.chip-primary { background: var(--primary-bg); color: var(--primary-dark); border-color: transparent; }
.chip-success { background: #D1FAE5; color: #065F46; border-color: transparent; }
.chip-warning { background: #FEF3C7; color: #92400E; border-color: transparent; }
.chip-danger { background: #FEE2E2; color: #991B1B; border-color: transparent; }
.chip .chip-close { cursor: pointer; opacity: 0.5; }
.chip .chip-close:hover { opacity: 1; }

/* ===================================================== */
/* ========== 分页 ========== */
/* ===================================================== */

.pagination { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 16px; }
.page-btn {
    min-width: 32px; height: 32px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; cursor: pointer; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-secondary); transition: all 0.2s;
}
.page-btn:hover:not(.disabled) { background: var(--surface-hover); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }

/* ===================================================== */
/* ========== 加载动画 ========== */
/* ===================================================== */

.spinner {
    width: 20px; height: 20px; border: 2px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 40px; color: var(--text-muted); font-size: 14px;
}

/* ===================================================== */
/* ========== 音频播放器 ========== */
/* ===================================================== */

.audio-player {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; background: var(--surface-2);
    border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.audio-player audio { height: 36px; }
.audio-info { flex: 1; }
.audio-name { font-size: 13px; font-weight: 500; }
.audio-meta { font-size: 11px; color: var(--text-muted); }
.play-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: all 0.2s;
}
.play-btn:hover { background: var(--primary-dark); }

/* ===================================================== */
/* ========== 代码块 ========== */
/* ===================================================== */

.code-block {
    background: #1E293B; color: #E2E8F0; border-radius: var(--radius-sm);
    padding: 16px; font-family: "Fira Code", "Cascadia Code", Consolas, monospace;
    font-size: 13px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap;
}

/* ===================================================== */
/* ========== 杂项 ========== */
/* ===================================================== */

.divider { height: 1px; background: var(--border); margin: 20px 0; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.w-full { width: 100%; } .flex-1 { flex: 1; }
.text-center { text-align: center; }
.cursor-pointer { cursor: pointer; }
.relative { position: relative; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: 0; top: 0; height: 100%; transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .search-box { width: 120px; }
    .row { flex-direction: column; }
}
