:root {
    --bg: #f1f2f6;
    --snake-head: #2ecc71;
    --snake-body: #27ae60;
    --target-neon: #2980b9;
    --apple: #ff4757;
    --math-item: #f1c40f;
    --text: #2f3542;
    --glass: rgba(0,0,0,0.05);
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
    height: 100vh;
}

.game-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header */
.game-header {
    background: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--snake-body);
}

.back-link {
    color: #666;
    text-decoration: none;
    font-weight: 600;
}

.target-panel {
    background: rgba(41, 128, 185, 0.1);
    border: 1px solid var(--target-neon);
    padding: 0.5rem 2rem;
    border-radius: 30px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--target-neon);
}

.stats {
    font-weight: 800;
    color: var(--snake-body);
}

/* stage */
#game-stage {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e1e2e6;
}

#snakeCanvas {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Overlay */
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.3s;
}

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

.overlay-content {
    background: #ffffff;
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid #ddd;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--snake-head);
    text-shadow: 0 0 20px var(--snake-head);
}

.btn-primary {
    background: var(--snake-head);
    color: #000;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 2rem;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: scale(1.05);
    background: #50d890;
}

.guide {
    margin-top: 2rem;
    text-align: left;
    color: #888;
}

.guide p {
    margin-bottom: 0.5rem;
}
