/**
 * 网站主题动态样式
 * 使用CSS变量实现主题切换
 */

:root {
    /* 默认主题：经典蓝 */
    --theme-primary: #1e3a5f;
    --theme-primary-light: #2d5a8a;
    --theme-primary-dark: #0f1f33;
    --theme-secondary: #3498db;
    --theme-accent: #e74c3c;
    --theme-background: #ffffff;
    --theme-surface: #f8f9fa;
    --theme-text-primary: #1a1a2e;
    --theme-text-secondary: #6c757d;
    --theme-border: #dee2e6;
    --theme-navbar-bg: #1e3a5f;
    --theme-navbar-text: #ffffff;
    --theme-footer-bg: #1a1a2e;
    --theme-footer-text: #e9ecef;
    --theme-button-primary: #3498db;
    --theme-button-secondary: #2d5a8a;
    --theme-link: #3498db;
    --theme-link-hover: #1e6bb8;
}

/* 经典蓝学术风 */
[data-theme="classic-blue"] {
    --theme-primary: #1e3a5f;
    --theme-primary-light: #2d5a8a;
    --theme-primary-dark: #0f1f33;
    --theme-secondary: #3498db;
    --theme-accent: #e74c3c;
    --theme-background: #ffffff;
    --theme-surface: #f8f9fa;
    --theme-text-primary: #1a1a2e;
    --theme-text-secondary: #6c757d;
    --theme-border: #dee2e6;
    --theme-navbar-bg: #1e3a5f;
    --theme-navbar-text: #ffffff;
    --theme-footer-bg: #1a1a2e;
    --theme-footer-text: #e9ecef;
    --theme-button-primary: #3498db;
    --theme-button-secondary: #2d5a8a;
    --theme-link: #3498db;
    --theme-link-hover: #1e6bb8;
}

/* 清新绿自然风 */
[data-theme="fresh-green"] {
    --theme-primary: #27ae60;
    --theme-primary-light: #2ecc71;
    --theme-primary-dark: #1e8449;
    --theme-secondary: #16a085;
    --theme-accent: #f39c12;
    --theme-background: #fafffe;
    --theme-surface: #e8f8f5;
    --theme-text-primary: #1d3a2f;
    --theme-text-secondary: #5d7a6d;
    --theme-border: #c8e6c9;
    --theme-navbar-bg: #27ae60;
    --theme-navbar-text: #ffffff;
    --theme-footer-bg: #1d3a2f;
    --theme-footer-text: #e8f8f5;
    --theme-button-primary: #27ae60;
    --theme-button-secondary: #16a085;
    --theme-link: #27ae60;
    --theme-link-hover: #1e8449;
}

/* 现代紫优雅风 */
[data-theme="modern-purple"] {
    --theme-primary: #6c5ce7;
    --theme-primary-light: #a29bfe;
    --theme-primary-dark: #5541d7;
    --theme-secondary: #fd79a8;
    --theme-accent: #fdcb6e;
    --theme-background: #fefefe;
    --theme-surface: #f5f3ff;
    --theme-text-primary: #2d2d3a;
    --theme-text-secondary: #74788d;
    --theme-border: #dcd6f7;
    --theme-navbar-bg: #6c5ce7;
    --theme-navbar-text: #ffffff;
    --theme-footer-bg: #2d2d3a;
    --theme-footer-text: #f5f3ff;
    --theme-button-primary: #6c5ce7;
    --theme-button-secondary: #a29bfe;
    --theme-link: #6c5ce7;
    --theme-link-hover: #5541d7;
}

/* 活力橙热情风 */
[data-theme="vibrant-orange"] {
    --theme-primary: #e67e22;
    --theme-primary-light: #f39c12;
    --theme-primary-dark: #d35400;
    --theme-secondary: #e74c3c;
    --theme-accent: #3498db;
    --theme-background: #fffbf5;
    --theme-surface: #fef5e7;
    --theme-text-primary: #2c2c2c;
    --theme-text-secondary: #7f8c8d;
    --theme-border: #fad390;
    --theme-navbar-bg: #e67e22;
    --theme-navbar-text: #ffffff;
    --theme-footer-bg: #2c2c2c;
    --theme-footer-text: #fef5e7;
    --theme-button-primary: #e67e22;
    --theme-button-secondary: #d35400;
    --theme-link: #e67e22;
    --theme-link-hover: #d35400;
}

