﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
    --gradient-pink: linear-gradient(135deg, #F472B6, #FB923C);
    --gradient-cyan: linear-gradient(135deg, #34D399, #22D3EE);
    --gradient-purple: linear-gradient(135deg, #A78BFA, #818CF8);
    --gradient-military: linear-gradient(135deg, #DC2626, #B91C1C);
    --gradient-gold: linear-gradient(135deg, #F59E0B, #D97706);
    --gradient-blue: linear-gradient(135deg, #3B82F6, #2563EB);
    --gradient-green: linear-gradient(135deg, #10B981, #059669);
    --gradient-orange: linear-gradient(135deg, #F97316, #EA580C);
    --gradient-rose: linear-gradient(135deg, #F43F5E, #E11D48);
    --gradient-teal: linear-gradient(135deg, #14B8A6, #0D9488);
    --gradient-violet: linear-gradient(135deg, #7C3AED, #6D28D9);
    
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 4px 12px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow-primary: 0 0 40px rgba(99, 102, 241, 0.3);
    --shadow-glow-gold: 0 0 40px rgba(245, 158, 11, 0.3);
    --shadow-glow-cyan: 0 0 40px rgba(52, 211, 153, 0.3);
    
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --bg-primary: linear-gradient(180deg, #F1F5F9 0%, #EEF2FF 20%, #E0E7FF 50%, #F5F3FF 80%, #F8FAFC 100%);
    --bg-body: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8FAFC;
    --bg-header: rgba(255, 255, 255, 0.85);
    --bg-header-hover: rgba(255, 255, 255, 0.95);
    --bg-input: #F1F5F9;
    --bg-button: #6366F1;
    --bg-button-hover: #4F46E5;
    
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-white: #FFFFFF;
    
    --border-color: rgba(226, 232, 240, 0.6);
    --border-color-hover: rgba(148, 163, 184, 0.5);
    
    --accent-primary: #6366F1;
    --accent-secondary: #8B5CF6;
    --accent-success: #10B981;
    --accent-warning: #F59E0B;
    --accent-danger: #EF4444;
    --accent-info: #3B82F6;
    
    --accent-cyan: #0EA5E9;
    --accent-teal: #0D9488;
    
    --theme-duration: 0.35s;
    --theme-easing: ease;
}

* {
    box-sizing: border-box;
}

svg {
    transition: color var(--theme-duration) var(--theme-easing), 
                stroke var(--theme-duration) var(--theme-easing),
                fill var(--theme-duration) var(--theme-easing);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Microsoft YaHei UI", "Source Han Sans CN", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--theme-duration) var(--theme-easing),
                color var(--theme-duration) var(--theme-easing),
                border-color var(--theme-duration) var(--theme-easing);
    position: relative;
}


.header,
main,
footer,
section,
.hero,
.content-wrapper {
    position: relative;
    z-index: 1;
}


[data-theme="dark"] {
    --bg-primary: linear-gradient(180deg, #0F172A 0%, #1E1B4B 20%, #172554 50%, #1E1B4B 80%, #0F172A 100%);
    --bg-body: #0F172A;
    --bg-card: #1E293B;
    --bg-card-hover: #334155;
    --bg-header: rgba(15, 23, 42, 0.85);
    --bg-header-hover: rgba(15, 23, 42, 0.95);
    --bg-input: #1E293B;
    --bg-button: #6366F1;
    --bg-button-hover: #818CF8;
    
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --text-white: #F8FAFC;
    
    --border-color: rgba(71, 85, 105, 0.4);
    --border-color-hover: rgba(148, 163, 184, 0.5);
    
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 4px 12px -2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .logo-icon {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(240, 198, 116, 0.3);
}

[data-theme="dark"] .logo-icon img {
    filter: drop-shadow(0 0 10px rgba(240, 198, 116, 0.4)) brightness(1.1);
}

[data-theme="dark"] .feature-card {
    background: #1E293B !important;
    border-color: rgba(71, 85, 105, 0.4) !important;
}

[data-theme="dark"] .feature-tags span {
    background: rgba(148, 163, 184, 0.1) !important;
}

/* ===== 护眼绿主题 ===== */
[data-theme="eye-care"] {
    --bg-primary: linear-gradient(180deg, #DDEEDC 0%, #E8F4EA 30%, #DDF2E0 60%, #E8F4EA 85%, #DDEEDC 100%);
    --bg-body: #DDEEDC;
    --bg-card: #EAF6EB;
    --bg-card-hover: #D6EDD9;
    --bg-header: rgba(221, 238, 220, 0.9);
    --bg-header-hover: rgba(214, 237, 217, 0.97);
    --bg-input: #F1F9F2;
    --bg-button: #4A9E7A;
    --bg-button-hover: #5FB791;

    --text-primary: #22493A;
    --text-secondary: #3C6B55;
    --text-muted: #68967E;
    --text-white: #FFFFFF;

    --border-color: rgba(106, 168, 130, 0.35);
    --border-color-hover: rgba(74, 158, 122, 0.6);

    --shadow-lg: 0 25px 50px -12px rgba(60, 107, 85, 0.18);
    --shadow-md: 0 10px 25px -5px rgba(60, 107, 85, 0.12);
    --shadow-sm: 0 4px 12px -2px rgba(60, 107, 85, 0.08);
}

[data-theme="eye-care"] .logo-icon {
    background: rgba(234, 246, 235, 0.9);
    border: 1px solid rgba(74, 158, 122, 0.25);
}

[data-theme="eye-care"] .logo-icon img {
    filter: drop-shadow(0 0 10px rgba(74, 158, 122, 0.25));
}

[data-theme="eye-care"] .feature-card {
    background: #EAF6EB !important;
    border-color: rgba(106, 168, 130, 0.35) !important;
}

[data-theme="eye-care"] .feature-tags span {
    background: rgba(74, 158, 122, 0.1) !important;
    color: #3C6B55 !important;
}

/* ===== OLED 纯黑主题 ===== */
[data-theme="oled"] {
    --bg-primary: linear-gradient(180deg, #000000 0%, #0A0A0F 30%, #000000 60%, #0A0A0F 85%, #000000 100%);
    --bg-body: #000000;
    --bg-card: #0F0F14;
    --bg-card-hover: #1A1A24;
    --bg-header: rgba(0, 0, 0, 0.92);
    --bg-header-hover: rgba(10, 10, 15, 0.98);
    --bg-input: #0F0F14;
    --bg-button: #7C3AED;
    --bg-button-hover: #8B5CF6;

    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --text-white: #F8FAFC;

    --border-color: rgba(51, 65, 85, 0.5);
    --border-color-hover: rgba(99, 102, 241, 0.5);

    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 4px 12px -2px rgba(0, 0, 0, 0.4);
}

[data-theme="oled"] .firefly {
    background: #E9D5FF;
    box-shadow:
        0 0 var(--glow-size, 10px) rgba(168, 85, 247, 0.7),
        0 0 calc(var(--glow-size, 10px) * 2.2) rgba(168, 85, 247, 0.3);
}

[data-theme="oled"] .logo-icon {
    background: rgba(15, 15, 20, 0.9);
    border: 1px solid rgba(124, 58, 237, 0.35);
}

[data-theme="oled"] .logo-icon img {
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.4)) brightness(1.15);
}

[data-theme="oled"] .feature-card {
    background: #0F0F14 !important;
    border-color: rgba(51, 65, 85, 0.5) !important;
}

[data-theme="oled"] .feature-tags span {
    background: rgba(124, 58, 237, 0.12) !important;
}

/* ===== 暖色纸白主题 ===== */
[data-theme="warm"] {
    --bg-primary: linear-gradient(180deg, #F5EFE0 0%, #FBF5E4 30%, #F7EFDB 60%, #FBF5E4 85%, #F5EFE0 100%);
    --bg-body: #F5EFE0;
    --bg-card: #FBF5E4;
    --bg-card-hover: #F3E7CA;
    --bg-header: rgba(245, 239, 224, 0.92);
    --bg-header-hover: rgba(243, 231, 202, 0.98);
    --bg-input: #FDF8EC;
    --bg-button: #B8860B;
    --bg-button-hover: #D4A017;

    --text-primary: #3D2E14;
    --text-secondary: #5C4725;
    --text-muted: #8B7355;
    --text-white: #FFFFFF;

    --border-color: rgba(184, 134, 11, 0.3);
    --border-color-hover: rgba(184, 134, 11, 0.55);

    --shadow-lg: 0 25px 50px -12px rgba(92, 71, 37, 0.18);
    --shadow-md: 0 10px 25px -5px rgba(92, 71, 37, 0.12);
    --shadow-sm: 0 4px 12px -2px rgba(92, 71, 37, 0.08);
}

[data-theme="warm"] .firefly {
    background: #F5DEB3;
    box-shadow:
        0 0 var(--glow-size, 8px) rgba(184, 134, 11, 0.55),
        0 0 calc(var(--glow-size, 8px) * 2) rgba(184, 134, 11, 0.22);
}

[data-theme="warm"] .logo-icon {
    background: rgba(251, 245, 228, 0.9);
    border: 1px solid rgba(184, 134, 11, 0.3);
}

[data-theme="warm"] .logo-icon img {
    filter: drop-shadow(0 0 10px rgba(184, 134, 11, 0.3)) brightness(1.05);
}

[data-theme="warm"] .feature-card {
    background: #FBF5E4 !important;
    border-color: rgba(184, 134, 11, 0.3) !important;
}

[data-theme="warm"] .feature-tags span {
    background: rgba(184, 134, 11, 0.1) !important;
    color: #5C4725 !important;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* 动画关键帧 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-infinite.animation-paused {
    animation-play-state: paused !important;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes rotate-gradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounce-in {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slide-up {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes card-entrance {
    0% { opacity: 0; transform: translateY(20px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes card-hover-lift {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-8px) scale(1.02); }
}

@keyframes chip-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes btn-press {
    0% { transform: scale(1); }
    50% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

/* ===== Header ===== */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    min-width: 1100px;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    will-change: transform, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background var(--theme-duration) var(--theme-easing),
                border-color var(--theme-duration) var(--theme-easing), color var(--theme-duration) var(--theme-easing);
}

[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.85) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15) !important;
}

[data-page="explore"] .header {
    background: rgba(10, 10, 10, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-page="explore"] .header:hover {
    background: rgba(10, 10, 10, 0.8) !important;
}

.header:hover {
    background: var(--bg-header-hover);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-scrolled-up {
    transform: translateY(-100%);
}

.header-shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    transition: transform 0.3s ease, color 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo svg {
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.3));
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 32px;
    white-space: nowrap;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.nav a {
    position: relative;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.nav a:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.nav a:hover::after {
    width: 40%;
}

.nav a.active-study {
    color: #6366F1;
    background: rgba(99, 102, 241, 0.08);
}

.nav a.active-study::after {
    width: 40%;
    background: #6366F1;
}

.nav a.active-game {
    color: #10B981;
    background: rgba(16, 185, 129, 0.08);
}

.nav a.active-game::after {
    width: 40%;
    background: #10B981;
}

.nav a.active-dev {
    color: #8B5CF6;
    background: rgba(139, 92, 246, 0.08);
}

.nav a.active-dev::after {
    width: 40%;
    background: #8B5CF6;
}

.nav a.active-military {
    color: #DC2626;
    background: rgba(220, 38, 38, 0.08);
}

.nav a.active-military::after {
    width: 40%;
    background: #DC2626;
}

.nav a.active-jw {
    color: #F97316;
    background: rgba(249, 115, 22, 0.08);
}

.nav a.active-jw::after {
    width: 40%;
    background: #F97316;
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
}

.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: color 0.3s ease, background 0.3s ease;
    white-space: nowrap;
}

.nav-dropdown-btn:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-dropdown-btn svg {
    transition: transform 0.3s ease;
}

.nav-dropdown.open .nav-dropdown-btn svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-dropdown-menu a.active-game,
.nav-dropdown-menu a.active-military,
.nav-dropdown-menu a.active-jw,
.nav-dropdown-menu a.active-job,
.nav-dropdown-menu a.active-plan {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(241, 245, 249, 0.6);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.search-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.search-btn:focus-within {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-btn kbd {
    background: rgba(148, 163, 184, 0.2);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-family: inherit;
    color: var(--text-secondary);
    font-weight: 600;
}

.fav-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: rgba(241, 245, 249, 0.6);
    cursor: pointer;
    color: #64748B;
    fill: #64748B;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.fav-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: #F59E0B;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: rgba(241, 245, 249, 0.6);
    cursor: pointer;
    color: #64748B;
    fill: #64748B;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.theme-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.fav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #FFFFFF;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.fav-badge:empty, .fav-badge[data-count="0"] { display: none; }

/* ===== Main ===== */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 90px 24px 32px;
}

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 40% 80%, rgba(52, 211, 153, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 35%);
    animation: pulse-glow 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 5%;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    filter: blur(30px);
}

.hero-decoration {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    z-index: 0;
}

.hero-decoration-1 {
    top: 10%;
    right: 10%;
    background: linear-gradient(135deg, #F472B6, #FB923C);
    animation: float 10s ease-in-out infinite;
}

.hero-decoration-2 {
    bottom: 20%;
    left: 5%;
    background: linear-gradient(135deg, #34D399, #22D3EE);
    animation: float 12s ease-in-out infinite reverse;
}

.hero-decoration-3 {
    top: 40%;
    right: 20%;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #A78BFA, #818CF8);
    animation: float 9s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 56px;
    font-weight: 900;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 25%, #EC4899 50%, #F472B6 75%, #F59E0B 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -1px;
    line-height: 1.2;
    animation: shimmer 4s linear infinite;
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
}

.hero p {
    font-size: 22px;
    background: linear-gradient(90deg, #64748B, #94A3B8, #64748B);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 400;
    letter-spacing: 1px;
    animation: shimmer 5s linear infinite;
    margin-bottom: 8px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 48px;
    position: relative;
    z-index: 1;
}

.hero-stat {
    text-align: center;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hero-stat:nth-child(1) .hero-stat-number {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat:nth-child(2) .hero-stat-number {
    background: var(--gradient-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat:nth-child(3) .hero-stat-number {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-number {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.hero-stat-label {
    font-size: 15px;
    color: #64748B;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===== Home Hero ===== */
.home-hero {
    position: relative;
    padding: 60px 40px;
    border-radius: 24px;
    margin: 0 0 30px;
    overflow: hidden;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 40%, #EC4899 100%);
}

.home-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.3;
}

.home-hero-bg::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
    border-radius: 50%;
}

.home-hero-bg::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -15%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    border-radius: 50%;
}

.home-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.home-hero-content .hero-title {
    font-size: 56px;
    font-weight: 900;
    margin: 0 0 12px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero-content .hero-subtitle {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    margin: 0 0 32px;
    font-weight: 500;
}

.home-hero-content .hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.home-hero-content .hero-stat {
    text-align: center;
}

.home-hero-content .hero-stat-num {
    display: block;
    font-size: 36px;
    font-weight: 900;
    color: #fff;
}

.home-hero-content .hero-stat-label {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-top: 6px;
}

.home-cards-section {
    margin-bottom: 40px;
}

.home-cards-section .section-header {
    margin-bottom: 24px;
}

.home-cards-section .section-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.home-cards-section .section-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== Home Cards ===== */
.home-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.timeline-showcase {
    padding: 40px 0;
    margin-bottom: 20px;
}

.showcase-header {
    text-align: center;
    margin-bottom: 32px;
}

.showcase-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.showcase-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.showcase-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #6366F1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.showcase-link:hover {
    gap: 10px;
}

.showcase-container {
    max-width: 100%;
    overflow: hidden;
}

.showcase-timeline {
    position: relative;
    display: flex;
    align-items: center;
    height: 200px;
    overflow: hidden;
}

.showcase-line {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #6366F1, #8B5CF6, #EC4899);
    transform-origin: left;
    animation: showcaseLineDraw 8s linear infinite;
}

@keyframes showcaseLineDraw {
    0% { transform: translateY(-50%) scaleX(0); }
    10% { transform: translateY(-50%) scaleX(0.1); }
    90% { transform: translateY(-50%) scaleX(1); }
    100% { transform: translateY(-50%) scaleX(1); }
}

.showcase-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #EC4899;
    border-radius: 50%;
    box-shadow: 0 0 10px #EC4899, 0 0 20px #EC4899;
    animation: showcasePulse 8s linear infinite;
}

@keyframes showcasePulse {
    0% { left: 0%; opacity: 0; }
    10% { left: 10%; opacity: 1; }
    90% { left: 90%; opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.showcase-items {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 6%;
    padding: 0 4%;
}

.showcase-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.showcase-item.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.showcase-item.current {
    transform: translateY(-10px) scale(1.1);
}

.showcase-item.current .showcase-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-color: rgba(99, 102, 241, 0.3);
}

.showcase-item.current .showcase-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.3), 0 0 15px rgba(99, 102, 241, 0.5);
}

.showcase-dot {
    width: 10px;
    height: 10px;
    background: #6366F1;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
    margin-bottom: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.showcase-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    text-align: center;
    min-width: 100px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.showcase-date {
    font-size: 12px;
    font-weight: 700;
    color: #6366F1;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.showcase-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .timeline-showcase {
        padding: 30px 0;
    }
    
    .showcase-header h2 {
        font-size: 20px;
    }
    
    .showcase-timeline {
        height: 160px;
    }
    
    .showcase-card {
        padding: 12px 16px;
        min-width: 80px;
    }
    
    .showcase-date {
        font-size: 11px;
    }
    
    .showcase-title {
        font-size: 12px;
    }
}

/* ===== 3D Timeline Showcase ===== */
.showcase-3d-container {
    width: 100%;
    overflow: hidden;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    padding: 12px 0 40px;
    text-align: center;
}

.showcase-3d-scene {
    position: relative;
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.showcase-3d-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.showcase-3d-item {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -80px;
    margin-top: -100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
    will-change: transform, opacity;
}

.showcase-3d-card {
    width: 160px;
    height: 200px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.showcase-3d-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6, #EC4899);
    border-radius: 18px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    filter: blur(8px);
}

.showcase-3d-card:hover::before {
    opacity: 0.6;
}

.showcase-3d-card:hover {
    transform: rotateY(180deg) scale(1.08) translateZ(30px);
}

.card-3d-front,
.card-3d-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.card-3d-front {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.15),
                0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-3d-back {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: white;
    transform: rotateY(180deg);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.card-3d-date {
    font-size: 14px;
    font-weight: 700;
    color: #6366F1;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.card-3d-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.card-3d-icon {
    color: #8B5CF6;
    opacity: 0.8;
}

.card-3d-back-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
}

.card-3d-back-desc {
    font-size: 13px;
    text-align: center;
    opacity: 0.9;
    line-height: 1.5;
}

.showcase-3d-dot {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #6366F1, #EC4899);
    border-radius: 50%;
    margin-top: 25px;
    box-shadow: 0 0 0 4px var(--bg-card),
                0 0 20px rgba(99, 102, 241, 0.5);
    position: relative;
    z-index: 5;
}

.showcase-3d-line {
    position: absolute;
    left: 50%;
    top: 78%;
    transform: translateX(-50%) translateZ(-150px);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(99, 102, 241, 0.3) 20%,
        rgba(99, 102, 241, 0.6) 50%,
        rgba(99, 102, 241, 0.3) 80%,
        transparent 100%
    );
    border-radius: 3px;
}

.showcase-3d-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: lineGlow 3s ease-in-out infinite;
}

@keyframes lineGlow {
    0%, 100% { 
        left: 0%; 
        opacity: 0;
        width: 20px;
        height: 20px;
    }
    10% { 
        opacity: 1; 
        width: 30px;
        height: 30px;
    }
    90% { 
        opacity: 1; 
        width: 30px;
        height: 30px;
    }
    100% { 
        left: 100%; 
        opacity: 0;
        width: 20px;
        height: 20px;
    }
}

.showcase-3d-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateZ(-200px);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, 
        rgba(99, 102, 241, 0.15) 0%, 
        rgba(139, 92, 246, 0.08) 40%, 
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
}

[data-theme="dark"] .card-3d-front {
    background: #1E293B;
    border-color: rgba(71, 85, 105, 0.4);
}

[data-theme="dark"] .card-3d-title {
    color: #F8FAFC;
}

[data-theme="dark"] .showcase-3d-dot {
    box-shadow: 0 0 0 4px #1E293B,
                0 0 20px rgba(99, 102, 241, 0.5);
}

/* ===== 精选推荐 顶部提示 ===== */
.showcase-3d-tip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.92), rgba(139, 92, 246, 0.92) 45%, rgba(236, 72, 153, 0.92));
    color: #F8FAFC;
    font-size: 13px;
    font-weight: 500;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.28);
    backdrop-filter: blur(6px);
}

.showcase-3d-tip svg {
    opacity: 0.92;
    flex-shrink: 0;
}

.showcase-3d-tip .tip-dot {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

[data-theme="dark"] .showcase-3d-tip {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.38);
}

@media (max-width: 768px) {
    .showcase-3d-scene {
        height: 260px;
    }
    
    .showcase-3d-track {
        gap: 20px;
    }
    
    .showcase-3d-card {
        width: 120px;
        height: 160px;
    }
    
    .card-3d-date {
        font-size: 12px;
    }
    
    .card-3d-title {
        font-size: 14px;
    }
    
    .card-3d-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .card-3d-back-title {
        font-size: 18px;
    }
    
    .card-3d-back-desc {
        font-size: 11px;
    }
}

.home-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    border: 1px solid rgba(226, 232, 240, 0.4);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease,
                background 0.4s ease;
    display: block;
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    content-visibility: auto;
    contain-intrinsic-size: 300px;
    will-change: transform, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.home-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: var(--card-gradient);
    transition: left 0.4s ease;
}

.home-card:hover::before {
    left: 0;
}

.home-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, var(--card-glow) 0%, transparent 60%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    pointer-events: none;
}

.home-card:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.15;
}

.home-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.15), 0 10px 25px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
    background: linear-gradient(145deg, #ffffff 0%, rgba(255, 255, 255, 0.98) 100%);
}

.home-card .icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

.home-card:hover .icon-wrap {
    transform: scale(1.15);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.18);
}

.home-card .icon-wrap.gradient-pink {
    background: var(--gradient-pink);
    --card-gradient: var(--gradient-pink);
    --card-glow: rgba(244, 114, 182, 0.4);
    box-shadow: 0 8px 20px rgba(244, 114, 182, 0.3);
}

.home-card .icon-wrap.gradient-cyan {
    background: var(--gradient-cyan);
    --card-gradient: var(--gradient-cyan);
    --card-glow: rgba(52, 211, 153, 0.4);
    box-shadow: 0 8px 20px rgba(52, 211, 153, 0.3);
}

.home-card .icon-wrap.gradient-purple {
    background: var(--gradient-purple);
    --card-gradient: var(--gradient-purple);
    --card-glow: rgba(139, 92, 246, 0.4);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.home-card .icon-wrap.gradient-military {
    background: var(--gradient-military);
    --card-gradient: var(--gradient-military);
    --card-glow: rgba(220, 38, 38, 0.4);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.home-card .icon-wrap.gradient-gold {
    background: var(--gradient-gold);
    --card-gradient: var(--gradient-gold);
    --card-glow: rgba(245, 158, 11, 0.4);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.home-card .icon-wrap.gradient-blue {
    background: var(--gradient-blue);
    --card-gradient: var(--gradient-blue);
    --card-glow: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.home-card .icon-wrap.gradient-green {
    background: var(--gradient-green);
    --card-gradient: var(--gradient-green);
    --card-glow: rgba(16, 185, 129, 0.4);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.home-card .icon-wrap.gradient-orange {
    background: var(--gradient-orange);
    --card-gradient: var(--gradient-orange);
    --card-glow: rgba(249, 115, 22, 0.4);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3);
}

.home-card .icon-wrap.gradient-teal {
    background: var(--gradient-teal);
    --card-gradient: var(--gradient-teal);
    --card-glow: rgba(20, 184, 166, 0.4);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.3);
}

.home-card .icon-wrap.gradient-rose {
    background: var(--gradient-rose);
    --card-gradient: var(--gradient-rose);
    --card-glow: rgba(244, 63, 94, 0.4);
    box-shadow: 0 8px 20px rgba(244, 63, 94, 0.3);
}

.home-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1E293B;
    position: relative;
    z-index: 1;
}

.home-card p {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.home-card .card-count {
    font-size: 12px;
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    z-index: 1;
    padding: 6px 12px;
    background: rgba(241, 245, 249, 0.6);
    border-radius: 20px;
    width: fit-content;
    margin: 0 auto;
}

/* ===== Recent Visits ===== */
.recent-section {
    margin-top: 48px;
}

.recent-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1E293B;
}

.recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s;
    cursor: pointer;
}

.recent-item:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-sm);
}

.recent-item .recent-cat {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.recent-item .recent-cat.study { background: #EEF2FF; color: #6366F1; }
.recent-item .recent-cat.game { background: #ECFDF5; color: #10B981; }
.recent-item .recent-cat.dev { background: #F5F3FF; color: #8B5CF6; }
.recent-item .recent-cat.jw { background: #FFF7ED; color: #F97316; }

/* ===== Section Header ===== */
.section-header {
    margin-bottom: 24px;
}

.section-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.section-header p { font-size: 16px; color: var(--text-secondary); }

/* ===== Category Tabs ===== */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cat-tab {
    position: relative;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.cat-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cat-tab:hover::before {
    opacity: 1;
}

.cat-tab:hover {
    background: #FFFFFF;
    color: #1E293B;
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.cat-tab.active {
    color: #FFFFFF;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cat-tab.active[data-section="study"] { background: var(--gradient-primary); }
.cat-tab.active[data-section="game"] { background: linear-gradient(135deg, #10B981, #059669); }
.cat-tab.active[data-section="dev"] { background: linear-gradient(135deg, #8B5CF6, #7C3AED); }
.cat-tab.active[data-section="military"] { background: linear-gradient(135deg, #DC2626, #B91C1C); }
.cat-tab.active[data-section="jw"] { background: linear-gradient(135deg, #F97316, #EA580C); }

/* ===== Cards Grid ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.resource-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease,
                background 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    overflow: hidden;
    content-visibility: auto;
    contain-intrinsic-size: 350px;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    animation: card-entrance 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transition: left 0.4s ease;
}

.resource-card:hover::before {
    left: 0;
}

.resource-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.03) 50%, transparent 70%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    pointer-events: none;
}

.resource-card:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.resource-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.12), 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: rgba(99, 102, 241, 0.15);
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.card-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.tag {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-secondary);
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.tag:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #6366F1;
    border-color: rgba(99, 102, 241, 0.2);
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    gap: 8px;
}

.card-bottom-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.access-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.access-badge.ok { 
    color: #10B981; 
    background: rgba(16, 185, 129, 0.1);
}
.access-badge.need { 
    color: #F97316; 
    background: rgba(249, 115, 22, 0.1);
}

.accel-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #F97316;
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.accel-btn:hover { background: #FFEDD5; }

.access-combo {
    display: flex;
    align-items: center;
    background: rgba(249, 115, 22, 0.1);
    border-radius: 6px;
    padding: 3px 3px;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.access-combo .access-badge.need {
    background: transparent;
    padding: 0 6px;
    border-right: 1px solid rgba(249, 115, 22, 0.3);
    border-radius: 0;
}

.access-combo .accel-btn {
    background: transparent;
    border: none;
    padding: 0 6px;
    border-radius: 0;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.card-link:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: translateX(4px);
}

.star-toggle {
    background: rgba(241, 245, 249, 0.6);
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    color: #CBD5E1;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: var(--radius-sm);
}

.star-toggle:hover {
    color: #F59E0B;
    background: #FFFBEB;
    transform: scale(1.15);
}

.star-toggle.active {
    color: #F59E0B;
    background: #FFFBEB;
}

/* ===== Card Top Actions ===== */
.card-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.mini-btn {
    background: rgba(241, 245, 249, 0.6);
    border: none;
    cursor: pointer;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #CBD5E1;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: var(--radius-sm);
    line-height: 0;
}
.mini-btn:hover {
    color: #06B6D4;
    background: #ECFEFF;
    transform: scale(1.12);
}
.mini-btn.active {
    color: #06B6D4;
    background: #ECFEFF;
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.25);
}

/* ===== Card Chips (已收藏/3天新增/访问次数) ===== */
.card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: -6px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    white-space: nowrap;
    line-height: 1.4;
    user-select: none;
}
.chip-fav {
    color: #B45309;
    background: rgba(245, 158, 11, 0.12);
}
.chip-new {
    color: #6D28D9;
    background: rgba(139, 92, 246, 0.12);
}
.chip-count {
    color: var(--text-muted);
    background: var(--bg-card-hover, rgba(100, 116, 139, 0.08));
    border: 1px solid var(--border-color, rgba(100,116,139,0.12));
}
.chip-sensitive {
    color: #DC2626;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== 四级 Access Badge ===== */
.access-badge.lvl-direct {
    color: #059669;
    background: rgba(16, 185, 129, 0.12);
}
.access-badge.lvl-slow {
    color: #CA8A04;
    background: rgba(234, 179, 8, 0.14);
}
.access-badge.lvl-proxy {
    color: #DC2626;
    background: rgba(249, 115, 22, 0.12);
}
.access-badge.lvl-campus {
    color: #7C3AED;
    background: rgba(139, 92, 246, 0.12);
}
.access-combo:has(.lvl-slow) {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.3);
}
.access-combo:has(.lvl-slow) .access-badge.lvl-slow {
    background: transparent;
    border-right-color: rgba(234, 179, 8, 0.35);
}
.access-combo:has(.lvl-slow) .accel-btn {
    color: #CA8A04;
}
.access-combo:has(.lvl-proxy) {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(249, 115, 22, 0.3);
}
.access-combo:has(.lvl-proxy) .access-badge.lvl-proxy {
    background: transparent;
    border-right-color: rgba(239, 68, 68, 0.4);
}
.access-combo:has(.lvl-campus) {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.3);
}
.access-combo:has(.lvl-campus) .access-badge.lvl-campus {
    background: transparent;
    border-right-color: rgba(139, 92, 246, 0.35);
}
.access-combo:has(.lvl-campus) .accel-btn {
    color: #7C3AED;
}

/* ===== Card Bottom New Layout ===== */
.card-bottom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 4px;
}
.card-bottom > :first-child {
    align-self: flex-start;
}

/* ===== Three Action Buttons (收藏/复制/访问) ===== */
.card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 2px;
}
.act-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card-hover, rgba(100, 116, 139, 0.08));
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.22s ease;
    white-space: nowrap;
    line-height: 1;
}
.act-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-xs, 0 2px 4px rgba(0,0,0,0.05));
}
.act-btn.fav-on {
    color: #B45309;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}
.act-btn.fav-on:hover {
    background: rgba(245, 158, 11, 0.18);
}
.act-btn.visit-btn {
    color: var(--c, var(--accent-color, #6366F1));
    background: color-mix(in srgb, var(--c, #6366F1) 8%, transparent);
    border-color: color-mix(in srgb, var(--c, #6366F1) 25%, transparent);
}
.act-btn.visit-btn:hover {
    background: color-mix(in srgb, var(--c, #6366F1) 16%, transparent);
    transform: translateY(-1px);
}

/* ===== 深色主题适配 ===== */
[data-theme="dark"] .mini-btn,
[data-theme="oled"] .mini-btn {
    background: rgba(51, 65, 85, 0.5);
    color: #94A3B8;
}
[data-theme="dark"] .mini-btn:hover,
[data-theme="oled"] .mini-btn:hover {
    background: rgba(6, 182, 212, 0.12);
    color: #22D3EE;
}
[data-theme="dark"] .mini-btn.active,
[data-theme="oled"] .mini-btn.active {
    background: rgba(6, 182, 212, 0.16);
    color: #22D3EE;
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4);
}
[data-theme="dark"] .star-toggle,
[data-theme="oled"] .star-toggle {
    background: rgba(51, 65, 85, 0.5);
    color: #94A3B8;
}
[data-theme="dark"] .chip-fav { background: rgba(245, 158, 11, 0.18); color: #FBBF24; }
[data-theme="oled"] .chip-fav { background: rgba(245, 158, 11, 0.18); color: #FBBF24; }
[data-theme="dark"] .chip-new { background: rgba(139, 92, 246, 0.18); color: #C4B5FD; }
[data-theme="oled"] .chip-new { background: rgba(139, 92, 246, 0.18); color: #C4B5FD; }
[data-theme="dark"] .chip-sensitive { background: rgba(239, 68, 68, 0.18); color: #F87171; }
[data-theme="oled"] .chip-sensitive { background: rgba(239, 68, 68, 0.18); color: #F87171; }

[data-theme="eye-care"] .mini-btn {
    background: rgba(220, 239, 226, 0.7);
    color: #4A7C59;
}
[data-theme="eye-care"] .chip-count {
    background: rgba(104, 150, 126, 0.12);
    color: #3E7555;
    border-color: rgba(104, 150, 126, 0.2);
}
[data-theme="warm"] .mini-btn {
    background: rgba(252, 233, 200, 0.7);
    color: #8B7355;
}
[data-theme="warm"] .chip-count {
    background: rgba(139, 115, 85, 0.12);
    color: #7A6040;
    border-color: rgba(139, 115, 85, 0.22);
}
[data-theme="dark"] .chip-count,
[data-theme="oled"] .chip-count {
    background: rgba(100, 116, 139, 0.16);
    color: #94A3B8;
    border-color: rgba(100, 116, 139, 0.3);
}

/* ===== Military Section ===== */
.gradient-military {
    background: linear-gradient(135deg, #DC2626, #B91C1C) !important;
}

.military-widgets {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.countdown-card {
    flex: 1;
    min-width: 240px;
    background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
    border: 1px solid #FECACA;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.countdown-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #DC2626;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.countdown-info { flex: 1; }

.countdown-label {
    font-size: 13px;
    color: #991B1B;
    font-weight: 500;
    margin-bottom: 2px;
}

.countdown-days {
    font-size: 28px;
    font-weight: 800;
    color: #DC2626;
    letter-spacing: -1px;
}

.quick-tools {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 240px;
}

.tool-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-btn:hover {
    border-color: #FCA5A5;
    background: #FEF2F2;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.tool-btn span { color: #DC2626; }

.scope-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.new-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: #DC2626;
    color: #fff;
    margin-left: 6px;
    vertical-align: middle;
    animation: newPulse 2s ease-in-out infinite;
}

.broken-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: #6B7280;
    color: #fff;
    margin-left: 6px;
    vertical-align: middle;
}

.resource-card.broken {
    opacity: 0.6;
    border-color: #E5E7EB;
}

.resource-card.broken .visit-btn {
    background: #9CA3AF !important;
    pointer-events: none;
}

@keyframes newPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.type-tag { background: #FEF2F2 !important; color: #DC2626 !important; border: 1px solid #FECACA !important; }
.year-tag { background: #F1F5F9 !important; color: #64748B !important; }

.military-card .card-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

/* Military Modal Specifics */
.position-form, .physical-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-input);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #DC2626;
}

.form-submit {
    padding: 12px;
    background: #DC2626;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.form-submit:hover { background: #B91C1C; }

.match-results {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-item {
    padding: 12px 14px;
    background: #F8FAFC;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    font-size: 14px;
}

.match-item strong { color: #DC2626; }

.physical-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.physical-table th,
.physical-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #E2E8F0;
}

.physical-table th {
    background: #F8FAFC;
    font-weight: 600;
    color: #64748B;
    font-size: 13px;
}

.physical-table tr:hover td { background: #FEF2F2; }

/* ===== Toast ===== */
.toast-notification {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
    font-size: 15px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-notification.bottom-right {
    top: auto;
    left: auto;
    right: 24px;
    bottom: 24px;
    transform: translateX(0) translateY(100px);
}

.toast-notification.bottom-right.show {
    transform: translateX(0) translateY(0);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open::before {
    background: rgba(0, 0, 0, 0.5);
}

.modal-overlay.open {
    pointer-events: auto;
    opacity: 1;
}

.modal-overlay.closing {
    opacity: 0;
}

.modal-overlay.closing::before {
    background: rgba(0, 0, 0, 0);
}

.modal {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transform: scale(0.85) translateY(30px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-overlay.closing .modal {
    transform: scale(0.92) translateY(15px);
    opacity: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1E293B;
}

.modal-close {
    background: rgba(241, 245, 249, 0.6);
    border: none;
    cursor: pointer;
    color: #64748B;
    padding: 10px;
    display: flex;
    align-items: center;
    border-radius: var(--radius-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-close:hover {
    background: #F1F5F9;
    color: #1E293B;
    transform: rotate(90deg);
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 16px;
    transition: border-color var(--theme-duration) var(--theme-easing);
}

.search-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #1E293B;
    background: transparent;
    transition: color var(--theme-duration) var(--theme-easing);
}

.search-input-wrap input::placeholder { color: #94A3B8; }

/* ===== Accelerator Modal ===== */
.accel-modal .modal {
    max-width: 480px;
}

.accel-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #F8FAFC;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    transition: all 0.2s;
}

.accel-item:hover {
    border-color: #CBD5E1;
    background: #F1F5F9;
}

.accel-item-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.accel-item-info p {
    font-size: 13px;
    color: #64748B;
}

.accel-item-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: #F97316;
    background: rgba(255, 247, 237, 0.8);
    border: 1px solid rgba(254, 215, 170, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.accel-item-link:hover {
    background: #FFEDD5;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

/* ===== Search / Favorites Results ===== */
.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 6px;
    cursor: pointer;
    border: 1px solid transparent;
}

.result-item:hover {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.1);
    transform: translateX(4px);
}

.result-info { flex: 1; }

.result-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.result-info p {
    font-size: 13px;
    color: #64748B;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 12px;
}

.section-label {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.section-label.study { background: linear-gradient(135deg, #EEF2FF, #E0E7FF); color: #6366F1; }
.section-label.game { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #10B981; }
.section-label.dev { background: linear-gradient(135deg, #F5F3FF, #EDE9FE); color: #8B5CF6; }
.section-label.military { background: linear-gradient(135deg, #FEF2F2, #FEE2E2); color: #DC2626; }
.section-label.jw { background: linear-gradient(135deg, #FFF7ED, #FFEDD5); color: #F97316; }

.empty-state {
    text-align: center;
    padding: 40px 0;
    color: #94A3B8;
    font-size: 15px;
}

.loading {
    text-align: center;
    padding: 60px 0;
    color: #94A3B8;
    font-size: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 1280px) {
    .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .home-cards { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 44px; }
    .hero-stats { gap: 40px; }
    .hero-stat-number { font-size: 32px; }
    .hero p { font-size: 18px; }
}

@media (max-width: 768px) {
    .header { padding: 0 16px; height: 64px; }
    .nav { display: none; }
    .search-btn kbd { display: none; }
    .search-btn span { display: none; }
    .hero { padding: 48px 0 40px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .hero-stats { gap: 20px; flex-wrap: wrap; }
    .hero-stat { padding: 16px 20px; }
    .hero-stat-number { font-size: 28px; }
    .hero-stat-label { font-size: 12px; }
    .home-cards { grid-template-columns: repeat(2, 1fr); }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .main { padding: 80px 16px 20px; }
    .section-header h1 { font-size: 24px; }
}

@media (max-width: 640px) {
    .home-cards { grid-template-columns: 1fr; }
    .cards-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 14px; }
}

@media (max-width: 480px) {
    .hero-stat { padding: 12px 16px; }
    .hero-stat-number { font-size: 24px; }
    .hero-stat-label { font-size: 11px; letter-spacing: 1px; }
    .home-card { padding: 24px 16px; }
    .home-card .icon-wrap { width: 56px; height: 56px; border-radius: 14px; }
    .home-card h3 { font-size: 18px; }
}

/* ===== NEW HOMEPAGE STYLES ===== */

/* Hero New */
.hero-new {
    position: relative;
    padding: 10px 40px 40px;
    border-radius: var(--radius-xl);
    margin: 0px auto 40px;
    max-width: 1200px;
    background: var(--bg-card);
    overflow: hidden;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.tree-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.hero-new-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    width: 100%;
    max-width: 900px;
    padding: 40px 0;
}

.hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
}

.hero-icon-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-tree-wrapper {
    margin-top: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
}

.hero-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
    border-radius: 1px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    opacity: 0.6;
    animation: dotPulse 2s ease-in-out infinite;
}

.hero-dot-2 {
    animation-delay: 0.3s;
}

.hero-dot-3 {
    animation-delay: 0.6s;
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.1); }
}

.hero-logo-video {
    width: 100%;
    height: 100%;
    border-radius: 32px;
    object-fit: cover;
}

.hero-logo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    letter-spacing: -1px;
}

.hero-title-wrapper {
    position: relative;
}

.hero-title {
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    margin: 0;
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.hero-title-gradient {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 40%, #EC4899 70%, #F472B6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-title-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer-sweep 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer-sweep {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.hero-title:hover .hero-title-gradient {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4));
}

.hero-title:active .hero-title-gradient {
    transform: scale(0.98);
}

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-btn {
    padding: 16px 56px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease,
                background var(--theme-duration) var(--theme-easing),
                color var(--theme-duration) var(--theme-easing),
                border-color var(--theme-duration) var(--theme-easing);
    border: none;
    text-align: center;
    min-width: 180px;
}

.hero-btn-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    color: #6366F1;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.hero-btn-primary:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.hero-btn-secondary {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.hero-btn-secondary:hover {
    border-color: var(--border-color-hover);
    background: var(--bg-card);
    transform: translateY(-1px);
}

.hero-btn-outline {
    background: transparent;
    color: #1E293B;
    border: 1px solid var(--border-color);
}

.hero-btn-outline:hover {
    border-color: var(--border-color-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.hero-center {
    justify-content: center !important;
}

.hero-center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
    width: 100%;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0;
    max-width: 500px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
    align-items: center;
}

.hero-buttons .hero-btn {
    min-width: 200px;
    width: auto;
    max-width: 280px;
    padding: 14px 48px;
    display: inline-block;
}

.hero-btn-primary {
    animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(99, 102, 241, 0);
    }
}

@media (max-width: 768px) {
    .hero-buttons {
        width: 100%;
    }
    
    .hero-buttons .hero-btn {
        width: 100%;
        min-width: auto;
    }
}

.hero-new-stats {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 32px 40px;
    background: rgba(99, 102, 241, 0.03);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    width: 100%;
    margin-top: auto;
}

.h-stat {
    text-align: center;
    padding: 0 40px;
    flex: 1;
}

.h-stat-num {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.h-stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.h-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.1);
}

/* Section Header */
.home-section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1));
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #6366F1;
    margin-bottom: 16px;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Features Section */
.features-section {
    padding: 60px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    border: 1px solid var(--border-color);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease,
                background 0.4s ease;
    position: relative;
    overflow: hidden;
    content-visibility: auto;
    contain-intrinsic-size: 280px;
    will-change: transform, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    opacity: 0;
    transition: left 0.4s ease, opacity 0.3s ease;
}

.feature-card:hover::before {
    left: 0;
    opacity: 1;
}

.feature-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 250%;
    height: 250%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 60%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    pointer-events: none;
}

.feature-card:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.1), 0 8px 20px rgba(0, 0, 0, 0.05);
    border-color: rgba(99, 102, 241, 0.15);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 28px;
}

.feature-study .feature-icon { background: linear-gradient(135deg, #EEF2FF, #E0E7FF); color: #6366F1; }
.feature-study::before { background: linear-gradient(90deg, #6366F1, #8B5CF6); }

.feature-game .feature-icon { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #10B981; }
.feature-game::before { background: linear-gradient(90deg, #10B981, #34D399); }

.feature-dev .feature-icon { background: linear-gradient(135deg, #F5F3FF, #EDE9FE); color: #8B5CF6; }
.feature-dev::before { background: linear-gradient(90deg, #8B5CF6, #A78BFA); }

.feature-military .feature-icon { background: linear-gradient(135deg, #FFF7ED, #FFEDD5); color: #F97316; }
.feature-military::before { background: linear-gradient(90deg, #F97316, #FB923C); }

.feature-job .feature-icon { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #10B981; }
.feature-job::before { background: linear-gradient(90deg, #10B981, #34D399); }

.feature-design .feature-icon { background: linear-gradient(135deg, #FDF2F8, #FCE7F3); color: #EC4899; }
.feature-design::before { background: linear-gradient(90deg, #EC4899, #F472B6); }

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.feature-tags span {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-secondary);
    font-weight: 500;
}

/* Categories Section */
.categories-section {
    padding: 40px 0 60px;
}

/* Stats Detail */
.stats-detail {
    padding: 60px 0;
    background: rgba(99, 102, 241, 0.03);
    border-radius: var(--radius-xl);
    margin-bottom: 60px;
    border: 1px solid var(--border-color);
}

.stats-detail-content {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 40px;
    align-items: center;
    padding: 0 40px;
}

.stats-detail-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.stats-detail-left .home-section-header {
    text-align: left;
    margin-bottom: 32px;
}

.stats-detail-left .section-desc {
    margin-left: 0;
}

.stats-detail-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.sd-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sd-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sd-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sd-icon-study { background: linear-gradient(135deg, #EEF2FF, #E0E7FF); color: #6366F1; }
.sd-icon-game { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #10B981; }
.sd-icon-dev { background: linear-gradient(135deg, #F5F3FF, #EDE9FE); color: #8B5CF6; }
.sd-icon-military { background: linear-gradient(135deg, #FEF2F2, #FEE2E2); color: #DC2626; }
.sd-icon-jw { background: linear-gradient(135deg, #FFF7ED, #FFEDD5); color: #F97316; }
.sd-icon-job { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); color: #10B981; }
.sd-icon-design { background: linear-gradient(135deg, #FDF2F8, #FCE7F3); color: #EC4899; }

.sd-item-num {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.sd-item-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(99,102,241,0.03) 0%, rgba(139,92,246,0.04) 50%, rgba(168,85,247,0.03) 100%);
    border-radius: var(--radius-xl);
    padding: 40px 40px;
    text-align: center;
    border: 1px solid rgba(99,102,241,0.08);
    position: relative;
    overflow: hidden;
    margin-top: 80px;
    margin-bottom: 60px;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(99,102,241,0.08);
    border-radius: 50%;
    filter: blur(80px);
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 12px;
}

.cta-content p {
    font-size: 15px;
    color: #64748B;
    margin-bottom: 28px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-btn-primary {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.cta-btn-secondary {
    background: transparent;
    color: #6366F1;
    border: 1px solid rgba(99,102,241,0.25);
}

.cta-btn-secondary:hover {
    background: rgba(99,102,241,0.06);
    border-color: rgba(99,102,241,0.4);
}

/* Responsive New */
@media (max-width: 1024px) {
    .hero-new { padding: 40px 30px 30px; }
    .hero-new-content { flex-direction: column; gap: 40px; text-align: center; }
    .hero-left { align-items: center; }
    .hero-title { font-size: 48px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-detail-content { grid-template-columns: 1fr; gap: 40px; }
    .stats-detail-left .home-section-header { text-align: center; }
    .stats-detail-left .section-desc { margin: 0 auto; }
    .stats-detail-items { max-width: 500px; margin: 0 auto; }
    .h-stat { padding: 0 20px; }
    .h-stat-num { font-size: 26px; }
}

@media (max-width: 768px) {
    .hero-new { min-height: auto; padding: 30px 20px 20px; }
    .hero-new-content { flex-direction: column; gap: 30px; }
    .hero-left { align-items: center; }
    .hero-title { font-size: 36px; }
    .hero-icon-wrapper { width: 100px; height: 100px; }
    .hero-circle-1 { width: 50px; height: 50px; }
    .hero-circle-2 { width: 38px; height: 38px; }
    .hero-circle-3 { width: 25px; height: 25px; }
    .hero-btn { padding: 12px 32px; }
    .hero-new-stats { flex-wrap: wrap; padding: 20px; gap: 16px; }
    .h-stat { padding: 0; flex: 1 1 40%; }
    .h-stat-divider { display: none; }
    .features-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 28px; }
    .stats-detail-items { grid-template-columns: 1fr; }
    .cta-section { padding: 40px 20px; }
    .cta-content h2 { font-size: 24px; }
}

[data-theme="dark"] .cta-section {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .cta-section::before {
    background: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .cta-content h2 {
    color: #F8FAFC;
}

[data-theme="dark"] .cta-content p {
    color: #CBD5E1;
}

[data-theme="dark"] .about-contact-link {
    color: #CBD5E1;
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.5);
}

[data-theme="dark"] .about-contact-link:hover {
    background: rgba(51, 65, 85, 0.8);
    color: #F8FAFC;
}

[data-theme="dark"] .browse-resource-item,
[data-theme="dark"] .panel-resource-item {
    color: #CBD5E1;
    background: rgba(30, 41, 59, 0.6);
}

[data-theme="dark"] .browse-resource-item:hover,
[data-theme="dark"] .panel-resource-item:hover {
    background: rgba(51, 65, 85, 0.8);
    color: #F8FAFC;
}

[data-theme="dark"] .legend-item {
    color: #CBD5E1;
}

[data-theme="dark"] .sort-btn,
[data-theme="dark"] .filter-btn {
    background: #1E293B;
    border-color: rgba(71, 85, 105, 0.5);
    color: #CBD5E1;
}

[data-theme="dark"] .sort-btn:hover,
[data-theme="dark"] .filter-btn:hover {
    background: #334155;
    color: #F8FAFC;
}

[data-theme="dark"] .quiz-explanation {
    background: rgba(249, 115, 22, 0.1);
    color: #FED7AA;
}

[data-theme="dark"] .tips-section li,
[data-theme="dark"] .font-tips li {
    color: #CBD5E1;
}

[data-theme="dark"] .size-table td,
[data-theme="dark"] .size-table th {
    color: #CBD5E1;
    border-color: rgba(71, 85, 105, 0.3);
}

[data-theme="dark"] .size-table {
    background: #1E293B;
}

[data-theme="dark"] .home-card h3,
[data-theme="dark"] .section-panel h3,
[data-theme="dark"] .browse-section-info h3,
[data-theme="dark"] .browse-category-name,
[data-theme="dark"] .about-card h2,
[data-theme="dark"] .about-features-header h2,
[data-theme="dark"] .about-stat-num {
    color: #F8FAFC;
}

[data-theme="dark"] .home-card p,
[data-theme="dark"] .home-card .card-count {
    color: #CBD5E1;
}

[data-theme="dark"] .cat-tab:hover {
    background: #1E293B;
    color: #F8FAFC;
}

[data-theme="dark"] .modal-close {
    color: #94A3B8;
}

[data-theme="dark"] .modal-close:hover {
    background: #334155;
    color: #F8FAFC;
}

[data-theme="dark"] .search-input-wrap input {
    color: #F8FAFC;
}

[data-theme="dark"] .browse-resource-item:hover {
    color: #F8FAFC;
    background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .dropdown-menu {
    background: #1E293B;
    border-color: rgba(71, 85, 105, 0.4);
}

[data-theme="dark"] .dropdown-item {
    color: #CBD5E1;
}

[data-theme="dark"] .dropdown-item:hover {
    background: #334155;
    color: #F8FAFC;
}

[data-theme="dark"] .home-card,
[data-theme="dark"] .about-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .timeline-content,
[data-theme="dark"] .showcase-card,
[data-theme="dark"] .plan-card,
[data-theme="dark"] .quiz-card,
[data-theme="dark"] .tips-card,
[data-theme="dark"] .resource-card,
[data-theme="dark"] .preview-content,
[data-theme="dark"] .modal {
    background: #1E293B !important;
}

[data-theme="dark"] .hero-btn-secondary {
    background: #334155;
    color: #F8FAFC;
    border-color: rgba(148, 163, 184, 0.3);
}

[data-theme="dark"] .resource-desc {
    color: #CBD5E1;
}

[data-theme="dark"] .fav-btn {
    color: #CBD5E1 !important;
}

[data-theme="dark"] .hero-btn-outline {
    color: #CBD5E1 !important;
}

[data-theme="dark"] .accel-item-info p {
    color: #CBD5E1;
}

[data-theme="dark"] .theme-btn {
    color: #CBD5E1 !important;
    background: rgba(30, 41, 59, 0.6) !important;
}

[data-theme="dark"] * {
    --text-secondary: #CBD5E1 !important;
}

[data-theme="dark"] svg {
    color: #CBD5E1 !important;
    stroke: #CBD5E1 !important;
    fill: #CBD5E1 !important;
}

[data-theme="dark"] .browse-section-content {
    background: #1E293B !important;
}

[data-theme="dark"] .browse-category-item,
[data-theme="dark"] .recent-item {
    background: rgba(30, 41, 59, 0.6);
}

[data-theme="dark"] .browse-category-item:hover,
[data-theme="dark"] .recent-item:hover {
    background: rgba(51, 65, 85, 0.8);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #1E293B;
    color: #F8FAFC;
    border-color: rgba(71, 85, 105, 0.5);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #64748B;
}

/* ===== RADIAL TREE VIEW (D3.js Radial Tidy Tree + OneZoom Style) ===== */
.radial-tree-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    margin-bottom: 40px;
    min-height: 700px;
    background: linear-gradient(135deg, #FAFBFC 0%, #F1F5F9 30%, #F8FAFC 100%);
    border-radius: 32px;
    margin: 90px auto 40px;
    max-width: 1400px;
    border: 1px solid rgba(226,232,240,0.5);
}

.tree-svg-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    overflow: visible;
}

#tree-svg {
    display: block;
    max-width: 100%;
    height: auto;
    overflow: visible;
}

.tree-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    padding: 16px 24px;
    background: rgba(255,255,255,0.8);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Detail Panel */
.tree-detail-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 500;
    overflow: hidden;
}

.tree-detail-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #E2E8F0;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
}

.panel-title {
    font-size: 20px;
    font-weight: 700;
    color: #1E293B;
}

.panel-close {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    transition: all 0.2s;
}

.panel-close:hover {
    background: #E2E8F0;
    color: #1E293B;
}

.panel-content {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.panel-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-category {
    background: #F8FAFC;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid transparent;
    cursor: pointer;
    opacity: 0;
    animation: panelItemAppear 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel-category:hover {
    background: #F1F5F9;
    transform: translateX(8px);
}

@keyframes panelItemAppear {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.panel-category-name {
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
}

.panel-category-count {
    font-size: 14px;
    font-weight: 600;
    color: #6366F1;
    background: rgba(99,102,241,0.08);
    padding: 4px 12px;
    border-radius: 20px;
}

.panel-category-resources {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.panel-resource-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #475569;
    transition: all 0.2s;
}

.panel-resource-item:hover {
    background: #fff;
    color: #1E293B;
}

.panel-resource-name {
    flex: 1;
    font-size: 14px;
}

.resource-proxy-tag {
    font-size: 11px;
    font-weight: 600;
    color: #EF4444;
    background: rgba(239,68,68,0.08);
    padding: 3px 10px;
    border-radius: 10px;
}

.panel-more-link {
    font-size: 14px;
    font-weight: 600;
    color: #6366F1;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.panel-more-link:hover {
    background: rgba(99,102,241,0.08);
}

/* Resource List */
.resource-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-list .resource-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #F8FAFC;
    border-radius: 16px;
    text-decoration: none;
    opacity: 0;
    animation: panelItemAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-list .resource-card:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.resource-list .resource-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.resource-list .resource-info {
    flex: 1;
    min-width: 0;
}

.resource-list .resource-title {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 4px;
}

.resource-list .resource-desc {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.resource-list .resource-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.resource-list .resource-tag {
    font-size: 11px;
    font-weight: 500;
    color: #6366F1;
    background: rgba(99,102,241,0.08);
    padding: 2px 8px;
    border-radius: 8px;
}

.resource-list .resource-status {
    flex-shrink: 0;
}

.resource-list .status-proxy {
    font-size: 11px;
    font-weight: 600;
    color: #EF4444;
    background: rgba(239,68,68,0.08);
    padding: 4px 12px;
    border-radius: 12px;
}

.resource-list .status-direct {
    font-size: 11px;
    font-weight: 600;
    color: #10B981;
    background: rgba(16,185,129,0.08);
    padding: 4px 12px;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .radial-tree-container {
        margin: 70px auto 20px;
        padding: 20px 10px;
        min-height: 500px;
    }
    
    #tree-svg {
        max-width: 100%;
    }
    
    .tree-detail-panel {
        width: 95%;
        max-height: 85vh;
    }
    
    .panel-header {
        padding: 16px 20px;
    }
    
    .panel-content {
        padding: 16px 20px;
    }
}

/* ===== Quick Tools Section ===== */
.quick-tools {
    padding: 20px 0 30px;
}

.quick-tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.quick-tool-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid rgba(226,232,240,0.6);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.quick-tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: transparent;
}

.quick-tool-btn svg {
    flex-shrink: 0;
}

/* ===== Modal Large ===== */
.modal-large {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

/* ===== Timer Content ===== */
.timer-content {
    padding: 20px;
}

.timer-item {
    background: #F8FAFC;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}

.timer-label {
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 12px;
}

.timer-countdown {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.timer-num {
    font-size: 32px;
    font-weight: 800;
    color: #F97316;
    background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
    padding: 8px 16px;
    border-radius: 12px;
}

.timer-unit {
    font-size: 14px;
    color: #94A3B8;
    align-self: center;
}

.timer-date {
    font-size: 13px;
    color: #94A3B8;
}

.timer-tips {
    text-align: center;
    padding: 16px;
    background: #F8FAFC;
    border-radius: 12px;
}

.timer-tips p {
    font-size: 13px;
    color: #94A3B8;
    margin-bottom: 8px;
}

.timer-link {
    display: inline-block;
    color: #F97316;
    font-weight: 600;
    font-size: 14px;
}

/* ===== Salary Calculator ===== */
.salary-form, .jw-salary-form {
    padding: 20px;
}

.salary-result, .jw-salary-result {
    padding: 20px;
    background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
    border-radius: 16px;
    margin-top: 16px;
}

.salary-result-item, .jw-salary-result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(226,232,240,0.5);
}

.salary-result-item:last-child, .jw-salary-result-item:last-child {
    border-bottom: none;
}

.salary-result-label, .jw-salary-result-label {
    font-size: 14px;
    color: #64748B;
}

.salary-result-value, .jw-salary-result-value {
    font-size: 16px;
    font-weight: 700;
    color: #1E293B;
}

.salary-note {
    padding: 16px 20px;
    background: #F8FAFC;
    border-radius: 12px;
    margin-top: 16px;
}

.salary-note p {
    font-size: 13px;
    color: #94A3B8;
    margin-bottom: 4px;
}

/* ===== Quiz Content ===== */
.quiz-content {
    padding: 20px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: #F8FAFC;
    border-radius: 12px;
    margin-bottom: 20px;
}

.quiz-progress, .quiz-score {
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
}

.quiz-question {
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
    padding: 20px;
    background: #F8FAFC;
    border-radius: 16px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid rgba(226,232,240,0.6);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: #475569;
}

.quiz-option:hover {
    border-color: #F97316;
    background: rgba(249,115,22,0.05);
}

.quiz-option.selected {
    border-color: #F97316;
    background: rgba(249,115,22,0.1);
}

.quiz-option.correct {
    border-color: #10B981;
    background: rgba(16,185,129,0.1);
}

.quiz-option.wrong {
    border-color: #EF4444;
    background: rgba(239,68,68,0.1);
}

.quiz-explanation {
    padding: 16px;
    background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.quiz-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.quiz-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    background: #F1F5F9;
    color: #64748B;
}

.quiz-btn:hover:not(:disabled) {
    background: #E2E8F0;
}

.quiz-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-btn-primary {
    background: linear-gradient(135deg, #F97316, #FB923C);
    color: #fff;
}

.quiz-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249,115,22,0.3);
}

/* ===== Tips Content ===== */
.tips-content {
    padding: 20px;
}

.tips-section {
    margin-bottom: 24px;
}

.tips-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(226,232,240,0.5);
}

.tips-section ul {
    list-style: none;
    padding: 0;
}

.tips-section li {
    padding: 10px 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}

.tips-example {
    padding: 16px;
    background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
    border-radius: 12px;
    font-size: 13px;
    color: #64748B;
    margin-top: 12px;
}

/* ===== Offer Compare ===== */
.offer-compare-content {
    padding: 20px;
}

.offer-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

.offer-col h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 16px;
    text-align: center;
    padding: 12px;
    background: #F8FAFC;
    border-radius: 12px;
}

.offer-result {
    padding: 20px;
    background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
    border-radius: 16px;
    margin-top: 16px;
}

.offer-result-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.offer-result-item {
    text-align: center;
}

.offer-result-item h5 {
    font-size: 14px;
    color: #64748B;
    margin-bottom: 8px;
}

.offer-result-item .value {
    font-size: 24px;
    font-weight: 800;
    color: #10B981;
}

.offer-recommendation {
    text-align: center;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
}

/* ===== Color Picker ===== */
.color-picker-content {
    padding: 20px;
}

.color-palette {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch-code {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.3);
    padding: 2px 8px;
    border-radius: 8px;
}

.color-presets {
    margin-top: 24px;
}

.color-presets h4 {
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 12px;
}

.preset-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.preset-item {
    cursor: pointer;
    transition: transform 0.3s;
}

.preset-item:hover {
    transform: translateY(-4px);
}

.preset-colors {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.preset-colors span {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.preset-name {
    font-size: 12px;
    color: #64748B;
    text-align: center;
}

/* ===== Font Preview ===== */
.font-preview-content {
    padding: 20px;
}

.font-categories {
    margin-top: 20px;
}

.font-categories h4 {
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 12px;
}

.font-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.font-item {
    padding: 16px;
    background: #F8FAFC;
    border-radius: 12px;
}

.font-sample {
    font-size: 20px;
    margin-bottom: 8px;
    color: #1E293B;
}

.font-info {
    display: flex;
    justify-content: space-between;
}

.font-name {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
}

.font-type {
    font-size: 12px;
    color: #94A3B8;
}

.font-tips {
    margin-top: 24px;
    padding: 16px;
    background: linear-gradient(135deg, #FDF2F8, #FCE7F3);
    border-radius: 12px;
}

.font-tips h4 {
    font-size: 14px;
    font-weight: 600;
    color: #EC4899;
    margin-bottom: 12px;
}

.font-tips ul {
    list-style: none;
    padding: 0;
}

.font-tips li {
    padding: 8px 0;
    font-size: 13px;
    color: #475569;
}

/* ===== Size Guide ===== */
.size-guide-content {
    padding: 20px;
}

.size-section {
    margin-bottom: 24px;
}

.size-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 12px;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    background: #F8FAFC;
    border-radius: 12px;
}

.size-table th, .size-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(226,232,240,0.5);
}

.size-table th {
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
    background: #F1F5F9;
}

.size-table td {
    font-size: 14px;
    color: #475569;
}

/* ===== Icon Resources ===== */
.icon-resources {
    padding: 20px;
}

.icon-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.icon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #F8FAFC;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.icon-item:hover {
    background: #fff;
    transform: translateX(8px);
}

.icon-item-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 4px;
}

.icon-item-info p {
    font-size: 13px;
    color: #64748B;
}

.icon-item-link {
    font-size: 14px;
    font-weight: 600;
    color: #EC4899;
}

/* ===== Physical Calc ===== */
.physical-calc {
    margin-top: 20px;
    padding: 16px;
    background: #F8FAFC;
    border-radius: 12px;
}

.physical-calc h4 {
    font-size: 14px;
    font-weight: 600;
    color: #F97316;
    margin-bottom: 12px;
}

.bmi-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.bmi-form input {
    padding: 10px 16px;
    border: 1px solid rgba(226,232,240,0.6);
    border-radius: 8px;
    font-size: 14px;
    width: 120px;
}

.bmi-form button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #F97316, #FB923C);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.bmi-result {
    margin-top: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    font-size: 14px;
}

.bmi-result.pass {
    color: #10B981;
}

.bmi-result.fail {
    color: #EF4444;
}

/* ===== Active Nav States ===== */
.active-job {
    color: #10B981 !important;
    font-weight: 600;
}

.active-design {
    color: #EC4899 !important;
    font-weight: 600;
}

.active-plan {
    color: #6366F1 !important;
    font-weight: 600;
}

/* ===== Micro Interactions ===== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple-effect 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

@keyframes ripple-effect {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

.btn, button {
    position: relative;
    overflow: hidden;
}

.input-focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
}

.input-focused {
    transform: translateY(-2px);
}

.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-reveal] {
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal].reveal-visible {
    opacity: 1;
}

[data-reveal="left"] {
    transform: translateX(-30px);
}

[data-reveal="left"].reveal-visible {
    transform: translateX(0);
}

[data-reveal="right"] {
    transform: translateX(30px);
}

[data-reveal="right"].reveal-visible {
    transform: translateX(0);
}

[data-reveal="up"] {
    transform: translateY(30px);
}

[data-reveal="up"].reveal-visible {
    transform: translateY(0);
}

[data-reveal="scale"] {
    transform: scale(0.9);
}

[data-reveal="scale"].reveal-visible {
    transform: scale(1);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 28px;
    background: var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toggle-switch.toggle-active {
    background: var(--gradient-primary);
}

.toggle-switch.toggle-active::after {
    transform: translateX(22px);
}

.toggle-switch input {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.badge-notification {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #EF4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
}

.badge-animate {
    animation: badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes badge-pop {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.heart-icon {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.heart-icon:hover {
    transform: scale(1.1);
}

.heart-icon.heart-active {
    color: #EF4444;
    animation: heart-beat 0.3s ease;
}

@keyframes heart-beat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.heart-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #EF4444;
    border-radius: 50%;
    opacity: 0;
    animation: heart-particle-fly 0.8s ease-out forwards;
    animation-delay: var(--delay);
}

@keyframes heart-particle-fly {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--tx, 0)), calc(-50% + var(--ty, -50px))) scale(0);
    }
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Tag Cloud ===== */
.tag-cloud-section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.tag-cloud-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.02) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.tag-cloud-section .section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.tag-cloud-section .section-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.tag-cloud-section .section-header p {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

.tag-cloud-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.tag-cloud-item {
    padding: 12px 24px;
    border-radius: 30px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.tag-cloud-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tag-cloud-item:hover::before {
    opacity: 1;
}

.tag-cloud-item:hover {
    transform: translateY(-4px) rotate(0deg) scale(1.1);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15), 0 4px 10px rgba(0, 0, 0, 0.05);
    border-width: 2px;
}

.tag-cloud-item.active {
    transform: translateY(-4px) rotate(0deg);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
    border-width: 2px;
}

.tag-cloud-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: inherit;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tag-cloud-item:hover::after {
    transform: translate(-50%, -50%) scale(1.5);
}

/* ===== Skeleton Loader ===== */
.skeleton-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.skeleton-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(99, 102, 241, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s ease-in-out infinite;
}

.skeleton-badge {
    width: 60px;
    height: 24px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(99, 102, 241, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

.skeleton-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-title {
    height: 24px;
    width: 70%;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(99, 102, 241, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s ease-in-out infinite;
    animation-delay: 0.1s;
}

.skeleton-desc {
    height: 18px;
    width: 90%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(99, 102, 241, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

.skeleton-tags {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.skeleton-tag {
    height: 20px;
    width: 50px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(99, 102, 241, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s ease-in-out infinite;
}

.skeleton-tag:nth-child(2) {
    width: 40px;
    animation-delay: 0.15s;
}

.skeleton-tag:nth-child(3) {
    width: 60px;
    animation-delay: 0.3s;
}

.skeleton-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.skeleton-access {
    height: 24px;
    width: 80px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(99, 102, 241, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s ease-in-out infinite;
    animation-delay: 0.25s;
}

.skeleton-btn {
    height: 36px;
    width: 80px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(99, 102, 241, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s ease-in-out infinite;
    animation-delay: 0.35s;
}

.skeleton-grid-item {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    border: 1px solid var(--border-color);
    text-align: center;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-grid-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    margin: 0 auto 20px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(99, 102, 241, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s ease-in-out infinite;
}

.skeleton-grid-title {
    height: 24px;
    width: 60%;
    margin: 0 auto 8px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(99, 102, 241, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s ease-in-out infinite;
    animation-delay: 0.1s;
}

.skeleton-grid-desc {
    height: 16px;
    width: 80%;
    margin: 0 auto 16px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(99, 102, 241, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s ease-in-out infinite;
    animation-delay: 0.2s;
}

.skeleton-grid-count {
    height: 28px;
    width: 60px;
    margin: 0 auto;
    border-radius: 14px;
    background: linear-gradient(90deg, var(--border-color) 25%, rgba(99, 102, 241, 0.1) 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s ease-in-out infinite;
    animation-delay: 0.3s;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes skeleton-shine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Lazy Load Images ===== */
.lazy-image {
    opacity: 0.6;
    filter: blur(2px);
    transition: opacity 0.4s ease, filter 0.4s ease;
}

.lazy-image.loaded {
    opacity: 1;
    filter: blur(0);
}

/* ===== Intro Animation ===== */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.intro-bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0;
    animation: gridFadeIn 1.5s ease-out 0.3s forwards;
}

.intro-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(212, 168, 83, 0.05) 30%, transparent 70%);
    animation: glowExpand 3s ease-out 0.5s forwards;
    pointer-events: none;
}

.intro-bg-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    animation: raysRotate 20s linear infinite;
    pointer-events: none;
}

.intro-ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 200px;
    background: linear-gradient(to top, rgba(99, 102, 241, 0.3), transparent);
    transform-origin: center bottom;
    opacity: 0;
    animation: rayFadeIn 1s ease-out 0.8s forwards;
}

.intro-ray:nth-child(1) { transform: translate(-50%, -100%) rotate(0deg); }
.intro-ray:nth-child(2) { transform: translate(-50%, -100%) rotate(60deg); }
.intro-ray:nth-child(3) { transform: translate(-50%, -100%) rotate(120deg); }
.intro-ray:nth-child(4) { transform: translate(-50%, -100%) rotate(180deg); }
.intro-ray:nth-child(5) { transform: translate(-50%, -100%) rotate(240deg); }
.intro-ray:nth-child(6) { transform: translate(-50%, -100%) rotate(300deg); }

.intro-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.intro-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(212, 168, 83, 0.9), rgba(99, 102, 241, 0.6));
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(212, 168, 83, 0.6), 0 0 20px rgba(99, 102, 241, 0.3);
    opacity: 0;
}

.intro-particle:nth-child(1) { left: 15%; top: 20%; animation: particleFloat 4s ease-in-out 0.5s infinite; }
.intro-particle:nth-child(2) { left: 80%; top: 25%; animation: particleFloat 5s ease-in-out 0.8s infinite; }
.intro-particle:nth-child(3) { left: 25%; top: 70%; animation: particleFloat 4.5s ease-in-out 1.2s infinite; }
.intro-particle:nth-child(4) { left: 70%; top: 65%; animation: particleFloat 3.8s ease-in-out 1.5s infinite; }
.intro-particle:nth-child(5) { left: 40%; top: 15%; animation: particleFloat 5.2s ease-in-out 1.8s infinite; }
.intro-particle:nth-child(6) { left: 60%; top: 85%; animation: particleFloat 4.2s ease-in-out 2s infinite; }
.intro-particle:nth-child(7) { left: 10%; top: 50%; animation: particleFloat 3.5s ease-in-out 2.3s infinite; }
.intro-particle:nth-child(8) { left: 90%; top: 45%; animation: particleFloat 4.8s ease-in-out 2.5s infinite; }
.intro-particle:nth-child(9) { left: 30%; top: 35%; animation: particleFloat 5.5s ease-in-out 2.8s infinite; }
.intro-particle:nth-child(10) { left: 75%; top: 75%; animation: particleFloat 4s ease-in-out 3s infinite; }

@keyframes gridFadeIn {
    0% { opacity: 0; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes glowExpand {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes raysRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rayFadeIn {
    0% { opacity: 0; height: 0; }
    100% { opacity: 0.5; height: 200px; }
}

@keyframes particleFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) translateX(0) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translateY(-10px) translateX(5px) scale(1);
    }
    40% {
        opacity: 0.8;
        transform: translateY(-25px) translateX(-8px) scale(1.1);
    }
    60% {
        opacity: 0.9;
        transform: translateY(-15px) translateX(12px) scale(0.9);
    }
    80% {
        opacity: 0.6;
        transform: translateY(-5px) translateX(-5px) scale(0.7);
    }
}

.intro-overlay.hide {
    opacity: 0;
    transform: translateY(-100%) scale(1.1);
    pointer-events: none;
}

.intro-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    z-index: 10;
}

.intro-logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-logo-ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    opacity: 0;
    animation: ringExpand 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.intro-logo-ring::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

.intro-logo {
    opacity: 0;
    transform: scale(0.3);
    animation: introLogoIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

.intro-logo img {
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
    animation: logoGlow 2.5s ease-in-out infinite;
}

.intro-logo-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: logoGlowPulse 2s ease-in-out 0.8s infinite;
}

@keyframes ringExpand {
    0% { opacity: 0; transform: scale(0.3); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.3)) drop-shadow(0 0 30px rgba(212, 168, 83, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(99, 102, 241, 0.5)) drop-shadow(0 0 45px rgba(212, 168, 83, 0.35));
    }
}

@keyframes logoGlowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

@keyframes introLogoIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-15deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.intro-title {
    font-size: 64px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 16px;
    font-family: "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif;
}

.intro-title-char {
    opacity: 0;
    display: inline-block;
}

.intro-title-char:first-child {
    animation: introCharIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s forwards;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.intro-title-char:last-child {
    animation: introCharIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1s forwards;
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 50%, #FCD34D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.3);
}

@keyframes introCharIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
        filter: blur(5px);
    }
    60% {
        opacity: 1;
        transform: translateY(-5px) scale(1.1);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes introTextIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(20px);
    animation: introTextIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.3s forwards;
    margin: 0;
    letter-spacing: 8px;
    font-weight: 300;
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", serif;
}

.intro-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: introTextIn 0.6s ease 1.5s forwards;
}

.intro-progress-bar {
    width: 180px;
    height: 3px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.intro-progress-bar::after {
    content: '';
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #6366F1, #F59E0B, #6366F1);
    border-radius: 2px;
    animation: progressFill 2s ease-out 1.6s forwards;
    background-size: 200% 100%;
}

.intro-progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

@keyframes progressFill {
    0% { width: 0%; background-position: 0% 50%; }
    100% { width: 100%; background-position: 200% 50%; }
}

@media (max-width: 768px) {
    .intro-title {
        font-size: 48px;
        letter-spacing: 12px;
    }
    
    .intro-subtitle {
        font-size: 14px;
        letter-spacing: 6px;
    }
    
    .intro-logo-ring {
        width: 110px;
        height: 110px;
    }
    
    .intro-progress-bar {
        width: 140px;
    }
    
    .intro-bg-rays {
        width: 400px;
        height: 400px;
    }
    
    .intro-bg-glow {
        width: 500px;
        height: 500px;
    }
}

/* ===== PAGE LOADER ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page-loader.active {
    opacity: 1;
    pointer-events: auto;
}

.page-loader .loader {
    position: relative;
    width: 2.5em;
    height: 2.5em;
    transform: rotate(165deg);
}

.page-loader .loader:before,
.page-loader .loader:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    width: 0.5em;
    height: 0.5em;
    border-radius: 0.25em;
    transform: translate(-50%, -50%);
}

.page-loader .loader:before {
    animation: before8 2s infinite;
}

.page-loader .loader:after {
    animation: after6 2s infinite;
}

@keyframes before8 {
    0% {
        width: 0.5em;
        box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
    }

    35% {
        width: 2.5em;
        box-shadow: 0 -0.5em rgba(225, 20, 98, 0.75), 0 0.5em rgba(111, 202, 220, 0.75);
    }

    70% {
        width: 0.5em;
        box-shadow: -1em -0.5em rgba(225, 20, 98, 0.75), 1em 0.5em rgba(111, 202, 220, 0.75);
    }

    100% {
        box-shadow: 1em -0.5em rgba(225, 20, 98, 0.75), -1em 0.5em rgba(111, 202, 220, 0.75);
    }
}

@keyframes after6 {
    0% {
        height: 0.5em;
        box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
    }

    35% {
        height: 2.5em;
        box-shadow: 0.5em 0 rgba(61, 184, 143, 0.75), -0.5em 0 rgba(233, 169, 32, 0.75);
    }

    70% {
        height: 0.5em;
        box-shadow: 0.5em -1em rgba(61, 184, 143, 0.75), -0.5em 1em rgba(233, 169, 32, 0.75);
    }

    100% {
        box-shadow: 0.5em 1em rgba(61, 184, 143, 0.75), -0.5em -1em rgba(233, 169, 32, 0.75);
    }
}

.page-loader-text {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 2px;
}

.page-loader-dots {
    display: inline-block;
    animation: dotsBounce 1.5s infinite;
}

@keyframes dotsBounce {
    0%, 20% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* ===== EXPLORE PAGE STYLES ===== */
.explore-main {
    padding: 0;
}

[data-page="explore"] .header {
    background: rgba(10, 10, 10, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-page="explore"] .header .logo span,
[data-page="explore"] .header .nav a {
    color: #FFFFFF !important;
}

#theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    color: #FFFFFF;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

#theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[data-theme="dark"][data-page="explore"] .header {
    background: rgba(10, 10, 10, 0.8) !important;
}

/* ===== Nav Badge (我的入口徽标) ===== */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366F1 0%, #EC4899 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    margin-left: 6px;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}
.nav-badge[data-count="0"] {
    display: none;
}
.nav-link-my {
    position: relative;
}
body[data-theme="dark"] .nav-badge,
body[data-theme="oled"] .nav-badge {
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}
/* Sub-page nav (browse/study/dev etc.) */
.header .nav > a:has(> .nav-badge) {
    display: inline-flex;
    align-items: center;
}

/* About page "我的" link */
.about-my-link {
    display: inline-flex;
    align-items: center;
    color: #9CA3AF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 2px;
    transition: color 0.3s ease;
    margin: 0 16px;
}
.about-my-link:hover {
    color: #fff;
}
[data-theme="light"] .about-my-link {
    color: #4B5563;
}
[data-theme="light"] .about-my-link:hover {
    color: #111827;
}
@media (max-width: 768px) {
    .about-my-link {
        font-size: 12px;
        margin: 0 10px;
    }
}

/* ===== 主题选择面板（全页面通用） ===== */
.nav-theme-wrap {
    position: relative;
    display: inline-flex;
}

.theme-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 16px;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.2s;
}

.theme-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.theme-panel::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.theme-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.theme-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.theme-panel-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 6px;
    display: flex;
    transition: all 0.2s;
}

.theme-panel-close:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #EF4444;
}

.theme-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 58vh;
    overflow-y: auto;
    padding-right: 4px;
}

.theme-options::-webkit-scrollbar {
    width: 5px;
}

.theme-options::-webkit-scrollbar-thumb {
    background: var(--border-color-hover);
    border-radius: 999px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    position: relative;
    transition: all 0.2s ease;
    font-family: inherit;
}

.theme-option:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    transform: translateX(2px);
}

.theme-option.active {
    border-color: var(--bg-button);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.06));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bg-button) 12%, transparent);
}

.theme-preview {
    width: 52px;
    height: 36px;
    border-radius: 9px;
    overflow: hidden;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 4px;
    gap: 3px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
}

.theme-option.active .theme-preview {
    border-color: color-mix(in srgb, var(--bg-button) 40%, var(--border-color));
}

.preview-swatch {
    border-radius: 3px;
    width: 100%;
    height: 100%;
}

.auto-preview {
    position: relative;
    padding: 0;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
}

.auto-half {
    width: 100%;
    height: 100%;
}

.auto-left {
    background: #FFFFFF;
    border-right: 1px solid #E2E8F0;
}

.auto-right {
    background: #0F172A;
}

.theme-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.theme-option-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.theme-option-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.theme-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.theme-option.active .theme-check {
    opacity: 1;
    transform: scale(1);
}

/* ===== Global Toast Styles (from styles_home.css, moved for global access) ===== */
.toast-container {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 48px);
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color, #6366F1);
    border-radius: 12px;
    box-shadow: var(--shadow-lg, 0 10px 25px rgba(0,0,0,0.1));
    min-width: 240px;
    max-width: 380px;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
    backdrop-filter: blur(8px);
}

.toast.show { transform: translateX(0); opacity: 1; }
.toast.hide { transform: translateX(120%); opacity: 0; }

.toast.success { border-left-color: #10B981; }
.toast.success .toast-icon { color: #10B981; background: rgba(16,185,129,0.12); }
.toast.error   { border-left-color: #EF4444; }
.toast.error .toast-icon { color: #EF4444; background: rgba(239,68,68,0.12); }
.toast.info    { border-left-color: #6366F1; }
.toast.info .toast-icon { color: #6366F1; background: rgba(99,102,241,0.12); }
.toast.warn    { border-left-color: #F59E0B; }
.toast.warn .toast-icon { color: #F59E0B; background: rgba(245,158,11,0.12); }

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.toast.show .toast-icon { animation: toast-bounce 0.5s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes toast-bounce {
    0% { transform: scale(0.4); }
    60% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.toast-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 2px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}
.toast-close:hover { opacity: 1; color: var(--text-primary); }


/* ===== Global Mobile Styles (Toast Only) ===== */
@media (max-width: 640px) {
    .toast-container { bottom: 20px; right: 16px; left: 16px; }
    .toast { min-width: 0; max-width: 100%; }
}

/* =========================================================
   ======== ANIMATION UPGRADE PACK — GLOBAL ADDONS ========
   ========================================================= */

/* ===== 1. Fireflies — Optimized (Low-CPU Version) ===== */
.fireflies-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
    opacity: 0.75;
}
.firefly {
    position: absolute;
    width: var(--size, 4px);
    height: var(--size, 4px);
    border-radius: 50%;
    background: #F4C976;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    box-shadow: 0 0 var(--glow-size, 10px) var(--glow-color, rgba(245, 185, 80, 0.5));
    animation:
        firefly-blink var(--blink-duration, 2.8s) ease-in-out infinite,
        firefly-drift-4pt var(--drift-duration, 18s) ease-in-out infinite;
    animation-delay: var(--delay, 0s), var(--delay, 0s);
    will-change: transform, opacity;
    filter: saturate(1.05);
}
.firefly::before, .firefly::after {
    content: none !important;
    display: none !important;
}
@keyframes firefly-blink {
    0%, 100% { opacity: calc(var(--max-opacity, 0.5) * 0.25); }
    22% { opacity: calc(var(--max-opacity, 0.5) * 1.15); }
    38% { opacity: calc(var(--max-opacity, 0.5) * 0.4); }
    58% { opacity: var(--max-opacity, 0.5); }
    78% { opacity: calc(var(--max-opacity, 0.5) * 0.7); }
}
@keyframes firefly-drift-4pt {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(var(--dx1, -20px), var(--dy1, -30px)) scale(1.06); }
    50%  { transform: translate(var(--dx2, 20px), var(--dy2, -60px)) scale(0.94); }
    75%  { transform: translate(var(--dx3, -10px), var(--dy3, -20px)) scale(1.04); }
    100% { transform: translate(0, 0) scale(1); }
}
@keyframes firefly-trail-follow {
    0%   { transform: translate(-14px, -10px) scale(0.7); opacity: 0.0; }
    12%  { transform: translate(-12px, -9px) scale(0.78); opacity: 0.55; }
    50%  { transform: translate(-20px, -24px) scale(0.72); opacity: 0.35; }
    88%  { transform: translate(-11px, -8px) scale(0.78); opacity: 0.45; }
    100% { transform: translate(-14px, -10px) scale(0.7); opacity: 0.0; }
}

/* ===== 2. Scroll Reveal — Global Entrance ===== */
.reveal {
    opacity: 0;
    transform: translate(0, var(--reveal-y, 22px));
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: transform, opacity;
}
.reveal.in-view {
    opacity: 1;
    transform: translate(0, 0);
}
.reveal.reveal-x-left  { --reveal-y: 0px; transform: translate(-28px, 0); }
.reveal.reveal-x-right { --reveal-y: 0px; transform: translate(28px, 0); }
.reveal.reveal-scale   { --reveal-y: 0px; transform: scale(0.93); }

/* ===== 3. Header Scroll Shrink + Progress Bar ===== */
.header {
    transition:
        padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}
.header.scrolled {
    box-shadow: var(--shadow-sm, 0 4px 12px -2px rgba(0,0,0,0.06));
    border-color: color-mix(in srgb, var(--border-color) 70%, transparent) !important;
}
#scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 1px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan, #22D3EE), var(--accent-teal, #14B8A6));
    z-index: 9999;
    pointer-events: none;
    opacity: 0.8;
}

/* ===== 4. Button Bounce + Ripple (Click Feedback) ===== */
button,
.btn,
[role="button"],
.clickable,
.home-card,
.feature-card,
.site-card,
.resource-card,
.category-card,
.card-link {
    position: relative;
    transition:
        transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
button, .btn, [role="button"] {
    overflow: hidden;
}
button:active:not(:disabled),
.btn:active:not(:disabled),
[role="button"]:active {
    transform: scale(0.97) !important;
    transition: transform 0.07s ease-out;
}
.home-card:active,
.feature-card:active,
.site-card:active,
.resource-card:active,
.category-card:active,
.card-link:active {
    transform: scale(0.992) !important;
    transition: transform 0.08s ease-out;
}
.ripple {
    position: absolute;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.2;
    transform: scale(0);
    animation: ripple-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    pointer-events: none;
}
@keyframes ripple-pop {
    to { transform: scale(3.2); opacity: 0; }
}

/* ===== 5. Toast — Slide-In + Icon Bounce Upgrade ===== */
.toast {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
    transition:
        opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.toast.show .toast-icon {
    animation: toast-icon-bounce 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes toast-icon-bounce {
    0%   { transform: scale(0.2) rotate(-35deg); opacity: 0; }
    45%  { transform: scale(1.25) rotate(10deg); opacity: 1; }
    70%  { transform: scale(0.95) rotate(-3deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ===== 6. Count-Up Numbers (My / Ranking Pages) ===== */
.count-up {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.count-up.animating {
    animation: count-pop 0.12s ease-out;
}
@keyframes count-pop {
    0%   { transform: translateY(2px) scale(0.98); opacity: 0.7; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ===== 7. Resource Card Icon — 3D Flip on Hover ===== */
.resource-card .icon-wrap,
.site-card .icon-wrap,
.category-card .icon-wrap,
.home-card .icon-wrap {
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
    transform-style: preserve-3d;
    perspective: 600px;
    display: inline-grid;
    place-items: center;
}
.resource-card:hover .icon-wrap,
.site-card:hover .icon-wrap,
.category-card:hover .icon-wrap,
.home-card:hover .icon-wrap {
    transform: rotateY(180deg) scale(1.12);
    filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--accent-cyan, #22D3EE) 35%, transparent));
}
.resource-card:hover .icon-wrap > *,
.site-card:hover .icon-wrap > *,
.category-card:hover .icon-wrap > *,
.home-card:hover .icon-wrap > * {
    transform: rotateY(180deg);
}

/* ===== 8. Search Input — Focus Glow ===== */
input[type="text"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus,
[contenteditable="true"]:focus {
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--accent-cyan, #22D3EE) 18%, transparent),
        0 0 0 0 color-mix(in srgb, var(--accent-cyan, #22D3EE) 30%, transparent);
    animation: input-glow-pulse 2.4s ease-in-out infinite;
}
@keyframes input-glow-pulse {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.04); }
}

/* ===== 9. SVG Checkmark — Stroke Draw (Plan Page) ===== */
.check-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.check-svg path {
    stroke-dasharray: 32;
    stroke-dashoffset: 32;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: none;
}
.task-item.completed .check-svg path,
.check-svg.checked path {
    animation: check-stroke-draw 0.55s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes check-stroke-draw {
    0%   { stroke-dashoffset: 32; opacity: 0.4; }
    60%  { stroke-dashoffset: 0;  opacity: 1; }
    100% { stroke-dashoffset: 0;  opacity: 1; }
}

/* ===== 10. Modal / Drawer Entrance ===== */
.modal,
.modal-overlay,
.drawer {
    animation: none;
}
.modal-overlay.show {
    animation: modal-fade 0.3s ease forwards;
}
.modal.show,
.drawer.show {
    animation: modal-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes modal-fade {
    from { opacity: 0; backdrop-filter: blur(0px); }
    to   { opacity: 1; backdrop-filter: blur(6px); }
}
@keyframes modal-pop-in {
    0%   { opacity: 0; transform: translateY(28px) scale(0.94); }
    60%  { transform: translateY(-4px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== 11. Link Hover Underline Sweep — 暂时关闭（之前作用于卡片导致错位，已禁用） ===== */
a.anchor-link::after,
.nav-link:not(.btn)::after,
.header .nav-link:not(.btn)::after,
.footer .nav-link:not(.btn)::after,
.footer-link::after,
.tag-link::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
/* All card/block links: absolutely forbid any decorative pseudo-element lines (无论什么来源的卡片伪元素线，全部禁掉) */
.home-card::before, .home-card::after,
.feature-card::before, .feature-card::after,
.site-card::before, .site-card::after,
.resource-card::before, .resource-card::after,
.category-card::before, .category-card::after,
.card-link::before, .card-link::after,
.home-grid a::before, .home-grid a::after,
.feature-section a::before, .feature-section a::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* ===== 12. Reduced Motion Respect (Accessibility) ===== */
@media (prefers-reduced-motion: reduce) {
    .firefly, .firefly::before, .firefly::after,
    .reveal, .hero-char, .hero-breath,
    .ripple, .toast, .toast.show .toast-icon,
    .count-up.animating, .resource-card:hover .icon-wrap,
    #scroll-progress, .check-svg.checked path,
    .modal.show, .drawer.show, .modal-overlay.show {
        animation: none !important;
        transition: opacity 0.2s ease, transform 0.2s ease !important;
    }
    .reveal, .hero-char,
    .hero-description, .hero-search {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

