/* ========================================= */
/* 1. ZÁKLADNÍ NASTAVENÍ A ADVANCED POZADÍ   */
/* ========================================= */

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Advanced animované pozadí */
    background: linear-gradient(-45deg, #0a0a12, #1a1a2e, #16213e, #0f0f1b);
    background-size: 400% 400%;
    animation: gradientAnimation 12s ease infinite;
    background-attachment: fixed;
    
    color: #e0e0f0; 
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* ========================================= */
/* 2. ZÁHLAVÍ - NADPIS NAHOŘE, MENU DOLE      */
/* ========================================= */

.main-header {
    background: rgba(15, 15, 27, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px 20px 25px 20px;
    text-align: center;
    border-bottom: 3px solid #e94560;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.main-header h1 {
    font-size: 2.8em;
    margin: 0 0 20px 0; 
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 15px rgba(233, 69, 96, 0.6);
    font-weight: 800;
}

.header-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    text-align: center;
}

.header-nav .nav-link {
    color: #b0b0d0; 
    text-decoration: none; 
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 15px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.header-nav .nav-link:hover {
    color: #fff;
    background: rgba(233, 69, 96, 0.2);
    border-color: #e94560;
    text-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}

/* ========================================= */
/* 3. ŽEBŘÍČEK A INTERAKTIVNÍ ANIMACE        */
/* ========================================= */

.ranking {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.game-entry {
    display: flex; 
    align-items: flex-start; 
    background-color: #2c2c47;
    margin-bottom: 15px;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer; 
    
    /* Přechody pro plynulé animace */
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

/* ANIMACE NA NAMÍŘENÍ (HOVER) */
.game-entry:hover {
    background-color: #35355a;
    transform: scale(1.015); /* Mírné zvětšení */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    border-color: rgba(233, 69, 96, 0.3);
}

/* TOP POZICE - BARVY A GRADIENTY */
.top-winner {
    border: 2px solid #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, #2c2c47 100%);
}
.top-winner .rank-number, .top-winner .game-info h3 { color: #ffd700; }

.second {
    border: 2px solid #c0c0c0;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, #2c2c47 100%);
}
.second .rank-number, .second .game-info h3 { color: #c0c0c0; }

.third {
    border: 2px solid #cd7f32;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, #2c2c47 100%);
}
.third .rank-number, .third .game-info h3 { color: #cd7f32; }

/* ========================================= */
/* 4. ZBYTEK TVÉHO KÓDU (BEZ ZMĚN)           */
/* ========================================= */

.rank-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #e94560;
    margin-right: 20px;
    width: 50px;
    text-align: center;
}

.game-cover-small {
    width: 100px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

.game-info { flex-grow: 1; display: flex; flex-direction: column; }
.game-info h3 { margin: 0 0 5px 0; font-size: 1.5em; }
.game-info p { margin: 0; color: #b0b0d0; font-size: 0.9em; }

.award-count { text-align: right; }
.count-number { font-size: 2em; font-weight: bold; color: #38bdf8; display: block; }
.count-label { font-size: 0.8em; color: #b0b0d0; display: block; margin-top: -5px; }

.media-list {
    font-size: 0.85em;
    color: #b0b0d0;
    max-height: 0; 
    margin-top: 0;
    padding-top: 0;
    border-top: 1px dashed transparent; 
    overflow: hidden;
    transition: all 0.4s ease-in-out;
}

.game-entry.show-media .media-list {
    max-height: 11000px; 
    margin-top: 10px;
    padding-top: 10px;
    border-top-color: rgba(233, 69, 96, 0.3);
}

.media-list .media-link { color: inherit; text-decoration: none; }
.media-list .media-link:hover { color: #e94560; }

.iframe-container {
    position: relative; 
    width: 100%; 
    height: 0; 
    padding-bottom: 213%; 
    overflow: hidden; 
}

.iframe-container iframe {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    border: none;
}

.main-footer {
    background-color: #0f0f1b;
    text-align: center;
    padding: 25px;
    margin-top: 40px;
    font-size: 0.8em;
}

.back-link {
    color: #e94560;
    text-decoration: none;
    font-size: 1.1em;
    display: block;
    margin-bottom: 20px;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.year-card {
    background-color: #2c2c47;
    padding: 25px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.year-card:hover {
    background-color: #3b3b64;
    transform: translateY(-8px);
    border: 1px solid #e94560;
}

.year-card-cover {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    opacity: 0.7;
    transition: opacity 0.4s;
}

.year-card:hover .year-card-cover { opacity: 1; }

.media-toggle-arrow {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
    border-radius: 50%;
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    user-select: none; /* Aby se text šipky neoznačoval modře při klikání */
}

.media-toggle-arrow:hover {
    background: rgba(233, 69, 96, 0.3);
}

/* Otočení šipky, když je aktivní */
.game-entry.show-media .media-toggle-arrow {
    transform: rotate(180deg);
    background: #e94560;
    color: #fff;
}

.table-wrapper {
    overflow-x: auto; /* Zajišťuje, že se tabulka na mobilu dá posouvat do stran */
    margin-top: 20px;
}

.eligibility-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    color: #e0e0f0;
    font-size: 0.95em;
}

.eligibility-table th, 
.eligibility-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.eligibility-table th {
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
}

/* Styly pro stavy */
.status-rejected {
    color: #ff4d4d;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 77, 77, 0.3);
}

.status-accepted {
    color: #4dff88;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(77, 255, 136, 0.3);
}

/* Efekt řádků při najetí myší */
.eligibility-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.year-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(233, 69, 96, 0.3);
    color: #b0b0d0;
    padding: 10px 25px;
    border-radius: 5px; /* Stejné jako tvé nav-linky */
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: #fff;
    background: rgba(233, 69, 96, 0.2);
    border-color: #e94560;
    text-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}

.filter-btn.active {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
    box-shadow: 0 0 15px rgba(233, 69, 96, 0.4);
}

/* Logika filtru */
.filter-row {
    transition: opacity 0.3s ease;
}

.filter-row.hidden {
    display: none;
}

/* ========================================= */
/* HONORABLE MENTIONS (EXPANDABLE)           */
/* ========================================= */

/* --- STYL DOLNÍ KARTY (ROZBALOVACÍ) --- */
.mentions-wrapper {
    max-width: 400px; /* TADY omezuješ šířku - uprav si dle libosti */
    margin: 20px auto; /* Vycentrování sekce */
    padding: 12px;
    background: rgba(22, 33, 62, 0.4);
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: 8px;
    text-align: center;
}

/* Skrytí checkboxu */
.mention-checkbox {
    display: none;
}

/* Tlačítko (Label) */
.expand-btn {
    color: #b0b0d0;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    user-select: none;
}

.expand-btn:hover {
    color: #e94560;
}

.arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

/* Obsah schovaný pod checkboxem */
.mentions-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.mentions-text {
    padding-top: 10px;
    font-size: 0.75rem;
    color: #8888a0;
    line-height: 1.4;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 10px;
}

/* Logika rozbalení */
.mention-checkbox:checked ~ .mentions-content {
    max-height: 200px; /* Maximální výška, kam až se to rozbalí */
}

.mention-checkbox:checked ~ .expand-btn .arrow {
    transform: rotate(180deg);
}

/* KDYŽ JE ZAŠKRTNUTO (KLIKNUTO) */
.mention-checkbox:checked ~ .mentions-content {
    max-height: 300px; /* Rozbalí se */
}

.mention-checkbox:checked ~ .expand-btn .arrow {
    transform: rotate(180deg); /* Otočí šipku */
}

/* ========================================= */
/* CONTRIBUTORS & THANK YOU SECTION          */
/* ========================================= */

.contributors-card {
    max-width: 900px; /* Omezení šířky, aby to nebylo přes celý web */
    margin: 40px auto; /* Vycentrování celé karty */
    padding: 30px 20px;
    background: rgba(22, 33, 62, 0.8);
    border: 1px dashed rgba(233, 69, 96, 0.5);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.thank-you-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.thank-you-title {
    font-size: 1.5rem; /* Menší, aby to sedělo do menšího čtverce */
    color: #e94560;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-align: center;
}

.thank-you-subtitle {
    font-size: 0.9rem;
    color: #b0b0d0;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.4;
}

.contributors-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.contributor-link {
    text-decoration: none;
    font-weight: 700;
    color: #ffffff;
    background: rgba(233, 69, 96, 0.1);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid rgba(233, 69, 96, 0.2);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    white-space: nowrap; /* Jméno se nikdy nerozlomí na dva řádky */
}

.contributor-link:hover {
    background: #e94560;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

/* ========================================= */
/* MOBILE ADAPTATION (Responzivita)          */
/* ========================================= */

@media (max-width: 650px) {
    .contributors-card {
        max-width: 90%; /* Na mobilu využije skoro celou šířku displaye */
        margin: 20px auto;
        padding: 20px 15px;
    }

    .thank-you-title {
        font-size: 1.2rem;
    }

    .thank-you-subtitle {
        font-size: 0.8rem;
    }

    .contributor-link {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

@media (max-width: 600px) {
    .main-header h1 { font-size: 1.8em; }
    .ranking { padding: 0 10px; }
    .game-entry { flex-direction: column; align-items: center; text-align: center; padding: 25px 15px; }
    .rank-number { font-size: 3em; margin: 0 0 10px 0; width: auto; order: 1; }
    .game-cover-small { order: 2; margin: 0 0 15px 0; }
    .game-info { order: 3; width: 100%; margin-bottom: 10px; }
    .award-count { order: 4; width: 100%; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: center; }
    
.media-toggle-arrow {
    display: flex;
    justify-content: center;
    align-items: center; }
}


.content-container { max-width: 800px; margin: 40px auto; padding: 0 20px; }
.info-card { background-color: #2c2c47; padding: 30px; border-radius: 12px; margin-bottom: 25px; }
.info-card h2 { color: #e94560; border-bottom: 2px solid #3b3b64; padding-bottom: 10px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-item { background-color: #3b3b64; padding: 25px; border-radius: 12px; }
.contact-item.full-width { grid-column: 1 / -1; text-align: center; }

.email-address { font-size: 1.5em; font-weight: bold; color: #ffd700; }

.contribute-box { margin: 50px auto; padding: 25px; text-align: center; border-top: 1px solid rgba(233, 69, 96, 0.3); color: #cccccc; }
.contribute-link { color: #4da6ff; font-weight: bold; text-decoration: none; margin-left: 5px; }

.percentage-label { display: block; font-size: 0.55em; color: #888; margin-top: 2px; align-items: center; text-align: center; }
.total-stats-box { text-align: center; padding: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(233, 69, 96, 0.3); border-radius: 12px; margin: 30px auto; max-width: 320px; font-weight: bold; }
.total-stats-box span { color: #e94560; margin-left: 5px; }