/* 极简黑白风 */
[data-theme="minimalist"] {
    --theme-primary: #000000;
    --theme-primary-light: #333333;
    --theme-primary-dark: #000000;
    --theme-secondary: #666666;
    --theme-accent: #c0392b;
    --theme-background: #ffffff;
    --theme-surface: #f5f5f5;
    --theme-text-primary: #1a1a1a;
    --theme-text-secondary: #757575;
    --theme-border: #e0e0e0;
    --theme-navbar-bg: #000000;
    --theme-navbar-text: #ffffff;
    --theme-footer-bg: #1a1a1a;
    --theme-footer-text: #ffffff;
    --theme-button-primary: #000000;
    --theme-button-secondary: #333333;
    --theme-link: #333333;
    --theme-link-hover: #000000;
}

/* 暖棕复古风 */
[data-theme="warm-brown"] {
    --theme-primary: #8b6914;
    --theme-primary-light: #c9a959;
    --theme-primary-dark: #6b5010;
    --theme-secondary: #5d4e37;
    --theme-accent: #c0392b;
    --theme-background: #fdfbf7;
    --theme-surface: #f5f0e6;
    --theme-text-primary: #3d3122;
    --theme-text-secondary: #7d6e5d;
    --theme-border: #d4c4a8;
    --theme-navbar-bg: #5d4e37;
    --theme-navbar-text: #fdfbf7;
    --theme-footer-bg: #3d3122;
    --theme-footer-text: #f5f0e6;
    --theme-button-primary: #8b6914;
    --theme-button-secondary: #5d4e37;
    --theme-link: #8b6914;
    --theme-link-hover: #6b5010;
}

/* 科技青现代风 */
[data-theme="tech-cyan"] {
    --theme-primary: #00b894;
    --theme-primary-light: #00cec9;
    --theme-primary-dark: #00896d;
    --theme-secondary: #0984e3;
    --theme-accent: #fdcb6e;
    --theme-background: #f0fdff;
    --theme-surface: #e8fafa;
    --theme-text-primary: #1a2f2a;
    --theme-text-secondary: #636e72;
    --theme-border: #b2bec3;
    --theme-navbar-bg: #00b894;
    --theme-navbar-text: #ffffff;
    --theme-footer-bg: #1a2f2a;
    --theme-footer-text: #e8fafa;
    --theme-button-primary: #00b894;
    --theme-button-secondary: #0984e3;
    --theme-link: #00b894;
    --theme-link-hover: #00896d;
}

/* 玫红时尚风 */
[data-theme="rose-pink"] {
    --theme-primary: #e84393;
    --theme-primary-light: #fd79a8;
    --theme-primary-dark: #c44175;
    --theme-secondary: #a29bfe;
    --theme-accent: #00b894;
    --theme-background: #fff5f8;
    --theme-surface: #ffeef2;
    --theme-text-primary: #2d2d2d;
    --theme-text-secondary: #757575;
    --theme-border: #fab1c4;
    --theme-navbar-bg: #e84393;
    --theme-navbar-text: #ffffff;
    --theme-footer-bg: #2d2d2d;
    --theme-footer-text: #ffeef2;
    --theme-button-primary: #e84393;
    --theme-button-secondary: #fd79a8;
    --theme-link: #e84393;
    --theme-link-hover: #c44175;
}

/* 金色典雅风 */
[data-theme="golden-elegant"] {
    --theme-primary: #d4a017;
    --theme-primary-light: #f5c842;
    --theme-primary-dark: #b8860b;
    --theme-secondary: #8b4513;
    --theme-accent: #c0392b;
    --theme-background: #fffdf5;
    --theme-surface: #fef9e7;
    --theme-text-primary: #2c2c2c;
    --theme-text-secondary: #696969;
    --theme-border: #daa520;
    --theme-navbar-bg: #2c2c2c;
    --theme-navbar-text: #f5c842;
    --theme-footer-bg: #1a1a1a;
    --theme-footer-text: #f5c842;
    --theme-button-primary: #d4a017;
    --theme-button-secondary: #8b4513;
    --theme-link: #d4a017;
    --theme-link-hover: #b8860b;
}

