/* ============================================================
   OJ 在线判题系统 - 现代化 UI 主题
   ============================================================ */

/* ============ CSS 变量 ============ */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-bg: #eef2ff;
    --success: #10b981;
    --success-bg: #d1fae5;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --info: #3b82f6;
    --info-bg: #dbeafe;
    --bg: #f1f5f9;
    --bg-secondary: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    --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-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ 全局 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============ 导航栏 ============ */
.navbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.navbar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}

.navbar .brand .school-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    object-fit: contain;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.navbar .brand .school-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
}

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

.navbar .nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.navbar .nav-links a:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

.navbar .nav-links a.active {
    color: var(--primary);
    background: var(--primary-bg);
    font-weight: 600;
}

.navbar .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.navbar .user-info .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.navbar .user-info .role-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.navbar .user-info .role-badge.teacher {
    background: var(--warning-bg);
    color: #92400e;
}

.navbar .user-info .role-badge.student {
    background: var(--info-bg);
    color: #1e40af;
}

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(99,102,241,0.4); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}
.btn-success:hover { box-shadow: 0 4px 16px rgba(16,185,129,0.4); transform: translateY(-1px); }

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}
.btn-danger:hover { box-shadow: 0 4px 16px rgba(239,68,68,0.4); transform: translateY(-1px); }

.btn-outline {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary-light); color: var(--primary); background: var(--primary-bg); }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: var(--radius-xs); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn-icon {
    width: 36px; height: 36px; padding: 0;
    border-radius: var(--radius-sm);
}

/* ============ 布局 ============ */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 28px;
}

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }

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

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

.page-header h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* ============ 筛选栏 ============ */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: fit-content;
}

