/**
 * eLfilms.cz - Styly pro stránku Prohlížet
 *
 * @package    eLfilms
 * @subpackage Frontend
 * @file       css/prohlizet.css
 * @version    4.0 - Perfect Edition
 * @datum      Leden 2026
 * @author     eLfilms Team
 * @copyright  2009-2026 eLfilms.cz
 *
 * Hlavní CSS soubor pro stránku prohlížení a filtrování filmů a seriálů.
 *
 * STYLUJE:
 * - Hlavní layout (sidebar + main content)
 * - Sidebar filtry (typ, žánry, range slidery, země)
 * - Typ toggle (Film / Seriál)
 * - Žánrové checkboxy
 * - Range slidery (rok, délka, lesbický obsah)
 * - Select boxy (země, řazení)
 * - Reset filtrů tlačítko
 * - Přepínač pohledů (grid/list)
 * - Grid zobrazení (4 sloupce)
 * - List zobrazení
 * - Item cards (postery, overlay, info)
 * - Stránkování
 * - Loading overlay
 * - Burger menu tlačítko (mobile)
 *
 * POUŽÍVÁ:
 * - prohlizet.php (parent stránka)
 *
 * DESIGN:
 * - Barvy: tmavě modrá (#0d1b2a, #0b334f–#1a4f72), zlatá (#EEB500)
 * - Max šířka obsahu: 1200px
 *
 * NOTE:
 * - Responzivní breakpointy jsou v prohlizet-responsive.css
 */

/* ============================================
   RESET
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #0b334f;
    color: white;
    min-height: 100vh;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   HLAVNÍ LAYOUT (sidebar + main)
   ============================================ */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px 60px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    min-height: calc(100vh - 60px);
}

/* ============================================
   SIDEBAR - FILTRY
   ============================================ */
.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
    padding-right: 20px;
}

.filter-section {
    margin-bottom: 28px;
}

.filter-title {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
    font-weight: 600;
}

/* ============================================
   TYP TOGGLE (Film / Seriál)
   ============================================ */
.type-toggle {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
}

.type-toggle button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.15);
}

.type-toggle button:first-child {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.type-toggle button:last-child {
    border-radius: 0 8px 8px 0;
}

.type-toggle button:hover {
    background: rgba(255,255,255,0.15);
}

.type-toggle button.active {
    background: #EEB500;
    color: #0b334f;
    font-weight: 600;
    border-color: #EEB500;
}

/* ============================================
   ŽÁNRY (checkboxy)
   ============================================ */
.genres-list {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 10px;
}

.genres-list::-webkit-scrollbar {
    width: 6px;
}

.genres-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
}

.genres-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.genre-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
    transition: all 0.2s;
}

.genre-item:hover {
    color: #EEB500;
}

.genre-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #EEB500;
    cursor: pointer;
    flex-shrink: 0;
}

.genre-item span {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    flex: 1;
}

.genre-item:hover span {
    color: #EEB500;
}

/* ============================================
   RANGE SLIDERY
   ============================================ */
.range-container {
    padding: 5px 0;
}

.range-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #EEB500;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #EEB500;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.range-current {
    text-align: center;
    margin-top: 5px;
    font-size: 13px;
    color: #EEB500;
    font-weight: 500;
}

/* ============================================
   SELECT (země, řazení)
   ============================================ */
