/* ========================================
   GEO Pro — Global Dark Glassmorphism Theme
   Shared CSS for all frontend pages
   ======================================== */

/* ─── CSS Variables ─── */
:root {
    /* 主色系 */
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --primary-gradient: linear-gradient(135deg, #7c3aed, #3b82f6);
    --primary-glow: rgba(124, 58, 237, 0.3);

    /* 辅色 */
    --accent: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* ========== 深色区域（导航栏、外框） ========== */
    --bg-primary: #0a0a14;
    --bg-secondary: #12121f;
    --nav-bg: #0d0d1a;
    
    /* ========== 浅色区域（内容区、卡片） ========== */
    --surface-primary: #ffffff;      /* 内容面板背景 → 白色 */
    --surface-secondary: #ffffff;    /* 卡片背景 → 白色 */
    --bg-card: #ffffff;             /* 卡片背景改为纯白 */
    --bg-card-hover: #f8f9fa;       /* 卡片hover */
    
    /* ========== 文字颜色 ========== */
    --text-on-dark: rgba(255,255,255,0.9);   /* 深色背景上的文字 → 白色 */
    --text-on-dark-secondary: rgba(255,255,255,0.5);
    --text-primary: #1a1a2e;                  /* 浅色背景上的文字 → 深色/黑色 */
    --text-secondary: #555;                   /* 浅色背景上的次要文字 */
    --text-muted: #999;
    
    /* ========== 卡片/面板边框 ========== */
    --card-border: #e8e8ee;          /* 白色区域的卡片边框 */
    --glass-border: rgba(0,0,0,0.08); /* 白色卡片之间的分隔 */
    --glass-border-hover: rgba(0,0,0,0.15);

    /* 玻璃态 */
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* 尺寸 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px var(--primary-glow);

    /* 字号 */
    --text-xs: 12px;
    --text-sm: 13px;
    --text-md: 14px;
    --text-lg: 16px;
    --text-xl: 20px;
    --text-2xl: 24px;
}

/* ─── Global Reset ─── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: gradientShift 15s ease-in-out infinite alternate;
}

/* ─── Container ─── */
.container {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* ─── Buttons ─── */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-md);
    font-weight: 500;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:active::after {
    opacity: 1;
    animation: rippleFade 0.3s ease-out;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

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

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

.btn-secondary {
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--primary);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    color: #fff;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: var(--text-md);
    padding: 0;
    text-decoration: none;
}

/* ─── Form Elements ─── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-size: var(--text-md);
    background: #f5f5f8;
    color: #1a1a2e;
    transition: all 0.25s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(124,58,237,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* ─── Cards ─── */
.card {
    background: var(--surface-secondary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
}

/* ─── Top Nav Layout ─── */
.app-container {
    display: none;
    padding-top: 60px;
    min-height: 100vh;
}

/* 顶部导航 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--nav-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.brand-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
    background: none;
    -webkit-text-fill-color: white;
}

.brand-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    text-decoration: none;
}

.nav-link:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.06);
}

.nav-link.active {
    color: #a78bfa;
    background: rgba(124,58,237,0.15);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.7);
}

.nav-logout {
    color: rgba(255,255,255,0.4) !important;
    font-size: 13px !important;
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-label {
    font-size: 14px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

/* 页面布局 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    min-height: calc(100vh - 60px);
    background: var(--surface-primary);
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    margin-top: 16px;
    margin-bottom: 16px;
}

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

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.content-body {
    /* content-body now just wraps .page content, no extra layout needed */
}

/* ─── Page Transitions ─── */
.page {
    display: none;
    opacity: 0;
}

.page.active {
    display: block;
    opacity: 1;
    animation: fadeSlideUp 0.4s ease-out;
}

/* ─── Brand Cards Grid ─── */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.brand-card {
    background: var(--surface-primary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.brand-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.brand-card h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.brand-card .meta {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 15px;
}

.brand-card .stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.brand-card .stat {
    text-align: center;
}

.brand-card .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
}

.brand-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.brand-card .actions {
    display: flex;
    gap: 10px;
}

.brand-card .btn {
    flex: 1;
    padding: 8px;
    font-size: 13px;
}

/* ─── Usage Cards ─── */
.usage-grid {
    display: flex;
    gap: 24px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.usage-card {
    flex: 1;
    min-width: 160px;
    text-align: center;
    padding: 28px 20px;
    background: var(--surface-primary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.usage-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.usage-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 6px;
}

.usage-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ─── Knowledge Stats ─── */
.knowledge-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface-primary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.stat-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-card .label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 5px;
}

/* ─── Knowledge Tabs ─── */
.knowledge-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.knowledge-tabs .tab {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--surface-primary);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.knowledge-tabs .tab:hover {
    border-color: var(--glass-border-hover);
    color: var(--text-primary);
}

.knowledge-tabs .tab.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(59, 130, 246, 0.1));
    color: var(--primary-light);
    border-color: rgba(124, 58, 237, 0.2);
}

/* ─── Documents ─── */
.document-list {
    max-height: 400px;
    overflow-y: auto;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--surface-primary);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    transition: all 0.2s;
}

