:root {
    --bg-color: #0d0d12;
    --text-color: #ffffff;
    --primary-color: #7b2cbf;
    --secondary-color: #3a86ff;
    --accent-color: #ff006e;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.background-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

.game-container {
    text-align: center;
    position: relative;
    z-index: 10;
}

header {
    margin-bottom: 1rem;
    position: relative;
}

.back-link {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent-color);
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 3rem;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

canvas {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(123, 44, 191, 0.2);
    border-radius: 12px;
    max-width: 100%;
}

.instruction {
    margin-top: 1rem;
    color: #a0a0b0;
    font-size: 0.9rem;
}

.btn {
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(58, 134, 255, 0.4);
}

.hidden {
    display: none;
}