/* ===== 风起长空 - 节日特效样式 v2.0 ===== */
/* 2025蛇年 & 圣诞特别版 */

/* 字体定义 */
@font-face {
    font-family: 'ZCOOL XiaoWei';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/zcoolxiaowei/v14/i7dMIFFrTRywPpUVX9_RJyM1YFKQHwyVd3U.woff2') format('woff2');
}

:root {
    /* 圣诞主题 */
    --xmas-gold: #d4af37;
    --xmas-red: #c41e3a;
    --xmas-green: #228b22;
    --xmas-white: #fffafa;
    
    /* 新年/蛇年主题 - 中国风 */
    --ny-red: #de2910;
    --ny-gold: #ffcc00;
    --ny-orange: #ff6600;
    --ny-pink: #ff69b4;
    --ny-jade: #00a86b;
    
    /* 马年特殊色 */
    --horse-red: #b22222;
    --horse-gold: #daa520;
    --horse-brown: #8b4513;
    
    /* 通用 */
    --bg-dark: #0a0a15;
    --bg-gradient: linear-gradient(135deg, #0a0a15 0%, #1a0a25 50%, #0a1520 100%);
    
    /* 当前主题（通过JS切换） */
    --theme-primary: var(--xmas-gold);
    --theme-secondary: var(--xmas-red);
    --theme-accent: var(--xmas-green);
    
    /* 动画时间变量 */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
}

/* 新年主题变体 */
body.new-year {
    --theme-primary: var(--ny-gold);
    --theme-secondary: var(--ny-red);
    --theme-accent: var(--horse-gold);
    --bg-gradient: linear-gradient(135deg, #150505 0%, #2a0a0a 50%, #1a0505 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: -webkit-fill-available;
    scroll-behavior: smooth;
}

body {
    overflow: hidden;
    background: var(--bg-gradient);
    font-family: 'ZCOOL XiaoWei', 'Microsoft YaHei', 'PingFang SC', -apple-system, sans-serif;
    color: var(--theme-primary);
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    transition: background var(--transition-slow) ease;
}

canvas {
    display: block;
}

/* ===== 加载器 ===== */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-gradient);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spinner {
    width: 70px;
    height: 70px;
    margin: 0 auto 30px;
    position: relative;
}

.spinner::before,
.spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.spinner::before {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--theme-primary);
    border-bottom-color: var(--theme-secondary);
    animation: spin 1.2s linear infinite;
}

.spinner::after {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border: 2px solid transparent;
    border-left-color: var(--theme-accent);
    border-right-color: var(--xmas-white);
    animation: spin 0.8s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    font-size: 18px;
    letter-spacing: 4px;
    color: var(--theme-primary);
    text-shadow: 0 0 20px var(--theme-primary);
    animation: pulse-text 2s ease-in-out infinite;
}

.loader-emoji {
    font-size: 40px;
    display: block;
    margin-bottom: 15px;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

/* ===== UI 容器 ===== */
#ui-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    transition: opacity var(--transition-slow) ease;
}

#ui-container.ui-hidden {
    opacity: 0 !important;
}

#ui-container.ui-hidden * {
    pointer-events: none !important;
}

/* ===== 顶部标题 ===== */
.header-section {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 25px 20px;
    text-align: center;
    pointer-events: auto;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 100%);
}

h1.main-title {
    font-size: clamp(32px, 7vw, 72px);
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(
        180deg, 
        #ffffff 0%, 
        var(--theme-primary) 40%, 
        var(--theme-secondary) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.6));
    animation: title-glow 3s ease-in-out infinite, title-float 6s ease-in-out infinite;
    letter-spacing: 8px;
}

@keyframes title-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.6)); 
    }
    50% { 
        filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0.9)) drop-shadow(0 0 60px rgba(212, 175, 55, 0.4)); 
    }
}

@keyframes title-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.sub-title {
    font-size: clamp(14px, 2.5vw, 22px);
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 4px;
    text-shadow: 0 0 15px var(--theme-primary);
    animation: fadeIn 1s ease 0.3s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 生肖标签 */
.zodiac-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 25px;
    font-size: 14px;
    color: var(--theme-primary);
    animation: fadeIn 1s ease 0.5s both;
}

.zodiac-badge .emoji {
    font-size: 20px;
    animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* ===== 倒计时区域 ===== */
.countdown-section {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow) ease;
}

.countdown-section.active {
    opacity: 1;
    visibility: visible;
}

.countdown-label {
    font-size: clamp(16px, 3vw, 26px);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    text-shadow: 0 0 15px var(--theme-primary);
    letter-spacing: 3px;
}

