:root {
    --primary-color: #edbb17; /* Arma žlutá */
    --bg-dark: rgba(18, 18, 18, 0.95);
    --text-color: #ffffff;
    --overlay-color: rgba(0, 0, 0, 0.7);

    /* --- KURZORY --- */
    --cursor-default: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2h6z" fill="white" stroke="black" stroke-width="1"/></svg>') 12 12, auto;
    --cursor-pointer: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="8" y="8" width="8" height="8" style="fill:rgba(255, 213, 0, 0.5); stroke:%23ffd500; stroke-width:2;" /><line x1="12" y1="2" x2="12" y2="6" style="stroke:%23ffd500;stroke-width:2" /><line x1="12" y1="18" x2="12" y2="22" style="stroke:%23ffd500;stroke-width:2" /><line x1="2" y1="12" x2="6" y2="12" style="stroke:%23ffd500;stroke-width:2" /><line x1="18" y1="12" x2="22" y2="12" style="stroke:%23ffd500;stroke-width:2" /></svg>') 12 12, pointer;
}

/* --- ZÁKLAD (MOBIL FIRST) --- */
html, body, * { 
    cursor: var(--cursor-default); 
    box-sizing: border-box; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000;
    background-image: url('../img/giphy.gif');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    margin: 0;
    padding-bottom: 0;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- AKTIVNÍ PRVKY (POINTER) --- */
a, button, input, select, textarea, label, summary,
.nav-btn, .hero-img, .footer-trigger, .popup-close, 
.gallery-item, .gallery-link, .gallery-select, .page-link,
.hero-link-wrapper, .hero-event-card {
    cursor: var(--cursor-pointer) !important;
}

/* =========================================
   NAVIGACE (MOBIL A ZÁKLAD)
   ========================================= */
.main-header {
    background-color: rgba(0, 0, 0, 0.8);
    position: sticky; top: 0; z-index: 5000;
    border-bottom: 1px solid #333; height: 60px; width: 100%;
}

.nav-container {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    height: 100%; padding: 0 5px;
    position: relative; overflow: visible !important;
    gap: 0;
}

/* LOGO NA MOBILU */
.logo-wrapper {
    z-index: 5001; display: flex; justify-content: center;
    overflow: visible !important; 
    order: 1; margin-right: 5px; flex: 0 0 auto;
}
.nav-logo { height: 40px; width: auto; }

/* MENU NA MOBILU (ROZTAŽENÉ) */
.nav-side { 
    display: flex; gap: 0; 
    flex: 1; 
    justify-content: space-around; 
}
.nav-left { order: 2; }
.nav-right { order: 3; }

#nvg-toggle { display: none; } 

.nav-btn {
    background: transparent; border: none; color: white;
    font-size: 12px; padding: 8px 4px; cursor: pointer;
    text-decoration: none; text-transform: uppercase; font-weight: bold;
    transition: all 0.3s ease; border-radius: 4px; white-space: nowrap;
}

.nav-btn:hover {
    background-color: var(--primary-color); color: #000000;
    box-shadow: 0 0 10px rgba(255, 213, 0, 0.4);
}

/* --- AKTIVNÍ STAV TLAČÍTKA (TOTO ZAJISTÍ SVÍCENÍ) --- */
.nav-btn.active {
    background-color: var(--primary-color) !important; /* Vynucená žlutá */
    color: #000000 !important; /* Černý text */
    box-shadow: 0 0 15px rgba(237, 187, 23, 0.6); /* Záře */
    font-weight: bold;
}

/* =========================================
   HERO SEKCE (OBECNÉ + MOBIL)
   ========================================= */
.hero-boxes { 
    display: flex; flex-direction: column; gap: 20px; 
    padding: 20px; 
    margin-top: 50px;
    padding-bottom: 200px !important; /* Mobilní scroll fix */
}

/* POJISTKA PRO SCROLL (MOBIL) */
.hero-boxes::after {
    content: "";
    display: block;
    min-height: 150px; 
    width: 100%;
}

/* 1. Obaly obrázků - MOBIL */
.hero-link-wrapper {
    display: block; position: relative; width: 100%; 
    aspect-ratio: 1/1; /* Čtverec na mobilu */
    text-decoration: none; border: 2px solid rgba(255, 213, 0, 0.3);
    border-radius: 8px; overflow: hidden;
}
.hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-overlay-label {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 10px; background: rgba(0, 0, 0, 0.8);
    color: var(--primary-color); text-align: center;
    font-weight: bold; font-family: 'Consolas', monospace; letter-spacing: 2px;
    border-top: 1px solid var(--primary-color); opacity: 1;
}

/* 2. Event Karta - MOBIL */
.hero-event-card {
    width: 100%; 
    height: auto; 
    min-height: 450px; 
    
    box-sizing: border-box; 
    background-color: rgba(0, 0, 0, 0.85);
    background-image: linear-gradient(rgba(18, 18, 18, 0.9), rgba(18, 18, 18, 0.9)), url('../img/map_grid_pattern.png');
    border: 2px solid rgba(255, 213, 0, 0.3);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 20px;
    font-family: 'Consolas', monospace;
    position: relative; overflow: hidden; transition: all 0.3s ease;
}

.hero-event-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 40px rgba(255, 213, 0, 0.6);
    transform: scale(1.02);
}

