/* 浅色主题样式 */

/* 当body有light-theme类时应用浅色主题 */
body.light-theme {
    background-color: #f8fafc; /* 更明亮的底色 */
    background-image: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(240,245,250,0.7) 100%),
                      radial-gradient(circle at top left, #e0f2fe, transparent 30%),
                      radial-gradient(circle at bottom right, #e0e7ff, transparent 30%);
    color: #1e293b;
    position: relative;
    min-height: 100vh;
}

/* 浅色主题下的渐变文字 */
body.light-theme .gradient-text {
    background-image: linear-gradient(45deg, #475569, #64748b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 浅色主题下的页眉 */
body.light-theme .header-style,
body.light-theme header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* 浅色主题下的页脚 */
body.light-theme .footer-style,
body.light-theme footer {
    background: #f9fafb; /* 更柔和的浅灰色 */
    border-top: none; /* 移除顶部分割线 */
    color: #4b5563; /* 略微调整文本颜色以匹配背景 */
}

/* 浅色主题图标颜色优化 (增加特异性以覆盖按钮样式) */
body.light-theme .card-hover .bg-blue-500 {
    background: #dbeafe !important; /* blue-100 */
}
body.light-theme .card-hover .bg-blue-500 svg {
    color: #2563eb !important; /* blue-600 */
}

body.light-theme .card-hover .bg-indigo-500 {
    background: #e0e7ff !important; /* indigo-100 */
}
body.light-theme .card-hover .bg-indigo-500 svg {
    color: #4f46e5 !important; /* indigo-600 */
}

body.light-theme .card-hover .bg-sky-500 {
    background: #e0f2fe !important; /* sky-100 */
}
body.light-theme .card-hover .bg-sky-500 svg {
    color: #0284c7 !important; /* sky-600 */
}

body.light-theme .card-hover .bg-emerald-500 {
    background: #d1fae5 !important; /* emerald-100 */
}
body.light-theme .card-hover .bg-emerald-500 svg {
    color: #059669 !important; /* emerald-600 */
}

body.light-theme .card-hover .bg-rose-500 {
    background: #ffe4e6 !important; /* rose-100 */
}
body.light-theme .card-hover .bg-rose-500 svg {
    color: #e11d48 !important; /* rose-600 */
}

body.light-theme .card-hover .bg-violet-500 {
    background: #f3e8ff !important; /* violet-100 */
}
body.light-theme .card-hover .bg-violet-500 svg {
    color: #7e22ce !important; /* violet-600 */
}

body.light-theme footer a {
    color: #64748b;
    transition: color 0.3s ease;
}

body.light-theme footer a:hover {
    color: #1e40af;
}

/* 浅色主题下的导航链接 - 已移至后面统一定义 */

/* 浅色主题下的logo文字 */
body.light-theme .logo-text,
body.light-theme header a span {
    color: #1e293b !important;
}

/* 浅色主题下的logo图标 */
body.light-theme .logo-icon,
body.light-theme header a svg {
    color: #64748b !important;
}

/* 浅色主题下的卡片 */
body.light-theme .base-card,
body.light-theme .card-hover {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #374151;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02), 0 10px 20px rgba(0,0,0,0.05);
}

/* 浅色主题下的主体内容区域 */
body.light-theme main {
    position: relative;
    z-index: 1;
}

/* 浅色主题下的容器 */
body.light-theme .container {
    position: relative;
}

/* 浅色主题下的卡片过渡效果 */
body.light-theme .card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



body.light-theme .card-hover:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-4px) scale(1.02);
    background: rgba(255, 255, 255, 0.8) !important;
}

/* 浅色主题下的文字颜色 */
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
    color: #1e293b;
}

body.light-theme p,
body.light-theme li,
body.light-theme span {
    color: #374151;
}

/* 浅色主题下的副标题 */
body.light-theme .page-subtitle {
    color: #64748b;
}

