body {
    margin: 0;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    background: linear-gradient(
        to bottom,
        #0b1f12,
        #102a18 55%,
        #07150c
    );

    color: white;
    font-family: Arial, sans-serif;

    position: relative;
    overflow: hidden;
}

/* Forest silhouettes */
body::before,
body::after {
    content: "";

    position: fixed;
    bottom: 0;

    width: 320px;
    height: 100vh;

    pointer-events: none;
    opacity: 0.6;

    background:
        radial-gradient(
            circle at 25% 20%,
            #0a2411 0 70px,
            transparent 72px
        ),

        radial-gradient(
            circle at 70% 35%,
            #0b2a14 0 85px,
            transparent 87px
        ),

        radial-gradient(
            circle at 35% 55%,
            #081e0e 0 95px,
            transparent 97px
        ),

        linear-gradient(
            90deg,
            transparent 12%,
            #07150b 12% 18%,
            transparent 18% 48%,
            #08190d 48% 55%,
            transparent 55% 78%,
            #07150b 78% 84%,
            transparent 84%
        );
}

body::before {
    left: 0;

    -webkit-mask-image: linear-gradient(
        to right,
        black 0%,
        black 60%,
        transparent 100%
    );

    mask-image: linear-gradient(
        to right,
        black 0%,
        black 60%,
        transparent 100%
    );
}

body::after {
    right: 0;
    transform: scaleX(-1);

    -webkit-mask-image: linear-gradient(
        to right,
        black 0%,
        black 60%,
        transparent 100%
    );

    mask-image: linear-gradient(
        to right,
        black 0%,
        black 60%,
        transparent 100%
    );
}

body::before {
    left: 0;
}

body::after {
    right: 0;
    transform: scaleX(-1);
}

/* Keep the game above the forest */
body > * {
    position: relative;
    z-index: 1;
}

h1 {
    margin-bottom: 20px;
} 
 
#gamecanvas{
    display: block;
        
    width: 600px;
    height: 600px;

    background: #07150b;

    border: none;
}   


.game-header {
    width: 600px;
    text-align: center;
    margin-bottom: 14px;
}

.game-header h1 {
    margin: 0 0 12px;

    font-size: 34px;
    letter-spacing: 4px;

    color: #a3ff12;
    text-shadow:
        0 0 8px rgba(163, 255, 18, 0.4);
}

.stats {
    display: flex;
    justify-content: space-between;

    padding: 10px 16px;
    margin-bottom: 10px;

    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(143, 209, 79, 0.35);
    border-radius: 8px;

    font-size: 15px;
}

.game-board {
    position: relative;
    
    width: 600px;
    height: 600px;

    border: 3px solid #8fd14f;

    box-shadow:
        0 0 20px rgba(143, 209, 79, 0.25),
        inset 0 0 20px rgba(0, 0, 0, 0.25);
}

.menu-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.65);
}

.menu-box {
    width: 320px;
    padding: 32px;

    text-align: center;

    background: rgba(8, 30, 14, 0.95);

    border: 1px solid #8fd14f;
    border-radius: 12px;

    box-shadow:
        0 0 25px rgba(143, 209, 79, 0.2);
}

.menu-box h2 {
    margin: 0 0 12px;

    color: #a3ff12;

    font-size: 36px;
    letter-spacing: 5px;
}

.menu-box p {
    margin-bottom: 24px;

    color: #d6e8d8;
}

.menu-box button {
    width: 100%;

    padding: 12px 20px;

    background: #32cd32;
    color: #07150c;

    border: none;
    border-radius: 6px;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;
}

.menu-box button:hover {
    background: #a3ff12;
}

.menu-box span {
    display: block;

    margin-top: 14px;

    font-size: 12px;
    color: #8ca991;
}

.hidden {
    display: none;
}

.controls {
    width: 600px;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-top: 14px;
    padding: 12px 20px;

    background: rgba(0, 0, 0, 0.25);

    border: 1px solid rgba(143, 209, 79, 0.35);
    border-radius: 8px;

    box-sizing: border-box;
}

.control-item {
    width: 33%;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 4px;

    color: #9db7a1;
}

.control-item span {
    color: #a3ff12;
    font-weight: bold;
}

.control-item small {
    font-size: 12px;
}

#muteButton {
    margin-top: 6px;

    padding: 6px 12px;

    background: rgba(0, 0, 0, 0.3);
    color: #9db7a1;

    border: 1px solid rgba(143, 209, 79, 0.35);
    border-radius: 6px;

    cursor: pointer;
}

#muteButton:hover {
    color: #a3ff12;
    border-color: #8fd14f;
}

.game-container {
    transform: translateY(-50px);
}  