/* ================================================
   HC BYSTŘEC - VLASTNÍ STYLY 
   Moderní hokejové téma pro web
   ================================================ */

/* === BAREVNÉ SCHÉMA === */
:root {
    --primary-blue: #1565C0;        /* Hlavní modrá - hokejový led */
    --secondary-red: #D73527;       /* CHL červená */
    --secondary-green: #228B22;     /* LHL zelená */
    --dark-gray: #2C3E50;          /* Tmavě šedá */
    --light-gray: #F8F9FA;         /* Světle šedá */
    --accent-orange: #FF6B35;      /* Akcentní oranžová */
    --text-dark: #343A40;          /* Tmavý text */
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-medium: rgba(0,0,0,0.15);
    --transition-smooth: all 0.3s ease;
}

/* === ZÁKLADNÍ LAYOUT === */

/* Fix pro hostingové panely Endory */
body {
    /* Navbar nahoře (50px) + Endora panel + rezerva = 70px */
    padding-top: 70px !important;      /* Trochu zvětšené z 60px pro viditelnost */
    padding-bottom: 70px !important;   /* Spodní fixed panel + rezerva */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Stylování Endora panelu aby lépe zapadl do designu */
.endora-panel {
    background: linear-gradient(135deg, var(--light-gray) 0%, #E1E8F0 100%) !important;
    box-shadow: 0 2px 8px var(--shadow-light) !important;
    backdrop-filter: blur(5px) !important;
    /* Reset všech nežádoucích mezer */
    padding: 0 10px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    z-index: 1020 !important; /* Pod navbar ale nad obsahem */
}

/* Horní Endora panel - MINIMÁLNÍ POSUN */
.endora-panel:not(.bottom) {
    position: relative !important;
    top: -20px !important; /* Ještě menší posun kvůli agresivním margin */
    margin-top: 0px !important; 
    margin-bottom: 0 !important; 
    border-bottom: 2px solid var(--primary-blue) !important;
}

/* Spodní Endora panel - ohraničení nahoře */
.endora-panel.bottom {
    border-top: 2px solid var(--primary-blue) !important;
    box-shadow: 0 -2px 8px var(--shadow-light) !important; /* Stín nahoře místo dole */
}

/* Vizuální efekt nad spodním panelem */
.endora-panel.bottom::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-blue) 50%, transparent 100%);
}

/* MÍRNÉ posunutí hlavního obsahu nahoru */
.container {
    margin-top: -15px !important; /* Mírnější negativní margin aby text zůstal viditelný */
}

/* První tabulka na stránce */
table:first-of-type {
    margin-top: 5px !important; /* Pozitivní margin pro lepší viditelnost */
}

/* Nadpisy mírně nahoru ale viditelné */
.nadpisy {
    margin-top: 10px !important; /* Pozitivní margin pro viditelnost */
    margin-bottom: 15px !important;
}

/* Zlepšit typography Endora panelu */
.endora-panel-text {
    color: var(--text-dark) !important;
    font-weight: 500 !important;
}

.endora-panel-text-span {
    color: var(--primary-blue) !important;
    font-weight: 700 !important;
}

/* Přizpůsobit tlačítko Endora panelu */
.endora-panel-btn {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #FF8A65 100%) !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3) !important;
    transition: var(--transition-smooth) !important;
}

.endora-panel-btn:hover {
    background: linear-gradient(135deg, #FF8A65 0%, var(--accent-orange) 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4) !important;
}

.container {
    margin-bottom: 20px;
}

/* === TYPOGRAFIE === */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 1rem;
}

.nadpisy {
    font-size: 1.75rem !important; /* Zvětšené z 1.25rem */
    font-weight: 700 !important;
    color: var(--primary-blue) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px !important;
    margin-top: 25px !important;
    display: block;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* === NAVIGACE === */
.navbar-inverse {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0D47A1 100%);
    border: none;
    box-shadow: 0 2px 10px var(--shadow-medium);
    z-index: 1030; /* Zajistí, že navbar bude nad Endora panelem */
}

/* Navbar zůstává nahoře */
.navbar-fixed-top {
    top: 0 !important; /* Navbar je úplně nahoře */
}

/* Propojení navbar s Endora panelem - vizuální kontinuita */
.navbar-inverse::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-blue) 50%, transparent 100%);
}