/* 应用主题颜色到元素 */
body {
    background-color: var(--theme-background);
    color: var(--theme-text-primary);
}

/* 导航栏 */
nav {
    background-color: var(--theme-navbar-bg) !important;
}

nav a:not(.bg-blue-600):not(.bg-gray-600) {
    color: var(--theme-navbar-text) !important;
}

nav .text-xl.font-bold {
    color: var(--theme-navbar-text) !important;
}

nav .text-gray-600 {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* 按钮 */
.btn-primary,
button[type="submit"],
a.bg-blue-600 {
    background-color: var(--theme-button-primary) !important;
}

a.text-blue-600 {
    color: var(--theme-link) !important;
}

a.text-blue-600:hover {
    color: var(--theme-link-hover) !important;
}

/* 链接 */
a:not(.no-theme):not(.bg-blue-600):not(.text-white) {
    color: var(--theme-link);
}

a:not(.no-theme):not(.bg-blue-600):not(.text-white):hover {
    color: var(--theme-link-hover);
}

/* 卡片 */
.bg-white.rounded-lg,
.card {
    background-color: var(--theme-background) !important;
    border-color: var(--theme-border);
}

/* 页面区块 */
.bg-gray-50 {
    background-color: var(--theme-surface) !important;
}

/* 页脚 */
footer {
    background-color: var(--theme-footer-bg) !important;
    color: var(--theme-footer-text) !important;
}

footer a {
    color: var(--theme-footer-text) !important;
}

/* 文本颜色 */
.text-gray-700,
.text-gray-800,
.text-gray-900 {
    color: var(--theme-text-primary) !important;
}

.text-gray-500,
.text-gray-600 {
    color: var(--theme-text-secondary) !important;
}

/* 边框 */
.border,
hr {
    border-color: var(--theme-border) !important;
}

/* 主色调文字 */
.text-primary {
    color: var(--theme-primary) !important;
}

/* 主色调背景 */
.bg-primary {
    background-color: var(--theme-primary) !important;
}

/* 特色强调色背景 */
.bg-accent {
    background-color: var(--theme-accent) !important;
}

/* 期刊卡片 */
.journal-card {
    border: 1px solid var(--theme-border);
    background: var(--theme-background);
}

.journal-card:hover {
    border-color: var(--theme-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 精选期刊卡片 */
.featured-card {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-light) 100%);
}

/* 统计数字 */
.stat-number {
    color: var(--theme-primary);
}

/* 英雄区 */
.hero-section {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-light) 100%);
}

/* 表单输入框聚焦 */
input:focus,
textarea:focus,
select:focus {
    border-color: var(--theme-primary) !important;
    outline-color: var(--theme-primary) !important;
}

/* 下拉菜单 */
.dropdown-menu {
    border-color: var(--theme-border);
}

.dropdown-menu a:hover {
    background-color: var(--theme-surface);
    color: var(--theme-primary);
}

/* 标签/徽章 */
.badge,
.tag {
    background-color: var(--theme-primary-light);
    color: white;
}

/* 模态框背景 */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* 加载动画 */
.loading-spinner {
    border-color: var(--theme-primary);
    border-top-color: transparent;
}

/* 管理员编辑按钮 */
.fixed.bottom-6.right-6 a {
    background-color: var(--theme-button-primary) !important;
}

.fixed.bottom-6.right-6 a:hover {
    background-color: var(--theme-primary-dark) !important;
}

/* 移动端菜单 */
@media (max-width: 768px) {
    #mobile-menu {
        background-color: var(--theme-navbar-bg) !important;
    }

    #mobile-menu a {
        color: var(--theme-navbar-text) !important;
    }

    #mobile-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}
