/* Overdrive: the speedrun look. Black-blue, electric cyan and cobalt,
   scanlines, cut corners and a glitching title. */

@layer themes {
    [data-theme="overdrive"] {
        --ground: #000814;
        --sky-top: #000814;
        --sky-mid: #001d4a;
        --sky-low: #00e5ff;
        --grid: rgb(0 229 255 / 0.55);
        --accent: #00e5ff;
        --accent-hover: #7df9ff;
        --accent-active: #00b8d4;
        --highlight: #7df9ff;
        --link: #7df9ff;
        --ink: #e0fbff;
        --ink-dim: #7fa8e0;
        --title-glow: #00e5ff;
        --title-glow-2: #0047ff;
        --glitch-a: #2f7fff;
        --glitch-b: #ffffff;

        --primary-bg: linear-gradient(90deg, #2f7fff, #00e5ff);
        --glow: 0 0 24px rgb(0 229 255 / 0.35), inset 0 0 30px rgb(0 71 255 / 0.2);
        --sun: linear-gradient(#7df9ff, #0047ff);
        --scene-overlay: repeating-linear-gradient(to bottom, transparent 0 3px, rgb(0 229 255 / 0.04) 3px 4px);

        --board-ground: #000814;
        --board-grid: rgb(0 229 255 / 0.4);
        --tile-1: #2f7fff;
        --tile-2: #00b8ff;
        --tile-3: #00e5ff;
        --tile-4: #ffffff;
    }
}

/* Extras: in a layer after the components, so they win over them. */
@layer theme-extras {
    /* Cut corners on the controls and panels. */
    :root[data-theme="overdrive"] :is(.btn, .period) {
        clip-path: polygon(0.5rem 0, 100% 0, 100% calc(100% - 0.5rem), calc(100% - 0.5rem) 100%,
                           0 100%, 0 0.5rem);
    }
    :root[data-theme="overdrive"] .brand {
        font-style: italic;
        animation: overdrive-glitch 2.4s steps(1) infinite;
    }
    @keyframes overdrive-glitch {
        0%, 92%, 100% { text-shadow: 0 0 8px #00e5ff; translate: 0; }
        93% { text-shadow: -3px 0 #0047ff, 3px 0 #7df9ff; translate: 2px 0; }
        96% { text-shadow: 3px 0 #0047ff, -3px 0 #ffffff; translate: -2px 0; }
    }
}
