html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}
body { font-family: 'Noto Sans SC', sans-serif; }
        .gradient-text {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .glass-card {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }
        .animate-float {
            animation: float 6s ease-in-out infinite;
        }
        @keyframes float {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-20px); }
        }
        .scroll-reveal {
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.8s ease-out;
        }
        .scroll-reveal.active {
            opacity: 1;
            transform: translateY(0);
        }
        /* 音乐面板动画 */
        .music-panel {
            position: absolute;
            bottom: calc(100% + 8px);
            right: 0;
            transform: scale(0.9) translateY(10px);
            opacity: 0;
            pointer-events: none;
            transition: all 0.25s ease-out;
        }
        .music-panel.open {
            transform: scale(1) translateY(0);
            opacity: 1;
            pointer-events: auto;
        }
        .music-btn-glow {
            box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
        }
        .playing-indicator span {
            display: inline-block;
            width: 3px;
            background: currentColor;
            animation: sound 0ms -800ms linear infinite alternate;
            border-radius: 1px;
        }
        .playing-indicator span:nth-child(1) { height: 6px; animation-duration: 474ms; }
        .playing-indicator span:nth-child(2) { height: 12px; animation-duration: 433ms; }
        .playing-indicator span:nth-child(3) { height: 8px; animation-duration: 407ms; }
        .playing-indicator span:nth-child(4) { height: 14px; animation-duration: 458ms; }
        @keyframes sound {
            0% { height: 4px; opacity: 0.5; }
            100% { height: 16px; opacity: 1; }
        }
        .music-btn-glow:hover {
            box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
        }
        /* 滚动进度条 */
        #scroll-progress {
            position: fixed;
            top: 0;
            left: 0;
            height: 3px;
            background: linear-gradient(90deg, #667eea, #764ba2);
            z-index: 9999;
            pointer-events: none;
            width: 0%;
            transition: width 0.1s;
        }
        /* 返回顶部按钮 */
        #back-to-top {
            position: fixed;
            bottom: 140px;
            right: 24px;
            width: 44px;
            height: 44px;
            background: rgba(255,255,255,0.85);
            border: 1px solid rgba(255,255,255,0.4);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.3s;
            z-index: 60;
            color: #667eea;
        }
        #back-to-top.show {
            opacity: 1;
            transform: translateY(0);
        }
        #back-to-top:hover {
            background: #667eea;
            color: #fff;
            transform: translateY(-3px);
        }
        /* 粒子画布：手机端关闭防止触摸层干扰 */
        #particle-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            pointer-events: none;
            z-index: 1;
        }
        @media (max-width: 768px) {
            #cursor-glow { display: none !important; }
            button, [onclick], [ontouchend] { touch-action: manipulation; }
        }
        .hero-content { position: relative; z-index: 2; }
        /* 数字滚动动画 */
        .count-up {
            display: inline-block;
        }
        /* 图片全屏预览 */
        #image-modal {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.85);
            z-index: -1;
            display: none;
            align-items: center;
            justify-content: center;
            cursor: zoom-out;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;
        }
        #image-modal.open {
            display: flex;
            opacity: 1;
            z-index: 9998;
            pointer-events: auto;
        }
        #image-modal img {
            max-width: 90vw;
            max-height: 90vh;
            border-radius: 12px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.5);
            transform: scale(0.9);
            transition: transform 0.3s;
        }
        #image-modal.open img {
            transform: scale(1);
        }
        /* 鼠标光晕 */
        #cursor-glow {
            position: fixed;
            pointer-events: none;
            display: none;
            z-index: 9997;
            width: 300px;
            height: 300px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(102,126,234,0.08) 0%, transparent 70%);
            transform: translate(-50%, -50%);
            transition: left 0.15s ease-out, top 0.15s ease-out;
        }
        /* 悬浮装饰圆 */
        .floating-orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(60px);
            opacity: 0.15;
            animation: orbFloat 12s ease-in-out infinite;
        }
        @keyframes orbFloat {
            0%, 100% { transform: translate(0, 0) scale(1); }
            25% { transform: translate(30px, -40px) scale(1.1); }
            50% { transform: translate(-20px, 30px) scale(0.9); }
            75% { transform: translate(40px, 20px) scale(1.05); }
        }
        /* 页面加载时的淡入 */
        body { opacity: 0; transition: opacity 0.6s; }
        body.loaded { opacity: 1; }
        /* 图片悬停增强 */
        .project-img-wrap {
            position: relative;
            overflow: hidden;
            border-radius: 1rem;
            cursor: pointer;
        }
        .project-img-wrap::after {
            content: '🔍';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0);
            font-size: 2rem;
            z-index: 5;
            transition: transform 0.3s;
            opacity: 0.6;
        }
        .project-img-wrap:hover::after {
            transform: translate(-50%, -50%) scale(1);
        }

        /* 音乐播放器进度条 */
        .music-progress-container {
            position: relative;
            width: 100%;
            height: 16px;
            display: flex;
            align-items: center;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
        }
        .music-progress-track {
            position: relative;
            width: 100%;
            height: 4px;
            background: #e2e8f0;
            border-radius: 2px;
            overflow: visible;
        }
        .music-progress-fill {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 2px;
            width: 0%;
            
        }
        .music-progress-thumb {
            position: absolute;
            top: 50%;
            left: 0%;
            width: 12px;
            height: 12px;
            background: #fff;
            border: 2px solid #667eea;
            border-radius: 50%;
            transform: translate(-50%, -50%) scale(0);
            box-shadow: 0 1px 4px rgba(0,0,0,0.15);
            transition: transform 0.2s ease-out, box-shadow 0.2s;
            pointer-events: none;
            z-index: 2;
        }
        .music-progress-container:hover .music-progress-thumb,
        .music-progress-container.dragging .music-progress-thumb {
            transform: translate(-50%, -50%) scale(1);
            box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
        }
        .music-progress-container.dragging .music-progress-fill {
            transition: none;
        }
        .music-progress-container:active .music-progress-track {
            height: 5px;
        }
        #current-time, #duration {
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.02em;
        }

