/* ============================================
   BASE.CSS - 变量、重置、基础样式、背景效果
   ============================================ */

/* --- RESET & BASE --- */
:root {
    --bg-color: #0a0a0a;
    --text-main: #f0f0f0;
    --text-muted: #888888;
    --accent-1: #4facfe;
    --accent-2: #00f2fe;
    --accent-3: #ff0099;
    /* Chinese Font Stack Optimization */
    --font-serif: "Songti SC", "Noto Serif SC", "SimSun", "STSong", "Playfair Display", serif;
    --font-sans: "PingFang SC", "Microsoft YaHei", "Inter", sans-serif;
    --easing: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Light Theme Variables */
body.light-theme {
    --bg-color: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #555555;
}

body.light-theme input {
    color: var(--text-main);
    border-bottom-color: rgba(0, 0, 0, 0.2);
}

body.light-theme input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

body.light-theme input:focus {
    border-bottom-color: rgba(0, 0, 0, 0.8);
}

body.light-theme .nav-btn {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

body.light-theme .nav-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.4);
}

body.light-theme .glass-box {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
    width: 100%;
    overflow: hidden;
    overscroll-behavior: none;
    /* Use root background color (default dark) */
    background-color: var(--bg-color);
}

body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed;
    /* Fix body to viewport */
    top: 0;
    left: 0;
    overscroll-behavior: none;
    touch-action: none;
    /* Disable default touch actions like panning */
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.8s var(--easing), color 0.8s var(--easing);
}

body.hide-orbs .gradient-orb {
    opacity: 0;
    pointer-events: none;
}

/* The Frosted Glass Box */
.glass-box {
    width: 150px;
    height: 150px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(var(--glass-blur, 15px));
    -webkit-backdrop-filter: blur(var(--glass-blur, 15px));
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: background 0.8s var(--easing), border 0.8s var(--easing), box-shadow 0.8s var(--easing);
}

/* --- BACKGROUND EFFECTS --- */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    pointer-events: none;
    z-index: 10;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.bg-video-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    display: none;
    opacity: 0.6;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    animation: float 20s infinite alternate;
    opacity: 0.6;
    transition: opacity 1.2s ease-in-out;
}

.orb-1 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-1), transparent 70%);
    top: -10%;
    left: -10%;
    animation-duration: 25s;
}

.orb-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-3), transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-duration: 30s;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(30px, 50px) rotate(10deg);
    }
}

/* --- MAIN CONTAINER --- */
.container {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* --- TYPOGRAPHY --- */
h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(20px);
    animation: textReveal 1.2s var(--easing) forwards 0.5s;
}

h1 span.italic {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-top: 0.5rem;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- GREETING STATE --- */
.greeting-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s var(--easing);
    z-index: 25;
}

.greeting-message h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 400;
    line-height: 1.3;
}

.fade-out {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: all 0.8s var(--easing);
}

/* ============================================
   CC ATTACK WARNING OVERLAY
   ============================================ */
.cc-attack-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 50%, #0a0a0a 100%);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.cc-attack-overlay.active {
    display: flex;
    opacity: 1;
}

.cc-attack-content {
    text-align: center;
    padding: 2rem;
    max-width: 500px;
    animation: ccShake 0.5s ease-out;
}

@keyframes ccShake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.cc-attack-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #ff4444, #cc0000);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: ccPulse 2s ease-in-out infinite;
    box-shadow:
        0 0 60px rgba(255, 68, 68, 0.5),
        0 0 120px rgba(255, 68, 68, 0.3);
}

@keyframes ccPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 0 60px rgba(255, 68, 68, 0.5),
            0 0 120px rgba(255, 68, 68, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow:
            0 0 80px rgba(255, 68, 68, 0.7),
            0 0 160px rgba(255, 68, 68, 0.5);
    }
}

.cc-attack-icon svg {
    width: 60px;
    height: 60px;
    color: white;
}

.cc-attack-title {
    font-family: var(--font-sans);
    font-size: 8rem;
    font-weight: 900;
    color: #ff4444;
    margin: 0;
    line-height: 1;
    text-shadow:
        0 0 40px rgba(255, 68, 68, 0.8),
        0 4px 20px rgba(0, 0, 0, 0.5);
    animation: textReveal 0.8s var(--easing) forwards;
}

.cc-attack-subtitle {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: #f0f0f0;
    margin: 1rem 0 2rem;
    opacity: 0.9;
}

.cc-attack-message {
    font-size: 1.2rem;
    color: #ff6666;
    margin-bottom: 1rem;
    padding: 1rem 2rem;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 12px;
    display: inline-block;
}

.cc-attack-timer {
    font-size: 1rem;
    color: #888;
    margin-top: 1.5rem;
}

.cc-attack-timer span {
    color: #ff4444;
    font-weight: bold;
    font-size: 1.2rem;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-height: 700px) {
    .container {
        padding: 1.5rem;
    }
}

@media (max-height: 600px) {
    .container {
        padding: 1rem;
        justify-content: flex-start;
        padding-top: 2rem;
    }
}