
/* =========================================
   GAME MENU & DIFFICULTY SYSTEM
========================================= */



.arena-wrapper {
    position: relative;

    width: 100%;
    max-width: 1440px;

    margin: 0 auto;

    overflow: hidden;
}



/* OVERLAY */
.game-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(5, 10, 20, 0.82);
    backdrop-filter: blur(7px);
}

.game-overlay[hidden],
.game-actions[hidden] {
    display: none !important;
}

/* MENU PANEL */
.menu-panel {
    width: 390px;
    max-width: 85%;
    padding: 35px;

    text-align: center;

    background: linear-gradient(
        145deg,
        #1c2b40,
        #101a2b
    );

    border: 1px solid #526b89;
    border-radius: 16px;

    box-shadow: 0 0 35px rgba(0, 150, 255, 0.18);
}

.menu-panel h1 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 30px;
    letter-spacing: 2px;
}

.menu-panel h1 span {
    color: #42cfff;
}

.menu-panel p {
    color: #a9bbd0;
    font-size: 13px;
    letter-spacing: 3px;
    margin-bottom: 25px;
}

/* DIFFICULTY */
.difficulty-options {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
}

.difficulty-btn {
    flex: 1;
    padding: 12px 5px;

    color: #c5d2e2;
    background: #263950;

    border: 1px solid #526b89;
    border-radius: 7px;

    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.difficulty-btn:hover {
    background: #36516f;
}

.difficulty-btn.selected {
    color: #071522;
    background: #42cfff;
    border-color: #42cfff;
    box-shadow: 0 0 15px rgba(66, 207, 255, 0.35);
}

/* MAIN BUTTON */
.main-btn,
.secondary-btn {
    width: 100%;
    padding: 13px;

    border: none;
    border-radius: 7px;

    font-weight: bold;
    font-size: 14px;
    letter-spacing: 2px;

    cursor: pointer;
    transition: 0.2s;
}

.main-btn {
    color: #071522;
    background: #42cfff;
}

.main-btn:hover {
    background: #8ce5ff;
    transform: translateY(-2px);
}

.secondary-btn {
    margin-top: 12px;
    color: #ffffff;
    background: #35465c;
}

.secondary-btn:hover {
    background: #526b89;
}

/* IN-GAME ACTIONS */
.game-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;

    display: flex;
    gap: 8px;
}

.game-actions button {
    padding: 9px 15px;

    color: #ffffff;
    background: rgba(20, 35, 55, 0.9);

    border: 1px solid #71869c;
    border-radius: 6px;

    font-weight: bold;
    cursor: pointer;
}

.game-actions button:hover {
    background: #42a9d5;
    color: #071522;
}

/* =========================================
   STAGE 5.0A - MENU SYSTEM
========================================= */

.arena-wrapper {
    position: relative;
    overflow: hidden;
}

.game-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(5, 12, 25, 0.82);
    backdrop-filter: blur(7px);
}

.game-overlay.hidden,
.game-buttons.hidden {
    display: none;
}

.menu-panel {
    width: min(440px, 90%);
    padding: 35px 28px;
    text-align: center;
    background: linear-gradient(145deg, #17283f, #0b1424);
    border: 1px solid rgba(105, 180, 255, 0.35);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.55);
}

.menu-panel h1 {
    margin: 0;
    color: #ffffff;
    font-size: 36px;
    letter-spacing: 2px;
}

.menu-panel h1 span {
    color: #55c8ff;
}

.menu-subtitle {
    margin: 10px 0 30px;
    color: #8fa9c5;
    font-size: 12px;
    letter-spacing: 3px;
}

.menu-panel h3 {
    margin-bottom: 15px;
    color: #dceaff;
    font-size: 14px;
    letter-spacing: 2px;
}

