/* Základní reset a nastavení písma */
body {
    margin: 0;
    /* Použijeme nový komiksový font */
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* Trávníkově zelená s jemným přechodem pro pocit hloubky */
    background: radial-gradient(circle, #7cb342 0%, #33691e 100%);
    color: #3e2723;
}

/* Styl pro horní lištu - Tmavé dřevo / Kování */
#top-bar {
    height: 50px;
    background: linear-gradient(to bottom, #5d4037, #3e2723);
    border-bottom: 4px solid #1f1209;
    color: #ffecb3;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    z-index: 10;
}

/* Obal pro menu a hlavní obsah */
#container {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 20px; /* Odsazení od okrajů obrazovky */
    gap: 20px; /* Mezera mezi menu a pergamenem */
}

/* Levé menu - Průhledné, drží jen tlačítka */
#sidebar {
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto; /* Povolí scrollování nahoru a dolů */
    overflow-x: hidden; /* TOTO schová  spodní posuvník */
    max-height: calc(100vh - 80px); /* VOLITELNÉ: Zabrání tomu, aby menu zalezlo pod horní lištu (číslo 80px případně uprav podle výšky tvého horního panelu) */
}

/* --- ELEGANTNÍ SCROLLBAR PRO MENU --- */
/* Šířka samotného posuvníku */
#sidebar::-webkit-scrollbar {
    width: 5px; 
}

/* Dráha, po které posuvník jezdí (uděláme ji neviditelnou) */
#sidebar::-webkit-scrollbar-track {
    background: transparent; 
}

/* Samotný "jezdec" */
#sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2); /* Průhledná černá, takže ztmaví tu zelenou pod ním */
    border-radius: 10px;
}

/* Jezdec po najetí myší (ztmavne) */
#sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4); 
}

/* Tlačítka v menu - Simulace dřevěných cedulí */
.nav-btn {
    padding: 15px;
    font-size: 1.3rem;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: bold;
    color: #3e2723;
    /* Světlé dřevo */
    background: linear-gradient(to bottom, #deb887, #c19a6b);
    border: 3px solid #5d4037;
    /* Mírně nepravidelné zakulacení rohů */
    border-radius: 10px 15px 15px 10px;
    cursor: pointer;
    box-shadow: 2px 4px 8px rgba(0,0,0,0.4), inset 0 0 10px rgba(255,255,255,0.3);
    transition: transform 0.1s, filter 0.1s;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.5);
}

.nav-btn:hover {
    filter: brightness(1.1);
    transform: translateX(5px); /* Jemné povysunutí při najetí myší */
}

.nav-btn.active {
    background: linear-gradient(to bottom, #ffcc80, #ffa726);
    box-shadow: 4px 4px 12px rgba(0,0,0,0.6), inset 0 0 10px rgba(255,255,255,0.5);
    transform: translateX(10px);
}

/* Hlavní obsahová část */
#main-content {
    flex: 1;    
    border: 5px solid #8d6e63;
    /* Zde už NENÍ žádný background-color ani background-image, stará se o to JS! */
    border-radius: 8px;
    padding: 30px;
    overflow-y: auto;
    /* Vnitřní stín funguje dál a překryje tvé nové obrázky */
    box-shadow: inset 0 0 40px rgba(139, 69, 19, 0.2), 5px 5px 15px rgba(0,0,0,0.5);
}

#main-content h1, #main-content h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #3e2723;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    border-bottom: 2px dashed #8d6e63;
    padding-bottom: 10px;
}

/* Karty úkolů - Menší pergameny */
.task-card, .building-card {
    background-color: #fdf5e6;
    border: 2px solid #a1887f;
    border-radius: 5px;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.2);
}

/* Styl pro sekci "V přípravě" */
.under-construction {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #5d4037;
}

/* --- STADION --- */
.stadium-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.building-card {
    /* Průhledná krémová barva (odpovídá tvým info-boxům, ale s 85% viditelností) */
    background-color: rgba(253, 245, 230, 0.85); 
    /* Krásně rozmaže pozadí stadionu pod kartičkou, aby text nerušily detaily nákresu */
    backdrop-filter: blur(4px); 
    border: 2px solid #8d6e63; /* Změněno ze šedé na hnědou, ať to ladí ke hře */
    border-radius: 10px;
    padding: 15px;
    width: 280px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.building-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.building-header h3 {
    margin: 0;
    color: #1e3a8a;
}

.building-level {
    background-color: #1e3a8a;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: bold;
}

.building-desc {
    font-size: 0.95rem;
    color: #4e342e; /* Tmavší hnědá pro lepší čitelnost */
    margin-bottom: 15px;
    /* ZDE BYLO flex-grow: 1; - To jsme smazali, aby se nedělaly ty obří bílé díry */
}

.building-stats {
    margin-top: auto; /* KOUZLO: Tohle přitlačí celou sekci s cenou vždycky úplně na dno karty! */
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.05); /* Jemně podbarvíme sekci pro upgrade */
    padding: 10px;
    border-radius: 5px;
    border: 1px dashed #a1887f;
}