/* 左下角主题切换按钮 */
.theme-toggle-btn {
    overflow: hidden;
}
#theme-icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}
[data-theme="night"] #theme-icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}
[data-theme="night"] #theme-icon-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* 主题切换动画遮罩层 */
#theme-animation-overlay {
    display: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#theme-animation-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}
#lottie-animation-container svg {
    /* 去掉圆角和阴影，避免产生边框感 */
    border-radius: 0;
    box-shadow: none;
}

/* 黑夜主题全局覆盖 */
[data-theme="night"] body {
    background-color: #0f172a;
    color: #cbd5e1;
}
[data-theme="night"] .gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    -webkit-background-clip: text;
}
[data-theme="night"] nav {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(51, 65, 85, 0.5);
}
[data-theme="night"] nav .text-slate-600,
[data-theme="night"] #mobile-menu a {
    color: #94a3b8;
}
[data-theme="night"] nav a:hover,
[data-theme="night"] #mobile-menu a:hover {
    color: #818cf8;
}
[data-theme="night"] #mobile-menu {
    background-color: #1e293b;
    border-color: #334155;
}
[data-theme="night"] .bg-gradient-to-br[class*="from-indigo-50"] {
    background-image: linear-gradient(to bottom right, #0f172a, #1e1b4b, #312e81) !important;
}
[data-theme="night"] .mix-blend-multiply.bg-purple-300 {
    background-color: #4c1d95;
    opacity: 0.12;
}
[data-theme="night"] .mix-blend-multiply.bg-indigo-300 {
    background-color: #312e81;
    opacity: 0.12;
}
[data-theme="night"] .floating-orb {
    opacity: 0.08;
}
[data-theme="night"] .text-slate-800 { color: #e2e8f0; }
[data-theme="night"] .text-slate-900 { color: #f8fafc; }
[data-theme="night"] .text-slate-600 { color: #94a3b8; }
[data-theme="night"] .text-slate-500 { color: #64748b; }
[data-theme="night"] .text-slate-400 { color: #64748b; }
[data-theme="night"] .text-slate-700 { color: #e2e8f0; }
[data-theme="night"] .border-slate-100 { border-color: #334155; }
[data-theme="night"] .border-slate-200 { border-color: #334155; }
[data-theme="night"] .border-slate-300 { border-color: #475569; }
[data-theme="night"] .text-indigo-600 { color: #818cf8; }
[data-theme="night"] .text-indigo-700 { color: #818cf8; }
[data-theme="night"] .text-purple-600 { color: #a78bfa; }
[data-theme="night"] .text-pink-600 { color: #f472b6; }
[data-theme="night"] .bg-indigo-600 { background-color: #4f46e5; }
[data-theme="night"] .bg-indigo-100 { background-color: rgba(79, 70, 229, 0.15); }
[data-theme="night"] .bg-purple-100 { background-color: rgba(124, 58, 237, 0.15); }
[data-theme="night"] .bg-pink-100 { background-color: rgba(219, 39, 119, 0.15); }

[data-theme="night"] .bg-slate-50 { background-color: #0f172a; }
[data-theme="night"] .bg-white { background-color: #1e293b; }
[data-theme="night"] .from-slate-50 { --tw-gradient-from: #0f172a; }
[data-theme="night"] .bg-slate-50\/80 { background-color: rgba(15, 23, 42, 0.8); }
[data-theme="night"] .hover\:shadow-indigo-200:hover { --tw-shadow-color: rgba(99, 102, 241, 0.3); }
[data-theme="night"] .dark-source span,
[data-theme="night"] .dark-source a { color: rgba(148, 163, 184, 0.4) !important; }
[data-theme="night"] .dark-source a:hover { color: rgba(148, 163, 184, 0.6) !important; }

[data-theme="night"] .bg-indigo-500 { background-color: #6366f1; }
[data-theme="night"] .bg-purple-600 { background-color: #7c3aed; }
[data-theme="night"] .bg-slate-200 { background-color: #334155; }
[data-theme="night"] #about,
[data-theme="night"] #projects {
    background-color: #1e293b;
}
[data-theme="night"] #skills {
    background-color: #0f172a;
}
[data-theme="night"] .glass-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(51, 65, 85, 0.3);
}
[data-theme="night"] .hover\:text-indigo-600:hover { color: #818cf8; }
[data-theme="night"] .hover\:border-indigo-600:hover { border-color: #6366f1; }
[data-theme="night"] #contact a.bg-white {
    background-color: #ffffff;
    color: #4f46e5;
}
[data-theme="night"] #contact a[class*="bg-white\/10"] {
    background-color: rgba(255,255,255,0.15);
}
[data-theme="night"] footer {
    background-color: #020617;
    color: #475569;
}
[data-theme="night"] footer a { color: #475569; }
[data-theme="night"] footer a:hover { color: #e2e8f0; }
[data-theme="night"] #music-panel {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(51, 65, 85, 0.5);
}
[data-theme="night"] #music-panel .text-slate-500,
[data-theme="night"] #music-panel .text-slate-400 {
    color: #64748b;
}
[data-theme="night"] #music-panel .border-slate-200 { border-color: #334155; }
[data-theme="night"] .music-progress-track { background: #334155; }
[data-theme="night"] #music-mini-name {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
}
[data-theme="night"] #music-expand-btn {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(51, 65, 85, 0.5);
    color: #94a3b8;
}
[data-theme="night"] #music-expand-btn:hover { color: #818cf8; }
[data-theme="night"] .music-btn-glow {
    box-shadow: 0 0 25px rgba(129, 140, 248, 0.5);
}
[data-theme="night"] #back-to-top {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(51, 65, 85, 0.5);
    color: #818cf8;
}
[data-theme="night"] #back-to-top:hover {
    background: #4f46e5;
    color: #fff;
}
[data-theme="night"] .theme-toggle-btn {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(51, 65, 85, 0.5);
}

/* ====== 图库管理样式 ====== */
#gallery-login-modal,
#gallery-upload-modal {
    transition: opacity 0.2s ease;
}
#gallery-login-modal.hidden,
#gallery-upload-modal.hidden {
    display: none !important;
}
#gallery-dropzone {
    transition: all 0.2s ease;
}
#gallery-dropzone:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}
[data-theme="night"] #gallery-dropzone {
    border-color: #334155;
}
[data-theme="night"] #gallery-dropzone:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}
#gallery-upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
[data-theme="night"] #cursor-glow {
    background: radial-gradient(circle, rgba(129, 140, 248, 0.12) 0%, transparent 70%);
}
[data-theme="night"] #scroll-progress {
    background: linear-gradient(90deg, #818cf8, #c084fc);
}
[data-theme="night"] #image-modal {
    background: rgba(2, 6, 23, 0.92);
}
[data-theme="night"] #about img,
[data-theme="night"] .hero-content img,
[data-theme="night"] .project-img-wrap img {
    filter: brightness(0.88);
}

/* ====== 夜间模式输入框文字可见性修复 ====== */
[data-theme="night"] input,
[data-theme="night"] textarea,
[data-theme="night"] select,
[data-theme="night"] input[type="password"],
[data-theme="night"] input[type="text"],
[data-theme="night"] input[type="email"],
[data-theme="night"] input[type="search"] {
    background-color: #1e293b !important;
    color: #ffffff !important;
    border-color: #475569 !important;
}
[data-theme="night"] input::placeholder,
[data-theme="night"] textarea::placeholder,
[data-theme="night"] select::placeholder {
    color: #94a3b8 !important;
}
[data-theme="night"] input:focus,
[data-theme="night"] textarea:focus,
[data-theme="night"] select:focus {
    border-color: #6366f1 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3) !important;
}

/* ====== 缓存刷新测试标记（看到这段就说明CSS已更新） ====== */
body::after {
    content: "网页最后修改: 2026-06-22 01:50";
    position: fixed;
    bottom: 4px;
    right: 4px;
    font-size: 11px;
    color: #94a3b8;
    background: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 99999;
    pointer-events: none;
    opacity: 0.5;
}