/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --header-height: 280px;
    --neon-blue: #00f3ff;
    --neon-pink: #ff00ff;
    --neon-purple: #9d00ff;
    --dark-bg: #0a0a0f;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: var(--dark-bg);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* 倒计时头部容器 */
.countdown-header {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
    padding: 20px;
    border-bottom: 2px solid var(--neon-blue);
    position: relative;
    height: var(--header-height);
    min-height: 200px;
    max-height: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 0 5px 30px rgba(0, 243, 255, 0.2);
}

/* 简化的扫描线效果 */
.countdown-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), var(--neon-pink), var(--neon-blue), transparent);
    animation: scanLine 4s ease-in-out infinite;
}

@keyframes scanLine {
    0%, 100% { top: 0; }
    50% { top: calc(100% - 2px); }
}

/* 粒子容器 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* 粒子样式 */
.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 6s ease-in-out infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100%) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100%) scale(1);
        opacity: 0;
    }
}

/* 星星粒子 */
.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    animation: starTwinkle 2s ease-in-out infinite;
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

/* 流星效果 */
.meteor {
    position: absolute;
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, var(--neon-blue), transparent);
    border-radius: 50%;
    animation: meteorFall 3s linear infinite;
    opacity: 0;
}

@keyframes meteorFall {
    0% {
        transform: translateX(0) translateY(-100px) rotate(45deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: translateX(300px) translateY(300px) rotate(45deg);
        opacity: 0;
    }
}

/* 角落装饰 */
.corner-decoration {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
}

.corner-decoration::before,
.corner-decoration::after {
    content: '';
    position: absolute;
    background: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue);
}

.corner-decoration.top-left { top: 10px; left: 10px; }
.corner-decoration.top-left::before { width: 30px; height: 2px; top: 0; left: 0; }
.corner-decoration.top-left::after { width: 2px; height: 30px; top: 0; left: 0; }

.corner-decoration.top-right { top: 10px; right: 10px; }
.corner-decoration.top-right::before { width: 30px; height: 2px; top: 0; right: 0; }
.corner-decoration.top-right::after { width: 2px; height: 30px; top: 0; right: 0; }

.corner-decoration.bottom-left { bottom: 10px; left: 10px; }
.corner-decoration.bottom-left::before { width: 30px; height: 2px; bottom: 0; left: 0; }
.corner-decoration.bottom-left::after { width: 2px; height: 30px; bottom: 0; left: 0; }

.corner-decoration.bottom-right { bottom: 10px; right: 10px; }
.corner-decoration.bottom-right::before { width: 30px; height: 2px; bottom: 0; right: 0; }
.corner-decoration.bottom-right::after { width: 2px; height: 30px; bottom: 0; right: 0; }

.container {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    position: relative;
    z-index: 10;
}

/* 标题样式 */
.title {
    text-align: center;
    color: #fff;
    font-size: clamp(1rem, 4vw, 2.2rem);
    font-weight: 700;
    margin-bottom: clamp(10px, 3vh, 25px);
    text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue);
    animation: titleGlow 3s ease-in-out infinite;
    letter-spacing: clamp(1px, 0.5vw, 3px);
    white-space: nowrap;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue); }
    50% { text-shadow: 0 0 15px var(--neon-blue), 0 0 30px var(--neon-blue), 0 0 40px var(--neon-pink); }
}

/* 倒计时主体区域 */
.countdown-main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 3vw, 30px);
    width: 100%;
}

/* 吉祥物样式 */
.mascot {
    width: clamp(50px, 12vh, 120px);
    height: clamp(50px, 12vh, 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mascotBounce 2s ease-in-out infinite;
    flex-shrink: 0;
}

.mascot img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
}

.mascot-left {
    animation-delay: 0s;
}

.mascot-right {
    animation-delay: 1s;
    transform: scaleX(-1);
}

.mascot-right img {
    transform: scaleX(-1);
}

@keyframes mascotBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.mascot-right {
    animation-name: mascotBounceRight;
}

@keyframes mascotBounceRight {
    0%, 100% {
        transform: translateY(0) scaleX(-1);
    }
    50% {
        transform: translateY(-8px) scaleX(-1);
    }
}

/* 倒计时显示区域 */
.countdown-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(6px, 1.5vw, 15px);
    flex-wrap: nowrap;
}

/* 时间单元 */
.time-unit {
    background: rgba(0, 243, 255, 0.08);
    border: 2px solid rgba(0, 243, 255, 0.4);
    border-radius: clamp(8px, 1.5vw, 15px);
    padding: clamp(8px, 2vh, 20px) clamp(10px, 2vw, 25px);
    width: clamp(70px, 12vw, 130px);
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2), inset 0 0 15px rgba(0, 243, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.time-unit:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.4), inset 0 0 20px rgba(0, 243, 255, 0.1);
    border-color: var(--neon-pink);
}