.difficulty-options {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.difficulty-btn {
    flex: 1;
    padding: 12px 5px;
    color: #c7d5e8;
    background: #1d3048;
    border: 1px solid #405875;
    border-radius: 7px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.difficulty-btn:hover {
    background: #294766;
}

.difficulty-btn.active {
    color: #071321;
    background: #55c8ff;
    border-color: #55c8ff;
    box-shadow: 0 0 15px rgba(85, 200, 255, 0.35);
}

.menu-main-btn,
.menu-secondary-btn {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    border: none;
    border-radius: 7px;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.2s;
}

.menu-main-btn {
    color: #071321;
    background: #55c8ff;
}

.menu-main-btn:hover {
    background: #8bdcff;
    transform: translateY(-2px);
}

.menu-secondary-btn {
    color: #ffffff;
    background: #34465d;
}

.menu-secondary-btn:hover {
    background: #526982;
}

.game-buttons {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

.game-buttons button {
    padding: 9px 16px;
    color: #ffffff;
    background: rgba(15, 30, 50, 0.9);
    border: 1px solid #66809e;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.game-buttons button:hover {
    background: #2875a8;
}

/* =========================================
   STAGE 5.0A - MENU VISIBILITY FIX
========================================= */

.hidden {
    display: none !important;
}

/* =================================
   FULL SCREEN GAME DISPLAY
================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #050b16;
}


/* GAME ARENA */
#gameContainer {
    position: relative;

    width: 100%;
    max-width: 1440px;

    aspect-ratio: 16 / 9;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #050b16;

    overflow: hidden;
}

/* GAME CANVAS */
#gameCanvas {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    image-rendering: auto;
}



/* FULLSCREEN BUTTON */

#fullscreenBtn {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 100;

    padding: 11px 18px;

    background: rgba(0, 25, 45, 0.9);
    color: #63eaff;

    border: 1px solid #00cfff;
    border-radius: 8px;

    font-size: 13px;
    font-weight: bold;

    cursor: pointer;

    box-shadow: 0 0 15px rgba(0, 207, 255, 0.35);
}

#fullscreenBtn:hover {
    background: #007da5;
    color: white;
}

/* TRUE FULLSCREEN */

#gameContainer:fullscreen {
    width: 100vw;
    height: 100vh;
}

#gameContainer:fullscreen #gameCanvas {
    width: min(100vw, 177.7778vh);
    height: min(100vh, 56.25vw);
}

/* =================================
   MAP SELECTION
================================= */

.map-selection-panel {
    width: 460px;
    max-width: 90%;
}

.map-options {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.map-card {
    width: 100%;
    padding: 12px;
    border: 2px solid #00cfff;
    border-radius: 12px;
    background: rgba(0, 30, 50, 0.85);
    box-shadow: 0 0 18px rgba(0, 207, 255, 0.25);
}

.map-preview {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.city-rooftop-preview {
    background:
        linear-gradient(
            to top,
            #101d32 0%,
            #263d5b 48%,
            #101a32 100%
        );
}

.city-rooftop-preview::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    background:
        linear-gradient(
            90deg,
            #101827 15%,
            transparent 15% 20%,
            #17243a 20% 35%,
            transparent 35% 40%,
            #101827 40% 65%,
            transparent 65% 70%,
            #17243a 70%
        );
}

.map-preview-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 0 10px #00cfff;
}

.map-card h2 {
    color: #63eaff;
    font-size: 17px;
}

.map-card p {
    color: #c5d8e8;
    font-size: 12px;
}

.map-card.selected {
    border-color: #00eaff;
}

/* =====================================
   DARK FOREST MAP PREVIEW
===================================== */

.dark-forest-preview {
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        180deg,
        #061b20,
        #123b32 65%,
        #071713
    );
}

/* MOON */

.dark-forest-preview::before {
    content: "";
    position: absolute;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #c9f5d5;
    top: 20px;
    right: 35px;
    box-shadow: 0 0 25px #8dffc0;
}

/* FOREST SILHOUETTE */

.dark-forest-preview::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 75%;
    background: linear-gradient(
        135deg,
        transparent 15%,
        #061b17 15% 25%,
        transparent 25% 35%,
        #09231b 35% 55%,
        transparent 55% 65%,
        #061b17 65%
    );
    clip-path: polygon(
        0 100%,
        0 40%,
        12% 5%,
        24% 45%,
        38% 0,
        52% 48%,
        68% 8%,
        82% 42%,
        100% 5%,
        100% 100%
    );
}
