/* ============================================
   DARKTIMES.CA - CRT ARCADE STYLES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=VT323&display=swap');

:root {
    --arcade-cyan: #00ffff;
    --arcade-magenta: #ff00ff;
    --arcade-green: #00ff41;
    --arcade-yellow: #ffff00;
    --neon-orange: #ff8c00;
    --cabinet-dark: #1a1a1a;
    --cabinet-mid: #2a2a2a;
    --screen-dark: #0a0a12;
}

/* ===== GLOBAL CRT SCANLINES ===== */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    opacity: 0.4;
}

/* ===== NAVIGATION ===== */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background: rgba(10, 10, 18, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    flex-wrap: wrap;
}

.nav-link {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: #00ffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: #ff00ff;
    border-color: rgba(255, 0, 255, 0.5);
    text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

/* Mobile hamburger — hidden by default */
.nav-toggle {
    display: none;
}

/* ===== MAIN PAGE — MOBILE RESPONSIVE ===== */
@media (max-width: 700px) {
    /* Scene sections — base styles */
    .scene {
        position: relative;
        min-height: 100vh;
        overflow: hidden;
    }

    /* Hero section */
    .hero-shell {
        padding: 80px 20px 40px;
        max-width: 800px;
        margin: 0 auto;
    }

    .hero-kicker {
        font-size: 0.6rem;
        letter-spacing: 2px;
        margin-bottom: 12px;
    }

    .hero-heading {
        font-size: clamp(1.8rem, 8vw, 4rem);
        line-height: 1.1;
        margin-bottom: 16px;
    }

    .hero-copy {
        font-size: 0.85rem;
        line-height: 1.6;
        margin-bottom: 24px;
    }

    .cta-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 20px;
    }

    .cta-button {
        font-size: 0.6rem;
        padding: 10px 16px;
        white-space: nowrap;
    }

    .stats-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .stat-pill {
        font-size: 0.7rem;
        padding: 6px 12px;
    }

    .site-tip {
        font-size: 0.7rem;
    }

    /* Two-column layouts — stack on mobile */
    .two-column {
        flex-direction: column !important;
        padding: 20px !important;
    }

    .content-shell {
        padding: 30px 20px;
    }

    .content-panel {
        margin-bottom: 20px;
    }

    .content-panel h2 {
        font-size: clamp(1.2rem, 5vw, 2rem);
    }

    .content-panel p {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    /* Arcade section on index */
    .arcade-layout {
        flex-direction: column !important;
        padding: 20px !important;
    }

    .arcade-cabinets {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 20px !important;
        margin-top: 20px !important;
    }

    .cabinet {
        width: 140px !important;
    }

    /* Bike section */
    .bike-layout {
        flex-direction: column !important;
        padding: 20px !important;
    }

    /* Basement section */
    .basement-layout {
        flex-direction: column !important;
        padding: 20px !important;
    }

    .desk-setup {
        display: none;
    }

    .basement-content {
        padding: 20px !important;
    }

    /* Bowling section */
    .bowling-sign {
        font-size: 2rem !important;
        top: 60px !important;
    }

    /* Parallax backgrounds — disable on mobile */
    .parallax-bg {
        background-attachment: scroll !important;
        background-position: center center !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    .parallax-mid, .parallax-fore {
        display: none !important;
    }

    /* Fog/smoke/bike canvas — explicit sizing for mobile */
    #fogCanvas, #smokeCanvas, #bikeTrails {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Feature grids — collapse on mobile */
    .feature-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .feature-card {
        padding: 14px !important;
    }

    /* Footer */
    footer {
        padding: 30px 20px !important;
        font-size: 0.7rem !important;
    }

    /* Game overlay — mobile */
    .game-overlay {
        padding: 10px !important;
    }

    .game-overlay canvas {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* ===== MOBILE NAV ===== */
@media (max-width: 700px) {
    #nav {
        padding: 0;
    }

    .nav-inner {
        display: none;
        flex-direction: column;
        padding: 10px;
        gap: 4px;
    }

    .nav-inner.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        background: rgba(0, 255, 255, 0.1);
        border: 1px solid rgba(0, 255, 255, 0.3);
        cursor: pointer;
        position: absolute;
        right: 15px;
        top: 8px;
    }

    .nav-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: #00ffff;
        margin: 2px 0;
        transition: all 0.3s;
    }

    .nav-link {
        font-size: 0.7rem;
        padding: 10px 16px;
        width: 100%;
        text-align: center;
        border: 1px solid rgba(0, 255, 255, 0.15);
        background: rgba(0, 0, 0, 0.5);
    }
}


body.arcade-page {
    font-family: 'Orbitron', sans-serif;
    background: #000;
    min-height: 100vh;
    overflow-x: hidden;
    color: #fff;
}

.arcade-header {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
}

.arcade-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: 8px;
    color: var(--arcade-cyan);
    text-shadow: 
        0 0 10px var(--arcade-cyan),
        0 0 20px var(--arcade-cyan),
        0 0 40px var(--arcade-cyan),
        0 0 80px rgba(0, 255, 255, 0.5);
    animation: neonFlicker 4s ease-in-out infinite;
}