/* 数字显示 */
.time-value {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.5rem, 5vw, 3.2rem);
    font-weight: 900;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue);
    line-height: 1;
    margin-bottom: clamp(4px, 1vh, 10px);
    transition: transform 0.3s ease, color 0.3s ease;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.time-value.changed {
    animation: numberPop 0.4s ease-out;
}

@keyframes numberPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: var(--neon-pink); }
    100% { transform: scale(1); }
}

.time-label {
    font-size: clamp(0.6rem, 1.5vw, 1rem);
    color: rgba(0, 243, 255, 0.8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: clamp(1px, 0.3vw, 3px);
}

/* 分隔符 */
.time-separator {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--neon-pink);
    font-weight: 700;
    animation: blink 1s infinite;
    text-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.3; }
}

/* 设置按钮 */
.settings-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 45px;
    height: 45px;
    padding: 0;
    font-size: 1.3rem;
    color: #fff;
    background: rgba(0, 243, 255, 0.1);
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
    z-index: 100;
}

.settings-btn:hover {
    background: rgba(0, 243, 255, 0.2);
    transform: rotate(90deg);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
}

/* iframe容器 */
.iframe-container {
    width: 100%;
    flex: 1;
    min-height: 400px;
    background: #fff;
    box-shadow: 0 -5px 20px rgba(0, 243, 255, 0.2);
    overflow: hidden;
    position: relative;
    border-top: 2px solid var(--neon-blue);
}

.iframe-container iframe {
    width: 100%;
    height: 6059px;
    border: none;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* 响应式设计 - 角落装饰和设置按钮 */
@media (max-width: 768px) {
    .corner-decoration { width: 40px; height: 40px; }
    .corner-decoration::before { width: 20px !important; }
    .corner-decoration::after { height: 20px !important; }
    
    .settings-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .countdown-header { padding: 10px; }
    
    .corner-decoration { width: 25px; height: 25px; }
    .corner-decoration::before { width: 12px !important; }
    .corner-decoration::after { height: 12px !important; }

    .settings-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        top: 8px;
        right: 8px;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 预览模式 - 隐藏弹窗 */
.modal.preview-mode {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
    border: 2px solid var(--neon-blue);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
}

.modal-header h2 {
    color: var(--neon-blue);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 10px var(--neon-blue);
}

.close-btn {
    background: rgba(255, 0, 255, 0.1);
    border: 2px solid var(--neon-pink);
    color: var(--neon-pink);
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(255, 0, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body { padding: 25px; }

.setting-group {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(0, 243, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 243, 255, 0.15);
}

.setting-group:last-child { margin-bottom: 0; }

.setting-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    gap: 10px;
}

.label-icon { font-size: 1.1rem; }

.value-display {
    font-family: 'Orbitron', monospace;
    color: var(--neon-blue);
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 0 0 8px var(--neon-blue);
}

.text-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.text-input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.datetime-input {
    color-scheme: dark;
    cursor: pointer;
}

.datetime-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.number-input {
    width: 100%;
    padding: 10px 14px;
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--neon-blue);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
}

.number-input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.modal-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 243, 255, 0.15);
    outline: none;
}

.modal-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-blue);
}

.modal-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
    cursor: pointer;
    border: none;
}

.setting-hint {
    font-size: 0.75rem;
    color: rgba(0, 243, 255, 0.5);
    margin-top: 8px;
}

/* 预览按钮 */
.btn-preview {
    margin-top: 12px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neon-pink);
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid var(--neon-pink);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-preview:hover {
    background: rgba(255, 0, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

/* 结束文字样式 */
.end-message {
    text-align: center;
    padding: clamp(10px, 3vh, 30px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.end-message span {
    font-size: clamp(1.2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #fff;
    text-shadow: 
        0 0 10px var(--neon-pink),
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-blue);
    animation: endMessageGlow 2s ease-in-out infinite;
    letter-spacing: clamp(1px, 0.5vw, 4px);
    line-height: 1.4;
    display: inline-block;
}

@keyframes endMessageGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px var(--neon-pink),
            0 0 20px var(--neon-pink),
            0 0 40px var(--neon-blue);
    }
    50% {
        text-shadow: 
            0 0 15px var(--neon-pink),
            0 0 30px var(--neon-pink),
            0 0 60px var(--neon-blue),
            0 0 80px var(--neon-purple);
    }
}



.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 15px 25px;
    border-top: 1px solid rgba(0, 243, 255, 0.3);
}

.btn-primary,
.btn-secondary {
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
}

.btn-secondary:hover {
    background: rgba(0, 243, 255, 0.1);
}

@media (max-width: 480px) {
    .modal-footer {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
::-webkit-scrollbar-thumb {
    background: var(--neon-blue);
    border-radius: 3px;
}
