/* === GLOBÁLNÍ NASTAVENÍ CELÉ STRÁNKY === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === POZADÍ, FONTY, TĚLO STRÁNKY === */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* === HLAVNÍ OBAL (bílé zaoblené okno uprostřed) === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* === HLAVIČKA S NÁZVEM (barevný pruh nahoře) === */
.header {
    background: linear-gradient(45deg, #b6325f, #ff887c);
    color: white;
    padding: 20px;
    text-align: center;
}
.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
	text-align: center;
}

/* === HLAVNÍ OBSAH (vše pod nadpisem) === */
.content {
    padding: 30px;
}

/* === SEKCE VSTUPNÍCH POLÍ (rozložení gridu) === */
.input-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* === KAŽDÉ VSTUPNÍ POLE (skupina label + input) === */
.input-group {
    background: #a8d0f7;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #2196F3;
}
.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}
.input-group select,
.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    text-align: center; /* centrování čísel */
}
.input-group select:focus,
.input-group input:focus {
    outline: none;
    border-color: #2196F3;
}

/* === PŘEPÍNAČ: Bez vody / Ve dvojím balastu === */
.variant-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}
.toggle-btn {
    padding: 12px 24px;
    border: none;
    background: #e0e0e0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}
.toggle-btn:first-child {
    border-radius: 8px 0 0 8px;
}
.toggle-btn:last-child {
    border-radius: 0 8px 8px 0;
}
.toggle-btn.active {
    background: #2196F3;
    color: white;
}

/* === KARTA VÝSLEDKŮ (šedé pozadí) === */
.results-section {
    background: #c5cbd1;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* === GRID PRO VÝSLEDKY VĚTRU (zadní, protivítr, boční) === */
.wind-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* === JEDNA KARTIČKA S HODNOTOU VĚTRU === */
.wind-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #2196F3;
}
.wind-card h3 {
    color: #2196F3;
    margin-bottom: 10px;
}
.wind-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

/* === OVLÁDACÍ POLE PRO VZDÁLENOSTI === */
.distance-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}
.distance-input {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #2196F3;
}
.distance-input input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* === TABULKA VÝSLEDKŮ DOKLUZU === */
.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.results-table th,
.results-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.results-table th {
    background: #2196F3;
    color: white;
    font-weight: bold;
}
.results-table tr:hover {
    background: #f5f5f5;
}
.safe {
    background-color: #e8f5e8 !important;
}
.warning {
    background-color: #fff3cd !important;
}
.danger {
    background-color: #f8d7da !important;
}
/* ztmaví všechny buňky (včetně těch barevných) o 10 % */
.results-table tr:hover td {
  filter: brightness(0.9);
}

/* === RŮŽICE VĚTRU === */
.wind-compass {
    margin: 20px auto;
    text-align: center;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
/* --- Kruh a značky světových stran --- */
.compass-circle {
    position: relative;
    width: 200px;
    height: 200px;
    border: 3px solid #333;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: linear-gradient(45deg, #f0f8ff, #e6f3ff);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.compass-direction {
    position: absolute;
    font-weight: bold;
    font-size: 16px;
    color: #333;
    background: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
}
.north { top: -11px; left: 50%; transform: translateX(-50%); }
.east  { right: -11px; top: 50%; transform: translateY(-50%); }
.south { bottom: -11px; left: 50%; transform: translateX(-50%); }
.west  { left: -11px; top: 50%; transform: translateY(-50%); }

/* --- KŘÍŽ UVNITŘ KRUHU (rozdělení na 4 části) --- */
.compass-line {
    position: absolute;
    background-color: #000; /* černá barva čáry */
    z-index: 0;             /* bude pod šipkami */
}

/* Vodorovná čára Z–V */
.compass-line.horizontal {
    width: 100%;
    height: 1px;      /* nebo zkus 0.5px pro jemnější vzhled */
    top: 50%;
    left: 0;
}

/* Svislá čára S–J */
.compass-line.vertical {
    height: 100%;
    width: 1px;
    top: 0;
    left: 50%;
}

/* --- Šipka větru: červená --- */
.wind-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
    transition: transform 0.5s ease;
    z-index: 2;
}

/* Špička bude přesně ve středu růžice a bude směřovat nahoru */
.arrow-head {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 15px solid #ff4444;
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(0deg); /* středově zarovnaná */
}

/* Tělo šipky bude od středu směrem nahoru */
.arrow-body {
    width: 4px;
    height: 84px;
    background: #ff4444;
    position: absolute;
    top: -84px; /* posun těla nahoru nad špičku */
    left: 50%;
    transform: translateX(-50%);
}


/* --- Šipka letu: modrá --- */
.flight-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
    transition: transform 0.5s ease;
    z-index: 1;
}
.flight-body {
    width: 3px;
    height: 150px;
    background: #271cff;
    margin: 0 auto;
    position: relative;
    top: +10px;
}
.flight-head {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 15px solid #271cff;
    position: relative;
    transform: translateY(-50%);
    top: +10px;
}