@keyframes neonFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.8; }
    94% { opacity: 1; }
    96% { opacity: 0.9; }
    97% { opacity: 1; }
    98% { opacity: 0.85; }
}

.arcade-subtitle {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
    letter-spacing: 4px;
}

/* ===== CABINET GRID ===== */
.cabinet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

@media (max-width: 900px) {
    .cabinet-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 20px;
    }
}

/* ===== ARCADE CABINET ===== */
.arcade-cabinet {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.arcade-cabinet:hover {
    transform: translateY(-10px);
}

.arcade-cabinet::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 80px;
    background: radial-gradient(ellipse at center, var(--glow-color) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

/* Cabinet Marquee */
.cabinet-marquee {
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    border: 3px solid #444;
    border-radius: 8px 8px 0 0;
    padding: 15px 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cabinet-marquee::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--glow-color), transparent);
}

.cabinet-marquee h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--glow-color);
    text-shadow: 
        0 0 10px var(--glow-color),
        0 0 20px var(--glow-color);
    position: relative;
    z-index: 1;
}

/* Cabinet Body */
.cabinet-body {
    background: linear-gradient(180deg, var(--cabinet-mid) 0%, var(--cabinet-dark) 100%);
    border: 4px solid #333;
    border-top: none;
    padding: 20px;
    position: relative;
    box-shadow: 
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 20px 60px rgba(0, 0, 0, 0.8);
}

/* CRT Screen Container */
.crt-screen {
    background: var(--screen-dark);
    border: 6px solid #222;
    border-radius: 8px;
    padding: 8px;
    position: relative;
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        0 0 2px var(--glow-color);
}

.crt-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    border-radius: 4px;
    z-index: 10;
}

.crt-screen::after {
    content: '';
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    height: 30%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    border-radius: 4px;
    pointer-events: none;
    z-index: 11;
}

.screen-content {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.game-preview {
    width: 100%;
    height: 100%;
}

.insert-coin {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: var(--glow-color);
    text-shadow: 0 0 5px var(--glow-color);
    animation: blink 1s step-end infinite;
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

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

.hi-score-display {
    font-family: 'VT323', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    text-align: center;
}

/* Cabinet Controls */
.cabinet-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.joystick {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #555, #222);
    border-radius: 50%;
    border: 3px solid #444;
    position: relative;
}

.joystick::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    border: 2px solid #555;
}

.button {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid #444;
}

.button-red {
    background: radial-gradient(circle at 30% 30%, #ff4444, #aa0000);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.button-blue {
    background: radial-gradient(circle at 30% 30%, #4488ff, #0022aa);
    box-shadow: 0 0 10px rgba(0, 100, 255, 0.5);
}

/* ===== GAME OVERLAY ===== */
.game-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-overlay.active {
    display: flex;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--game-color, var(--arcade-cyan));
    text-shadow: 
        0 0 10px var(--game-color, var(--arcade-cyan)),
        0 0 20px var(--game-color, var(--arcade-cyan));
    animation: neonFlicker 3s ease-in-out infinite;
}

.game-scores {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
    display: flex;
    gap: 40px;
    justify-content: center;
}

.score-label {
    color: rgba(255, 255, 255, 0.5);
}

.score-value {
    color: #fff;
}

/* CRT Monitor Frame */
.crt-monitor {
    position: relative;
    background: #1a1a1a;
    border: 8px solid #2a2a2a;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        inset 0 0 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 0, 0, 0.8),
        0 10px 40px rgba(0, 0, 0, 0.6);
}

.crt-monitor::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 3px solid #333;
    border-radius: 12px;
    pointer-events: none;
}

.crt-bezel {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 12px;
    padding: 4px;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.crt-screen-area {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 
        inset 0 0 100px rgba(0, 0, 0, 0.9),
        inset 0 0 20px var(--game-color, var(--arcade-cyan));
}

.crt-screen-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 100;
}

.crt-screen-area::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 101;
}

