:root {
    /* Based on user specs */
    --bg-dark: #0B0F1A;
    --text-main: #FFFFFF;
    --text-muted: #A0B3D6;
    --primary: #5B8CFF;
    --primary-hover: #8A5BFF;
    --secondary: #00E5FF;
    --accent: #FF4D6D;

    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --gradient-text: linear-gradient(135deg, #5B8CFF, #8A5BFF, #00E5FF);

    --nav-bg: rgba(11, 15, 26, 0.8);
    --nav-bg-scrolled: rgba(11, 15, 26, 0.95);
    --card-hover-bg: rgba(255, 255, 255, 0.08);
    --card-radius: 20px;
}

:root[data-theme="light"] {
    --bg-dark: #F4F7FB;
    --text-main: #0B0F1A;
    --text-muted: #5B6A8C;
    --secondary: #0096B0;
    /* Darker cyan for readability */
    --accent: #E01B3F;
    /* Deeper red/pink for readability */
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(244, 247, 251, 0.8);
    --nav-bg-scrolled: rgba(244, 247, 251, 0.95);
    --card-hover-bg: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

h1,
h2,
h3,
h4,
.logo,
.card-num {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    font-weight: 900;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--nav-bg-scrolled);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent);
    animation: blink 1s infinite alternate;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

html[lang="zh"] .en {
    display: none !important;
}

html[lang="en"] .zh {
    display: none !important;
}

.lang-btn {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    transition: transform 0.3s;
}

.lang-btn:hover {
    transform: scale(1.1);
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 700;
    font-size: 1.05rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-btn {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.3s;
    color: var(--text-main);
}

.theme-btn:hover {
    transform: scale(1.1);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #FFF;
    box-shadow: 0 4px 15px rgba(91, 140, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(91, 140, 255, 0.6);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--card-hover-bg);
    border-color: var(--secondary);
}

/* Base Section */
section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.3rem;
}

/* 1. Hero */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 120px;
}

.hero-content {
    max-width: 650px;
    z-index: 2;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.hero-title span {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    line-height: 1.4;
}

.hero-desc {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    width: 450px;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sphere {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #00E5FF, #5B8CFF);
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.4);
    z-index: 2;
    animation: float 5s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-25px);
    }
}

.orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed var(--glass-border);
}

.orbit-1 {
    width: 320px;
    height: 320px;
    animation: rotate 20s linear infinite;
}

.orbit-2 {
    width: 480px;
    height: 480px;
    border: 1px solid rgba(91, 140, 255, 0.2);
    animation: rotate 30s linear infinite reverse;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

/* 2. Play Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.play-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 3rem 2.5rem;
    border-radius: var(--card-radius);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.play-card:hover {
    transform: translateY(-10px);
    background: var(--card-hover-bg);
    border-color: var(--secondary);
    box-shadow: 0 10px 40px rgba(0, 229, 255, 0.15);
}

.card-num {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
    line-height: 1;
}

:root[data-theme="light"] .card-num {
    color: rgba(0, 0, 0, 0.05);
}

.play-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.play-card p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* 3. Grid Points (Replaced Horizontal Scroll) */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.point-item {
    padding: 2.5rem;
    background: var(--glass-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.point-item:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
}

.point-item h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: var(--secondary);
}

/* Remove old videos section */

/* 4. Video UI */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.video-card {
    height: 400px;
    border-radius: var(--card-radius);
    background: #000;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.video-card::after {
    content: '▶';
    position: absolute;
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
}

.video-card:hover::after {
    color: #FFF;
    transform: scale(1.2);
}

/* 5. Modes Text Grid */
.modes-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.mode-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s;
    color: var(--text-main);
}

.mode-btn strong {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.mode-btn:hover {
    background: var(--secondary);
    color: #000;
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.mode-btn:hover strong {
    color: #000;
}

/* Engine UI */
.engine-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--glass-border);
    color: #FFF;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    font-weight: bold;
}

.engine-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.engine-btn.active {
    background: var(--primary);
    border-color: var(--primary-hover);
    box-shadow: 0 0 20px rgba(91, 140, 255, 0.6);
    color: #FFF;
}

/* 6. CTA */
.cta-section {
    text-align: center;
    padding: 120px 5%;
    margin-bottom: 50px;
}

.cta-content {
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.1), rgba(255, 77, 109, 0.1));
    border: 1px dashed var(--primary);
    border-radius: var(--card-radius);
    padding: 5rem 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    line-height: 1.4;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 5%;
    border-top: 1px solid var(--glass-border);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1000px) {
    .nav-links {
        display: none;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        padding-top: 150px;
        gap: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-sub {
        font-size: 1.8rem;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .modes-grid {
        flex-direction: column;
    }

    .mode-btn {
        text-align: center;
    }
}

/* Admin Features */
#eye-protection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(245, 222, 179, 0.35); /* Warm tint */
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 9998;
    display: none;
}
#eye-protection-overlay.active {
    display: block;
}

.content-editable-active [contenteditable="true"]:hover {
    outline: 2px dashed #FFD700;
    background: rgba(255, 215, 0, 0.1);
    cursor: text;
}
.content-editable-active [contenteditable="true"] { -webkit-text-fill-color: initial !important; color: inherit; }
.content-editable-active .hero-title span { background: none !important; color: var(--secondary) !important; }

/* SPA Page Routing */
.page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    width: 100%;
}
.page.active {
    display: block;
    opacity: 1;
}

/* Feedback Floating Button */
.floating-feedback-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 990;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}
.floating-feedback-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 140, 255, 0.4);
}

/* Feedback Modal Overlay */
.feedback-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.feedback-modal-overlay.active {
    display: flex;
    opacity: 1;
}
.feedback-modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.feedback-modal-overlay.active .feedback-modal-content {
    transform: scale(1);
}
#feedback-textarea {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 8px;
    padding: 15px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    font-size: 1rem;
}
#feedback-textarea:focus {
    border-color: var(--primary);
}
