/* --- 1. KONFIGURACE (PROMĚNNÉ & ZÁKLAD) --- */
:root {
    --primary-dark: #4F46E5;
    --primary-light: #6366F1;
    --secondary-bg: #EEF2FF;
    --dark-gray: #374151;
    --medium-gray: #4B5563;
    --light-gray: #F3F4F6;
    --accent-yellow: #FBBF24;
    --accent-red: #EF4444;
    --accent-green: #22C55E;
    --accent-purple: #A855F7;
    --font-main: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-gray);
    color: var(--dark-gray);
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- 2. UNIVERZÁLNÍ KOMPONENTY --- */

/* Tlačítka */
.btn-primary {
    background-color: var(--primary-dark);
    color: white;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: scale(1.05);
}

/* Karty (Obecné) */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-0.25rem);
}

/* --- 3. HERNÍ KARTY & EFEKTY --- */

.game-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.game-card-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    height: 0;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 8px;
    box-sizing: border-box;
}

.game-card:hover .game-card-overlay {
    height: 100%;
    opacity: 1;
}

.game-card:hover .game-image {
    filter: brightness(70%);
}

.aspect-ratio-box {
    aspect-ratio: 5 / 4;
    object-fit: cover;
    width: 100%;
    border-radius: 0.5rem;
}

/* --- 4. NAVIGACE A KATEGORIE --- */

.category-box {
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.category-box:hover {
    background-color: #c7d2fe;
    transform: translateY(-2px);
}

.category-dropdown-content {
    display: none;
}

.category-dropdown-button.active + .category-dropdown-content {
    display: block;
}

/* Sub-kategorie (Pill Nav) */
.subcat-pill-nav-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    width: 100%;
}

.subcat-pill-nav {
    display: flex;
    gap: 35px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 5px;
    max-width: 100%;
}

.subcat-pill {
    display: flex;
    align-items: center;
    background: #1e293b; 
    border-radius: 50px;
    height: 48px;
    padding-right: 20px;
    margin-left: 25px; 
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.subcat-pill:hover {
    background: #2d3748;
    transform: translateY(-2px);
}

.subcat-img-circ {
    width: 60px;
    height: 60px;
    background: #0f172a; 
    border: 4px solid #0f172a; 
    border-radius: 50%;
    margin-left: -30px;  
    overflow: hidden;
    z-index: 2;
    box-shadow: 4px 0 10px rgba(0,0,0,0.5);

    /* --- PŘIDANÝ FLEXBOX --- */
    display: flex;
    align-items: center;
    justify-content: center;
}

.subcat-img-circ img {
    /* Změň 160% na 100%, aby flexbox mohl obrázek správně vycentrovat */
    width: 160%; 
    height: 160%;
    object-fit: cover;
}

.subcat-text {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 15px;
    margin-left: 10px;
    white-space: nowrap;
}

/* --- 5. HERNÍ STRÁNKA (IFRAME, SIDEBAR, VERDICT) --- */

.game-iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 0.75rem;
}

.game-iframe-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

.sidebar-game-card {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.sidebar-game-card:hover {
    border-color: var(--accent-yellow);
    background-color: rgba(251, 191, 36, 0.05);
}

.game-card-sidebar {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.game-card-sidebar:hover {
    border-color: var(--accent-yellow);
    background: rgba(251, 191, 36, 0.05);
}

.verdict-box {
    margin-top: 4rem;
    background-color: #111827;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* --- 6. ČLÁNKY A STATICKÉ STRÁNKY --- */

.article-container {
    background-color: white;
    border-radius: 0.5rem;
    padding: 2rem 1rem;
    margin-top: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.page-content {
    font-size: 1.125rem;
    color: var(--medium-gray);
    line-height: 1.625;
}

.page-content p { margin-bottom: 1.25em; }
.page-content h2 { color: var(--dark-gray); font-weight: 700; margin-top: 1.5rem; }

/* --- 7. NAVBAR & RESPONSIVITY --- */

@media (max-width: 767px) {
    .navbar-desktop-nav-group, .navbar-desktop-auth-group { display: none !important; }
    .navbar-mobile-search-flex { flex-grow: 1; }
    .navbar-mobile-search-input { width: 100%; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .navbar-desktop-auth-group { display: none !important; }
    .navbar-desktop-nav-group { display: flex !important; }
}

@media (min-width: 1024px) {
    .navbar-mobile-toggle { display: none !important; }
    .navbar-desktop-nav-group, .navbar-desktop-auth-group { display: flex !important; }
}

/* --- 8. UTILITY --- */

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

#backToTop {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 50px; height: 50px;
    background-color: var(--primary-dark);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#backToTop.show { opacity: 1; visibility: visible; }

@keyframes bounce-slow {
    0%, 100% { transform: translateY(-5%); }
    50% { transform: translateY(0); }
}

.animate-bounce-slow { animation: bounce-slow 3s infinite ease-in-out; }

/* --- 9. DOPLNĚK PRO ČLÁNKY (GALERIE, VIDEO, ODKAZY) --- */
.page-content p { margin-bottom: 1em; line-height: 1.6; }
.article-content { color: #374151; letter-spacing: -0.011em; line-height: 1.8; }
.article-content p { margin-bottom: 1.5rem; }
.article-content h2, .article-content h3, .article-content h4 { scroll-margin-top: 100px; }
.article-content h2 { font-size: 1.875rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: 1rem; color: #1F2937; }
.article-content strong { color: #111827; font-weight: 700; }

.article-gallery { margin: 2rem 0; width: 100%; }
.gallery-container { display: grid; gap: 10px; margin-bottom: 5px; }
.cols-1 { grid-template-columns: 1fr; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.gallery-img { width: 100%; border-radius: 12px; aspect-ratio: 16/9; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.source-tag { text-align: right; font-size: 12px; color: #888; }

.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 2.5rem 0; border-radius: 1rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.article-content a { color: #2563eb !important; text-decoration: underline !important; font-weight: 500; }
.article-content a:hover { color: #1d4ed8 !important; text-decoration: none !important; }

/* Progress Bar */
.reading-progress-container { width: 100%; height: 4px; background: transparent; position: fixed; top: 72px; left: 0; z-index: 100; }
.reading-progress-bar { height: 100%; background: #FBBF24; width: 0%; transition: width 0.1s ease; }

/* --- DOPLNĚNÍ DO SEKCE 4 V MAIN.CSS --- */

/* Šipky pro posun (v main.css ti chybí úplně) */
.subcat-arrow {
    background: rgba(30, 41, 59, 0.9);
    color: white;
    border: 1px solid #374151;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    display: none; /* Zapne JS */
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    position: absolute;
}

.subcat-arrow:hover {
    background: #ffcc00;
    color: #000;
}

/* Pozice šipek na desktopu */
@media (min-width: 1024px) {
    .subcat-arrow.left { left: 0px; }
    .subcat-arrow.right { right: 0px; }
}

/* Skrytí šipek na mobilu a zarovnání doleva */
@media (max-width: 1023px) {
    .subcat-arrow {
        display: none !important;
    }
    .subcat-pill-nav-container {
        justify-content: flex-start;
    }
}

/* Chybějící styl pro písmeno, pokud není obrázek */
.subcat-letter {
    color: #ffcc00; 
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
}

/* Fix pro margin a scrollbar u navu */
.subcat-pill-nav {
    scrollbar-width: none; /* Pro Firefox */
}
.subcat-pill-nav::-webkit-scrollbar {
    display: none; /* Pro Chrome/Safari */
}