/* Hlavní kontejner HUDu pres celou obrazovku, prokliknutelný jen na ovládacích prvcích */
#hud-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
    font-family: sans-serif;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
}

#hud-container button, 
#hud-container input,
#hud-container label {
    pointer-events: auto;
}

.hud-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}
.hud-btn:active {
    background: rgba(50, 50, 50, 0.9);
}

/* Horní rádek pro LAT, ALT, LON vedle sebe */
#top-gps-bar {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 20;
    padding: 0 10px;
}

/* Styly pro GPS ukazatele - nastaveno na 12px */
.gps-hud-badge {
    background: rgba(0, 0, 0, 0.65);
    color: #4CAF50;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-family: monospace;
    font-weight: bold;
    backdrop-filter: blur(4px);
    z-index: 20;
}

#gps-lat-display {
    /* pozicováno flexboxem v top-gps-bar */
}
#gps-alt-display {
    color: #FFEB3B;
}
#gps-lon-display {
    /* pozicováno flexboxem v top-gps-bar */
}

/* 1. Nahore uprostred: Dev panel s testem (umísteno pod horní GPS rádek) */
#dev-panel {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    padding: 6px 10px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    color: white;
    font-size: 13px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 20;
}
.dev-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
}
#dev-inputs {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-top: 6px;
}
#dev-inputs input {
    width: 80px;
    padding: 4px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #222;
    color: white;
    font-size: 12px;
    text-align: center;
}

/* 2. Levý svislý okraj: Filtry kategorií (defaultne neaktivní/šedivé) */
#left-sidebar {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.filter-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.filter-btn.active {
    background: rgba(40, 140, 40, 0.8);
    color: white;
    border-color: #4CAF50;
}

/* 3. Pravý svislý okraj: Pevná šírka kontejneru proti skákání */
#right-sidebar {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 4px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-size: 11px;
    width: 52px;
    box-sizing: border-box;
}
.slider-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 315px; /* Zvetšeno z 180px (cca x1.75) */
    width: 100%;
}
#dist-val {
    font-weight: bold;
    font-size: 10px;
    white-space: nowrap;
    text-align: center;
}
#distanceSlider {
    writing-mode: bt-lr;
    -webkit-appearance: slider-vertical;
    width: 16px;
    height: 225px; /* Zvetšeno z 130px (cca x1.75) */
    cursor: pointer;
}
#object-counter {
    font-weight: bold;
    font-size: 11px;
    white-space: nowrap;
    text-align: center;
}

/* 4. Dole uprostred: Kompas, azimut a tlacítko R */
#bottom-panel {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

#compass-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

#compass {
    width: 76px;
    height: 76px;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: relative;
    backdrop-filter: blur(4px);
}

#compass span {
    position: absolute;
    font-weight: bold;
}

/* Hlavní smery (velké, výrazné písmo) */
.comp-n { top: 2px; left: 50%; transform: translateX(-50%); font-size: 14px; color: #ff5252; }
.comp-e { right: 5px; top: 50%; transform: translateY(-50%); font-size: 14px; color: white; }
.comp-s { bottom: 2px; left: 50%; transform: translateX(-50%); font-size: 14px; color: white; }
.comp-w { left: 5px; top: 50%; transform: translateY(-50%); font-size: 14px; color: white; }

/* Mezilehlé smery */
.comp-ne { top: 14px; right: 14px; font-size: 8px; color: rgba(255, 255, 255, 0.6); }
.comp-se { bottom: 14px; right: 14px; font-size: 8px; color: rgba(255, 255, 255, 0.6); }
.comp-sw { bottom: 14px; left: 14px; font-size: 8px; color: rgba(255, 255, 255, 0.6); }
.comp-nw { top: 14px; left: 14px; font-size: 8px; color: rgba(255, 255, 255, 0.6); }

#compass-needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 44px;
    background: #ff5252;
    transform-origin: top center;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* Kontejner pro azimut nad tlacítkem R */
#right-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#azimuth-display {
    color: white;
    font-size: 14px;
    font-family: monospace;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    text-align: center;
    min-width: 38px;
}

/* Úprava tlacítka "R" pro hezký vzhled vedle kompasu */
#btn-reset-compass {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}