:root {
    --bg-color: #1a1a1a;
    --text-color: #4caf50;
    --accent: #ff5252;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 1rem;
}

header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.back-btn {
    text-decoration: none;
    color: #fff;
    background-color: #4caf50;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 4px 0 #388e3c;
    transition: transform 0.1s, box-shadow 0.1s;
}

.back-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #388e3c;
}

h1 {
    font-size: 2.5rem;
    color: var(--accent);
    text-shadow: 2px 2px 0 #000;
}

.hud {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 30px;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.canvas-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    background: linear-gradient(to bottom, #81d4fa 0%, #b3e5fc 50%, #8bc34a 50%, #689f38 100%);
}

canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(5px);
}

.overlay h2 {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-align: center;
}

.overlay p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #455a64;
    text-align: center;
}

.btn {
    background-color: #ffca28;
    color: #d84315;
    border: none;
    padding: 15px 40px;
    font-size: 1.8rem;
    font-weight: 900;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 0 #ff8f00;
    transition: transform 0.1s, box-shadow 0.1s;
    font-family: 'Outfit', sans-serif;
}

.btn:active {
    transform: translateY(6px);
    box-shadow: 0 0 0 #ff8f00;
}

.hidden {
    display: none !important;
}
