/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow: hidden;
    width: 100%;
    height: 100%;
    background: #000; /* Fallback background */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

/* Container for canvas + controls */
#gameContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    background: #00072D;
    border: none;
    overflow: hidden;
    box-shadow: none;
}

/* Canvas */
#canvas1 {
    display: block;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    font-weight: bold; /* ← Added for bold */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

/* Hidden assets */
#layer1,#layer2,#layer3,#layer4,#player,#angler1,#angler2,#lucky,#projectile,#particle,#hiveWhale,#drone,#smoke,#fire {
    display: none;
}

/* --- ICONS: Sound, Pause/Play, Restart Icon --- */
#topIcons {
    position: absolute;
    top: 180px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 100;
    flex-direction: column;
    align-items: center;
}

#topIcons button {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(0, 255, 156, 0.6);
    border-radius: 50%;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#topIcons button:hover {
    background: rgba(0, 255, 156, 0.4);
    border-color: #00ff9c;
    transform: scale(1.15);
    box-shadow: 0 0 25px rgba(0, 255, 156, 0.8);
}

#topIcons img {
    width: 20px;
    height: 20px;
    display: block;
    filter: drop-shadow(0 0 6px rgba(0, 255, 156, 0.7));
}

/* GAME OVER RESTART BUTTON */
#btnRestart {
    position: absolute;
    top: -69px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border: 3px solid #00ff9c;
    border-radius: 15px;
    padding: 12px 30px;
    font-size: 28px;
    font-family: Arial, sans-serif;
    font-weight: bold; /* ← Added for bold */
    cursor: pointer;
    z-index: 50;
    display: none;
    box-shadow: 0 0 20px rgba(0, 255, 156, 0.6);
    transition: all 0.3s ease;
}

#btnRestart:hover {
    background-color: rgba(0, 255, 156, 0.3);
    color: black;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 156, 0.9);
}

/* DIFFICULTY SELECTION MENU */
#difficulty-selection {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 30;
    animation: menuPulse 3s ease-in-out infinite;
    pointer-events: auto;
    width: 100%;
    max-width: 800px;
}

#difficulty-selection h1 {
    font-family: Arial, sans-serif;
    font-weight: bold; /* ← Added for bold */
    font-size: 80px;
    color: #00ff9c;
    text-shadow:
        0 0 15px #00ff9c,
        0 0 30px #00ff9c,
        0 0 50px #00b36b,
        0 0 80px #00b36b;
    margin-bottom: 30px;
    letter-spacing: 6px;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

#difficulty-selection .btn-difficulty {
    font-family: Arial, sans-serif;
    font-weight: bold; /* ← Added for bold */
    font-size: 40px;
    padding: 18px 60px;
    margin: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 5px solid #00ff9c;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 0 20px rgba(0, 255, 156, 0.6);
    letter-spacing: 3px;
    display: inline-block;
}

#difficulty-selection .btn-difficulty:hover {
    background: #00ff9c;
    color: black;
    transform: scale(1.15) translateY(-8px);
    box-shadow: 0 0 40px #00ff9c, 0 15px 30px rgba(0, 0, 0, 0.6);
}

#difficulty-selection .active-difficulty {
    background: #00ff9c;
    color: black;
    box-shadow: 0 0 50px #00ff9c;
    transform: scale(1.1);
}

/* Credits */
#credits {
    margin-top: 60px;
    font-family: Arial, sans-serif;
    font-weight: bold; /* ← Added for bold */
    font-size: 30px;
    color: #00ff9c;
    text-shadow:
        0 0 10px #00ff9c,
        0 0 20px #00b36b;
    letter-spacing: 3px;
    animation: glowPulse 3s ease-in-out infinite alternate;
}

/* Rest of your CSS (unchanged) */
@keyframes glowPulse {
    from {
        opacity: 0.9;
        text-shadow: 0 0 10px #00ff9c;
    }
    to {
        opacity: 1;
        text-shadow: 0 0 25px #00ff9c, 0 0 40px #00b36b;
    }
}

@keyframes menuPulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.03); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes titleGlow {
    from {
        text-shadow:
            0 0 15px #00ff9c,
            0 0 30px #00ff9c,
            0 0 50px #00b36b;
    }
    to {
        text-shadow:
            0 0 25px #00ff9c,
            0 0 50px #00ff9c,
            0 0 80px #00b36b,
            0 0 100px #00b36b;
    }
}

/* CONTROLS WRAPPER */
#controls {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 20;
}

.control-btn {
    pointer-events: auto;
    width: 80px;
    height: 80px;
    font-size: 20px;
    border-radius: 50%;
    opacity: 0.9;
    background: linear-gradient(145deg, #555, #222);
    color: white;
    border: 2px solid #666;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    transition: transform 0.1s, box-shadow 0.1s, background 0.2s;
}

.control-btn:hover {
    background: linear-gradient(145deg, #666, #333);
    transform: translateY(-2px);
    box-shadow: 4px 4px 8px rgba(0,0,0,0.5);
}

.control-btn:active {
    transform: translateY(1px);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

#btnShoot {
    position: absolute;
    left: 20px;
    bottom: 20px;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
}

#upDown {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#btnUp, #btnDown {
    width: 80px;
    height: 50px;
    font-size: 18px;
    border-radius: 12px;
    background: linear-gradient(145deg, #555, #222);
    border: 2px solid #666;
    color: white;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, background 0.2s;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

#btnUp {
    transform: translateY(-15px);
}

#btnUp:hover, #btnDown:hover {
    background: linear-gradient(145deg, #666, #333);
    transform: translateY(-2px);
    box-shadow: 4px 4px 8px rgba(0,0,0,0.5);
}

#btnUp:active, #btnDown:active {
    transform: translateY(1px);
    box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Responsive */
@media screen and (max-width: 800px) {
    #gameContainer {
        width: 100vw;
        height: 100vh;
        aspect-ratio: auto;
        margin: 0;
    }

    #difficulty-selection h1 {
        font-size: 50px;
        margin-bottom: 20px;
    }

    #difficulty-selection .btn-difficulty {
        font-size: 28px;
        padding: 12px 40px;
        margin: 10px;
    }

    #credits {
        font-size: 22px;
        margin-top: 40px;
    }

    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 16px;
    }

    #btnUp, #btnDown {
        width: 60px;
        height: 40px;
        font-size: 14px;
    }

    #btnShoot {
        width: 60px;
        height: 60px;
    }

    #topIcons {
        top: 120px;
        right: 10px;
        gap: 6px;
    }

    #topIcons button {
        width: 28px;
        height: 28px;
        padding: 4px;
    }

    #topIcons img {
        width: 18px;
        height: 18px;
    }

    #btnRestart {
        top: -59px;
        font-size: 24px;
        padding: 10px 25px;
    }

    #btnUp {
        transform: translateY(-15px);
    }
}