/* 浅色主题下的按钮 */
body.light-theme .primary-button {
    background: linear-gradient(45deg, #64748b, #475569);
    color: white;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

body.light-theme .primary-button:hover {
    box-shadow: 0 10px 20px rgba(100, 116, 139, 0.3);
    background: linear-gradient(45deg, #475569, #334155);
}

/* 浅色主题下的彩虹按钮系统 */
body.light-theme .bg-blue-500 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    color: white !important;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
}

body.light-theme .bg-blue-500:not(.card-hover)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
    pointer-events: none;
}

body.light-theme .bg-blue-500:hover {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    box-shadow: 0 12px 40px rgba(79, 172, 254, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

body.light-theme .bg-blue-500:not(.card-hover):hover::before {
    left: 100%;
}

body.light-theme .hover\:bg-blue-600:hover {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    box-shadow: 0 12px 40px rgba(79, 172, 254, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

/* 浅色主题下的灰色按钮优化 */
body.light-theme .bg-gray-700 {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    border: 1px solid rgba(107, 114, 128, 0.3) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.2) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.light-theme .bg-gray-700:hover {
}

/* 浅色主题下的主题切换按钮 */
body.light-theme .theme-toggle {
    color: #4b5563; /* gray-600 */
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1e293b; /* slate-800 */
}

/* 浅色主题下的链接 */
body.light-theme .text-link {
    color: #64748b;
}

body.light-theme .text-link:hover {
    color: #475569;
}

/* 浅色主题下的时间线样式优化 */
body.light-theme .timeline-item::before {
    background: #3b82f6;
    border: 3px solid #f8fafc;
    box-shadow: 0 0 0 2px #3b82f6;
}

body.light-theme .timeline-item::after {
    background: linear-gradient(to bottom, #3b82f6, rgba(59, 130, 246, 0.3)) !important;
}

/* 浅色主题下的渐变背景优化 */
body.light-theme .bg-gradient-to-r.from-blue-600.to-purple-600 {
    background: linear-gradient(to right, #f8fafc, #e2e8f0) !important;
    border: 2px solid #3b82f6 !important;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15) !important;
}

/* 浅色主题下的圆形背景色优化 - 保持鲜艳度 */
body.light-theme .bg-yellow-500 {
    background: linear-gradient(135deg, #eab308, #ca8a04) !important;
}

body.light-theme .bg-red-500 {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

/* 浅色主题下的文字颜色优化 */
body.light-theme .text-white {
    color: #1e293b !important;
    font-weight: 600;
}

/* 浅色主题下的蓝色系文字 - 简化版本 */
body.light-theme .text-blue-100 {
    color: #475569 !important;
}

body.light-theme .text-blue-200 {
    color: #334155 !important;
}

body.light-theme .text-blue-300 {
    color: #1e40af !important;
    font-weight: 600;
}

/* 浅色主题下的紫色系文字 - 简化版本 */
body.light-theme .text-purple-200 {
    color: #6d28d9 !important;
    font-weight: 600;
}

body.light-theme .text-purple-300 {
    color: #5b21b6 !important;
    font-weight: 600;
}

/* 浅色主题下的绿色系文字 - 简化版本 */
body.light-theme .text-emerald-200 {
    color: #047857 !important;
}

body.light-theme .text-emerald-300 {
    color: #065f46 !important;
    font-weight: 600;
}

body.light-theme .text-green-200 {
    color: #16a34a !important;
}

body.light-theme .text-green-300 {
    color: #15803d !important;
    font-weight: 600;
}

/* 浅色主题下的天蓝色系文字 */
body.light-theme .text-sky-200 {
    color: #0369a1 !important;
}

body.light-theme .text-sky-300 {
    color: #0c4a6e !important;
}

/* 浅色主题下的靛蓝色系文字 */
body.light-theme .text-indigo-300 {
    color: #3730a3 !important;
}

/* 浅色主题下的玫瑰色系文字 */
body.light-theme .text-rose-300 {
    color: #be123c !important;
}

/* 浅色主题下的紫罗兰色系文字 */
body.light-theme .text-violet-300 {
    color: #5b21b6 !important;
}

/* 浅色主题下的彩虹色文字系统 - 扩展版 */
body.light-theme .text-amber-300 {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-weight: 600;
}

body.light-theme .text-teal-300 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-weight: 600;
}

body.light-theme .text-yellow-300 {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-weight: 600;
}

body.light-theme .text-orange-300 {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-weight: 600;
}

/* 新增彩虹色文字类 */
body.light-theme .text-rainbow {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #4facfe 50%, #00f2fe 75%, #43e97b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    font-weight: 700;
    animation: rainbow-shift 3s ease-in-out infinite;
}

@keyframes rainbow-shift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(180deg); }
}

/* 导航链接优化 - 修复显示问题 */
body.light-theme nav a {
    color: #374151 !important;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

body.light-theme nav a:hover {
    color: #1e40af !important;
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(30, 64, 175, 0.2);
}

/* 浅色主题下的背景色圆形图标 - 柔和配色 */
body.light-theme .bg-blue-500 {
    background: linear-gradient(135deg, #64748b, #475569) !important;
}

/* 浅色主题下的彩虹按钮系统 - 多色版本 */
body.light-theme .bg-indigo-500 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

body.light-theme .bg-indigo-500:hover {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
    box-shadow: 0 12px 40px rgba(168, 237, 234, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

body.light-theme .bg-sky-500 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(79, 172, 254, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

body.light-theme .bg-sky-500:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

body.light-theme .bg-emerald-500 {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

body.light-theme .bg-emerald-500:hover {
    background: linear-gradient(135deg, #34d399, #10b981) !important;
    box-shadow: 0 12px 40px rgba(52, 211, 153, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

body.light-theme .bg-rose-500 {
    background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(244, 63, 94, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

body.light-theme .bg-rose-500:hover {
    background: linear-gradient(135deg, #fb7185, #f43f5e) !important;
    box-shadow: 0 12px 40px rgba(251, 113, 133, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

body.light-theme .bg-violet-500 {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

body.light-theme .bg-violet-500:hover {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6) !important;
    box-shadow: 0 12px 40px rgba(167, 139, 250, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

body.light-theme .bg-green-500 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(67, 233, 123, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

body.light-theme .bg-green-500:hover {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    box-shadow: 0 12px 40px rgba(79, 172, 254, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

body.light-theme .bg-blue-600 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

body.light-theme .bg-blue-600:hover {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
    box-shadow: 0 12px 40px rgba(168, 237, 234, 0.5) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

body.light-theme .bg-indigo-600 {
    background-color: #4f46e5 !important;
}

body.light-theme .bg-purple-600 {
    background-color: #9333ea !important;
}

body.light-theme .bg-violet-600 {
    background-color: #7c3aed !important;
}

body.light-theme .bg-fuchsia-600 {
    background-color: #c026d3 !important;
}

/* 浅色主题下的背景透明元素 - 优化对比度 */
body.light-theme .bg-white.bg-opacity-10 {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(8px) !important;
}

body.light-theme .bg-black.bg-opacity-20 {
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: blur(12px) !important;
}

/* 浅色主题下的白色透明背景优化 */
body.light-theme .bg-white.bg-opacity-5 {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: blur(6px) !important;
}

/* 浅色主题下的边框 */
body.light-theme .border-white.border-opacity-20 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* 浅色主题下的边框颜色 */
body.light-theme .border-sky-500 {
    border-color: #0ea5e9 !important;
}

body.light-theme .border-sky-500.border-opacity-50 {
    border-color: rgba(14, 165, 233, 0.5) !important;
}

body.light-theme .border-blue-400 {
    border-color: #60a5fa !important;
}

body.light-theme .border-indigo-400 {
    border-color: #818cf8 !important;
}

body.light-theme .border-purple-400 {
    border-color: #a78bfa !important;
}

body.light-theme .border-violet-400 {
    border-color: #a78bfa !important;
}

body.light-theme .border-fuchsia-400 {
    border-color: #e879f9 !important;
}

/* 浅色主题下的特殊背景色 */
body.light-theme .bg-gray-700 {
    background-color: #374151 !important;
    color: white !important;
}

body.light-theme .bg-gray-800 {
    background-color: #1f2937 !important;
    color: white !important;
}

body.light-theme .bg-gray-900 {
    background-color: #111827 !important;
    color: white !important;
}

/* 主题切换按钮样式 */
.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.light-theme .theme-toggle {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #374151;
}

body.light-theme .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* 浅色主题下的彩虹主题切换按钮 */
body.light-theme #themeToggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    position: relative;
    overflow: hidden;
}

body.light-theme #themeToggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

body.light-theme #themeToggle:hover {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    box-shadow: 0 12px 40px rgba(79, 172, 254, 0.6) !important;
    transform: translateY(-3px) scale(1.05) !important;
}

body.light-theme #themeToggle:hover::before {
    left: 100%;
}

/* 浅色主题下的彩虹图标 */
body.light-theme #themeToggle svg {
    color: white !important;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)) !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

body.light-theme #themeToggle:hover svg {
    color: white !important;
    transform: rotate(180deg) scale(1.2) !important;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3)) !important;
}

/* 浅色主题下的影响与批判卡片样式覆盖 */
body.light-theme .bg-gradient-to-br.from-green-900 {
    background: linear-gradient(to bottom right, #dcfce7, #bbf7d0) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

body.light-theme .bg-gradient-to-br.from-red-900 {
    background: linear-gradient(to bottom right, #fef2f2, #fecaca) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

/* 浅色主题下绿色卡片的文字颜色 */
body.light-theme .bg-gradient-to-br.from-green-900 .text-green-300,
body.light-theme .bg-gradient-to-br.from-green-900 h3 {
    color: #15803d !important;
}

body.light-theme .bg-gradient-to-br.from-green-900 .text-green-200,
body.light-theme .bg-gradient-to-br.from-green-900 h4 {
    color: #166534 !important;
}

body.light-theme .bg-gradient-to-br.from-green-900 .text-green-100,
body.light-theme .bg-gradient-to-br.from-green-900 p {
    color: #374151 !important;
}

/* 浅色主题下红色卡片的文字颜色 */
body.light-theme .bg-gradient-to-br.from-red-900 .text-red-300,
body.light-theme .bg-gradient-to-br.from-red-900 h3 {
    color: #dc2626 !important;
}

body.light-theme .bg-gradient-to-br.from-red-900 .text-red-200,
body.light-theme .bg-gradient-to-br.from-red-900 h4 {
    color: #991b1b !important;
}

body.light-theme .bg-gradient-to-br.from-red-900 .text-red-100,
body.light-theme .bg-gradient-to-br.from-red-900 p {
    color: #374151 !important;
}

/* 浅色主题下圆形图标背景色调整 */
body.light-theme .bg-gradient-to-br.from-green-900 .bg-green-500 {
    background: #22c55e !important;
}

body.light-theme .bg-gradient-to-br.from-red-900 .bg-red-500 {
    background: #ef4444 !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .theme-toggle {
        padding: 0.375rem;
    }
}