/* =============================
   ZÁKLADNÍ STYLING
============================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    color: #f1f1f1;
    background: #000;
    overflow-x: hidden;
}

/* =============================
   ANIMACE
============================= */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- STYLY PRO HEADER (NAVIGACI) --- */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

nav {
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.9);
    position: relative;
    z-index: 10;
    height: 120px;
    display: flex;
    align-items: center;
    padding: 0 30px; 
}

/* ... KÓD NAVIGACE JE BEZE ZMĚN ... */
nav ul {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    margin: 0;
    height: 100%;
}

nav li {
    height: 100%;
}

nav a {
    height: 100%;
    padding: 0 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: #f0f0f0;
    font-weight: 600;
    font-size: 34px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

nav a:hover {
    color: #0096c8dc;
}

nav li:first-child {
    margin-right: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -100vw;
    height: 100vh;
    width: 250px;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: -10px 0 10px rgba(0, 0, 0, 0.3);
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    transition: right 0.3s ease;
    z-index: 9999;
}

.sidebar-visible {
    right: 0;
}

.sidebar li {
    width: 100%;
}

.sidebar a {
    width: 100%;
    padding: 20px 30px;
    font-size: 18px;
    color: #ffffff;
    font-weight: 600;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #0096c8dc;
}

.menu-button {
    display: none;
    height: 100%;
    align-items: center;
    margin-left: 20px;
    z-index: 1000;
    position: relative;
}

.hamburger {
    width: 40px;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.hamburger span {
    display: block;
    height: 4px;
    width: 100%;
    background-color: #DDDDDD;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(13px) rotate(45deg);
    background-color: #FFFFFF;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-13px) rotate(-45deg);
    background-color: #FFFFFF;
}

@media (min-width: 769px) {
    .hideOnMobile {
        display: flex !important;
    }
    .menu-button {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hideOnMobile {
        display: none;
    }
    .menu-button {
        display: flex;
    }
}

/* --- KONEC HEADER STYLŮ --- */

/* =============================
   SEKCE POZADÍ
============================= */
.cleni-section {
    position: relative;
    min-height: 100vh;
    background: url("image (1).png") center/cover no-repeat fixed;
    display: flex;
    align-items: center; 
    justify-content: center;
    padding: 150px 20px 60px; 
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(10px); 
    z-index: 1;
}

/* =============================
   OBSAH
============================= */
/* =============================
   STYLY PRO TIMER
============================= */
.season-timer {
    font-size: 1.4rem;
    font-weight: 600;
    color: #0096c8; /* Modrá barva, aby vynikla */
    text-shadow: 0 0 8px rgba(0, 150, 200, 0.5);
    margin-bottom: 40px; /* Mezera nad kartami */
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease forwards 0.4s; /* Zpoždění, aby se zobrazil po titulku */
}
.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    width: 100%;
    text-align: center;
}

.title {
    font-size: 3rem;
    margin-bottom: 50px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease forwards 0.2s;
}

/* =============================
   GRID KARET
============================= */
.cards {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    display: grid;
    gap: 30px;
    justify-items: center;
}

/* =============================
   KARTA HRÁČE - ZVÝŠENÁ PRŮHLEDNOST / LIQUID GLASS
============================= */
.player-card {
    display: flex;
    align-items: center;
    /* Průhlednost 0.5 a silný blur 15px */
    background: rgba(30, 30, 30, 0.5); 
    backdrop-filter: blur(15px); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.45s ease, border-color 0.45s ease;
    transform: translateY(0) scale(1);
    overflow: hidden;
    padding: 20px 25px;
    width: 100%;
    max-width: 450px;
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease forwards;
}

.player-card:nth-child(3n+1) {
    animation-delay: 0.4s;
}
.player-card:nth-child(3n+2) {
    animation-delay: 0.5s;
}
.player-card:nth-child(3n+3) {
    animation-delay: 0.6s;
}

/* EFEKT PŘI NAJETÍ MYŠI */
.player-card:hover {
    transform: translateY(-15px) scale(1.05); 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 20px rgba(224, 255, 255, 0.4); 
    border-color: rgba(255, 255, 255, 0.3); 
}

.player-skin {
    flex-shrink: 0;
    width: 130px;
    height: 130px;
    border-radius: 12px;
    margin-right: 25px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.player-info {
    flex: 1;
    text-align: left;
}

.player-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.player-role {
    font-size: 1rem;
    color: #a0a0a0;
    margin: 6px 0 2px;
}

.player-playtime {
    font-size: 1rem;
    color: #a0a0a0;
    margin: 0 0 15px;
}

/* =============================
   SOCIÁLNÍ IKONY A OPRAVA ZOBRAZENÍ
============================= */
.player-socials {
    /* KLÍČOVÉ: ZAJISTÍ, ŽE SE NEZOBRAZENÉ IKONY AUTOMATICKY VYŘADÍ Z MÍSTA */
    display: flex;
    gap: 15px;
}

/* 1. VYNUCENÍ ZOBRAZENÍ A ZÁKLADNÍCH STYLŮ PRO KAŽDOU IKONU */
.social {
    display: inline-flex !important; /* Vynucení viditelnosti */
    align-items: center;
    justify-content: center;
    color: #c0c0c0;
    font-size: 1.5rem;
    transition: color 0.2s ease, transform 0.2s ease;
    opacity: 1 !important; 
    visibility: visible !important;
}

/* 2. KLÍČOVÉ PRAVIDLO: SKRYJE POUZE TY IKONY, KTERÉ MAJÍ PŘESNĚ href="" */
.player-socials a[href=""] {
    display: none !important; 
}


/* BARVY IKON PŘI HOVERU */
.social:hover {
    transform: scale(1.15);
}

.social.youtube:hover {
    color: #ff3333;
}
.social.instagram:hover {
    color: #d62976;
}
.social.tiktok:hover {
    color: #00f2ea;
}

/* =============================
   RESPONSIVITA
============================= */
@media (max-width: 1200px) {
    .cards {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .cleni-section {
        padding: 150px 15px 40px; 
    }
    .title {
        font-size: 2.5rem;
    }
    .cards {
        grid-template-columns: 1fr; 
        max-width: 400px; 
        margin: 0 auto;
    }
    .player-card {
        max-width: 100%; 
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }
    .player-skin {
        margin-right: 0;
        margin-bottom: 15px;
        width: 90px;
        height: 90px;
    }
    .player-info {
        text-align: center;
    }
    .player-socials {
        justify-content: center;
    }
}
/* =======================================
    MODAL WINDOW (POPUP) STYLES
======================================= */

/* 1. Modální překrytí (Overlay) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); 
    backdrop-filter: blur(12px); 
    z-index: 9999; 
    
    /* Změna ZDE: Vždy ho necháme ve stromu, jen ho skryjeme přes opacity/visibility */
    display: flex; 
    align-items: center;
    justify-content: center;
    
    /* Počáteční stav: neviditelný */
    opacity: 0;
    visibility: hidden;
    
    /* Plynulá změna: Overlay animujeme jen přes opacity */
    transition: opacity 0.4s ease-in-out, visibility 0s 0.4s; /* visibility se mění až po 0.4s */
    
}

/* 2. Cílový stav Overlay (Modal otevřen) */
.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    /* Při otevírání se visibility změní hned (žádné zpoždění) */
    transition: opacity 0.3s ease-in-out;
}

/* 3. Obsah modalu (The Modal Box) */
.modal-content {
    background: rgba(30, 30, 30, 0.98); 
    border-radius: 20px;
    padding: 40px;
    max-width: 650px; 
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 150, 200, 0.3);
    position: relative;
    text-align: center;
    
   transform: scale(0.9) translateY(-10px);
    opacity: 0;
    
    /* Přechod: Animujeme transform a opacity */
    transition: transform 0.1s ease-out, opacity 0.2s ease-out;
}

/* 4. Cílový stav Obsahu (Animace spuštěna) */
.modal-overlay.is-open .modal-content {
    /* Cílový stav: Plná velikost a v centru */
    transform: scale(1) translateY(0);
    opacity: 1;
}


/* 5. Styly pro detaily v modalu */
.modal-skin-lg {
    width: 120px; /* Menší skin než na kartě */
    height: 120px;
    border-radius: 15px;
    margin-bottom: 20px;
    /* Pěkný, jemný glow efekt */
    box-shadow: 0 0 15px rgba(0, 150, 200, 0.4), 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.modal-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.modal-role {
    font-size: 1.2rem;
    color: #0096c8; /* Tvůj modrý odstín */
    margin-bottom: 20px;
}

.modal-details {
    text-align: left;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-details h4 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 10px;
}

.modal-details p {
    font-size: 1rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 15px;
}

/* 6. Tlačítko pro zavření */
.close-button {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover {
    color: #fff;
}

/* Reakce pro mobilní zařízení */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        margin: 20px;
        max-width: unset;
    }

    .modal-details p {
        font-size: 0.9rem;
    }
}
/* =============================
   🔧 OPRAVA POSUNU NA MOBILU
============================= */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* Karty i modal se nikdy neroztáhnou mimo viewport */
  .player-card,
  .modal-content {
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Omezíme scale efekt, který na menším displeji přesahoval */
  .player-card:hover {
    transform: translateY(-10px) scale(1.02);
  }

  /* Modal na mobilech lépe zarovnáme */
  .modal-content {
    margin: 0 10px;
  }

  /* Obrázky a sociální ikony přizpůsobíme */
  .player-skin,
  .modal-skin-lg {
    max-width: 100%;
    height: auto;
  }

  .player-socials {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
}