/* --- Legenda růžice větru --- */
.compass-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 10px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    font-size: 12px;
}
.wind-color {
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 2px;
}
.flight-color {
    width: 12px;
    height: 12px;
    background: #271cff;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .input-section {
        grid-template-columns: 1fr;
    }
    .header h1 {
        font-size: 2em;
    }
    .content {
        padding: 15px;
    }
    .distance-controls {
        flex-direction: column;
        align-items: center;
    }
    .results-table {
        font-size: 14px;
    }
    .results-table th,
    .results-table td {
        padding: 8px 4px;
    }
    .wind-info {
        grid-template-columns: 1fr;
    }
    .compass-circle {
        width: 200px;
        height: 200px;
    }

    /* 🔻 ZAKOMENTOVÁNO – NEBUDE měnit délku šipek na mobilu */
    /* .arrow-body {
        height: 40px;
    }
    .flight-body {
        height: 55px;
    } */

    .header-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .lang-switch {
        position: static !important;
        display: flex;
        justify-content: center;
        margin-top: 0.5rem;
        flex-wrap: wrap;
    }

    .header h1 {
        font-size: 1.6em;
    }
}


/* === RESPONSIVNÍ ZOBRAZENÍ PRO MOBIL NA ŠÍŘKU (landscape) === */
@media (max-height: 450px) {
  .header-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .lang-switch {
    position: static !important;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.5rem;
  }

  .header h1 {
    font-size: 1.6em;
  }
}


/* === KARTA SPRÁVNÝ KURZ A TAS === */
.correct-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    box-sizing: border-box;
}
.correct-display {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.correct-input {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.correct-input label {
    font-size: 1.1rem;
    font-weight: bold;
    color: #000000;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.correct-input input {
    width: 80%;
    padding: 0.5rem;
    font-size: 1rem;
    box-sizing: border-box;
    text-align: center;
    margin: 0 auto;
}

/* === SNOS VĚTRU – zobrazování v kartě správný kurz === */
.drift-display {
    text-align: center;
    margin-top: 0.25rem;
}
.drift-display span {
    display: block;
    font-size: 1.0rem;
    font-weight: bold;
    color: #ff4444;
}
.drift-display .wind-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #000000;
    margin-top: 0.25rem;
}

/* === ZOBRAZENÍ M/S POD KM/H === */
.wind-value-ms {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    color: #555555;
    margin-top: 0.75rem;
}

/* === HLAVIČKA S PŘEPÍNAČEM JAZYKA === */
.header-row {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Tu vlož logo vedle nadpisu */
.header-row .logo {
    width: 64px;       /* upravíš podle potřeby, např. 24px, 48px… */
    height: auto;      /* zachová poměr stran */
    margin-right: 8px; /* mezera mezi obrázkem a textem */
    vertical-align: middle;
	flex-shrink: 0; /* ✨ tohle řekne ikoně, ať se nikdy „nezmenšuje“ ani neroztahuje rodiče */
}

.lang-switch {
    position: absolute;
    right: 20px;
}
.header-row h1 {
    flex: 1 1 auto;
    text-align: center;
    margin: 0.5rem 0;
}
.lang-switch {
    flex: 0 0 auto;
    margin: 0.5rem;
}

/* === Tlačítko přepínání jednotek === */
#unitToggleBtn {
    background-color: white;       /* barva pozadí (background-color) */
    border: 2px solid black;       /* černý okraj o tloušťce 2px */
    border-radius: 5px;            /* zaoblení rohů (5px) */
    padding: 4px 8px;             /* vnitřní odsazení: 8px nahoře/dole, 16px vlevo/vpravo */
    cursor: pointer;               /* kurzor se změní na ruku při hoveru */
    font-weight: bold;             /* font – nastaví tučné písmo */
    font-size: 14px;               /* velikost písma (14px) */
    transition: background-color 0.3s ease; /* plynulý přechod barvy pozadí za 0.3s */
}

#unitToggleBtn:hover {
    background-color: #cccccc;     /* nová barva pozadí při najetí myší */
}

/* === Přepínač jazyka (select menu) === */
#languageToggle {
    appearance: none;             /* odstraňuje výchozí šipku na některých prohlížečích */
    background-color: white;      /* barva pozadí */
    border: 2px solid black;      /* černý okraj */
    border-radius: 5px;           /* zaoblení rohů */
    padding: 4px 8px;             /* vnitřní odsazení – výška 4px, šířka 8px */
    font-size: 14px;              /* velikost písma */
    font-weight: bold;            /* tučný řez písma */
    cursor: pointer;              /* kurzor ruky při najetí */
    transition: background-color 0.3s ease; /* plynulý přechod barvy při hoveru */
    /* případně: width: auto; nebo pevná šířka */
}

#languageToggle:hover,
#languageToggle:focus-visible {
    background-color: #cccccc;    /* pozadí při najetí/fokusu */
    outline: none;                /* odstraní modrý obrys ve focusu */
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

@media (max-width: 768px) {
    .results-table {
        min-width: 560px; /* uprav podle potřeby podle počtu sloupců */
    }
}



/* === KONEC, ostatní třídy neměněny === */