/* Prvky uvnitř karty */
.event-status { color: var(--primary-color); font-size: 10px; letter-spacing: 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 5px; display: flex; align-items: center; }
.blink-dot { width: 8px; height: 8px; background: #00ff00; border-radius: 50%; display: inline-block; margin-right: 8px; box-shadow: 0 0 5px #00ff00; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.event-content { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.event-label { color: #666; font-size: 10px; margin-top: 5px; }
#hero-mission-name { color: #fff; font-size: 24px; margin: 2px 0 15px 0; text-transform: uppercase; text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
.event-details { font-size: 12px; color: #ccc; text-align: left; margin: 0 auto; width: 90%; border-left: 2px solid #333; padding-left: 10px; }
.detail-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.detail-row span:first-child { color: #666; }
.detail-row span:last-child { color: var(--primary-color); font-weight: bold; text-transform: uppercase; }
.event-countdown { margin-top: 20px; font-size: 14px; color: #fff; font-weight: bold; background: rgba(255, 255, 255, 0.05); padding: 5px; border-radius: 4px; }
.event-action-btn { background: transparent; border: 1px solid rgba(255, 213, 0, 0.3); color: var(--primary-color); text-decoration: none; padding: 10px; text-align: center; font-weight: bold; font-size: 12px; transition: all 0.3s; text-transform: uppercase; margin-top: 10px; }
.event-action-btn:hover { background: var(--primary-color); color: #000; box-shadow: 0 0 15px var(--primary-color); border-color: var(--primary-color); }

/* =========================================
   GALERIE 
   ========================================= */
.gallery-main-container { max-width: 1200px; margin: 100px auto; background: rgba(0, 0, 0, 0.8); padding: 20px; border-radius: 8px; }
.gallery-title { color: var(--primary-color); text-align: center; margin-bottom: 20px; }
.gallery-controls { text-align: center; margin-bottom: 30px; }
.gallery-label { color: white; font-size: 1.1em; margin-right: 10px; }
.gallery-select { padding: 8px 15px; border-radius: 4px; background-color: #333; color: white; border: 1px solid var(--primary-color); font-size: 1em; cursor: pointer; }

/* Mřížka (základ = mobil = 2 sloupce) */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.gallery-empty-msg { grid-column: 1 / -1; text-align: center; color: #ccc; }

.gallery-item { position: relative; padding-bottom: 100%; overflow: hidden; border: 2px solid transparent; border-radius: 4px; transition: border-color 0.3s; }
.gallery-item:hover { border-color: var(--primary-color); }
.gallery-link { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.gallery-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; display: block; }
.gallery-item:hover .gallery-thumb { transform: scale(1.05); }

.pagination-container { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 30px; flex-wrap: wrap; }
.page-link { display: inline-block; padding: 8px 14px; border: 1px solid #555; border-radius: 4px; color: white; text-decoration: none; background-color: transparent; font-weight: bold; transition: all 0.3s ease; min-width: 35px; text-align: center; }
.page-link:hover { border-color: var(--primary-color); color: var(--primary-color); }
.page-link.active { background-color: var(--primary-color); color: black; border-color: var(--primary-color); cursor: default; }


/* =========================================
   STYLY PRO TEXTOVÉ STRÁNKY (O NÁS, PODMÍNKY)
   ========================================= */
.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(18, 18, 18, 0.9);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #333;
    color: #e0e0e0;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.legal-title {
    color: var(--primary-color, #edbb17);
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary-color, #edbb17);
    padding-bottom: 10px;
    display: table; 
    margin-left: auto;
    margin-right: auto;
}

.legal-container h1 { 
    text-align: center; 
    display: block; 
    width: 100%; 
    border-bottom: none; 
}

.legal-intro { font-size: 1.1em; margin-bottom: 30px; line-height: 1.6; }
.legal-section { margin-bottom: 30px; }
.legal-section h2 { color: #fff; border-left: 4px solid var(--primary-color, #edbb17); padding-left: 15px; margin-bottom: 15px; }
.legal-section p { margin-bottom: 10px; color: #ccc; line-height: 1.6; }
.legal-footer { margin-top: 50px; text-align: center; font-size: 0.85em; color: #888; }
.legal-container hr { border: 0; border-top: 1px solid #444; margin: 20px 0; }

/* =========================================
   MEDIA QUERY: PC VERZE (Sjednoceno pro výkon)
   ========================================= */
@media (min-width: 768px) {
    /* 1. Lišta na PC */
    .main-header { height: 50px; background-color: rgba(0, 0, 0, 0.6); border-bottom: none; overflow: visible !important; position: absolute; top: 50px; backdrop-filter: blur(5px); }
    .nav-container { max-width: 1400px; margin: 0 auto; justify-content: center; gap: 0; position: relative; }
    .nav-side { flex: 1; gap: 0; justify-content: unset; }
    .nav-left { order: unset; justify-content: flex-end; padding-right: 0; } 
    .nav-right { order: unset; justify-content: flex-start; padding-left: 0; }
    
    #nvg-toggle { display: block; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); margin: 0; }

    /* Navigační tlačítka PC */
    .nav-btn {
        font-size: 16px; width: 180px; padding: 0 10px; height: 50px; line-height: 50px;
        border-radius: 0; text-align: center; white-space: nowrap; position: relative; z-index: 10;
    }
    
    /* Aktivní stav na PC - musí přebít jiné styly */
    .nav-btn.active {
        background-color: var(--primary-color) !important;
        color: #000000 !important;
        box-shadow: 0 0 25px rgba(255, 213, 0, 0.8) !important;
        z-index: 11;
    }
    
    .nav-btn:hover { background-color: var(--primary-color); color: #000000; box-shadow: 0 0 25px rgba(255, 213, 0, 0.5); z-index: 10; }

    /* Tlačítka u loga */
    .nav-left .nav-btn:last-child { width: 290px; padding-right: 110px; }
    .nav-right .nav-btn:first-child { width: 290px; padding-left: 110px; }
    .nav-right .nav-btn:last-child { animation: pulse-yellow 2s infinite; background-color: rgba(255, 213, 0, 0.1); border: 1px solid var(--primary-color); }

    .logo-wrapper { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: auto; overflow: visible !important; z-index: 6000; order: unset; margin-right: 0; }
    .nav-logo { height: 180px; position: relative; top: 20px; filter: drop-shadow(0 0 10px rgba(0,0,0,0.8)); transition: transform 0.3s; }
    .nav-logo:hover { transform: scale(1.1); animation: glitch-shake 0.3s cubic-bezier(.36,.07,.19,.97) both; filter: drop-shadow(-2px 0 red) drop-shadow(2px 0 #edbb17); }

    /* Hero sekce PC */
    .hero-boxes { width: 100%; max-width: none; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); display: flex; flex-direction: row; justify-content: center; align-items: center; margin: 27vh auto 0 auto; padding: 5px 0; gap: 20px; padding-bottom: 20px !important; }
    .hero-boxes::after { display: none; }

    .hero-link-wrapper, .hero-event-card { width: 350px !important; height: 350px !important; aspect-ratio: 1/1; flex: 0 0 auto; box-sizing: border-box; border: 2px solid rgba(255, 213, 0, 0.3); border-radius: 0; background-color: #000; transition: all 0.3s ease; position: relative; overflow: hidden; }
    .hero-event-card { padding: 15px; min-height: 0; height: 350px !important; } 

    .hero-link-wrapper:hover, .hero-event-card:hover { border-color: var(--primary-color); box-shadow: 0 0 40px rgba(255, 213, 0, 0.6); transform: scale(1.02); z-index: 10; }
    .hero-overlay-label { opacity: 0; transition: opacity 0.3s ease; }
    .hero-link-wrapper:hover .hero-overlay-label { opacity: 1; }
    
    /* Galerie PC */
    .gallery-main-container { margin-top: 160px; }
    .legal-container { margin-top: 160px !important; }
    .gallery-grid { grid-template-columns: repeat(4, 1fr) !important; }
    .popup-close { width: auto; }

    /* Fix scrollování PC (skrytí mobilní mezery) */
    .force-mobile-space { display: none !important; height: 0 !important; width: 0 !important; }
}

/* =========================================
   DEFINITIVNÍ FIX SCROLLOVÁNÍ (MOBIL)
   ========================================= */
.force-mobile-space {
    display: block;
    width: 100%;
    height: 200px;
    background: transparent;
    clear: both;
}

/* =========================================
   OSTATNÍ (Popupy, Footer, Efekty)
   ========================================= */
.popup-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 2000; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.popup-content { background: var(--bg-dark); border: 1px solid var(--primary-color); padding: 25px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 0 20px rgba(255, 213, 0, 0.2); }
.popup-close { margin-top: 20px; background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); padding: 10px 20px; width: 100%; font-weight: bold; cursor: pointer; }

/* Patička */
.main-footer { 
    position: fixed; bottom: 0; width: 100%; 
    background: rgba(0, 0, 0, 0.95); border-top: 1px solid #333; padding: 15px 0; 
    text-align: center; font-size: 12px; 
    z-index: 9000; 
    transform: translateY(100%); transition: transform 0.3s ease; 
}
.main-footer:hover, .main-footer.active { transform: translateY(0); }

.footer-trigger { 
    display: block; position: absolute; top: -30px; left: 50%; 
    transform: translateX(-50%); background: rgba(0,0,0,0.8); 
    padding: 5px 20px; border-radius: 10px 10px 0 0; 
    border: 1px solid #333; border-bottom: none; 
    cursor: pointer; color: var(--primary-color); font-size: 12px; 
}

/* Responsivita pro textové stránky na mobilu */
@media (max-width: 768px) {
    .legal-container { padding: 20px; margin: 20px 10px; }
    .legal-title { font-size: 1.5em; }
}

/* Efekty pozadí a loga */
body::before { content: " "; display: block; position: fixed; top: 0; left: 0; bottom: 0; right: 0; background: linear-gradient(to bottom, rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%); background-size: 100% 4px; z-index: 9000; pointer-events: none; }
@keyframes glitch-shake { 0% { transform: translate(0); } 20% { transform: translate(-2px, 2px); } 40% { transform: translate(-2px, -2px); } 60% { transform: translate(2px, 2px); } 80% { transform: translate(2px, -2px); } 100% { transform: translate(0); } }
@keyframes pulse-yellow { 0% { box-shadow: 0 0 0 0 rgba(255, 213, 0, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(255, 213, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 213, 0, 0); } }

.social-icons a { display: inline-block; transition: transform 0.3s ease, filter 0.3s ease; }
.social-icons a:hover { transform: scale(1.2); filter: drop-shadow(0 0 8px var(--primary-color)); }

/* Widgety */
.tactical-widget { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; font-family: 'Consolas', monospace; font-size: 12px; z-index: 4000; box-shadow: 0 0 15px rgba(0,0,0,0.5); transition: transform 0.3s; }
.widget-left { position: fixed; top: 200px; left: 0; width: 220px; transform: translateX(-100%); border-right: 3px solid var(--primary-color); border-radius: 0 0 8px 0; }
.widget-left:hover { transform: translateX(0); }
.widget-left::after { content: 'SERVER STATUS'; position: absolute; top: 0; right: -35px; width: 35px; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); border-left: none; border-right: 2px solid var(--primary-color); writing-mode: vertical-rl; transform: rotate(180deg); display: flex; align-items: center; justify-content: center; color: var(--primary-color); font-weight: bold; cursor: pointer; }
.widget-left:hover::after { background: var(--primary-color); color: #000; }
.widget-right { position: fixed; top: 150px; right: 20px; width: 200px; text-align: right; border-left: 1px solid #333; border-right: 3px solid var(--primary-color); }
@media (max-width: 1200px) { .tactical-widget { display: none; } }
.widget-header { background: rgba(237, 187, 23, 0.15); padding: 10px; font-weight: bold; color: var(--primary-color); border-bottom: 1px solid rgba(255, 255, 255, 0.1); text-align: center; }
.widget-content { padding: 15px; } .server-row { display: flex; justify-content: space-between; margin-bottom: 8px; border-bottom: 1px dashed rgba(255, 255, 255, 0.1); }
.label { color: #ccc; } .value { color: #fff; font-weight: bold; }

/* NVG & News */
#nvg-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; background: radial-gradient(circle, rgba(0, 50, 0, 0) 60%, rgba(0, 0, 0, 0.6) 100%), repeating-linear-gradient(transparent 0, rgba(0, 20, 0, 0.2) 2px, transparent 4px); backdrop-filter: sepia(1) hue-rotate(70deg) saturate(2) brightness(0.8); }
body.nvg-active { --primary-color: #00ff00 !important; --text-color: #e0ffe0 !important; --bg-dark: rgba(0, 20, 0, 0.95) !important; background-color: #000a00 !important; }
body.nvg-active #nvg-overlay { opacity: 1; }
.news-ticker-bar { position: fixed; bottom: 0; left: 0; width: 100%; height: 30px; background-color: rgba(0, 0, 0, 0.95); border-top: 2px solid var(--primary-color); display: flex; align-items: center; z-index: 8000; font-family: 'Consolas', monospace; font-size: 13px; overflow: hidden; }
.ticker-title { background-color: var(--primary-color); color: #000; padding: 0 15px; height: 100%; display: flex; align-items: center; font-weight: bold; z-index: 2; }
.ticker-wrapper { flex: 1; overflow: hidden; position: relative; }
.ticker-content { display: inline-block; white-space: nowrap; padding-left: 100%; animation: ticker-move 30s linear infinite; }
@keyframes ticker-move { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }
.decoding::after { content: '_'; opacity: 1; animation: blinkCursor 0.5s step-end infinite; color: var(--primary-color); }
@keyframes blinkCursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }