:root {
    --bg-dark: #0a0a0e;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --primary: #00f3ff;
    --primary-glow: rgba(0, 243, 255, 0.6);
    --secondary: #bc13fe;
    --secondary-glow: rgba(188, 19, 254, 0.6);
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --font-main: 'Outfit', sans-serif;
    --font-arcade: 'Press Start 2P', cursive;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent scrolling while playing */
}

.background-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(188, 19, 254, 0.05) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    z-index: 10;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
}

.back-btn {
    text-decoration: none;
    color: var(--text-muted);
    transition: 0.3s;
}

.back-btn:hover {
    color: #fff;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    position: relative;
    width: 800px;
    max-width: 100%;
}

.score-board {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 40px;
    font-family: var(--font-arcade);
}

.score {
    text-align: center;
}

.score .label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-family: var(--font-main);
    letter-spacing: 2px;
}

.score span:last-child {
    font-size: 2rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.player span:last-child {
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

.ai span:last-child {
    color: var(--secondary);
    text-shadow: 0 0 15px var(--secondary-glow);
}

.divider {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-arcade);
}

canvas {
    background: rgba(10, 10, 14, 0.8);
    border: 2px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.1);
    display: block;
    width: 100%;
    /* Keep aspect ratio handled by JS re-size often, but here fixed mainly */
}

/* Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 14, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    transition: opacity 0.3s;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay h1 {
    font-family: var(--font-arcade);
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.overlay p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 15px 40px;
    font-family: var(--font-arcade);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    /* Arcade feel */
    transition: 0.3s;
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--primary-glow);
    background: #fff;
}