.countdown-timer {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid var(--theme-primary);
    border-radius: 16px;
    padding: 18px 24px;
    min-width: 90px;
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.2),
        inset 0 0 30px rgba(212, 175, 55, 0.1);
    transition: all var(--transition-normal) ease;
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.2), inset 0 0 20px rgba(212, 175, 55, 0.1);
    }
    50% { 
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.4), inset 0 0 30px rgba(212, 175, 55, 0.2);
    }
}

.countdown-number {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    color: var(--theme-primary);
    text-shadow: 0 0 25px var(--theme-primary);
    display: block;
    font-variant-numeric: tabular-nums;
    transition: transform var(--transition-fast) ease;
}

.countdown-item:hover .countdown-number {
    transform: scale(1.1);
}

.countdown-unit {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 3px;
    margin-top: 8px;
    text-transform: uppercase;
}

/* ===== 底部控制区 ===== */
.controls-section {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px 20px;
    pointer-events: auto;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.glass-btn {
    position: relative;
    padding: 14px 28px;
    font-family: inherit;
    font-size: 14px;
    color: var(--theme-primary);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--theme-primary);
    border-radius: 12px;
    backdrop-filter: blur(15px);
    cursor: pointer;
    transition: all var(--transition-normal) ease;
    letter-spacing: 2px;
    overflow: hidden;
    white-space: nowrap;
}

.glass-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.6s ease;
}

.glass-btn:hover {
    background: rgba(212, 175, 55, 0.25);
    box-shadow: 
        0 0 25px rgba(212, 175, 55, 0.5),
        inset 0 0 25px rgba(212, 175, 55, 0.15);
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.8);
}

.glass-btn:hover::before {
    left: 100%;
}

.glass-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.glass-btn.active {
    background: rgba(212, 175, 55, 0.35);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
}

/* 按钮图标动画 */
.glass-btn .btn-icon {
    display: inline-block;
    margin-right: 6px;
    transition: transform var(--transition-normal) ease;
}

.glass-btn:hover .btn-icon {
    transform: scale(1.2) rotate(10deg);
}

.upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ===== 提示文字 ===== */
.hint-section {
    text-align: center;
}

.hint-text {
    display: inline-block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
    line-height: 2;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    max-width: 95%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.hint-text b {
    color: var(--theme-primary);
    text-shadow: 0 0 10px var(--theme-primary);
}

.hint-emoji {
    font-size: 16px;
    margin-right: 4px;
}

/* ===== 摄像头预览 ===== */
.cv-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 160px;
    height: 120px;
    border: 2px solid var(--theme-primary);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100;
    pointer-events: none;
    opacity: 0.9;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    transition: all var(--transition-normal) ease;
}

.cv-container:hover {
    opacity: 1;
    transform: scale(1.05);
}

.cv-container.hidden {
    display: none;
}

.cv-container::before {
    content: '📷';
    position: absolute;
    top: 5px;
    left: 8px;
    font-size: 12px;
    z-index: 1;
}

#webcam {
    display: none;
}

#cv-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

/* ===== 节日切换器 ===== */
.festival-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    pointer-events: auto;
    z-index: 20;
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(15px);
    padding: 10px 18px;
    border-radius: 35px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-normal) ease;
}

.switch-container:hover {
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 4px 30px rgba(212, 175, 55, 0.2);
}

.switch-label {
    font-size: 20px;
    transition: transform var(--transition-normal) ease;
}

.switch-label:first-child:hover {
    transform: scale(1.2) rotate(-10deg);
}

.switch-label:last-child:hover {
    transform: scale(1.2) rotate(10deg);
}

.switch-toggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: linear-gradient(135deg, var(--xmas-green) 0%, #1a5a1a 100%);
    border-radius: 14px;
    cursor: pointer;
    transition: all var(--transition-normal) ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

.switch-toggle.new-year {
    background: linear-gradient(135deg, var(--ny-red) 0%, #a01010 100%);
}

.switch-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    border-radius: 50%;
    transition: transform var(--transition-normal) ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.switch-toggle.new-year::after {
    transform: translateX(28px);
}

/* ===== 祝福弹窗 ===== */
.blessing-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(25px);
    border: 2px solid var(--theme-primary);
    border-radius: 24px;
    padding: 45px;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90%;
    width: 420px;
    box-shadow: 
        0 0 60px rgba(212, 175, 55, 0.4),
        inset 0 0 60px rgba(212, 175, 55, 0.05);
}

.blessing-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.blessing-icon {
    font-size: 70px;
    margin-bottom: 25px;
    animation: bounce 2s ease-in-out infinite;
    display: block;
}

.blessing-text {
    font-size: 28px;
    color: var(--theme-primary);
    margin-bottom: 12px;
    text-shadow: 0 0 25px var(--theme-primary);
    letter-spacing: 4px;
}

.blessing-sub {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.blessing-close {
    padding: 12px 35px;
    font-size: 15px;
    font-family: inherit;
    color: var(--theme-primary);
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--theme-primary);
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--transition-normal) ease;
    letter-spacing: 2px;
}

