body {
    background-color: #040406;
    color: white;
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

#landing-page {
    text-align: center;
    margin-top: 50px;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

.game-title {
    font-size: 3.5rem;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff;
    margin-bottom: 0;
}

.subtitle {
    font-size: 1.5rem;
    color: #fff;
    letter-spacing: 2px;
    margin-top: 10px;
}

.menu-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.modal-box {
    text-align: center;
    padding: 25px;
    border: 2px solid #a55eea;
    border-radius: 10px;
    background: rgba(10, 10, 15, 0.95);
    max-width: 400px;
    margin: 10vh auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 90%;
}

.text-input {
    padding: 10px;
    font-size: 18px;
    text-align: center;
    width: 80%;
    background: #111;
    color: #fff;
    border: 1px solid #a55eea;
    margin-bottom: 10px;
    border-radius: 5px;
    font-family: 'Orbitron', sans-serif;
}

.text-btn {
    margin-top: 15px;
    background: none;
    border: none;
    color: #ff004c;
    cursor: pointer;
    text-decoration: underline;
    font-family: 'Orbitron', sans-serif;
}

button {
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    transition: 0.2s;
}

.start-game-btn {
    padding: 15px 40px;
    font-size: 20px;
    background: transparent;
    color: white;
    border: 2px solid #00ffff;
    border-radius: 5px;
    text-transform: uppercase;
}

    .start-game-btn:hover {
        background: #00ffff;
        color: black;
        box-shadow: 0 0 30px #00ffff;
    }

.action-btn {
    padding: 8px 15px;
    background: #111;
    color: #fff;
    border: 1px solid #00ffff;
    border-radius: 5px;
}

    .action-btn:hover {
        background: rgba(0, 255, 255, 0.2);
    }

.active-btn {
    background: rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 10px #00ffff;
}

.weapon-btn {
    padding: 8px 15px;
    background: #111;
    color: #00ffff;
    border: 1px solid #00ffff;
    border-radius: 5px;
}

.weapon-active {
    background: rgba(0, 255, 255, 0.4);
    box-shadow: 0 0 15px #00ffff;
}

.weapon-disabled {
    border-color: #444 !important;
    color: #555 !important;
    cursor: not-allowed;
    background: #0a0a0c !important;
}

.diff-btn {
    padding: 8px 20px;
    background: #111;
    color: #fff;
    border: 1px solid #777;
}

.active-diff {
    border-color: #ffea00;
    color: #ffea00;
    box-shadow: 0 0 10px #ffea00;
}

/* SEO BOX STIL PO UZORU NA SLIKU */
.seo-box {
    margin-top: 40px;
    background: #0a0a0c;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 25px;
    font-family: Arial, sans-serif;
    color: #999;
    font-size: 14px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

    .seo-box strong {
        color: #ddd;
    }

/* --- GLAVNI GAME CONTAINER --- */
#game-container {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative; /* OVO JE KLJUČNO ZA HAMBURGER MENI! */
    max-width: 1200px;
    margin: 0 auto;
}

#ui-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
    background: rgba(20, 20, 30, 0.8);
    border-bottom: 2px solid #00ffff;
    margin-bottom: 10px;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- NOVI TOP BAR & HAMBURGER --- */
#top-ui-bar {
    width: 100%; /* Sluša game-container, nema apsolutnog izlijetanja */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
    z-index: 100;
}

#stats-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(10, 10, 12, 0.85);
    padding: 8px 15px;
    border: 1px solid #333;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.stat-box {
    font-size: 16px;
    color: #ffea00;
}

.level-text {
    color: #ffea00;
    font-weight: bold;
}

#hamburger-btn {
    background: rgba(10, 10, 12, 0.85);
    color: #fff;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 22px;
    padding: 5px 12px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

    #hamburger-btn:hover {
        border-color: #00ffff;
        color: #00ffff;
        box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
    }

/* Skriveni meni koji iskoči ispod hamburgera */
#game-options-menu {
    position: absolute;
    top: 60px;
    right: 10px;
    background: rgba(10, 10, 12, 0.95);
    border: 1px solid #444;
    padding: 10px;
    border-radius: 8px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 101;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
}

    #game-options-menu.show-menu {
        display: flex;
    }


#territoryBarContainer {
    width: 100%; /* Da se rastegne preko cijelog ekrana ispod bodova */
    height: 10px;
    background: #111;
    display: flex;
    border: 1px solid #444;
    margin-bottom: 5px;
}

.bar {
    height: 100%;
    transition: width 0.3s;
}

