body {
    font-family: 'Fredoka One', cursive;
    background: #2c3e50;
    color: white;
    text-align: center;
    margin: 0;
    padding: 20px;
    overflow: hidden;
    /* Prevent scrolling while playing */
}

.game-wrapper {
    max-width: 850px;
    margin: 0 auto;
}

.title {
    color: #f1c40f;
    text-shadow: 3px 3px 0 #d35400;
    font-size: 3rem;
    margin-bottom: 5px;
}

.subtitle {
    font-family: sans-serif;
    color: #bdc3c7;
    margin-bottom: 20px;
}

#game-container {
    position: relative;
    width: 800px;
    height: 400px;
    margin: 0 auto;
    border: 5px solid #ecf0f1;
    border-radius: 10px;
    background: #34495e;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

canvas {
    display: block;
    background-color: #87CEEB;
    /* Sky blue fallback */
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    /* Darker for better contrast */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.hidden {
    display: none !important;
}

h2 {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 #000;
}

.btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.1s;
    text-transform: uppercase;
}

.play-btn {
    background: #2ecc71;
    color: white;
    box-shadow: 0 5px 0 #27ae60;
}

.play-btn:active {
    transform: translateY(5px);
    box-shadow: none;
}

/* Difficulty Buttons */
.difficulty-selector {
    display: flex;
    gap: 10px;
}

.diff-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    padding: 10px 20px;
    border: 2px solid #fff;
    background: transparent;
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.7;
}

.diff-btn.selected {
    background: #f1c40f;
    color: #2c3e50;
    border-color: #f1c40f;
    opacity: 1;
    transform: scale(1.1);
}

.diff-btn:hover {
    opacity: 1;
}

.score-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    color: #f1c40f;
    text-shadow: 2px 2px 0 #000;
    z-index: 5;
}

/* Mobile Responsiveness */
@media (max-width: 820px) {

    #game-container,
    canvas {
        width: 100%;
        height: auto;
        aspect-ratio: 2/1;
    }

    .title {
        font-size: 2rem;
    }

    h2 {
        font-size: 2rem;
    }

    .btn {
        font-size: 1.2rem;
        padding: 12px 30px;
    }
}