.blessing-close:hover {
    background: rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
    transform: scale(1.05);
}

/* 弹窗背景遮罩 */
.blessing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal) ease;
}

.blessing-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ===== 烟花效果容器 ===== */
#fireworks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* ===== 灯笼装饰 ===== */
.lantern {
    position: fixed;
    width: 65px;
    height: 90px;
    animation: swing 3.5s ease-in-out infinite;
    transform-origin: top center;
    z-index: 8;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-slow) ease;
}

body.new-year .lantern {
    opacity: 1;
}

.lantern-left {
    top: -10px;
    left: 6%;
}

.lantern-right {
    top: -10px;
    right: 6%;
    animation-delay: -1.75s;
}

@keyframes swing {
    0%, 100% { transform: rotate(-6deg); }
    50% { transform: rotate(6deg); }
}

.lantern-body {
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #ff5555 0%, #dd0000 60%, #aa0000 100%);
    border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
    box-shadow: 
        0 0 40px rgba(255, 50, 50, 0.7),
        inset 0 -25px 35px rgba(0, 0, 0, 0.35),
        inset 0 10px 20px rgba(255, 200, 100, 0.3);
    position: relative;
    animation: lantern-glow 2s ease-in-out infinite;
}

@keyframes lantern-glow {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 50, 50, 0.7), inset 0 -25px 35px rgba(0, 0, 0, 0.35); }
    50% { box-shadow: 0 0 60px rgba(255, 100, 50, 0.9), inset 0 -25px 35px rgba(0, 0, 0, 0.35); }
}

.lantern-body::before {
    content: '福';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: var(--ny-gold);
    text-shadow: 0 0 15px var(--ny-gold), 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

.lantern-top {
    width: 35px;
    height: 18px;
    background: linear-gradient(to bottom, #ffdd44, #cc9900);
    border-radius: 6px 6px 0 0;
    margin: 0 auto;
    box-shadow: 0 -2px 10px rgba(255, 200, 0, 0.5);
}

.lantern-bottom {
    width: 25px;
    height: 30px;
    margin: 0 auto;
    position: relative;
}

.lantern-tassel {
    width: 5px;
    height: 35px;
    background: linear-gradient(to bottom, #dd0000, #ff7777, #dd0000);
    margin: 0 auto;
    border-radius: 0 0 3px 3px;
    animation: tassel-swing 2.5s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
}

@keyframes tassel-swing {
    0%, 100% { transform: rotate(-4deg) translateX(-2px); }
    50% { transform: rotate(4deg) translateX(2px); }
}

/* ===== 马年装饰 ===== */
.horse-decoration {
    position: fixed;
    font-size: 35px;
    opacity: 0;
    pointer-events: none;
    z-index: 6;
    transition: opacity var(--transition-slow) ease;
    animation: horse-gallop 2s ease-in-out infinite;
}

body.new-year .horse-decoration {
    opacity: 0.85;
}

.horse-decoration.left {
    bottom: 15%;
    left: 3%;
    animation-delay: 0s;
}

.horse-decoration.right {
    bottom: 20%;
    right: 3%;
    animation-delay: -1s;
    transform: scaleX(-1);
}

@keyframes horse-gallop {
    0%, 100% { 
        transform: translateY(0) translateX(0) rotate(-3deg); 
    }
    25% {
        transform: translateY(-12px) translateX(5px) rotate(2deg);
    }
    50% { 
        transform: translateY(-5px) translateX(10px) rotate(-2deg); 
    }
    75% {
        transform: translateY(-15px) translateX(5px) rotate(3deg);
    }
}

/* ===== 音乐控制按钮 ===== */
.music-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--theme-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all var(--transition-normal) ease;
    pointer-events: auto;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.music-btn:hover {
    background: rgba(212, 175, 55, 0.25);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    transform: scale(1.1);
}

.music-btn.playing {
    animation: pulse-btn 1.2s ease-in-out infinite;
}

.music-btn.playing::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--theme-primary);
    animation: ripple 1.5s ease-out infinite;
}

@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.4); }
    50% { box-shadow: 0 0 35px rgba(212, 175, 55, 0.8); }
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ===== Toast 通知 ===== */
.toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid var(--theme-primary);
    border-radius: 35px;
    padding: 14px 30px;
    color: var(--theme-primary);
    font-size: 15px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    box-shadow: 0 4px 30px rgba(212, 175, 55, 0.3);
    letter-spacing: 1px;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== 模式指示器 ===== */