.filter-select {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.filter-select:hover,
.filter-select:focus {
    border-color: #EEB500;
    background: rgba(255,255,255,0.12);
}

.filter-select option {
    background: #0b334f;
    color: white;
    padding: 10px;
}

/* ============================================
   RESET FILTRŮ TLAČÍTKO
   ============================================ */
.reset-filters-btn {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reset-filters-btn:hover {
    border-color: #EEB500;
    color: #EEB500;
}

/* ============================================
   HLAVNÍ OBSAH
   ============================================ */
.main-content {
    min-width: 0;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.content-header h1 {
    font-size: 25px;
    font-weight: 600;
    color: white;
}

.content-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ============================================
   ŘAZENÍ
   ============================================ */
.sort-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.sort-select {
    background: transparent;
    border: none;
    color: #EEB500;
    padding: 8px 5px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

.sort-select option {
    background: #0b334f;
    color: white;
}

/* ============================================
   PŘEPÍNAČ POHLEDŮ (grid / list)
   ============================================ */
.view-toggle {
    display: flex;
    gap: 5px;
    background: rgba(255,255,255,0.05);
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.view-btn.active {
    background: #EEB500;
    color: #0b334f;
}

/* ============================================
   POČET VÝSLEDKŮ
   ============================================ */
.results-count {
    margin-bottom: 20px;
    font-size: 20px;
    color: rgba(255,255,255,0.6);
}

.results-count span {
    color: #EEB500;
    font-weight: 600;
}

/* ============================================
   GRID FILMŮ / SERIÁLŮ
   ============================================ */
.items-grid {
    display: grid;
    gap: 30px;
}

.items-grid.view-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.items-grid.view-list {
    grid-template-columns: 1fr;
    gap: 0;
}

/* ============================================
   KARTA – GRID VIEW
   ============================================ */
.item-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.item-card:hover {
    transform: translateY(-8px);
}

.item-poster {
    position: relative;
    aspect-ratio: 2/3;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.item-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.item-card:hover .item-poster img {
    transform: scale(1.05);
}

.item-poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 12px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-card:hover .item-overlay {
    opacity: 1;
}

.item-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #EEB500;
}

.item-rating i {
    font-size: 12px;
}

.item-info {
    padding: 0 5px;
}

.item-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.item-card:hover .item-title {
    color: #EEB500;
}

.item-year {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.item-subtitle {
    display: none;
}

/* ============================================
   LIST VIEW
   ============================================ */
.view-list .item-card a {
    display: flex;
    flex-direction: row;
    gap: 25px;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.view-list .item-card {
    flex-direction: row;
    gap: 25px;
    padding: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 25px;
    padding-top: 25px;
    margin-bottom: 0;
    border-radius: 0;
}

.view-list .item-card:first-child {
    padding-top: 0;
}

.view-list .item-card:hover {
    transform: none;
    background: transparent;
}

.view-list .item-card:last-child {
    border-bottom: none;
}

.view-list .item-poster {
    width: 140px;
    min-width: 140px;
    aspect-ratio: 2/3;
    margin-bottom: 0;
    border-radius: 8px;
}

.view-list .item-overlay {
    display: none;
}

.view-list .item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 5px 0;
}

.view-list .item-title {
    font-size: 20px;
    font-weight: 600;
    color: #EEB500;
    margin-bottom: 8px;
    -webkit-line-clamp: 1;
}

.view-list .item-card:hover .item-title {
    color: #ffd700;
}

.item-meta-line {
    display: none;
}

.view-list .item-meta-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}

.view-list .item-meta-line .separator {
    color: rgba(255,255,255,0.3);
}

.item-rating-line {
    display: none;
}

.view-list .item-rating-line {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.view-list .item-rating-stars {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #EEB500;
    font-size: 14px;
}

.view-list .item-rating-stars i {
    font-size: 13px;
}

.view-list .item-rate-btn {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.3s;
}

.view-list .item-rate-btn:hover {
    color: #EEB500;
}

.item-description {
    display: none;
}

.view-list .item-description {
    display: block;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
}

/* ============================================
   ŽÁDNÉ VÝSLEDKY
   ============================================ */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,0.5);
}

.no-results i {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.7);
}

.no-results p {
    font-size: 16px;
}

/* ============================================
   STRÁNKOVÁNÍ
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.7);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.pagination a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.pagination a.active {
    background: #EEB500;
    color: #0b334f;
    font-weight: 600;
}

.pagination .prev,
.pagination .next {
    font-weight: bold;
    font-size: 18px;
}

.pagination .disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination .dots {
    background: transparent;
    color: rgba(255,255,255,0.4);
    cursor: default;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 51, 79, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #EEB500;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   BURGER MENU TLAČÍTKO (mobilní filtry)
   ============================================ */
.filters-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    transition: all 0.3s;
}

.filters-burger span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.filters-burger:hover {
    background: rgba(255,255,255,0.15);
    border-color: #EEB500;
}

.filters-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.filters-burger.active span:nth-child(2) {
    opacity: 0;
}

.filters-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: #EEB500;
    color: #0b334f;
    text-decoration: none;
    font-weight: bold;
}

.skip-to-content:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid #EEB500;
    outline-offset: 2px;
}