.blue-bar {
    background: #00ffff;
}

.red-bar {
    background: #ff004c;
}

.green-bar {
    background: #00ff66;
}

.yellow-bar {
    background: #ffea00;
}

#gameCanvas {
    width: 100%;
    max-width: 1200px;
    height: auto;
    max-height: 75vh;
    aspect-ratio: 12 / 7;
    touch-action: none;
    margin: 0 auto;
    display: block;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    border-radius: 5px;
    background-color: #040406;
}

.tech-item {
    display: flex;
    justify-content: space-between;
    background: #111;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #444;
}

#mobileMenuBtn {
    display: none;
}

/* REDIZAJN DONJEG IZBORNIKA */
#action-menu {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 40px;
    padding: 15px 10px;
    box-sizing: border-box;
}

.menu-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(20, 20, 30, 0.7);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #333;
}

.menu-title {
    color: #00ffff;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 0 5px #00ffff;
    margin-bottom: 12px;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn, .weapon-btn {
    min-width: 100px;
    padding: 8px 5px;
    font-size: 14px;
    text-align: center;
}

    .action-btn small, .weapon-btn small {
        font-size: 11px;
        opacity: 0.8;
    }

/* --- SPECIFIČNI STIL ZA CRVENI 'NEW GAME' GUMB --- */
#btnNewGame {
    font-family: 'Orbitron', sans-serif !important;
    color: #ff004c !important;
    border: 2px solid #ff004c !important;
    background: transparent;
    text-shadow: 0 0 10px #ff004c;
    box-shadow: 0 0 15px rgba(255, 0, 76, 0.4), inset 0 0 10px rgba(255, 0, 76, 0.2);
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: auto;
}

    #btnNewGame:hover {
        background: rgba(255, 0, 76, 0.1) !important;
        box-shadow: 0 0 30px rgba(255, 0, 76, 0.8), inset 0 0 20px rgba(255, 0, 76, 0.4) !important;
        transform: scale(1.05);
    }

/* --- LANDSCAPE OVERLAY --- */
#rotate-device-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #040406;
    color: #00ffff;
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
}

@media screen and (max-width: 1000px) and (orientation: portrait) {
    #rotate-device-overlay {
        display: flex;
    }
}

.rotate-content .phone-icon {
    font-size: 50px;
    margin-bottom: 20px;
    animation: rotatePhone 2s infinite ease-in-out;
}

@keyframes rotatePhone {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(90deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

#rotate-device-overlay p {
    font-size: 20px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #00ffff;
}

/* Bočne reklame */
.adsense-sidebar {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 600px;
    background: rgba(0, 0, 0, 0.3);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.left-ad {
    left: 10px;
}

.right-ad {
    right: 10px;
}

@media (max-width: 1550px) {
    .adsense-sidebar {
        display: none !important;
    }
}

.interstitial-ad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999 !important;
    display: none;
    justify-content: center;
    align-items: center;
}

.ad-content {
    background: #111;
    padding: 20px;
    border: 2px solid #00ffff;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
}

/* --- MOBILNA OPTIMIZACIJA (SCROLL I MENIJI) --- */
@media screen and (max-height: 600px) {
    #top-ui-bar {
        padding: 5px;
    }

    #stats-container {
        padding: 4px 10px;
    }

    .stat-box {
        font-size: 12px;
    }

    #gameCanvas {
        max-height: 85vh;
    }
}

@media screen and (max-width: 900px) {
    .game-title {
        font-size: 2.5rem;
    }

    #mobileMenuBtn {
        display: block;
        width: 100%;
        padding: 8px;
        background: #111;
        color: #00ffff;
        border: 2px solid #00ffff;
        font-family: 'Orbitron', sans-serif;
        font-size: 16px;
        font-weight: bold;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 1000;
    }

    #action-menu {
        display: none;
        position: fixed;
        bottom: 40px;
        left: 0;
        flex-direction: column;
        gap: 15px;
        padding: 10px;
        background: rgba(10, 10, 15, 0.95);
        border-top: 2px solid #a55eea;
        z-index: 999;
        max-height: 65vh;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        width: 95%;
        left: 2.5%;
        top: 15%;
    }

        #action-menu.show-mobile-menu {
            display: flex;
        }

    .menu-group {
        width: 100%;
        padding: 10px;
        border: none;
        background: transparent;
    }

    .button-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        width: 100%;
    }

    .action-btn, .weapon-btn {
        width: 100%;
        min-width: 0;
        font-size: 10px;
        padding: 6px 4px;
    }
}