.navbar-inverse .navbar-brand {
    color: white !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-inverse .navbar-nav > li > a {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: var(--transition-smooth);
}

.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > .open > a {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* === TLAČÍTKA === */
.btn {
    border-radius: 6px;
    transition: var(--transition-smooth);
    font-weight: 500;
    border: none;
    box-shadow: 0 2px 4px var(--shadow-light);
}

.btn-default {
    background: linear-gradient(135deg, #6C757D 0%, #495057 100%);
    color: white;
    border: 1px solid transparent;
}

.btn-default:hover {
    background: linear-gradient(135deg, #5A6268 0%, #3D4449 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-medium);
}

/* LHL a CHL specifická tlačítka */
.btn-lhl {
    background: linear-gradient(135deg, var(--secondary-green) 0%, #1F7A1F 100%);
    color: white;
}

.btn-lhl:hover {
    background: linear-gradient(135deg, #1F7A1F 0%, #1A6B1A 100%);
    color: white;
    transform: translateY(-2px);
}

.btn-chl {
    background: linear-gradient(135deg, var(--secondary-red) 0%, #C62D20 100%);
    color: white;
}

.btn-chl:hover {
    background: linear-gradient(135deg, #C62D20 0%, #B02A1E 100%);
    color: white;
    transform: translateY(-2px);
}

/* === PANELY A KARTY === */
.panel {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-light);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-medium);
}

.panel-default {
    background: white;
}

.panel-default > .panel-heading {
    background: linear-gradient(135deg, var(--light-gray) 0%, #E9ECEF 100%);
    border: none;
    color: var(--text-dark);
    font-weight: 600;
}

/* === TABULKY === */
.table {
    margin-bottom: 0;
    background: white;
}

.table th {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0D47A1 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 12px 8px;
}

.table-hover > tbody > tr:hover {
    background-color: #F1F8FF;
    transform: scale(1.005);
    transition: var(--transition-smooth);
}

.table-bordered {
    border: 1px solid #E9ECEF;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #E9ECEF;
}

/* Zebra striping pro lepší čitelnost */
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #FAFBFC;
}

/* === SPECIFICKÉ HOKEJOVÉ STYLY === */

/* LHL tabulky */
.table.lhl th {
    background: linear-gradient(135deg, var(--secondary-green) 0%, #1F7A1F 100%);
}

.table.lhl tr:hover {
    background-color: #F0FFF0 !important;
}

/* CHL tabulky */
.table.chl th {
    background: linear-gradient(135deg, var(--secondary-red) 0%, #C62D20 100%);
}

.table.chl tr:hover {
    background-color: #FFF0F0 !important;
}

/* === SOUPISKA STYLY === */
.soupiska .table {
    font-size: 1rem; /* Zvětšeno z 0.9rem pro lepší čitelnost */
}

.soupiska th {
    text-align: center;
    padding: 10px 5px;
    font-size: 1rem; /* Také zvětšené záhlaví */
}

.soupiska td {
    vertical-align: middle;
    padding: 8px 5px;
}

/* === STATISTIKY STYLY === */
/* Zvětšení textu pro statistiky */
.statistiky .table {
    font-size: 1rem; /* Mírné zvětšení pro lepší čitelnost */
}

.statistiky .table th {
    font-size: 1rem; /* Zvětšené záhlaví */
}

/* ULTRA AGRESIVNÍ odstranění tučného písma ze všech sloupců statistik */
.statistiky .table td,
.statistiky .table td:first-child,
.statistiky .table td:nth-child(1),
.statistiky .table td:nth-child(2), 
.statistiky .table td:nth-child(3),
.statistiky .table td:nth-child(4),
.statistiky .table td:nth-child(5),
.statistiky .table td:nth-child(6),
.statistiky .table td:nth-child(7),
.statistiky .table td:nth-child(8) {
    font-weight: 400 !important; /* Normální font-weight */
    color: var(--text-dark) !important; /* Černá barva textu */
    font-size: 1rem !important; /* Větší text v buňkách */
}

/* Přepis specifických Bootstrap stylů */
.statistiky .table-hover > tbody > tr > td {
    font-weight: 400 !important;
    color: var(--text-dark) !important;
    font-size: 1rem !important; /* Konzistentní velikost */
}

/* Přepis pro malé tabulky */
.statistiky .table.small td,
.statistiky .table.table-condensed td {
    font-weight: 400 !important;
    color: var(--text-dark) !important;
    font-size: 1rem !important; /* Zvětšeno i pro "malé" tabulky */
}

/* === ROZPIS A ZÁPASY === */
.rozpis-index {
    margin: 2rem 0;
}

.last-matches th {
    font-size: 0.8rem;
    padding: 8px 6px;
}

.last-matches td {
    padding: 8px 6px;
    font-size: 0.9rem;
}

/* === LHL TABULKY === */
.tabulky .lhl-tabulka-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 15px;
    margin: 0 auto;
}

.tabulky .cross-table th,
.tabulky .cross-table td {
    text-align: center;
    vertical-align: middle;
    padding: 8px 10px;
    font-size: 1rem;
}

.tabulky .stats-table th,
.tabulky .stats-table td {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 1rem;
}

.tabulky .stats-table .team-name,
.tabulky .cross-table .team-name {
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.tabulky .cross-table .diagonal {
    background-color: #d5d5d5;
}

.tabulky .cross-table .col-header {
    font-size: 0.9rem;
    max-width: 2.5em;
    line-height: 1.1;
}

.tabulky .tabulka-cast h4 {
    text-align: center;
    margin-bottom: 15px;
}

.tabulky tr.skupina-a,
.tabulky tr.skupina-a td { background-color: #fff3cd; }
.tabulky tr.skupina-b,
.tabulky tr.skupina-b td { background-color: #cfe2ff; }
.tabulky tr.skupina-c,
.tabulky tr.skupina-c td { background-color: #d1e7dd; }

.tabulky tr.sk-skupina-3,
.tabulky tr.sk-skupina-3 td { background-color: #b8e6b8; }
.tabulky tr.sk-skupina-4,
.tabulky tr.sk-skupina-4 td { background-color: #7bc67b; }
.tabulky tr.sk-skupina-5,
.tabulky tr.sk-skupina-5 td { background-color: #9ec5fe; }
.tabulky tr.sk-skupina-6,
.tabulky tr.sk-skupina-6 td { background-color: #6ea8fe; }

.tabulky .table.lhl tbody tr.skupina-a:hover,
.tabulky .table.lhl tbody tr.skupina-a:hover td { background-color: #fff3cd !important; }
.tabulky .table.lhl tbody tr.skupina-b:hover,
.tabulky .table.lhl tbody tr.skupina-b:hover td { background-color: #cfe2ff !important; }
.tabulky .table.lhl tbody tr.skupina-c:hover,
.tabulky .table.lhl tbody tr.skupina-c:hover td { background-color: #d1e7dd !important; }
.tabulky .table.lhl tbody tr.sk-skupina-3:hover,
.tabulky .table.lhl tbody tr.sk-skupina-3:hover td { background-color: #b8e6b8 !important; }
.tabulky .table.lhl tbody tr.sk-skupina-4:hover,
.tabulky .table.lhl tbody tr.sk-skupina-4:hover td { background-color: #7bc67b !important; }
.tabulky .table.lhl tbody tr.sk-skupina-5:hover,
.tabulky .table.lhl tbody tr.sk-skupina-5:hover td { background-color: #9ec5fe !important; }
.tabulky .table.lhl tbody tr.sk-skupina-6:hover,
.tabulky .table.lhl tbody tr.sk-skupina-6:hover td { background-color: #6ea8fe !important; }

.tabulky .table.chl.stats-table tbody tr,
.tabulky .table.chl.cross-table tbody tr {
    background-color: #fff !important;
}

.tabulky .table.chl tbody tr:hover {
    background-color: #fff !important;
}

.tabulky .chl-liga-nadpis {
    text-align: center;
    margin: 25px 0 10px 0;
    color: var(--secondary-red);
}

@media (max-width: 768px) {
    .tabulky .lhl-tabulka-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .tabulky .cross-table th,
    .tabulky .cross-table td,
    .tabulky .stats-table th,
    .tabulky .stats-table td {
        font-size: 0.95rem;
        padding: 6px 8px;
    }
}

/* === SUBMENU === */
.submenu {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 8px;
}

.submenu .btn {
    margin: 0 5px;
    min-width: 100px;
}

/* === FORMULÁŘE === */
.form-control {
    border-radius: 6px;
    border: 2px solid #E9ECEF;
    transition: var(--transition-smooth);
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(21, 101, 192, 0.25);
}

/* === OBRÁZKY === */
img {
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow-light);
    transition: var(--transition-smooth);
}

img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px var(--shadow-medium);
}

/* === RESPONZIVNÍ DESIGN === */
@media (max-width: 768px) {
    body {
        padding-top: 65px !important;      /* Zvětšené z 55px pro viditelnost */
        padding-bottom: 60px !important;   /* Menší padding na mobilu */
    }
    
    /* Container mírně nahoru na mobilu */
    .container {
        margin-top: -10px !important; /* Ještě mírnější na mobilu */
    }
    
    /* Navbar zůstává nahoře i na mobilu */
    .navbar-fixed-top {
        top: 0 !important;
    }
    
    /* POSITION OVERRIDE Endora panel na mobilu */
    .endora-panel:not(.bottom) {
        position: relative !important;
        top: -15px !important; /* Menší posun na mobilu kvůli container margin */
        margin-top: 0px !important;
        margin-bottom: 0 !important;
        border-bottom-width: 1px !important;
        box-shadow: 0 1px 4px var(--shadow-light) !important;
    }
    
    .endora-panel.bottom {
        border-top-width: 1px !important;
        box-shadow: 0 -1px 4px var(--shadow-light) !important;
    }
    
    .endora-panel.bottom::before {
        height: 1px; /* Menší gradient čára na mobilu */
    }
    
    .container {
        padding: 0 10px;
    }
    
    .panel {
        margin: 10px 0;
    }
    
    .table-responsive {
        border: none;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* === UTILITY TŘÍDY === */
.hockey-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow-light);
    margin: 1rem 0;
    transition: var(--transition-smooth);
}

.hockey-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-medium);
}

.text-lhl {
    color: var(--secondary-green) !important;
    font-weight: 600;
}

.text-chl {
    color: var(--secondary-red) !important;
    font-weight: 600;
}

.bg-lhl {
    background-color: var(--secondary-green) !important;
    color: white;
}

.bg-chl {
    background-color: var(--secondary-red) !important;
    color: white;
}

/* === ANIMACE === */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

/* === LOADING STATES === */
.loading {
    opacity: 0.7;
    pointer-events: none;
    transition: var(--transition-smooth);
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0D47A1;
}

/* === ZLEPŠENÁ ČITELNOST PRO HLAVNÍ STRÁNKU === */

/* Zlepšená čitelnost tabulek s výsledky */
.table.last-matches td,
.table.rozpis-index td {
    font-size: 15px !important; /* Zvětšený text v tabulkách */
    padding: 12px 8px !important; /* Více prostoru */
    line-height: 1.6 !important;
    vertical-align: middle !important;
}

.table.last-matches th,
.table.rozpis-index th {
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 15px 8px !important;
}

/* Zvýraznění důležitých dat - POUZE PRO HLAVNÍ STRÁNKU */
.table.last-matches td:first-child,
.table.rozpis-index td:first-child {
    font-weight: 600 !important; /* Datum tučně */
    color: var(--primary-blue) !important;
}

.table.last-matches td:nth-child(4),
.table.rozpis-index td:nth-child(4) {
    font-weight: 700 !important; /* Skóre extra tučně */
    font-size: 16px !important;
    color: var(--text-dark) !important;
}

/* Větší tlačítka v tabulkách */
.table .btn-xs {
    font-size: 12px !important;
    padding: 6px 12px !important;
    min-width: 50px;
}

/* Responzivní úpravy pro tabulky */
@media (max-width: 768px) {
    .table.last-matches td,
    .table.rozpis-index td {
        font-size: 14px !important;
        padding: 10px 6px !important;
    }
    
    .nadpisy {
        font-size: 1.5rem !important; /* Menší na mobilu */
        margin-top: 20px !important;
        margin-bottom: 15px !important;
    }
    
    /* Mírnější velikost na mobilech pro statistiky a soupisky */
    .statistiky .table,
    .soupiska .table {
        font-size: 0.95rem !important; /* Trochu menší na mobilu */
    }
    
    .statistiky .table td,
    .soupiska td {
        font-size: 0.95rem !important;
    }
}

/* === FINÁLNÍ PŘEPIS PRO STATISTIKY === */
/* Toto pravidlo má nejvyšší prioritu a přepíše všechno ostatní */
div.statistiky table.table td[style*="text-align: left"],
div.statistiky table.table td:not([style*="text-align: center"]):not([style*="text-align: right"]),
div.statistiky .table td,
div.container .statistiky .table td {
    font-weight: 400 !important; /* ŽÁDNÉ tučné písmo */
    color: #333333 !important; /* Černá barva */
    font-size: 1rem !important; /* Větší text */
}

/* Specificky pro td elementy ve statistikách */
div.statistiky table tbody tr td {
    font-weight: normal !important;
    color: #333 !important;
    font-size: 1rem !important; /* Konzistentní velikost */
}

