/**
 * scirco.cn 集中化 Light Mode Helper
 * 在所有页面链接这个 CSS，自动获得完整的 light mode 适配
 *
 * 加载位置：放在页面 <style> 之后或作为最后的 <link>
 *
 * 覆盖范围：
 * 1. nav 元素背景（不依赖类名）
 * 2. .header 类背景
 * 3. .navbar / .nav-link / .logo / #theme-toggle
 * 4. .page-title / .page-subtitle / .page-header
 * 5. .card / .panel / .container-box / .main-content
 * 6. .form-group label / input / textarea / select
 * 7. .btn-secondary / .btn-ghost
 * 8. .message.success / .message.error
 * 9. .empty-state / .info-box / .rules-list
 * 10. .submission-item / .submission-title
 * 11. .file-item / .upload-zone / .result-item
 * 12. .table th/td
 * 13. .checkbox-wrapper label
 * 14. 视频背景 / 背景动画调淡
 */

body.theme-light {
    background: #f0f2f5;
    color: #1e293b;
}

/* ===== 全局 CSS 变量覆盖（覆盖各页 :root 中定义的反色变量） ===== */
body.theme-light {
    --dark: #f0f2f5;
    --light: #1e293b;
    --gray: #64748b;
}

/* ===== 导航栏（兼容 nav 元素、.navbar 类、.header 类） ===== */
body.theme-light nav,
body.theme-light .navbar,
body.theme-light .header {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
body.theme-light nav.scrolled,
body.theme-light .navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
}
body.theme-light .logo {
    color: #4f46e5;
    -webkit-text-fill-color: #4f46e5;
}
body.theme-light .nav-link,
body.theme-light .nav a {
    color: #475569;
}
body.theme-light .nav-link:hover,
body.theme-light .nav a:hover {
    color: #1e293b;
    background: rgba(79, 70, 229, 0.08);
}
body.theme-light .nav-cta {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff !important;
}

/* ===== 主题切换按钮 ===== */
body.theme-light #theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #1e293b;
}
body.theme-light #theme-toggle:hover {
    background: #ffffff;
}

/* ===== 页面标题 ===== */
body.theme-light .page-header h1,
body.theme-light .page-title {
    background: linear-gradient(135deg, #1e293b 0%, #4f46e5 50%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
body.theme-light .page-subtitle,
body.theme-light .page-header p {
    color: #475569;
}

/* ===== 卡片、面板、容器 ===== */
body.theme-light .panel,
body.theme-light .card,
body.theme-light .container-box,
body.theme-light .main-content,
body.theme-light .chat-container,
body.theme-light .editor-container,
body.theme-light .game-container,
body.theme-light .stats-card,
body.theme-light .user-card,
body.theme-light .content-panel,
body.theme-light .glass-card,
body.theme-light .info-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
    color: #1e293b;
}
body.theme-light .panel-header,
body.theme-light .card-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    color: #1e293b;
}
body.theme-light .card-title,
body.theme-light .card-desc {
    color: #1e293b;
}

/* ===== 表格 ===== */
body.theme-light table th,
body.theme-light .data-table th,
body.theme-light .user-table th {
    background: rgba(0, 0, 0, 0.02);
    color: #64748b;
}
body.theme-light table td,
body.theme-light .data-table td,
body.theme-light .user-table td {
    color: #334155;
    border-bottom-color: rgba(0, 0, 0, 0.05);
}
body.theme-light table tr:hover,
body.theme-light .data-table tr:hover,
body.theme-light .user-table tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* ===== 表单 ===== */
body.theme-light input,
body.theme-light textarea,
body.theme-light select,
body.theme-light .form-group input,
body.theme-light .form-group select,
body.theme-light .form-group textarea,
body.theme-light .form-input,
body.theme-light .form-textarea,
body.theme-light .form-select {
    background: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    color: #1e293b;
}
body.theme-light input::placeholder,
body.theme-light textarea::placeholder,
body.theme-light .form-input::placeholder,
body.theme-light .form-textarea::placeholder {
    color: #94a3b8;
}
body.theme-light input:focus,
body.theme-light textarea:focus,
body.theme-light select:focus,
body.theme-light .form-group input:focus,
body.theme-light .form-group select:focus,
body.theme-light .form-group textarea:focus,
body.theme-light .form-input:focus,
body.theme-light .form-textarea:focus,
body.theme-light .form-select:focus {
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
body.theme-light .form-group label,
body.theme-light .form-label {
    color: #1e293b;
}
body.theme-light .form-hint {
    color: #64748b;
}

/* ===== 按钮 ===== */
body.theme-light .btn-secondary,
body.theme-light button.secondary,
body.theme-light .btn-ghost {
    background: rgba(255, 255, 255, 0.8);
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.12);
}
body.theme-light .btn-secondary:hover,
body.theme-light button.secondary:hover,
body.theme-light .btn-ghost:hover {
    background: #ffffff;
    color: #4f46e5;
}
body.theme-light .btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
}
body.theme-light .btn-danger,
body.theme-light .btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== 选项 / 复选框 ===== */
body.theme-light .checkbox-wrapper label,
body.theme-light .option-label {
    color: #475569;
}

