:root {
    --bg-color: #050510;
    --accent-primary: #00f2ff;
    --accent-secondary: #ff00e5;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-shadow: 0 0 10px rgba(0, 242, 255, 0.5), 0 0 20px rgba(0, 242, 255, 0.3);
    --neon-pink: 0 0 10px rgba(255, 0, 229, 0.5), 0 0 20px rgba(255, 0, 229, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Back link to arcade hub */
.hub-back {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 50;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: var(--accent-primary);
    border: 1px solid rgba(0, 242, 255, 0.4);
    border-radius: 50px;
    padding: 8px 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    box-shadow: var(--neon-shadow);
    transition: all 0.25s ease;
}

.hub-back:hover {
    color: var(--bg-color);
    background: var(--accent-primary);
    transform: translateY(-1px);
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-secondary);
    bottom: -150px;
    right: -150px;
    animation-delay: -5s;
}

@keyframes move {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 50px) scale(1.1);
    }
}

@keyframes powerup-pulse {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.2);
        filter: brightness(1.5);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@keyframes badge-enter {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Game Layout */
.game-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    z-index: 1;
}

.hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.score-board,
.high-score-board {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.value {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
}

.p1-score .value {
    color: var(--accent-primary);
    text-shadow: var(--neon-shadow);
}

.p2-score .value {
    color: var(--accent-secondary);
    text-shadow: var(--neon-pink);
}

.status-container {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    height: 14px;
    justify-content: center;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    animation: badge-enter 0.3s ease-out;
    letter-spacing: 1px;
}

.badge-speed {
    background: #ffea00;
    color: #000;
    box-shadow: 0 0 10px #ffea00;
}

.badge-slow {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 10px #00ff00;
}

.badge-ghost {
    background: #ffffff;
    color: #000;
    box-shadow: 0 0 10px #ffffff;
}

.badge-reverse {
    background: #ff0000;
    color: #fff;
    box-shadow: 0 0 10px #ff0000;
}

.badge-growth {
    background: #008cff;
    color: #fff;
    box-shadow: 0 0 10px #008cff;
}

.brand {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.3));
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 16, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay h1,
.overlay h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    letter-spacing: 8px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.overlay p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.dual-scores {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 10px;
}

.score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-label {
    font-size: 0.8rem;
    font-weight: 900;
    margin-bottom: 5px;
    opacity: 0.6;
}

.score-box span:last-child {
    font-family: 'Space Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
}

.p1-color span:last-child {
    color: var(--accent-primary);
    text-shadow: var(--neon-shadow);
}

.p2-color span:last-child {
    color: var(--accent-secondary);
    text-shadow: var(--neon-pink);
}

button {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--neon-shadow);
}

button:hover {
    background: var(--accent-primary);
    color: var(--bg-color);
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-primary);
}

.controls-hint {
    display: flex;
    justify-content: center;
    gap: 40px;
    opacity: 0.4;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.new-high-score {
    animation: pulse 0.5s ease-in-out;
}