/* 1. BUTTONS & CONTROLS */

.sound-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 26px;
    background: #ffffffcc;
    border: 2px solid #444;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: 0.2s;
    z-index: 9999;
}

.sound-btn:hover {
    background: #ffffff;
    transform: scale(1.1);
}


/* 2. MENU LAYOUT */

.menu {
    position: absolute;
    inset: 0;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Press Start 2P', sans-serif;
    z-index: 10;
}

.menu img {
    width: 150px;
}

.menu h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.menu button {
    min-width: 160px;
    margin: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    background: #ffaa00;
    color: #000000;
    cursor: pointer;
    transition: 0.2s;
}

.menu button:hover {
    background: #ffcc00;

    transform: scale(1.05);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 1);
}


/* 3. CANVAS STATES */

canvas {
    display: none;
    /* becomes visible when the game starts */
}


/* 4. ANIMATIONS */

.hidden {
    opacity: 0;
    display: none;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.visible {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s ease;
}

/* Start button fade-out */
#start-btn.fade-out {
    opacity: 0;
    transform: scale(0.9) rotate(360deg);
    transition: all 0.6s ease;
}