/* ===== 文件上传区 ===== */
body.theme-light .upload-zone,
body.theme-light .file-upload-area {
    border-color: rgba(6, 182, 212, 0.5);
    background: rgba(6, 182, 212, 0.05);
}
body.theme-light .upload-zone:hover,
body.theme-light .upload-zone.dragover,
body.theme-light .file-upload-area:hover,
body.theme-light .file-upload-area.dragover {
    border-color: #0891b2;
    background: rgba(6, 182, 212, 0.12);
}
body.theme-light .upload-zone h3,
body.theme-light .upload-zone p,
body.theme-light .file-upload-text,
body.theme-light .file-upload-hint {
    color: #1e293b;
}
body.theme-light .file-upload-hint {
    color: #64748b;
}
body.theme-light .selected-file {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
body.theme-light .selected-file-name {
    color: #15803d;
}

/* ===== 文件列表项 ===== */
body.theme-light .file-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
}
body.theme-light .file-item .file-name {
    color: #1e293b;
}
body.theme-light .file-item .file-size {
    color: #64748b;
}
body.theme-light .file-item .remove-btn {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}
body.theme-light .file-item .remove-btn:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* ===== 上传结果项 ===== */
body.theme-light .result-item.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
body.theme-light .result-item.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
body.theme-light .result-item .name {
    color: #1e293b;
}
body.theme-light .result-item .message {
    color: #475569;
}

/* ===== 信息提示框 ===== */
body.theme-light .info-box {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.2);
}
body.theme-light .info-box h4,
body.theme-light .info-box-title {
    color: #4338ca;
}
body.theme-light .info-box li {
    color: #475569;
}
body.theme-light .info-box li::before {
    color: #4338ca;
}

/* ===== 消息提示 ===== */
body.theme-light .message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.3);
}
body.theme-light .message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.3);
}
body.theme-light .message.info {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.3);
}
body.theme-light .message.warning {
    background: rgba(251, 191, 36, 0.1);
    color: #b45309;
    border-color: rgba(251, 191, 36, 0.3);
}

/* ===== 规则列表 / 投稿列表 / 通知列表 ===== */
body.theme-light .rules-list li,
body.theme-light .submission-item,
body.theme-light .notification-item,
body.theme-light .list-item {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #334155;
}
body.theme-light .submission-title,
body.theme-light .notification-title,
body.theme-light .list-title {
    color: #1e293b;
}
body.theme-light .submission-date,
body.theme-light .notification-date,
body.theme-light .list-date {
    color: #64748b;
}

/* ===== 状态徽章 ===== */
body.theme-light .badge,
body.theme-light .status-badge {
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
    border: 1px solid rgba(99, 102, 241, 0.2);
}
body.theme-light .badge.success,
body.theme-light .status-badge.success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.2);
}
body.theme-light .badge.error,
body.theme-light .status-badge.error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.2);
}

/* ===== 空状态 ===== */
body.theme-light .empty-state {
    color: #64748b;
}
body.theme-light .empty-state-icon {
    opacity: 0.4;
}

/* ===== 视频背景、背景动画、粒子调淡 ===== */
body.theme-light .video-bg {
    opacity: 0.08;
    filter: blur(8px) saturate(0.6);
}
body.theme-light .video-overlay {
    background: linear-gradient(180deg, rgba(240,242,245,0.5) 0%, rgba(240,242,245,0.85) 100%);
}
body.theme-light .bg-animation::before,
body.theme-light .bg-animation {
    background:
        radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%);
}
body.theme-light .particle {
    background: rgba(6, 182, 212, 0.4);
}
body.theme-light .orb-1 { background: rgba(79, 70, 229, 0.15); }
body.theme-light .orb-2 { background: rgba(124, 58, 237, 0.12); }
body.theme-light .orb-3 { background: rgba(6, 182, 212, 0.1); }

/* ===== Footer ===== */
body.theme-light .footer,
body.theme-light footer {
    background: rgba(255, 255, 255, 0.9);
    border-top-color: rgba(0, 0, 0, 0.08);
    color: #475569;
}
body.theme-light .footer-title,
body.theme-light footer h4 {
    color: #1e293b;
}
body.theme-light .footer-link,
body.theme-light footer a {
    color: #64748b;
}
body.theme-light .footer-link:hover,
body.theme-light footer a:hover {
    color: #4f46e5;
}
body.theme-light .footer-bottom {
    color: #94a3b8;
    border-top-color: rgba(0, 0, 0, 0.08);
}

/* ===== Sidebar (admin pages) ===== */
body.theme-light .sidebar {
    background: rgba(255, 255, 255, 0.9);
    border-right-color: rgba(0, 0, 0, 0.08);
}
body.theme-light .sidebar-title {
    color: #64748b;
}
body.theme-light .sidebar-link {
    color: #475569;
}
body.theme-light .sidebar-link:hover,
body.theme-light .sidebar-link.active {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
}

/* ===== 标签页 tabs ===== */
body.theme-light .tab,
body.theme-light .nav-tab {
    color: #64748b;
    border-bottom-color: transparent;
}
body.theme-light .tab:hover,
body.theme-light .nav-tab:hover {
    color: #1e293b;
}
body.theme-light .tab.active,
body.theme-light .nav-tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

/* ===== 滚动条 ===== */
body.theme-light ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}
body.theme-light ::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.5);
}
body.theme-light ::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.7);
}

/* ===== 强制覆盖硬编码的深色背景和白色文字（针对 inline 样式） ===== */
body.theme-light [style*="background: rgba(15, 23, 42"],
body.theme-light [style*="background:#0f172a"],
body.theme-light [style*="background: #0f172a"] {
    background: rgba(255, 255, 255, 0.85) !important;
}
body.theme-light [style*="color: white"],
body.theme-light [style*="color:#fff"],
body.theme-light [style*="color: #fff"] {
    color: #1e293b !important;
}

/* ===== 通用 section 标题覆盖 ===== */
body.theme-light h1, body.theme-light h2, body.theme-light h3,
body.theme-light .section-title, body.theme-light .heading {
    color: #1e293b;
}

/* ===== Section 标题渐变覆盖 ===== */
body.theme-light .section-title {
    background: linear-gradient(135deg, #1e293b 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
body.theme-light .section-subtitle {
    color: #64748b;
}