.filter-bar .filter-btn {
    padding: 7px 18px;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-bar .filter-btn:hover { color: var(--text); background: var(--bg); }
.filter-bar .filter-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* ============ 题目卡片 ============ */
.question-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    cursor: pointer;
}
.question-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.question-card .q-info {
    display: flex;
    align-items: center;
    gap: 14px;
}
.question-card .q-title {
    font-size: 15px;
    font-weight: 600;
}
.question-card .q-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* 难度徽章 */
.difficulty-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.difficulty-badge.easy { background: var(--success-bg); color: #065f46; }
.difficulty-badge.medium { background: var(--warning-bg); color: #92400e; }
.difficulty-badge.hard { background: var(--danger-bg); color: #991b1b; }

.passed-badge { font-size: 18px; }

/* ============ 状态徽章 ============ */
.status-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.status-badge.accepted { background: var(--success-bg); color: #065f46; }
.status-badge.wrong_answer { background: var(--danger-bg); color: #991b1b; }
.status-badge.runtime_error { background: var(--danger-bg); color: #991b1b; }
.status-badge.timeout { background: var(--warning-bg); color: #92400e; }
.status-badge.running { background: var(--info-bg); color: #1e40af; }
.status-badge.pending { background: #f1f5f9; color: #64748b; }

/* ============ 题目详情（双栏） ============ */
.question-detail {
    display: flex;
    gap: 20px;
    height: calc(100vh - 130px);
}
.question-detail .left-panel {
    flex: 1;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.question-detail .left-panel h2 {
    font-size: 22px;
    font-weight: 700;
}
.question-detail .left-panel #qd-description {
    line-height: 1.8;
    margin-top: 16px;
}
.question-detail .left-panel #qd-description h2,
.question-detail .left-panel #qd-description h3,
.question-detail .left-panel #qd-description h4 { margin-top: 16px; margin-bottom: 8px; }
.question-detail .left-panel #qd-description pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}
.question-detail .left-panel #qd-description code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
}
.question-detail .left-panel #qd-description pre code {
    background: none;
    padding: 0;
}

.question-detail .right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============ 编辑器 ============ */
.editor-container {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.editor-body {
    flex: 1;
    position: relative;
}
.editor-body .CodeMirror {
    height: 100% !important;
    font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', monospace;
    font-size: 14px;
}
.editor-body .debug-current-line {
    background: rgba(245, 158, 11, 0.2) !important;
}
.editor-body .debug-line-highlight {
    background: rgba(99, 102, 241, 0.12) !important;
}

/* 操作栏 */
.action-bar {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    align-items: center;
}

/* ============ 底部面板（运行结果 + AI） ============ */
.bottom-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 180px;
    max-height: 380px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}
.panel-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}
.panel-tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}
.panel-tab:hover { color: var(--text); }
.panel-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}
.panel-content { display: none; flex: 1; overflow-y: auto; }
.panel-content.active { display: flex; flex-direction: column; }
.output-body {
    padding: 16px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    flex: 1;
}
.output-body.success { color: #065f46; }
.output-body.error { color: #991b1b; }

/* ============ AI 助手 ============ */
.ai-quick-actions {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.ai-chat {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    min-height: 80px;
    max-height: 180px;
    font-size: 13px;
    line-height: 1.7;
}
.ai-welcome {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    font-size: 13px;
    line-height: 2;
}
.ai-message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.7;
}
.ai-message.user {
    background: var(--primary-bg);
    margin-left: 24px;
    border-bottom-right-radius: 2px;
}
.ai-message.assistant {
    background: var(--bg);
    border: 1px solid var(--border-light);
    margin-right: 24px;
    border-bottom-left-radius: 2px;
}
.ai-message .ai-label {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ai-message pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    overflow-x: auto;
    margin: 8px 0;
}
.ai-message pre code { background: none; padding: 0; color: inherit; }
.ai-message code {
    background: var(--border-light);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
}
.ai-typing {
    color: var(--text-muted);
    font-size: 12px;
    padding: 8px 14px;
}
.ai-typing::after {
    content: '...';
    animation: typingDot 1.4s infinite;
}
@keyframes typingDot {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
.ai-input-row {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
}
.ai-input-row input {
    flex: 1;
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}
.ai-input-row input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.ai-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px 8px;
    font-size: 11px;
    color: var(--text-muted);
}
.ai-status-dot { width: 7px; height: 7px; border-radius: 50%; }
.ai-status-dot.online { background: var(--success); box-shadow: 0 0 6px rgba(16,185,129,0.4); }
.ai-status-dot.offline { background: var(--danger); }

/* ============ 调试面板 ============ */
.debug-panel {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 8px;
}
.debug-panel .debug-header {
    padding: 8px 16px;
    border-bottom: 1px solid #fde68a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}
.debug-panel .debug-body { padding: 14px 16px; max-height: 180px; overflow-y: auto; }
.debug-vars {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.debug-var {
    background: white;
    border: 1px solid #fde68a;
    border-radius: var(--radius-xs);
    padding: 6px 10px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
}
.debug-var .var-name { color: var(--primary); font-weight: 600; }
.debug-var .var-value { color: var(--text-secondary); word-break: break-all; }
.debug-controls { display: flex; gap: 6px; padding: 0 16px 12px; }

/* ============ 排行榜 ============ */
.ranking-table {
    width: 100%;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.ranking-table table { width: 100%; border-collapse: collapse; }
.ranking-table th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 12px 18px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
.ranking-table td {
    padding: 12px 18px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
}
.ranking-table tr:last-child td { border-bottom: none; }
.ranking-table tr:hover td { background: var(--bg); }
.rank-number { font-weight: 800; font-size: 18px; }
.rank-number.top-1 { color: #f59e0b; }
.rank-number.top-2 { color: #94a3b8; }
.rank-number.top-3 { color: #d97706; }

/* ============ 提交记录 ============ */
.submission-table {
    width: 100%;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.submission-table table { width: 100%; border-collapse: collapse; }
.submission-table th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 10px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}
.submission-table td {
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
}
.submission-table tr:hover td { background: var(--bg); }

/* ============ 教师管理 ============ */
.manage-tabs {
    display: flex;
    gap: 0;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 4px;
    border: 1px solid var(--border);
    width: fit-content;
    margin-bottom: 20px;
}
.manage-tab {
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    transition: var(--transition);
}
.manage-tab:hover { color: var(--text); }
.manage-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}
.manage-panel { display: none; }
.manage-panel.active { display: block; animation: fadeIn 0.25s ease; }

/* 设置面板 */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.setting-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
}
.setting-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}
.setting-card .form-group { margin-bottom: 12px; }
.setting-card label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.setting-card input[type="text"],
.setting-card input[type="url"] {
    width: 100%;
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}
.setting-card input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.toggle-switch .toggle-track {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--border);
    position: relative;
    transition: var(--transition);
}
.toggle-switch .toggle-track.active { background: var(--primary); }
.toggle-switch .toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.toggle-switch .toggle-track.active::after { left: 22px; }

/* ============ 模态框 ============ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }
.modal {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    width: 440px;
    max-width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-secondary);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    background: white;
}
.form-group textarea { min-height: 120px; resize: vertical; font-size: 13px; }
.modal .modal-actions { display: flex; gap: 8px; margin-top: 24px; }
.modal .modal-actions .btn { flex: 1; }
.modal .modal-hint { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.modal .modal-hint a { color: var(--primary); cursor: pointer; font-weight: 600; }
.modal .modal-hint a:hover { text-decoration: underline; }

/* ============ Toast ============ */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    z-index: 300;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 420px;
    box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { background: var(--success); color: white; }
.toast.error { background: var(--danger); color: white; }
.toast.info { background: var(--info); color: white; }

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

/* ============ 测试用例编辑器 ============ */
.tc-editor {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
}
.tc-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.tc-row input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
}

/* ============ 注册禁用提示 ============ */
.registration-closed-notice {
    background: var(--warning-bg);
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    text-align: center;
    color: #92400e;
}

/* ============ Hero 区域（首页） ============ */
.hero-section {
    text-align: center;
    padding: 48px 20px 32px;
}
.hero-section .hero-icon {
    font-size: 56px;
    margin-bottom: 16px;
}
.hero-section h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}
.hero-section p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}
.stats-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 24px;
}
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 28px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.stat-card .stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}
.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
    .question-detail { flex-direction: column; height: auto; }
    .question-detail .left-panel,
    .question-detail .right-panel { flex: none; height: auto; }
    .question-detail .right-panel { min-height: 500px; }
    .navbar .nav-links a { padding: 6px 8px; font-size: 12px; }
    .hero-section h1 { font-size: 24px; }
    .settings-grid { grid-template-columns: 1fr; }
}