.mode-indicator {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
    z-index: 15;
}

.mode-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-normal) ease;
    position: relative;
}

.mode-dot::before {
    content: attr(data-label);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--theme-primary);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-fast) ease;
}

.mode-dot:hover::before {
    opacity: 1;
    right: 25px;
}

.mode-dot.active {
    background: var(--theme-primary);
    box-shadow: 0 0 15px var(--theme-primary);
    transform: scale(1.3);
}

.mode-dot:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.5);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .cv-container {
        width: 120px;
        height: 90px;
        bottom: 15px;
        right: 15px;
        border-radius: 12px;
    }
    
    .controls-section {
        padding: 20px 15px;
    }
    
    .glass-btn {
        padding: 12px 20px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    .hint-text {
        font-size: 12px;
        padding: 12px 18px;
        line-height: 1.9;
    }
    
    .countdown-item {
        padding: 14px 18px;
        min-width: 72px;
        border-radius: 12px;
    }
    
    .countdown-number {
        font-size: 32px;
    }
    
    .festival-switcher {
        top: 15px;
        right: 15px;
    }
    
    .switch-container {
        padding: 8px 14px;
        gap: 10px;
    }
    
    .switch-toggle {
        width: 48px;
        height: 24px;
    }
    
    .switch-toggle::after {
        width: 18px;
        height: 18px;
    }
    
    .switch-toggle.new-year::after {
        transform: translateX(24px);
    }
    
    .lantern {
        width: 45px;
        height: 62px;
    }
    
    .lantern-body::before {
        font-size: 18px;
    }
    
    .lantern-top {
        width: 24px;
        height: 12px;
    }
    
    .music-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
        top: 15px;
        left: 15px;
    }
    
    .mode-indicator {
        right: 10px;
        gap: 10px;
    }
    
    .mode-dot {
        width: 10px;
        height: 10px;
    }
    
    .blessing-popup {
        padding: 35px 25px;
        width: 340px;
        border-radius: 20px;
    }
    
    .blessing-icon {
        font-size: 55px;
        margin-bottom: 20px;
    }
    
    .blessing-text {
        font-size: 24px;
    }
    
    .horse-decoration {
        font-size: 28px;
    }
    
    .zodiac-badge {
        padding: 6px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header-section {
        padding: 18px 15px;
    }
    
    .btn-group {
        gap: 8px;
    }
    
    .glass-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .countdown-timer {
        gap: 10px;
    }
    
    .countdown-item {
        padding: 12px 14px;
        min-width: 62px;
    }
    
    .countdown-number {
        font-size: 28px;
    }
    
    .countdown-unit {
        font-size: 11px;
    }
    
    .blessing-popup {
        padding: 28px 20px;
        width: 300px;
    }
    
    .blessing-icon {
        font-size: 48px;
    }
    
    .blessing-text {
        font-size: 20px;
    }
    
    .blessing-sub {
        font-size: 13px;
    }
    
    .toast {
        bottom: 100px;
        padding: 12px 24px;
        font-size: 13px;
    }
    
    .hint-text {
        font-size: 11px;
        padding: 10px 14px;
    }
    
    .lantern-left {
        left: 2%;
    }
    
    .lantern-right {
        right: 2%;
    }
    
    .horse-decoration {
        font-size: 22px;
    }
    
    .horse-decoration.left {
        left: 1%;
    }
    
    .horse-decoration.right {
        right: 1%;
    }
}

/* ===== 横屏适配 ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .header-section {
        padding: 10px;
    }
    
    h1.main-title {
        font-size: 28px;
    }
    
    .sub-title {
        font-size: 12px;
    }
    
    .controls-section {
        padding: 10px;
    }
    
    .hint-text {
        display: none;
    }
    
    .countdown-section {
        top: 45%;
    }
    
    .countdown-item {
        padding: 8px 12px;
        min-width: 55px;
    }
    
    .countdown-number {
        font-size: 24px;
    }
    
    .lantern {
        display: none;
    }
}

/* ===== 深色模式增强 ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-gradient: linear-gradient(135deg, #050510 0%, #100520 50%, #051015 100%);
    }
}

/* ===== 减少动画（辅助功能） ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== 打印样式 ===== */
@media print {
    body {
        background: white !important;
    }
    
    #ui-container, .cv-container, .lantern, .snake-decoration, #fireworks-canvas {
        display: none !important;
    }
}
