:root {
    --primary: #ff0055;
    --accent: #00f3ff;
    --bg: #0a0a10;
    --road: #1a1a24;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
    user-select: none;
}

body {
    background: var(--bg);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 600px; /* Mobile Viewport constrain on desktop */
    background: black;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 10;
    pointer-events: auto;
    backdrop-filter: blur(5px);
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 3rem;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent);
    margin-bottom: 20px;
    text-align: center;
    font-weight: 900;
    transform: skew(-10deg);
}

p {
    color: #ccc;
    margin-bottom: 40px;
    font-size: 1.2rem;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary);
    transition: 0.2s;
    text-transform: uppercase;
    clip-path: polygon(10% 0, 100% 0, 100% 80%, 90% 100%, 0 100%, 0 20%);
}

button:hover {
    transform: scale(1.1);
    background: #ff3377;
    box-shadow: 0 0 40px #ff3377;
}

.score-board {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: monospace; /* Retro arcade feel */
    z-index: 5;
    text-shadow: 2px 2px 0 #000;
}

.back-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.1);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 100;
    pointer-events: auto;
    border: 1px solid rgba(255,255,255,0.2);
}

.back-btn:hover {
    background: white;
    color: black;
}