#gameCanvas {
    display: block;
    background: #000;
}

.game-instructions {
    font-family: 'VT323', monospace;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 20px;
    text-align: center;
}

/* ===== HIGH SCORE ENTRY ===== */
.highscore-entry {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.highscore-entry.active {
    display: flex;
}

.entry-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--arcade-yellow);
    text-shadow: 0 0 20px var(--arcade-yellow);
    margin-bottom: 30px;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.entry-score {
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 40px;
}

.initials-display {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.initial-slot {
    width: 60px;
    height: 80px;
    background: #111;
    border: 3px solid var(--arcade-cyan);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: var(--arcade-cyan);
    text-shadow: 0 0 10px var(--arcade-cyan);
    position: relative;
}

.initial-slot.active {
    border-color: var(--arcade-yellow);
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
}

.initial-slot.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--arcade-yellow);
    animation: blink 0.5s step-end infinite;
}

.keyboard-hint {
    font-family: 'VT323', monospace;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    line-height: 1.8;
}

.char-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin-bottom: 30px;
}

.char-btn {
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 4px;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.char-btn:hover, .char-btn.selected {
    background: var(--arcade-cyan);
    color: #000;
    border-color: var(--arcade-cyan);
    box-shadow: 0 0 15px var(--arcade-cyan);
}

/* ===== AMBIENT GLOW ===== */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(0, 255, 255, 0.03) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 30%, rgba(255, 0, 255, 0.03) 0%, transparent 40%),
        radial-gradient(ellipse at 20% 70%, rgba(0, 255, 65, 0.03) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 255, 0, 0.03) 0%, transparent 40%);
}

/* ===== FOOTER ===== */
.arcade-footer {
    text-align: center;
    padding: 60px 20px;
}

.back-link {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    color: var(--arcade-cyan);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid var(--arcade-cyan);
    display: inline-block;
    transition: all 0.3s;
}

.back-link:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* ===== INDEX PAGE ARCADE SECTION UPDATES ===== */
/* These extend the existing index.html arcade styles */

#arcade .arcade-cabinets {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 60px;
    flex-wrap: wrap;
}

#arcade .arcade-cabinet-inline {
    width: 160px;
    height: 280px;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 8px 8px 4px 4px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

#arcade .arcade-cabinet-inline:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 60px rgba(0, 255, 255, 0.5);
}

#arcade .arcade-cabinet-inline.screen-cyan { --glow-color: var(--arcade-cyan); }
#arcade .arcade-cabinet-inline.screen-magenta { --glow-color: var(--arcade-magenta); }
#arcade .arcade-cabinet-inline.screen-green { --glow-color: var(--arcade-green); }
#arcade .arcade-cabinet-inline.screen-yellow { --glow-color: var(--arcade-yellow); }

#arcade .arcade-cabinet-inline::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 40px;
    background: radial-gradient(ellipse at center, var(--glow-color) 0%, transparent 70%);
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

#arcade .cabinet-screen {
    width: 120px;
    height: 100px;
    background: #000;
    margin: 20px auto 10px;
    border-radius: 4px;
    border: 3px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#arcade .cabinet-screen canvas {
    width: 100%;
    height: 100%;
}

#arcade .cabinet-label {
    text-align: center;
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.7rem;
    color: var(--glow-color, var(--arcade-cyan));
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px;
    text-shadow: 0 0 10px var(--glow-color, var(--arcade-cyan));
}

#arcade .cabinet-joystick {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, #444, #222);
    border-radius: 50%;
    margin: 15px auto 0;
    border: 2px solid #555;
}

/* Screen types for inline cabinets */
.screen-asteroids { --glow-color: var(--arcade-cyan); }
.screen-galaga { --glow-color: var(--arcade-magenta); }
.screen-pong { --glow-color: var(--arcade-green); }
.screen-invaders { --glow-color: var(--arcade-yellow); }