* {
    box-sizing: border-box;
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 14px;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* Use a uniform dark background to avoid a lighter center */
    background: #05060a;
}

#gameAreaWrapper {
    position: absolute;
    inset: 0;
    /* Uniform dark background for the game area (no light center) */
    background: #05060a;
}

#bgCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

canvas,
#cvs {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
    z-index: 1;
}

div {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#mobile {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    display: none; /* Hidden by default, only show during gameplay */
}

#mobile.visible {
    display: block; /* Show when game is active */
}

#split,
#feed {
    position: absolute;
    bottom: 10px;
    width: 100px;
    height: 100px;
    padding: 5px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    cursor: pointer;
    pointer-events: all;
    color: #fff;
    font-weight: 600;
}

#split {
    left: 10px;
    background: linear-gradient(135deg, #444 0%, #555 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#feed {
    right: 10px;
    background: linear-gradient(135deg, #555 0%, #444 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#split:active,
#feed:active {
    transform: scale(0.95);
}

@media only screen and (min-width: 1224px) {
    #mobile {
        display: none !important; /* Always hidden on larger screens */
    }
}

input[type="image"]:focus,
*:focus {
    outline: none;
}

/* ===== GAME LOGO ===== */
.game-logo {
    text-align: center;
    margin-bottom: 10px;
}

.game-logo__text {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}


/* ===== END SCREEN ===== */
.end-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.97) 0%, rgba(15, 15, 30, 0.97) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.end-screen-content {
    text-align: center;
    color: #ffffff;
}

.end-screen-content h2 {
    font-size: 48px;
    margin-bottom: 40px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.end-screen-stat {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 20px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.stat-value {
    color: #ffffff;
    font-weight: 700;
}

.end-screen-message {
    margin-top: 40px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.8;
}

/* Death Overlay */
.death-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.death-overlay.is-hidden {
    display: none;
}

.death-overlay-content {
    text-align: center;
    animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.death-title {
    font-size: 80px;
    font-weight: 900;
    color: #ff4444;
    margin: 0;
    text-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
    letter-spacing: 3px;
}

.death-subtitle {
    font-size: 50px;
    font-weight: 700;
    color: #ffffff;
    margin: 20px 0 0 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.death-message {
    font-size: 24px;
    color: #cccccc;
    margin: 40px 0 0 0;
    letter-spacing: 1px;
}

#deathCountdown {
    color: #ff6666;
    font-weight: 700;
    font-size: 28px;
}