.stat-cost { color: #dc2626; font-weight: bold; }
.stat-time { color: #2563eb; font-weight: bold; }

.btn-upgrade {
    background-color: #16a34a;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-upgrade:hover { background-color: #15803d; }
.btn-upgrade:disabled { background-color: #94a3b8; cursor: not-allowed; }


/* --- ŠATNA --- */
.locker-room-controls {
    text-align: center;
    margin-bottom: 20px;
}

.locker-room-controls select {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.2rem;
    padding: 5px 10px;
    background-color: #fdf5e6;
    border: 2px solid #8d6e63;
    border-radius: 5px;
    cursor: pointer;
}

.pitch-section {
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px dashed #a1887f;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.pitch-section h3 {
    margin-top: 0;
    color: #3e2723;
    border-bottom: 1px solid #a1887f;
    padding-bottom: 5px;
}

/* Nadpisy řad hráčů na hřišti (Útočníci, Záložníci...) */
.pitch-role-title {
    background-color: rgba(78, 52, 46, 0.85);
    color: #fdf5e6;
    padding: 5px 15px;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 10px;
    border: 1px solid #a1887f;
    margin-top: 0; /* Pro jistotu vynulujeme výchozí odsazení nadpisu */
}

.player-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.player-card {
    background: #fdf5e6;
    border: 2px solid #8d6e63;
    border-radius: 8px;
    padding: 10px;
    width: 200px;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.1s, background-color 0.2s;
}

.player-card:hover {
    transform: translateY(-3px);
    background-color: #fff;
}

/* --- ŠTÍTKY A KARTY HRÁČŮ --- */

/* Cenovky na kartách */
.price-tag {
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 4px;
    margin: 5px 0;
    padding: 2px;
}
.price-tag.buy {
    color: #166534;
    background-color: #dcfce7;
}
.price-tag.sell {
    color: #b91c1c;
    background-color: #fef2f2;
}

/* Karta reprezentující prázdné místo na střídačce */
.player-card.empty-slot {
    background-color: transparent;
    border: 2px dashed #a1887f;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #8d6e63;
    cursor: default;
}
.player-card.empty-slot:hover {
    transform: none; /* Prázdná karta by neměla povyskočit při najetí myši */
    background-color: rgba(255, 255, 255, 0.1);
}

/* Zvýraznění při kliknutí (když vybíráme hráče k výměně) */
.player-card.selected {
    background-color: #ffcc80;
    border-color: #e65100;
    transform: scale(1.05);
    box-shadow: 0 0 10px #e65100;
}

.player-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 2px;
    color: #1e3a8a;
    text-align: center;
    border-bottom: 2px solid rgba(0,0,0,0.1); /* Podtržení jména */
}

.player-position-row {
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 3px 0;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(0,0,0,0.1); /* Podtržení pozice */
    color: #374151;
}

.player-info-line {
    font-size: 0.85rem;
    color: #4b5563;
    text-align: center;
    margin-bottom: 3px;
}

.player-rank-text {
    font-size: 0.8rem;
    font-style: italic;
    color: #6b7280;
    text-align: center;
    margin-bottom: 5px;
}

.player-stars {
    color: #f59e0b; /* Krásná zlatá barva */
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 2px; /* Mírná mezera mezi hvězdami */
}

.player-stats {
    font-size: 0.85rem;
    display: grid;
    /* Změněno na jeden sloupec, aby se vešla celá slova, a mírně odsazeno */
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 5px;
}

/* Decentní "vytažení" statistik místo zeleného podbarvení */
.stat-item.highlighted {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 4px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.05);
    font-weight: normal;
    color: inherit;
}

.stat-item.highlighted span {
    color: #1e3a8a; /* Hodnota statu bude výraznější modrá */
    font-weight: bold;
}

.stat-item span {
    font-weight: bold;
    color: #d84315;
}


/* --- XP LIŠTA (Progress bar) --- */
.xp-bar-container {
    margin: 8px 0;
    background-color: #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    height: 12px;
    border: 1px solid #9ca3af;
    position: relative;
}

.xp-bar-fill {
    height: 100%;
    background-color: #3b82f6; /* Klasická modrá barva XP */
    transition: width 0.3s ease-in-out;
}

/* Modifikátor pro hráče na max levelu (Zlatá barva) */
.xp-bar-fill.maxed {
    background-color: #f59e0b; 
}

/* --- LOGIN OBRAZOVKA (Vylepšená) --- */
.login-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none; /* Zapíná JS přes flex */
    justify-content: center;
    align-items: center;
}

.login-box {
    background-color: #fdf5e6;
    border: 5px solid #8d6e63;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    width: 550px;
    max-width: 90%;
}

.login-title {
    color: #4e342e;
    margin-top: 0;
    font-size: 2.2rem;
    margin-bottom: 25px;
}

/* Hlavní řádek: Jméno + Tlačítko */
.login-input-group {
    display: flex;
    flex-wrap: wrap; /* Dovolí prvkům skočit pod sebe, když nezbývá místo */
    gap: 10px;
    margin-bottom: 20px;
}

.login-input {
    flex: 1;
    min-width: 200px; /* Zabrání tomu, aby se pole smrsklo do neviditelna */
    padding: 12px;
    font-size: 1.1rem;
    border: 2px solid #a1887f;
    border-radius: 5px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.btn-login-main {
    margin-top: 0;
    padding: 10px 20px; /* Vrátili jsme padding, aby tlačítko nebylo moc spláclé */
    white-space: normal; /* OPRAVA: Text se teď může hezky zalomit na dva řádky! */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Sekce výběru avatara */
.avatar-selection-container {
    border-top: 2px dashed #d7ccc8;
    margin-top: 20px;
    padding-top: 15px;
}

.avatar-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.avatar-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    object-fit: cover;
}

.avatar-img:hover { transform: scale(1.1); }
.avatar-img.selected {
    border-color: #166534;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(22, 101, 52, 0.5);
}

.login-footer {
    margin-top: 25px;
}

/* --- VYLEPŠENÍ SEKCE KANCELÁŘ --- */

/* 1. Stylový nadpis s tmavým pozadím */
.section-title {
    background-color: rgba(233, 227, 227, 0.75);
    color: #fdf5e6;
    padding: 10px 30px;
    border-radius: 8px;
    border: 2px solid #a1887f;
    display: inline-block;
    margin: 40px auto 20px auto;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* 3. Uspořádání a vzhled kartiček s úkoly */
.office-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap; /* Pokud se nevejdou vedle sebe, zalomí se dolů */
    margin-top: 100px;
}

.task-card {
    background-color: rgba(253, 245, 230, 0.95); /* Jemně průhledná krémová */
    border: 3px solid #8d6e63;
    border-radius: 12px;
    padding: 20px;
    width: 320px; /* Pevná šířka, už nebudou roztažené! */
    box-shadow: 5px 5px 15px rgba(0,0,0,0.4);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.task-card h3 {
    margin-top: 0;
    color: #4e342e;
    border-bottom: 2px solid #d7ccc8;
    padding-bottom: 10px;
}

/* Herní vzhled tlačítka 'Začít úkol' */
.btn-task {
    background-color: #166534;
    color: white;
    border: 2px solid #14532d;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-task:hover {
    background-color: #15803d;
    transform: translateY(-2px); /* Tlačítko po najetí myší povyskočí */
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

/* 2. Malé tlačítko pro odhlášení */
.btn-logout {
    background-color: #4b5563;
    color: white;
    border: 1px solid #374151;
    border-radius: 4px;
    padding: 3px 8px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.btn-logout:hover {
    background-color: #ef4444; /* Zčervená při najetí */
}

/* Styl pro jednotlivé položky surovin v horní liště */
.resource {
    margin-left: 30px; /* Tímto se položky od sebe krásně oddělí */
    display: inline-block; /* Pro jistotu, aby texty zůstaly hezky v řádku */
}

/* === SEKCE ZÁPASY A LIGOVÁ TABULKA === */

.next-match-card {
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    max-width: 550px;
    margin: 0 auto 30px auto;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.league-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
    background-color: rgba(253, 245, 230, 0.95);
    border: 3px solid #8d6e63;
    border-radius: 8px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
    /* Nutné pro zaoblené rohy u tabulky: */
    overflow: hidden; 
}

.league-table th, .league-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #d7ccc8;
}

.league-table th {
    background-color: #4e342e;
    color: #fdf5e6;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Zvýraznění sudých řádků pro lepší čitelnost */
.league-table tbody tr:nth-child(even) {
    background-color: rgba(215, 204, 200, 0.3);
}

/* ZELENÁ linka pro top 2 postupující týmy */
.league-table tbody tr:nth-child(1),
.league-table tbody tr:nth-child(2) {
    border-left: 6px solid #166534;
}

/* ČERVENÁ linka pro poslední 2 sestupující týmy */
.league-table tbody tr:nth-child(9),
.league-table tbody tr:nth-child(10) {
    border-left: 6px solid #dc2626;
}

/* Speciální řádek pro tým hráče */
.player-team-row {
    background-color: rgba(245, 158, 11, 0.25) !important;
    font-weight: bold;
    color: #92400e;
}

/* --- SKAUTING SOUPEŘE (PvE) --- */
.scouting-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(0,0,0,0.85);
    border-radius: 10px;
    padding: 25px;
    border: 3px solid #fcd34d;
    box-shadow: 0 10px 25px rgba(0,0,0,0.7);
}

.scouting-title {
    color: #fca5a5;
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px black;
}

.scouting-desc {
    color: #e5e7eb;
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.5;
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 5px;
}

.scouting-note {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    line-height: 1.4;
}

.scouting-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    text-align: left;
}

.stat-box {
    background: rgba(0,0,0,0.6);
    padding: 10px 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-box.full-width {
    grid-column: span 2;
}

.stat-label {
    color: #f3f4f6;
    font-weight: bold;
}

.stat-val {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Specifické barvy pro jednotlivé atributy */
.stat-atk { border-left: 4px solid #f87171; } .stat-atk .stat-val { color: #f87171; }
.stat-def { border-left: 4px solid #60a5fa; } .stat-def .stat-val { color: #60a5fa; }
.stat-spd { border-left: 4px solid #fcd34d; } .stat-spd .stat-val { color: #fcd34d; }
.stat-str { border-left: 4px solid #fb923c; } .stat-str .stat-val { color: #fb923c; }
.stat-eng { border-left: 4px solid #a78bfa; } .stat-eng .stat-val { color: #a78bfa; }
.stat-gk  { border-left: 4px solid #34d399; } .stat-gk  .stat-val { color: #34d399; }
.stat-tek { border-left: 4px solid #38bdf8; } .stat-tek .stat-val { color: #38bdf8; }


/* --- ZÁZNAM UTKÁNÍ A MINIATURA HŘIŠTĚ --- */
.match-report-header {
    position: relative; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-bottom: 20px; 
    padding-top: 10px;
}

.match-report-board {
    text-align: center; 
    margin-bottom: 20px; 
    background: rgba(0,0,0,0.6); 
    padding: 20px; 
    border-radius: 12px; 
    border: 2px solid #8d6e63; 
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
}

.match-report-layout {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: flex-start;
    margin-top: 20px;
}

.score-container {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    max-width: 550px; 
    margin: 0 auto 15px auto;
}

.team-name-home { font-size: 1.5rem; font-weight: bold; color: #60a5fa; flex: 1; text-align: right; text-shadow: 1px 1px 2px black; }
.team-name-away { font-size: 1.5rem; font-weight: bold; color: #ef4444; flex: 1; text-align: left; text-shadow: 1px 1px 2px black; }
.match-score { 
    font-size: 3.5rem; 
    font-family: 'Courier New', monospace; 
    font-weight: bold; 
    color: #fcd34d; 
    margin: 0 20px; 
    text-shadow: 3px 3px 6px black; 
    background: rgba(0,0,0,0.5); 
    padding: 5px 20px; 
    border-radius: 8px; 
}

/* Samotné 1D hřiště */
.pitch-1d {
    position: relative; 
    width: 100%; 
    height: 100px; 
    background: repeating-linear-gradient(90deg, #15803d, #15803d 10%, #166534 10%, #166534 20%); 
    border: 3px solid rgba(255,255,255,0.8); 
    border-radius: 6px; 
    overflow: hidden; 
    box-shadow: inset 0 0 10px rgba(0,0,0,0.6);
}

/* Vodoznaky (texty na trávě) */
.pitch-watermark {
    position: absolute; 
    top: 50%; 
    color: rgba(255,255,255,0.15); 
    font-weight: bold; 
    pointer-events: none;
}
.wm-box-l { left: 7.5%; transform: translate(-50%, -50%) rotate(-90deg); font-size: 0.75rem; letter-spacing: 2px; }
.wm-def-l { left: 25%; transform: translate(-50%, -50%); font-size: 0.9rem; letter-spacing: 2px; }
.wm-mid   { left: 50%; transform: translate(-50%, -50%); font-size: 1.1rem; letter-spacing: 5px; white-space: nowrap; }
.wm-def-r { left: 75%; transform: translate(-50%, -50%); font-size: 0.9rem; letter-spacing: 2px; }
.wm-box-r { left: 92.5%; transform: translate(-50%, -50%) rotate(90deg); font-size: 0.75rem; letter-spacing: 2px; }

/* Čáry na hřišti */
.pitch-line-solid { position: absolute; border: 2px solid rgba(255,255,255,0.6); }
.pitch-line-dashed { position: absolute; top: 0; bottom: 0; width: 2px; border-left: 2px dashed rgba(255,255,255,0.3); }

/* Vápna a střed */
.pitch-box-large-l { left: 0; top: 15%; bottom: 15%; width: 15%; border-left: none; }
.pitch-box-small-l { left: 0; top: 35%; bottom: 35%; width: 5%; border-left: none; }
.pitch-box-large-r { right: 0; top: 15%; bottom: 15%; width: 15%; border-right: none; }
.pitch-box-small-r { right: 0; top: 35%; bottom: 35%; width: 5%; border-right: none; }
.pitch-center-line { left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,0.6); transform: translateX(-50%); }
.pitch-center-circle { left: 50%; top: 50%; width: 20px; height: 20px; border-radius: 50%; transform: translate(-50%, -50%); }

/* Míč */
.pitch-ball {
    position: absolute; 
    top: 50%; 
    transform: translate(-50%, -50%); 
    font-size: 2rem; 
    /* Parádní fyzika kopu */
    transition: left 1.1s ease-in-out;
    z-index: 10; 
    filter: drop-shadow(3px 5px 4px rgba(0,0,0,0.8));
}

.pitch-labels {
    display: flex; 
    justify-content: space-between; 
    font-size: 0.9rem; 
    color: #9ca3af; 
    margin-top: 8px; 
    text-transform: uppercase; 
    font-weight: bold; 
    letter-spacing: 1px;
}

.replay-window-container {
    background: #111827; 
    padding: 20px; 
    height: 400px; 
    overflow-y: auto; 
    border: 4px solid #374151; 
    border-radius: 10px; 
    max-width: 800px; 
    margin: 0 auto; 
    box-shadow: inset 0 0 20px rgba(0,0,0,1);
}

.max-level-badge {
    color: #fcd34d;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
    margin-left: 5px; /* Drobná mezera od samotného čísla levelu */
}

/* --- UNIVERZÁLNÍ KOMPONENTY (Nové) --- */

/* Informační panely (Trénink, Šatna, Kancelář) */
.info-box {
    background-color: rgba(0, 0, 0, 0.75);
    color: #fdf5e6;
    padding: 15px 30px;
    border-radius: 8px;
    border: 2px solid #a1887f;
    max-width: 650px;
    margin: 0 auto 20px auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    text-align: center;
}

/* Variace info panelů */
.info-box.warning {
    border-color: #ef4444;
}
.info-box.success {
    border-color: #10b981;
}

/* Modifikátory textu v JS */
.text-highlight-gold {
    color: #fcd34d;
    font-weight: bold;
}
.text-muted {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Flexibilní řádky pro statistiky (Trénink) */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Speciální tlačítka (např. plusko v tréninku) */
.btn-small-add {
    margin-left: 10px;
    padding: 2px 8px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}
.btn-small-add:hover {
    background: #059669;
}

/* --- INFORMAČNÍ PANELY --- */
.info-panel {
    background-color: rgba(0, 0, 0, 0.75);
    color: #fdf5e6;
    padding: 15px 25px;
    border-radius: 8px;
    border: 2px solid #f59e0b;
    max-width: 600px;
    margin: 0 auto 25px auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- POŠTA --- */
.mail-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(0,0,0,0.7);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #8d6e63;
}

.mail-message {
    background: #fdf5e6;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 5px;
    color: #4e342e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid #9ca3af; /* Výchozí šedá pro přečtené */
    box-shadow: none; /* Výchozí stav bez stínu */
}

/* Zvýraznění nepřečtené zprávy */
.mail-message.unread {
    border-left-color: #d84315; /* Změníme levou čáru na oranžovou */
    box-shadow: 0 4px 6px rgba(216, 67, 21, 0.3); /* Přidáme stín */
}

/* --- NOTIFIKAČNÍ BANNERY (Upozornění na poštu) --- */
.notification-banner {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border: 2px solid #fcd34d;
    cursor: pointer;
    animation: pulse 2s infinite; /* Tady voláme animaci pulzování */
}

/* Modifikátor pro větší verzi banneru (do Podzemí) */
.notification-banner.large {
    padding: 30px;
    max-width: 600px;
    margin: 0 auto 20px auto;
}

/* Samotná animace pulzování */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* --- VELKÉ ODPOČTY ČASU --- */
.huge-timer {
    font-size: 2.5rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #f59e0b; /* Výchozí oranžová (Zápasy, Podzemí) */
    margin: 15px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Modifikátor pro červenou barvu (Kancelář) */
.huge-timer.danger {
    color: #d84315;
}

/* Červené testovací/přeskakovací tlačítko */
.btn-test {
    background-color: #ef4444 !important; /* !important zajistí, že přebije základní barvu btn-task */
    border-color: #b91c1c !important;
    color: white;
    margin-top: 10px;
}

.btn-test:hover {
    background-color: #dc2626 !important;
}

/* Široké akční tlačítko (použijeme v Podzemí nebo v Zápasech) */
.btn-full-width {
    width: 100%;
    font-size: 1.2rem;
    padding: 15px;
}

/* --- HODNOCENÍ TÝMŮ V ZÁZNAMU UTKÁNÍ --- */
.rating-panel {
    width: 220px;
    background: rgba(0,0,0,0.6);
    border: 2px solid #8d6e63;
    border-radius: 10px;
    padding: 20px 15px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.rating-panel-title {
    margin: 0 0 20px 0;
    border-bottom: 1px dashed #6b7280;
    padding-bottom: 10px;
    text-align: center;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px black;
}

.rating-panel.home .rating-panel-title { color: #60a5fa; } /* Modrá pro domácí */
.rating-panel.away .rating-panel-title { color: #ef4444; } /* Červená pro hosty */

.rating-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.rating-row.last {
    margin-bottom: 0;
}

.rating-row span {
    color: #d1d5db; /* Tvá oblíbená světle šedá */
}

.rating-row strong {
    color: white;
}

/* --- SDÍLENÉ KOMPONENTY (Rozbalovací panely) --- */
.collapsible-box {
    margin-top: 20px;
    background: rgba(0,0,0,0.4);
    border: 2px solid #8d6e63; /* Výchozí hnědá barva */
    border-radius: 8px;
    padding: 10px;
}

/* Modrá varianta boxu */
.collapsible-box.blue {
    border-color: #3b82f6;
}

.collapsible-header {
    color: #fdf5e6;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 5px;
    text-align: center;
    list-style: none; /* Skryje ošklivou výchozí šipku */
}

/* Společný styl pro informační text bez odsazení */
.info-text-base {
    margin: 0;
    font-size: 1rem;
}

/* --- KANCELÁŘ --- */
.office-stats-box {
    text-align: right;
    background: rgba(245, 158, 11, 0.2);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #f59e0b;
}

.office-stats-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #fcd34d;
}

.office-stats-val {
    font-size: 1.5rem;
    font-weight: bold;
    color: #10b981;
}

.active-task-card {
    background-color: #fdf5e6;
    border: 3px solid #8d6e63;
    border-radius: 10px;
    padding: 25px;
    max-width: 500px;
    margin: 30px auto;
    text-align: center;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
}

.active-task-title {
    color: #1e3a8a;
    margin-top: 0;
    border-bottom: 2px solid #a1887f;
    padding-bottom: 10px;
}

.active-task-flavor {
    font-style: italic;
    color: #5d4037;
    font-size: 1.1rem;
    margin: 20px 0;
    line-height: 1.5;
}

/* Pomocná třída pro vycentrování nadpisů sekcí - využijeme ji u více obrazovek */
.text-center {
    text-align: center;
}

/* --- ŠATNA A SESTAVA --- */
.formation-label {
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 10px;
}

.formation-select {
    padding: 6px 10px;
    font-size: 1rem;
    border-radius: 5px;
    background-color: #fdf5e6;
    color: #4e342e;
    font-weight: bold;
    border: 2px solid #8d6e63;
    cursor: pointer;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.formation-hint {
    font-style: italic;
    color: #fcd34d;
    margin: 0 0 10px 0;
    font-size: 1.05rem;
}

/* Modifikátor pro sekci střídačky (tmavší) */
.bench-section {
    background-color: rgba(0,0,0,0.4);
    border-color: #5d4037;
    margin-top: 20px;
}

.bench-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #8d6e63;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.bench-title {
    margin: 0;
    color: #fdf5e6;
}

/* Tlačítka pro režim prodeje */
.btn-sell-mode {
    padding: 8px 15px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    transition: 0.2s;
    color: white;
}

.btn-sell-inactive { background-color: #f59e0b; }
.btn-sell-active { background-color: #ef4444; }

.sell-warning-text {
    text-align: center;
    margin: 0 0 15px 0;
    color: #fca5a5;
    font-weight: bold;
    background-color: rgba(220, 38, 38, 0.2);
    padding: 5px;
    border-radius: 4px;
}

/* Modifikátor pro zlatý rozbalovací box (Trezor) */
.collapsible-box.gold {
    border-color: #f59e0b;
    margin-top: 30px;
}

/* Styly pro karty v trezoru */
.inventory-card {
    border-style: solid;
    border-color: #8d6e63;
    background: #fffbeb;
    width: 180px;
}

.inventory-slot-empty {
    width: 180px;
    min-height: 80px;
    border-style: dashed;
    opacity: 0.5;
}

.inventory-item-name {
    font-weight: bold;
    color: #b45309;
    font-size: 0.9rem;
}

.inventory-item-duration {
    font-size: 0.75rem;
    margin: 5px 0;
}

.btn-discard {
    background: #ef4444;
    border: none;
    padding: 3px 8px;
    font-size: 0.7rem;
}
.btn-discard:hover {
    background: #dc2626;
}

/* --- STADION (ÚKLID) --- */
.stadium-subtitle {
    text-align: center;
    color: white;
    margin-bottom: 20px;
}

.active-build-container {
    margin-bottom: 30px;
}

/* Zvýrazněný text pro bonusy budov */
.building-bonus-text {
    margin-bottom: 10px;
    color: #b45309;
    font-weight: bold;
}

/* Speciální box pro pokladnu obchodu */
.shop-safe-box {
    margin: 10px 0;
    padding: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    border: 1px solid #cbd5e1;
    text-align: center;
}

.shop-safe-amount {
    color: #10b981;
    font-size: 1.1rem;
    font-weight: bold;
}

.btn-collect-safe {
    padding: 8px 10px;
    font-size: 0.9rem;
    margin-top: 8px;
    width: 100%;
}

/* Box pro budovy na maximálním levelu */
.building-stats-maxed {
    text-align: center;
    background: #fef3c7;
    border-color: #f59e0b;
}

.maxed-title {
    color: #b45309;
    font-weight: bold;
}

.maxed-desc {
    font-size: 0.8rem;
    margin: 5px 0 0 0;
}

/* --- SKAUTING (ÚKLID) --- */
.scout-info-box {
    max-width: 700px;
}

.scout-timer-text {
    color: #f59e0b;
    font-family: monospace;
    font-size: 1.3rem;
    font-weight: bold;
}

/* Rozbalovací box pro detaily pravděpodobností */
.scout-details-box {
    margin-top: 15px;
    text-align: left;
    background: rgba(0,0,0,0.4);
    border: 1px solid #8d6e63;
    border-radius: 5px;
    padding: 10px;
}

.scout-details-summary {
    cursor: pointer;
    color: #fcd34d;
    font-weight: bold;
    list-style: none;
}

.scout-odds-container {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #e5e7eb;
}

.scout-odds-col {
    flex: 1;
}

.scout-odds-title {
    color: #60a5fa;
    font-weight: bold;
}

.scout-odds-list {
    margin: 5px 0;
    padding-left: 20px;
}

.scout-note {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 10px;
    font-style: italic;
}

/* --- ZÁPASY A LIGA (ÚKLID) --- */
.season-timer-box {
    background: rgba(0,0,0,0.8);
    color: #fcd34d;
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid #f59e0b;
    display: inline-block;
    margin-top: 10px;
    font-size: 0.9rem;
}

.season-timer-text {
    font-family: monospace;
    font-weight: bold;
}

.next-match-title {
    margin-top: 0;
    color: #fcd34d;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.vs-text-container {
    font-size: 1.3rem;
    margin: 15px 0;
}

/* Týmové barvy a odznáček VS */
.team-home-text { color: #60a5fa; font-weight: bold; }
.team-away-text { color: #ef4444; font-weight: bold; }
.vs-badge { color: #9ca3af; font-size: 1rem; margin: 0 10px; font-weight: bold; }

/* Řádek pro testovací tlačítka */
.match-buttons-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.match-buttons-row .btn-task {
    flex: 1;
    padding: 10px;
}

/* Specifické barvy pro testovací tlačítka */
.btn-play-now { background-color: #ef4444; border-color: #b91c1c; }
.btn-sim-season { background-color: #7c2d12; border-color: #450a0a; }

.prepare-text {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 15px;
}

/* Obal ligové tabulky */
.league-table-wrapper {
    border-radius: 8px;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    border: 3px solid #8d6e63;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5);
}

/* Dynamické barvy pro tabulku */
.table-pos-up { color: #166534; }
.table-pos-down { color: #dc2626; }

/* --- PODZEMÍ (PvE) - ÚKLID --- */
.pve-unread-banner-text {
    font-size: 1.1rem;
    line-height: 1.5;
    font-weight: normal;
}

.pve-dungeon-description {
    color: #fdf5e6;
    font-style: italic;
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 5px;
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.pve-stage-card {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(0,0,0,0.8);
    border-radius: 10px;
    padding: 25px;
    border: 3px solid #8d6e63;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* Speciální styl pro Boss karty */
.pve-stage-card.is-boss {
    border-color: #ef4444;
}

.pve-card-header {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pve-badge {
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.pve-badge.normal { background: #4b5563; }
.pve-badge.boss { background: #ef4444; }

.pve-opponent-title {
    text-align: center;
    font-size: 1.8rem;
    margin: 0 0 10px 0;
}

.pve-reward-box {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pve-reward-header {
    color: #10b981;
    margin: 0 0 10px 0;
    text-align: center;
}

.pve-cooldown-box {
    background: rgba(0,0,0,0.5);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.pve-cooldown-label {
    color: #9ca3af;
    margin: 0 0 10px 0;
}

.pve-warning-box {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-weight: bold;
    border: 1px solid #ef4444;
}

/* --- SKAUTING SOUPEŘE V LIZE (ÚKLID) --- */
.opponent-scout-header {
    text-align: center;
    position: relative;
    margin-bottom: 20px;
}

.btn-back-absolute {
    position: absolute;
    left: 0;
    top: 0;
    padding: 10px 20px;
    background: #4e342e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.btn-back-absolute:hover {
    background: #3e2723;
}

.opponent-hint-box {
    background-color: rgba(0, 0, 0, 0.85);
    color: #fdf5e6;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #ef4444;
    max-width: 500px;
    margin: 0 auto;
}

.opponent-hint-title {
    margin: 0;
    color: #fca5a5;
}

.opponent-hint-text {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
}

/* --- POŠTA (DOPLNĚNÍ ÚKLIDU) --- */
.mail-empty-text {
    color: white;
    margin-top: 20px;
}

.mail-msg-title {
    font-size: 1.1rem;
}

.mail-msg-date {
    font-size: 0.8rem;
    color: #8d6e63;
}

.mail-msg-score-text {
    font-weight: bold;
}

/* Tlačítka pro přehrání záznamu */
.btn-replay-read {
    background-color: #4b5563;
    border-color: #374151;
    padding: 5px 15px;
}

.btn-replay-unread {
    background-color: #166534;
    border-color: #14532d;
    padding: 5px 15px;
}

/* --- BARVY KARET PODLE POZIC --- */
.player-card.pos-att { background-color: #fee2e2 !important; border-color: #f87171; } /* Světle červená */
.player-card.pos-mid { background-color: #e0f2fe !important; border-color: #7dd3fc; } /* Světle modrá */
.player-card.pos-def { background-color: #f0fdf4 !important; border-color: #86efac; } /* Světle zelená */
.player-card.pos-gk  { background-color: #ffffff !important; border-color: #d1d5db; } /* Bílá */

/* Styl pro národnost na kartě */
.player-nationality {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 5px;
}

/* =========================================
   🏆 SEKCE MINILIGA
========================================= */

.minileague-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(20, 20, 20, 0.9);
}

.minileague-menu-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.minileague-card {
    background: #374151;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #4b5563;
}

.minileague-card-title {
    margin-top: 0;
    margin-bottom: 5px;
}
.minileague-card-title.yellow { color: #fcd34d; }
.minileague-card-title.blue { color: #60a5fa; }
.minileague-card-title.purple { color: #a78bfa; }

.minileague-card-desc {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 15px;
}

.minileague-btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.minileague-input {
    padding: 10px;
    border-radius: 5px;
    border: none;
    width: 60%;
    font-family: inherit;
}

/* Specifické barvy tlačítek */
.btn-create-league { background-color: #059669; }
.btn-create-league:hover { background-color: #047857; }

.btn-join-league { background-color: #2563eb; }
.btn-join-league:hover { background-color: #1d4ed8; }

.btn-my-leagues { background-color: #7c3aed; font-size: 1.1rem; padding: 15px; }
.btn-my-leagues:hover { background-color: #6d28d9; }

/* --- TABULKA V MINILIZE (Kopie vzhledu hlavní ligy) --- */
.minileague-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #fdf6e3; /* Světlý pergamenový základ */
    color: #333;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.minileague-table th {
    background: #4e342e; /* Tmavě hnědá hlavička */
    color: white;
    padding: 12px 10px;
    font-size: 0.9rem;
}

.minileague-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.minileague-table tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.03); /* Lehké odlišení sudých řádků */
}

.minileague-table tr:hover {
    background: rgba(0, 0, 0, 0.08); /* Zvýraznění po najetí myší */
}

/* Zvýraznění tvého vlastního týmu v tabulce */
.minileague-table tr.my-team-row {
    background: rgba(245, 158, 11, 0.2); /* Jemně oranžové podbarvení */
    font-weight: bold;
}

.ml-team-name {
    color: #2563eb; /* Modrý text pro název manažera/týmu */
    font-weight: bold;
}

/* Rolovací sekce Šatna v detailu miniligy */
.minileague-locker-accordion {
    margin-top: 30px;
    border: 2px solid #4b5563;
    border-radius: 8px;
    overflow: hidden;
}

.locker-header {
    background: #374151;
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #fcd34d;
}

.locker-header:hover { background: #4b5563; }

.locker-content {
    padding: 20px;
    background: rgba(30, 30, 30, 0.8);
    display: none; /* Skryté, dokud se nerozklikne */
}

.locker-content.active { display: block; }

/* Strukturovaná šatna v minilize */
.ml-pitch-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.ml-pitch-row {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 5px;
}

.ml-row-title {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    margin-bottom: 8px;
    border-bottom: 1px solid #4b5563;
    display: block;
}

.ml-bench-area {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 10px;
    border: 2px dashed #4b5563;
}

/* Tlačítko pro režim odebrání */
.btn-ml-remove {
    background-color: #991b1b;
    font-size: 0.8rem;
    padding: 5px 15px;
}
.btn-ml-remove.active {
    background-color: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

.player-card.ml-selected {
    border: 2px solid #fcd34d;
    transform: scale(1.05);
}


/* =========================================
   📦 REZERVA TÝMU
========================================= */
.reserve-accordion {
    margin-top: 20px;
    border: 2px solid #3b82f6; /* Modrá barva pro odlišení */
    border-radius: 8px;
    overflow: hidden;
}

.reserve-header {
    background: #1e3a8a;
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #fcd34d;
}

.reserve-header:hover { background: #1e40af; }

.reserve-filters {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid #4b5563;
    background: #374151;
    color: white;
    cursor: pointer;
    font-size: 0.8rem;
}

.filter-btn.active {
    background: #3b82f6;
    border-color: #fcd34d;
}

.btn-reserve-action {
    width: 100%;
    margin-top: 5px;
    font-size: 0.75rem;
    padding: 6px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.btn-to-bench { background: #059669; color: white; }
.btn-to-ml { background: #7c3aed; color: white; }
.btn-to-reserve { background: #3b82f6; color: white; }

.reserve-content.active { display: block !important; }


/* Překrytí pro výběr miniligy */
.ml-selector-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}

.ml-selector-box {
    background: #1f2937;
    border: 2px solid #fcd34d;
    border-radius: 10px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.ml-selector-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ml-select-item {
    background: #374151;
    color: white;
    border: 1px solid #4b5563;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: bold;
}

.ml-select-item:hover {
    background: #7c3aed;
    border-color: #fcd34d;
}

.btn-close-selector {
    margin-top: 20px;
    background: #4b5563;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* ============================================================
   RESPONZIVITA - MOBILNÍ VERZE (Obrazovky pod 768px)
   ============================================================ */
@media (max-width: 768px) {
    /* 1. Hlavní kontejner a prostor pro spodní lištu */
    #container {
        flex-direction: column;
        padding: 5px;
        gap: 5px;
    }

    #main-content {
        padding-bottom: 80px !important; /* Dělá místo pro fixní lištu dole */
        border-width: 2px;
    }

    /* 2. Úprava hlavičky - přehledný grid */
    #top-bar {
        height: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 10px;
        gap: 5px;
        line-height: 1.4;
    }

    .manager-profile {
        grid-column: span 2;
        justify-content: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 8px;
        margin-bottom: 5px;
    }

    .resource {
        margin: 0;
        padding: 5px;
        font-size: 0.85rem;
        text-align: center;
        border: none;
        background: rgba(0,0,0,0.2);
        border-radius: 4px;
    }

    .resource:last-child {
        grid-column: span 2;
        background: rgba(245, 158, 11, 0.15);
    }

    /* 3. Pravá mobilní spodní lišta (přilepená trvale dole) */
    #sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: row; 
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px 5px;
        background: #2e4c16;
        border-top: 2px solid #8d6e63;
        z-index: 1000;
        box-shadow: 0 -4px 10px rgba(0,0,0,0.4);
        gap: 10px;
    }

    .nav-btn {
        flex: 0 0 auto; 
        white-space: nowrap;
        margin: 0;
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .nav-btn.active {
        transform: translateY(-3px); 
    }
    /* sekce 4 sloužila pro stadion, šatnu a trénink - poskládání vedle sebe. Není ale nutná, protože styly jsou již nadefinovány v základu */

    /* 5. Záznam utkání v Poště - Hlavička a názvy týmů */
    .match-report-header {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .match-report-header button {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .match-report-header .section-title {
        width: 100% !important;
        font-size: 1.4rem !important;
        box-sizing: border-box;
    }

    .score-container {
        width: 100% !important;
        padding: 0 5px !important;
        box-sizing: border-box;
    }
    
    .team-name-home, .team-name-away {
        font-size: 0.9rem !important;
        max-width: 35% !important;
        word-wrap: break-word !important;
        line-height: 1.2 !important;
    }

    .pitch-watermark { 
        display: none; /* Skryje obří vodoznaky, ať je vidět míč */
    }

    /* 6. Záznam utkání v Poště - Přeskládání tabulek a komentáře */
    .match-report-layout {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    #replay-window {
        order: 1 !important;
        height: 180px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 15px !important;
    }

    .rating-panel.home {
        order: 2 !important;
        width: 100% !important;
        max-width: 350px !important;
        margin-bottom: 10px !important;
    }
    
    .rating-panel.away {
        order: 3 !important;
        width: 100% !important;
        max-width: 350px !important;
    }
    /* Zmenšení a vycentrování bloku s koncem sezóny */
    .resource:last-child {
        grid-column: span 2;
        background: rgba(245, 158, 11, 0.15);
        margin-left: 0 !important; /* Vyruší to obří 30px odsazení z HTML */
        padding: 5px !important;
        border-left: none !important;
        font-size: 0.9rem; /* Lehce menší text */
    }

    /* Schováme oranžové a červené testovací tlačítko na mobilu */
    #top-bar .resource button {
        display: none !important;
    }

}