.document-item:hover {
    border-color: var(--glass-border-hover);
}

.document-item h4 {
    margin: 0 0 5px;
    font-size: 14px;
    color: var(--text-primary);
}

.document-item .doc-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── AI Chunks ─── */
.ai-chunk-card {
    border-radius: var(--radius-md);
    background: var(--surface-primary);
    border: 1px solid var(--card-border);
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.ai-chunk-card:hover {
    border-color: var(--glass-border-hover);
}

.ai-chunk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ai-badge {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(59, 130, 246, 0.1));
    color: var(--primary-light);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: var(--radius-md);
    font-weight: 500;
}

.ai-chunk-body {
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.ai-chunk-edit textarea {
    width: 100%;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

.ai-chunk-edit .edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* ─── Brand Select Grid ─── */
.brand-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.brand-option {
    padding: 20px;
    border: 1px solid var(--card-border);
    background: var(--surface-primary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.brand-option:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

.brand-option.selected {
    border-color: var(--primary-light);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(59, 130, 246, 0.08));
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15), 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: scale(1.03);
}

.brand-option .name {
    font-weight: 600;
    color: var(--text-primary);
}

.brand-option .category {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ─── Wizard ─── */
.wizard {
    background: var(--surface-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 30px;
    position: relative;
    padding: 20px 40px;
    background: var(--surface-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 60px;
    right: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-gradient) 0%, #e0e0e0 0%);
    z-index: 0;
    transform: translateY(-50%);
    transition: background 0.6s ease;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--text-lg);
    transition: all 0.4s ease;
    border: 2px solid var(--glass-border);
}

.step.active .step-number {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-glow), 0 0 0 0 rgba(102, 126, 234, 0.4);
    transform: scale(1.1);
    border: 2px solid white;
    animation: stepPulse 2s ease-in-out infinite;
}

.step.completed .step-number {
    background: var(--success);
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
    font-size: 18px;
}

.step-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s;
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step.completed .step-label {
    color: var(--success);
}

.wizard-content {
    min-height: 400px;
}

.wizard-step {
    display: none;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wizard-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ─── Progress Bar ─── */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    transition: width 0.5s ease;
}

/* ─── Analysis Result ─── */
.analysis-result {
    background: var(--surface-primary);
    border-radius: var(--radius-md);
    padding: 25px;
    margin: 20px 0;
    border: 1px solid var(--card-border);
}

.analysis-section {
    margin-bottom: 20px;
}

.analysis-section h4 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* ─── Tags ─── */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary);
    border-radius: var(--radius-xl);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all 0.2s;
    cursor: default;
}

.tag:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.topic-tag {
    display: inline-block;
    padding: 8px 18px;
    background: rgba(102, 126, 234, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.topic-tag:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.topic-tag.selected {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

/* ─── Data Coverage ─── */
.data-coverage {
    margin-top: 20px;
}

.coverage-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: var(--surface-primary);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border: 1px solid var(--card-border);
}

.coverage-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.coverage-icon.has-data {
    background: var(--success);
    color: white;
}

.coverage-icon.no-data {
    background: var(--danger);
    color: white;
}

/* ─── Article Preview ─── */
.article-preview {
    background: var(--surface-primary);
    border-radius: var(--radius-md);
    padding: 30px;
    line-height: 1.8;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--card-border);
}

.article-preview h1 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.4;
}

.article-preview h2 {
    font-size: 22px;
    color: var(--text-primary);
    margin: 30px 0 15px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.article-preview h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 20px 0 10px;
}

.article-preview p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.article-preview ul,
.article-preview ol {
    margin: 15px 0;
    padding-left: 25px;
}

.article-preview li {
    margin-bottom: 8px;
}

.estimated-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    padding: 2px 8px;
    border-radius: var(--radius-lg);
    font-size: 12px;
    margin-left: 5px;
}

