/* =========================================================
   snova — Coming Soon Page Styles
   ========================================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #06060b;
    --bg-secondary: #0c0c14;
    --bg-card: #10101a;
    --bg-elevated: #16162a;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #555570;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --accent-subtle: rgba(99, 102, 241, 0.08);
    --success: #34d399;
    --danger: #f43f5e;
    --warning: #fbbf24;
    --tron-player: #06b6d4;
    --tron-ai: #f43f5e;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

::selection {
    background: var(--accent);
    color: white;
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, transparent 0%, var(--bg-primary) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Nav */
.hero-nav {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 20px;
    color: var(--accent-light);
    animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.logo-text {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    background: var(--accent-subtle);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-light);
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.status-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-light);
    letter-spacing: 0.3px;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
    animation: fadeInDown 0.8s var(--ease-out) both;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -2px;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s var(--ease-out) 0.1s both;
}

.title-line {
    display: block;
}

.title-accent {
    background: linear-gradient(135deg, var(--accent-light) 0%, #a78bfa 50%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
    font-size: clamp(15px, 1.8vw, 18px);
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 48px;
    animation: fadeInUp 0.8s var(--ease-out) 0.2s both;
}

/* Countdown */
.hero-cta {
    animation: fadeInUp 0.8s var(--ease-out) 0.3s both;
    width: 100%;
    max-width: 520px;
}

.countdown-wrapper {
    margin-bottom: 32px;
}

.countdown-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
    padding: 12px 8px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.countdown-number {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.countdown-unit {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

.countdown-separator {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--text-muted);
    padding-bottom: 16px;
}

/* Email Form */
.email-form {
    display: flex;
    gap: 8px;
    width: 100%;
}

.email-input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.email-input::placeholder {
    color: var(--text-muted);
}

.email-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(255, 255, 255, 0.05);
}

.email-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: white;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
}

.email-btn:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.email-btn:active {
    transform: translateY(0);
}

.email-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.2);
    color: var(--success);
    font-size: 14px;
    font-weight: 500;
    animation: fadeInUp 0.5s var(--ease-spring);
}

/* Scroll Indicator */
.scroll-indicator {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-bottom: 40px;
    animation: fadeInUp 0.8s var(--ease-out) 0.5s both;
}

.scroll-indicator span {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.scroll-arrow {
    color: var(--text-muted);
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* =========================================================
   GAMES SECTION
   ========================================================= */
.games-section {
    position: relative;
    padding: 80px 24px 60px;
    max-width: 800px;
    margin: 0 auto;
}

.games-header {
    text-align: center;
    margin-bottom: 48px;
}

.games-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.games-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.games-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* Game Tabs */
.game-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 6px;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.game-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    position: relative;
}

.game-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.game-tab.active {
    color: var(--text-primary);
    background: var(--bg-elevated);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tab-icon {
    font-size: 16px;
}

.tab-keys {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Game Container */
.game-container {
    display: none;
    animation: gameIn 0.4s var(--ease-out);
}

.game-container.active {
    display: block;
}

@keyframes gameIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.game-ui {
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    overflow: hidden;
}

.game-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-wrap: wrap;
}

.game-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.stat-value.tron-player { color: var(--tron-player); }
.stat-value.tron-bot-red { color: #f43f5e; }
.stat-value.tron-bot-yellow { color: #fbbf24; }
.stat-value.tron-bot-green { color: #34d399; }

.tron-bot-scores {
    display: flex;
    gap: 12px;
    align-items: center;
}

.tron-bot-scores .stat-value {
    font-size: 18px;
}

.bot-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.bot-dot-red { background: #f43f5e; }
.bot-dot-yellow { background: #fbbf24; }
.bot-dot-green { background: #34d399; }

.tron-bots-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* Game Canvas */
.game-canvas-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-card);
    aspect-ratio: 1;
    max-height: 500px;
    overflow: hidden;
}

.game-canvas-wrapper canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Game Overlay */
.game-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(6, 6, 11, 0.85);
    backdrop-filter: blur(8px);
    z-index: 5;
}

.overlay-content {
    text-align: center;
    padding: 40px;
}

.overlay-content h3 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.overlay-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.game-start-btn {
    padding: 12px 32px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--accent);
    color: white;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.game-start-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.game-start-btn:active {
    transform: translateY(0);
}

.game-over-overlay h3 {
    color: var(--danger);
}

/* Mobile Controls */
.mobile-controls {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.ctrl-row {
    display: flex;
    gap: 4px;
}

.ctrl-btn {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.ctrl-btn:active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(0.95);
}

/* Minesweeper Grid */
.minesweeper-wrapper {
    aspect-ratio: auto;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 300px;
}

.minesweeper-grid {
    display: grid;
    gap: 2px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.mine-cell {
    width: clamp(28px, 5vw, 36px);
    height: clamp(28px, 5vw, 36px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mine-cell:hover:not(.revealed):not(.flagged) {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
}

.mine-cell.revealed {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.03);
    cursor: default;
}

.mine-cell.flagged {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
}

.mine-cell.mine-exploded {
    background: rgba(244, 63, 94, 0.2);
    border-color: var(--danger);
    animation: mineExplode 0.3s ease;
}

@keyframes mineExplode {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.mine-cell[data-count="1"] { color: #60a5fa; }
.mine-cell[data-count="2"] { color: #34d399; }
.mine-cell[data-count="3"] { color: #f43f5e; }
.mine-cell[data-count="4"] { color: #a78bfa; }
.mine-cell[data-count="5"] { color: #fbbf24; }
.mine-cell[data-count="6"] { color: #06b6d4; }
.mine-cell[data-count="7"] { color: #f97316; }
.mine-cell[data-count="8"] { color: #8888a0; }

/* Difficulty Buttons */
.mine-difficulty {
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
}

.difficulty-btns {
    display: flex;
    gap: 4px;
}

.diff-btn {
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.diff-btn:hover {
    color: var(--text-secondary);
    border-color: var(--border-hover);
}

.diff-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 24px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-logo .logo-icon { font-size: 16px; }
.footer-logo .logo-text { font-size: 18px; }

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-light);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .hero-nav {
        padding: 16px 20px;
    }

    .hero-content {
        padding: 0 20px;
    }

    .hero-title {
        letter-spacing: -1px;
    }

    .countdown {
        gap: 4px;
    }

    .countdown-item {
        min-width: 52px;
        padding: 10px 6px;
    }

    .countdown-number {
        font-size: 22px;
    }

    .email-form {
        flex-direction: column;
    }

    .email-btn {
        justify-content: center;
    }

    .tab-keys {
        display: none;
    }

    .game-tab {
        padding: 10px 8px;
        font-size: 13px;
        gap: 6px;
    }

    .mobile-controls {
        display: flex;
    }

    .game-info {
        padding: 12px 16px;
    }

    .stat-value {
        font-size: 16px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .games-section {
        padding: 60px 16px 40px;
    }

    .mine-difficulty .stat-label {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: -0.5px;
    }

    .countdown-item {
        min-width: 44px;
        padding: 8px 4px;
    }

    .countdown-number {
        font-size: 18px;
    }

    .countdown-unit {
        font-size: 9px;
    }

    .tab-label {
        font-size: 12px;
    }

    .tab-icon {
        font-size: 14px;
    }

    .mine-cell {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .ctrl-btn {
        width: 48px;
        height: 48px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .mobile-controls {
        display: flex;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
