:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --accent-color: #f472b6; /* Pink/Magenta accent */
    --secondary-color: #818cf8; /* Indigo */
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    touch-action: none; /* Prevent double-tap zoom */
}

.game-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

h1 {
    margin: 0;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(244, 114, 182, 0.5);
    background: linear-gradient(to right, #f472b6, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-container {
    font-size: 1.5rem;
    margin-top: 10px;
    font-weight: 600;
}

canvas {
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    width: 100%;
    height: 100%;
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    transition: opacity 0.3s ease;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

h2 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

button {
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    color: white;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(244, 114, 182, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(244, 114, 182, 0.4);
}

button:active {
    transform: translateY(1px);
}

.back-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    z-index: 30;
    padding: 10px;
    transition: color 0.3s;
}

.back-btn:hover {
    color: white;
}