/* ─── Schema Block ─── */
.schema-block {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 20px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    overflow-x: auto;
    white-space: pre;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

/* ─── FAQ Items ─── */
.faq-item {
    background: var(--surface-primary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--card-border);
}

.faq-item .question {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.faq-item .answer {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ─── Review Report ─── */
.review-report {
    background: var(--surface-primary);
    border-radius: var(--radius-md);
    padding: 25px;
    border: 1px solid var(--card-border);
}

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

.review-score {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
}

.review-status {
    padding: 8px 20px;
    border-radius: var(--radius-lg);
    font-weight: 500;
}

.review-status.pass {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.review-status.fail {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.review-status.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

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

.check-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--surface-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
}

.check-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-lg);
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.check-icon.pass {
    background: var(--success);
    color: white;
}

.check-icon.fail {
    background: var(--danger);
    color: white;
}

.check-icon.warning {
    background: var(--warning);
    color: white;
}

.check-item.fail {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid var(--danger);
    border-radius: 0 8px 8px 0;
}

.check-item.pass {
    border-left: 3px solid var(--success);
    border-radius: 0 8px 8px 0;
}

.review-group-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.review-group-title:first-child {
    margin-top: 0;
}

.review-level {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0 0;
}

.review-level .level-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13px;
}

.level-badge.excellent {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.level-badge.good {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.level-badge.needs-improve {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.level-badge.fail {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.check-info {
    flex: 1;
}

.check-name {
    font-weight: 500;
    color: var(--text-primary);
}

.check-message {
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── Modal ─── */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 30px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
    border: 1px solid var(--glass-border);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding: 0 0 20px 0;
}

.modal-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* ─── Toast Notifications ─── */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.toast {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 14px 24px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s;
    z-index: 9999;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

/* ─── Loading / Spinner ─── */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.active {
    display: block;
}

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

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* ─── Skeleton Loaders ─── */
.skeleton-block,
.skeleton-tag {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-tag {
    display: inline-block;
    height: 28px;
    border-radius: 14px;
}

.skeleton-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ─── Badge ─── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
}

/* ─── Side Panel ─── */
.side-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 24px;
}

.side-panel.open {
    right: 0;
}

/* ─── Draft Banner ─── */
#draftBanner {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
    display: none;
    justify-content: space-between;
    align-items: center;
}

/* ─── Animations ─── */
@keyframes gradientShift {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(2%, 1%);
    }
}

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

@keyframes rippleFade {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    30% {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: scale(2);
    }
}

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

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

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

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

@keyframes skeleton-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

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

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

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

@keyframes stepPulse {
    0%,
    100% {
        box-shadow: var(--shadow-glow), 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: var(--shadow-glow), 0 0 0 8px rgba(102, 126, 234, 0.1);
    }
}

@keyframes glowPulse {
    0%,
    100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

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

@keyframes indeterminate {
    0% {
        left: -50%;
        width: 30%;
    }
    50% {
        width: 50%;
    }
    100% {
        left: 110%;
        width: 30%;
    }
}

@keyframes btnLoading {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ─── Progress Fill Indeterminate ─── */
.progress-fill-indeterminate {
    position: relative;
    width: 30%;
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    animation: indeterminate 1.8s ease-in-out infinite;
}

/* ─── 光点汇聚动画 ─── */
/* ─── Particle V2 — 曲线路径光点 ─── */
@keyframes particle-v2-curve {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    60% {
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0.2);
        opacity: 0;
    }
}

@keyframes particle-v2-trail {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* 中心光球脉冲增强 */
@keyframes pulse-ring-v2 {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* 环形扩散波 */
@keyframes ring-wave {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* 烟花四散 */
@keyframes firework-burst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--fx), var(--fy)) scale(0);
        opacity: 0;
    }
}

/* 逐行文字渐入 */
@keyframes text-fade-in {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.particle-container {
    position: relative;
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Canvas 叠加层（星座连线） */
.particle-container canvas.constellation-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle-goal {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle, #7c3aed, #4f46e5, #3b82f6);
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.6), 0 0 80px rgba(59, 130, 246, 0.3);
    z-index: 2;
    position: relative;
    transition: transform 0.2s, box-shadow 0.3s;
}

.particle-goal::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(124, 58, 237, 0.25);
    animation: pulse-ring-v2 2s ease-out infinite;
}

/* 粒子 V2 */
.particle-v2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    animation: particle-v2-curve 1.2s cubic-bezier(0.4, 0, 0.6, 1) forwards;
    pointer-events: none;
    z-index: 3;
    box-shadow: 0 0 6px currentColor;
}

/* 拖尾碎片 */
.particle-v2-trail {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    animation: particle-v2-trail 1.2s ease-out forwards;
    pointer-events: none;
    z-index: 2;
}

/* 环形扩散波 */
.ring-wave {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(124, 58, 237, 0.6);
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ring-wave 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 4;
}

/* 烟花粒子 */
.firework-particle {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    animation: firework-burst 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 0 8px currentColor;
}

/* 进度文字动画 */
.status-text {
    opacity: 0;
    animation: text-fade-in 0.4s ease-out forwards;
    margin: 6px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.status-text.done {
    color: #22c55e;
}

.status-text.done::before {
    content: '✓ ';
}

.status-text.active {
    color: #7c3aed;
    font-weight: 600;
}

.status-text.active::before {
    content: '✦ ';
}

.status-text.failed {
    color: #ef4444;
}

.status-text.failed::before {
    content: '✗ ';
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .top-nav {
        padding: 0 12px;
    }

    .nav-brand .brand-subtitle {
        display: none;
    }

    .nav-links {
        gap: 2px;
    }

    .nav-link {
        padding: 6px 10px;
        font-size: 13px;
    }

    .nav-label {
        display: none;
    }

    .main-content {
        padding: 16px;
        margin: 8px;
        border-radius: var(--radius-md);
    }

    .knowledge-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .wizard-steps {
        flex-direction: column;
        gap: 20px;
    }

    .wizard-steps::before {
        display: none;
    }
}
