:root {
    --primary-neon: #00ffcc;
    --secondary-neon: #ff00ff;
    --danger-neon: #ff3333;
    --bg-color: #030105;
    --text-main: #e0e0ff;
    
    /* BIGGAME SHELL VARIABLES */
    --night:#060c1a;--deep:#0e1630;--purple:#191440;--paper:#edf3ff;--gold:#ffd93d;--warm:#ff6b6b;--cool:#4d96ff;
    --soft:#a6b5d5;--line:rgba(100,132,201,.2);--glass:rgba(8,14,28,.88);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Rajdhani', sans-serif;
}

body {
    min-height: 100vh;
    color: var(--paper);
    background: radial-gradient(circle at top, rgba(0,255,204,.05), transparent 28%),
      radial-gradient(circle at 18% 18%, rgba(255,0,255,.08), transparent 24%),
      linear-gradient(155deg, var(--night), var(--deep) 45%, #000);
}

.chronos-drift-shell {
    width: min(1320px, calc(100% - 40px));
    margin: 0 auto;
    padding: 12px 0 34px;
}

.topbar {
    width: min(1320px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-size: 1.42rem;
    font-weight: 900;
    color: transparent;
    background: linear-gradient(45deg, var(--warm), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: .04em;
    text-decoration: none;
}

.trail {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--soft);
    font-size: 0.92rem;
}

.trail a {
    color: var(--gold);
    text-decoration: none;
}

.intro {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 32px;
    margin: 14px 0 18px;
}

.intro .eyebrow {
    font-size: .7rem;
    color: var(--gold);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .2em;
    margin-bottom: 8px;
}

.intro h1 {
    font: clamp(2.4rem, 5vw, 4.2rem)/1 'Orbitron', sans-serif;
    color: var(--paper);
    letter-spacing: -.02em;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
    margin: 0;
}

.intro .lede {
    color: var(--soft);
    line-height: 1.65;
    max-width: 700px;
    margin-top: 10px;
    font-size: 1.02rem;
}

.legend {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.legend span {
    min-width: 80px;
    text-align: center;
    padding: 12px 10px;
    border: 1px solid rgba(255, 217, 61, 0.15);
    background: rgba(255, 217, 61, 0.05);
    border-radius: 16px;
    color: var(--soft);
    font-size: 0.74rem;
}

.legend strong {
    display: block;
    font: 1.55rem Georgia, serif;
    color: var(--gold);
    margin-bottom: 3px;
}

.game-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 600px;
    background: var(--glass);
    border: 1px solid rgba(255, 217, 61, 0.16);
    border-radius: var(--rad);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#gameContainer {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
}

#gameContainer canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* UI Overlays */
#uiLayer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(3, 1, 5, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.overlay h2 {
    font-family: 'Courier New', Courier, monospace;
    font-size: 3rem;
    color: var(--secondary-neon);
    text-shadow: 0 0 15px var(--secondary-neon);
    margin-bottom: 1rem;
    text-align: center;
}

.overlay p {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    text-align: center;
}

.overlay button {
    background: transparent;
    border: 2px solid var(--primary-neon);
    color: var(--primary-neon);
    padding: 12px 32px;
    font-size: 1.2rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3), inset 0 0 10px rgba(0, 255, 204, 0.3);
    transition: all 0.2s;
    text-transform: uppercase;
}

.overlay button:hover {
    background: var(--primary-neon);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--primary-neon);
}

#hud {
    position: absolute;
    inset: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.3s;
}

#hud.active {
    opacity: 1;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px var(--primary-neon), 0 0 20px var(--primary-neon);
}

.speed-bar-container {
    width: 200px;
    height: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--secondary-neon);
    border-radius: 5px;
    overflow: hidden;
    align-self: center;
    margin-bottom: 10px;
}

#speedBar {
    width: 5%;
    height: 100%;
    background: var(--secondary-neon);
    box-shadow: 0 0 10px var(--secondary-neon);
    transition: width 0.1s linear, background 0.2s;
}

.underbar {
    background: rgba(3, 10, 20, 0.78);
    padding: 13px 18px;
    border-top: 1px solid rgba(255, 217, 61, 0.12);
    display: flex;
    justify-content: center;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    color: var(--soft);
    font-size: 0.75rem;
}

.controls kbd {
    font: inherit;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 6px;
    color: var(--paper);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    margin-right: 3px;
    font-size: 0.72rem;
}
