﻿/* =========================================================
   TITULKYPLUS.EU — STYLE.CSS (Optimalizovaná finální verze)
   Verze 71 (2025-10-24)
   BLOK 1 / 3 — Základ a rozvržení:
   - Root proměnné, globál, typografie, odkazy
   - Navigace (navbar)
   - Gridy (series/movies)
   - Detail stránky (series + movie)
   - Epizody
   - Základní responzivita pro výše uvedené
   ========================================================= */

/* =================== ROOT VARIABLES =================== */
:root {
    --primary: #0056b3;
    --primary-hover: #004494;
    --success: #28a745;
    --success-hover: #218838;
    --danger: #dc3545;
    --danger-hover: #b02a37;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #fff;
    --bg-light: #f4f6f9;
    --radius: 6px;
    --transition: all 0.2s ease;
    --max-width: 1200px;
}

/* =================== GLOBAL =================== */
body {
    font-family: Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    margin: 0;
}
.container {
    max-width: var(--max-width);
    margin: 30px auto;
    padding: 0 20px;
}
h1, h2 { color: var(--primary); }
h1 {
    display: flex;              /* hezčí h1 s ikonou */
    align-items: center;
    gap: 10px;
    font-size: 28px;
    margin: 20px 0 25px 0;
    color: var(--primary);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =================== NAVBAR =================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);
    padding: 12px 20px;
    white-space: nowrap;
    box-sizing: border-box;
    flex-wrap: nowrap;
}
.nav-container,
.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}
.navbar a,
.nav-user a,
.nav-user span {
    color: var(--text-light);
    font-weight: bold;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 15px;
}
.navbar a:hover,
.nav-user a:hover { background: var(--primary-hover); }
.logout-link { background: var(--danger); color: var(--text-light); }
.logout-link:hover { background: var(--danger-hover); }

/* Oprava podtržení odkazů v navigaci */
.navbar a,
.navbar a:hover,
.nav-user a,
.nav-user a:hover {
    text-decoration: none !important;
}

/* =================== SERIES / MOVIES GRID =================== */
.series-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.series-item {
    position: relative; /* pro vlaječky a badge */
    width: 160px;
    height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}
.series-item:hover {
    transform: scale(1.03);
}
.series-image {
    width: 160px;
    height: 240px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: box-shadow 0.2s ease;
    object-fit: cover;
}
.series-image:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.3); }
.series-title {
    text-align: center;
    font-weight: bold;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.3;
    min-height: 36px;
    margin: 8px 0 2px 0;
}
.series-date {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 4px;
}

/* Jemnější hover pro favorites grid (globální pro karty v seznamech) */
.series-container .series-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* =================== DETAIL PAGE (SERIES + MOVIE) =================== */
.detail-main {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border: 1px solid #e0e4ec;
    margin-bottom: 40px;
    padding: 30px;
    overflow: hidden;
}
.poster-cell {
    width: 35%;
    padding: 25px;
    text-align: center;
    vertical-align: top;
    background: #f9fafc;
}
.poster-img {
    width: auto;
    max-width: 240px; /* dříve 340px */
    height: auto;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}
.btn-fav {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-fav:hover { background: var(--primary-hover); }

.info-cell {
    width: 65%;
    padding: 25px;
    background: #fff;
    border-left: 1px solid #dee2e8;
}
.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.6;
}
.detail-table th {
    color: var(--primary);
    width: 160px;
    text-align: left;
    padding: 6px 8px;
    vertical-align: top;
}
.detail-table td {
    padding: 6px 8px;
    color: #222;
}
.detail-table tr:last-child td { white-space: pre-line; }
.detail-table a { color: var(--primary); font-weight: 600; }
.detail-table a:hover { text-decoration: underline; }

h2 {
    margin-top: 35px;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 6px;
    display: inline-block;
}

/* =================== EPISODES =================== */
.episodes-list {
    margin: 10px 0 30px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.episode-code {
    display: inline-block;
    margin: 3px 5px;
    padding: 6px 8px;
    border-radius: var(--radius);
    font-family: monospace;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}
.episode-code.has-subs { background: var(--success); }
.episode-code.no-subs { background: var(--danger); }
.episode-code:hover { opacity: 0.8; transform: scale(1.05); }
.episode-date {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 3px;
    text-align: center;
}

/* =================== GRID RESULTS (TMDb výběr) =================== */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    align-items: start;
    margin-top: 10px;
}
.result-card {
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    position: relative; /* pro vlaječky v kartě výsledku */
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.result-card .poster {
    width: 100%;
    height: 270px;
    object-fit: cover;
    border-radius: 6px;
    background: #e9ecef;
}
.result-card img.poster {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}
.result-card .title {
    font-weight: bold;
    font-size: 14px;
    margin: 8px 0 4px 0;
    min-height: 34px;
}
.result-card .meta { font-size: 12px; color: #6c757d; margin-bottom: 8px; }
.result-card .actions { text-align: center; }
.result-card .actions form { margin: 0; }
.result-card .btn-primary { font-size: 14px; padding: 6px 12px; }

/* Upload confirmation sekce */
.detail-main h2 {
    color: var(--primary);
    font-size: 22px;
    border-left: 5px solid var(--primary);
    padding-left: 10px;
    margin-bottom: 25px;
}
.results-section { margin-bottom: 40px; }
.results-section h3 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    color: var(--primary);
    border-bottom: 2px solid #dce6f5;
    padding-bottom: 6px;
    margin-bottom: 15px;
}
.results-section h3::before { font-size: 20px; opacity: 0.8; }
.results-section:first-of-type h3::before { content: "🗂️"; }
.results-section:last-of-type h3::before { content: "🌐"; }

/* =================== FLAG ICONS – jazykové vlaječky =================== */
.flag-icon, .fi {
    width: 22px;
    height: 15px;
    border-radius: 3px;
    vertical-align: middle;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
    transition: transform 0.15s ease;
    display: inline-block;
}
.flag-icon:hover, .fi:hover { transform: scale(1.15); }

/* Obecný badge pro vlaječky (může být použit všude) */
.flag-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 8px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none; /* aby klik šel skrz na plakát/odkaz */
}
.flag-badge .flag-icon + .flag-icon,
.flag-badge .fi + .fi { margin-left: 3px; }

/* Zajištění, že kontejner karty je relativní (pro jistotu) */
.series-item .flag-badge,
.result-card .flag-badge,
.favorite-card .flag-badge {
    position: absolute;
}

/* =================== UTILITIES (obecné drobnosti) =================== */
.sep { height: 1px; background: #e9ecef; margin: 24px 0; }
#ai_translate_wrapper {
    border-left: 3px solid var(--primary);
    padding-left: 10px;
    margin-bottom: 15px;
}

/* =================== RESPONSIVE (základ pro blok 1) =================== */
@media (max-width: 768px) {
    .navbar { flex-direction: column; align-items: flex-start; }
    .nav-user { margin-top: 10px; }

    .series-item { width: 48%; height: auto; }
    .series-image { width: 100%; height: auto; }

    .detail-main { display: block; }
    .poster-cell, .info-cell { width: 100%; border: none; }
    .poster-img { max-width: 100%; }

    .btn-fav { width: 100%; }
}
/* =========================================================
   TITULKYPLUS.EU — STYLE.CSS
   BLOK 2 / 3 — Komponenty a modální okna:
   - Tlačítka (globální styly)
   - Upload formuláře a progress bary
   - Login / registrace
   - Hlavičky sekcí
   - Carousel a reklamní sekce
   ========================================================= */

/* =================== BUTTONS =================== */
.btn {
    display: inline-block;
    background: var(--primary);
    color: var(--text-light);
    border: none;
    border-radius: var(--radius);
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    font-weight: bold;
}
.btn:hover { background: var(--primary-hover); color: #fff; text-decoration: none; }

.btn-danger {
    background: var(--danger);
    color: var(--text-light);
}
.btn-danger:hover { background: var(--danger-hover); }

.btn-success {
    background: var(--success);
    color: var(--text-light);
}
.btn-success:hover { background: var(--success-hover); }

.btn-translate {
    background: #ff9800;
    color: #fff;
    font-weight: bold;
}
.btn-translate:hover { background: #e68a00; color: #fff; }

.btn-download {
    background: var(--primary);
    color: #fff;
}
.btn-download:hover { background: var(--primary-hover); }

.btn-secondary {
    background: #6c757d;
    color: #fff;
}
.btn-secondary:hover { background: #545b62; }

button.disabled, .btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =================== UPLOAD FORM =================== */
.upload-form {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    padding: 25px;
    margin-top: 25px;
    max-width: 640px;
}
.upload-form h2 {
    font-size: 20px;
    border-left: 5px solid var(--primary);
    padding-left: 10px;
    color: var(--primary);
}
.upload-form label {
    display: block;
    font-weight: bold;
    color: var(--text-primary);
    margin-top: 14px;
    margin-bottom: 4px;
}
.upload-form input[type="text"],
.upload-form input[type="file"],
.upload-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    font-size: 14px;
    box-sizing: border-box;
}
.upload-form .btn {
    margin-top: 15px;
    width: 100%;
    font-size: 16px;
}
.upload-progress {
    margin-top: 15px;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}
.upload-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.4s ease;
}
.upload-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    padding: 28px 36px;
    text-align: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}
.upload-success h2 {
    color: var(--success);
    margin-bottom: 12px;
}
.upload-success p {
    color: #333;
    margin-bottom: 18px;
}

/* =================== LOGIN / REGISTER =================== */
.login-box {
    max-width: 420px;
    margin: 50px auto;
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}
.login-box h1 {
    text-align: center;
    color: var(--primary);
    font-size: 24px;
    margin-bottom: 20px;
}
.login-box label {
    display: block;
    font-weight: bold;
    margin-top: 12px;
    color: var(--text-primary);
}
.login-box input[type="text"],
.login-box input[type="password"],
.login-box input[type="email"] {
    width: 100%;
    padding: 10px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    font-size: 14px;
}
.login-box button {
    margin-top: 20px;
    width: 100%;
}
.login-box p {
    text-align: center;
    font-size: 14px;
    margin-top: 15px;
}
.login-box p a {
    color: var(--primary);
    font-weight: 600;
}
.login-box p a:hover {
    text-decoration: underline;
}
/* =================== LOGIN / REGISTER / FORGOT / RESET MODALS =================== */
.modal {
    display: none; /* výchozí stav – skryté */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(3px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    border-radius: 10px;
    padding: 25px 30px;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    position: relative;
    animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close {
    color: #999;
    position: absolute;
    right: 16px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}
.close:hover { color: #333; }

.modal h2 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal form label {
    display: block;
    margin-top: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal form input[type="text"],
.modal form input[type="email"],
.modal form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    font-size: 15px;
    box-sizing: border-box;
    margin-top: 4px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.modal .btn-login,
.modal .btn-register {
    width: 100%;
    margin-top: 18px;
    font-size: 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: bold;
}
.modal .btn-login:hover,
.modal .btn-register:hover {
    background: var(--primary-hover);
}

.modal-links {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
}
.modal-links a {
    color: var(--primary);
    font-weight: 600;
}
.modal-links a:hover {
    text-decoration: underline;
}

/* Responsivita modálních oken */
@media (max-width: 480px) {
    .modal-content {
        width: 90%;
        padding: 20px;
    }
    .modal h2 { font-size: 18px; }
}


/* =================== HEADERS / SECTIONS =================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 5px;
    margin-bottom: 15px;
}
.section-header h2 {
    font-size: 20px;
    color: var(--primary);
    margin: 0;
}
.section-header a {
    font-size: 14px;
    color: var(--primary);
}
.section-header a:hover { text-decoration: underline; }

/* =================== CAROUSEL =================== */
.carousel-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 10px;
    margin-bottom: 25px;
}
.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}
.carousel-item {
    min-width: 200px;
    margin-right: 15px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}
.carousel-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}
.carousel-item h4 {
    font-size: 15px;
    margin: 8px;
    color: var(--text-primary);
}
.carousel-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}
.carousel-btn:hover { background: rgba(0,0,0,0.8); }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }

/* =================== ADS / BANNERS =================== */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0;
}
.ad-banner {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background: #e9ecef;
    border: 2px dashed #ccc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
}

/* =================== TOOLTIP =================== */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}
.tooltip .tooltiptext {
    visibility: hidden;
    width: max-content;
    max-width: 240px;
    background-color: rgba(0,0,0,0.8);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 6px 10px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* =================== FAVORITES GRID =================== */
.favorite-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}
.favorite-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}
.favorite-card img {
    width: 100%;
    height: 270px;
    object-fit: cover;
}
.favorite-card .fav-title {
    font-weight: bold;
    padding: 8px;
    font-size: 15px;
    text-align: center;
    color: var(--text-primary);
}

/* =================== SEARCH BAR =================== */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.search-bar input[type="text"] {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid #ccc;
    font-size: 15px;
}
.search-bar button {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}
.search-bar button:hover { background: var(--primary-hover); }

/* =================== PAGINATION =================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
}
.pagination button {
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    padding: 6px 10px;
    cursor: pointer;
    transition: var(--transition);
}
.pagination button:hover { background: var(--primary-hover); }
.pagination button.disabled {
    background: #ccc;
    cursor: not-allowed;
}
/* =========================================================
   TITULKYPLUS.EU — STYLE.CSS
   BLOK 3 / 3 — Titulky, modální okna, responzivita
   ========================================================= */

/* =================== SUBTITLES MODAL =================== */
#subs-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
}

#subs-dialog {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 720px;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* === Hlavička === */
.subs-header {
    background: #0059c9; /* ✳️ firemní modrá TitulkyPlus */
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
}
.subs-header .close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.subs-header .close-btn:hover { transform: rotate(90deg); }

/* === Obsah === */
.subs-content {
    padding: 18px 22px;
    background: #fff;
}

/* === Jednotlivé položky titulků === */
.subtitle-item {
    background: #f9fafc;
    border: 1px solid #e0e4ec;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}
.subtitle-item:hover { background: #f2f7ff; }

.subtitle-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.subtitle-info img {
    width: 22px;
    height: 15px;
    border-radius: 3px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
}
.subtitle-info .release {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    word-break: break-word;
}

/* === Akční tlačítka === */
.subtitle-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.subtitle-actions .btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.subtitle-actions .btn:hover { transform: scale(1.05); }

/* Modré tlačítko Stáhnout */
.subtitle-actions .btn-download {
    background: #0059c9;
    color: #fff;
    font-weight: bold;
}
.subtitle-actions .btn-download:hover { background: #004aa8; }

/* Oranžové tlačítko Přeložit do CZ */
.subtitle-actions .btn-translate {
    background: #f7941d;
    color: #fff;
    font-weight: bold;
}
.subtitle-actions .btn-translate:hover { background: #e68a00; }

/* === Spodní sekce s tlačítkem === */
.subs-footer {
    border-top: 1px solid #e0e4ec;
    background: #fff;
    text-align: center;
    padding: 15px 0 18px 0;
}
.subs-footer button {
    background: #f7941d;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.subs-footer button:hover {
    background: #e68a00;
    transform: scale(1.05);
}

/* === Responzivita === */
@media (max-width: 600px) {
    .subtitle-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .subtitle-actions {
        width: 100%;
        justify-content: flex-start;
    }
}
/* =================== FILTRY – KOMBO MENU (favorites.php) =================== */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    background: #f7f9fc;
    border: 1px solid #e0e4ec;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: bold;
    color: #0059c9;
    font-size: 15px;
}

/* === Vzhled selectů === */
.filters-bar select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230059c9' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 14px;
    border: 1px solid #ccd4e0;
    border-radius: 6px;
    padding: 6px 32px 6px 10px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filters-bar select:hover {
    border-color: #0059c9;
    box-shadow: 0 0 0 2px rgba(0, 89, 201, 0.1);
}

.filters-bar select:focus {
    outline: none;
    border-color: #f7941d;
    box-shadow: 0 0 0 2px rgba(247, 148, 29, 0.25);
}

/* === Ikonky emoji v názvech === */
.filters-bar select option {
    font-size: 14px;
    padding: 6px 10px;
}

/* === Responzivní úpravy === */
@media (max-width: 600px) {
    .filters-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .filter-group {
        width: 100%;
        justify-content: space-between;
    }
    .filters-bar select {
        width: 100%;
    }
}
/* ================== UPLOAD TITULKŮ ================== */

.upload-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 25px 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    color: #0059c9;
    display: block;
    margin-bottom: 8px;
}

.radio-group {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.radio-group.column {
    flex-direction: column;
    gap: 8px;
}

.radio-group label,
.checkbox-label {
    cursor: pointer;
    color: #333;
    font-size: 15px;
}

input[type="radio"],
input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #0059c9;
}

input[type="file"],
input[type="number"] {
    padding: 8px 10px;
    border: 1px solid #ccd4e0;
    border-radius: 6px;
    width: 100%;
    max-width: 400px;
    font-size: 15px;
}

input[type="file"]:hover {
    border-color: #0059c9;
}

.hint {
    font-size: 13px;
    color: #666;
    display: block;
    margin-top: 5px;
    line-height: 1.4;
}

.btn-primary {
    background-color: #0059c9;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background-color: #0047a6;
    transform: translateY(-1px);
}

.form-footer {
    margin-top: 25px;
    text-align: right;
}
/* =================== UPLOAD MODAL (Nahrávání titulků) =================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 28px 32px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    max-width: 480px;
    width: 92%;
}

.modal-content h2 {
    color: #0056b3;
    margin: 0 0 8px;
    font-size: 22px;
}

.modal-content p {
    margin: 4px 0 18px;
    line-height: 1.44;
}
.tmdb-search-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.tmdb-search-link:hover {
    text-decoration: underline;
}


/* Výběr seriálu / filmu */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 20px;
}
.result-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    text-align: center;
    padding: 12px;
}
.result-card .poster {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 10px;
}
.result-card .title {
    font-weight: 600;
    color: #222;
}
.result-card .meta {
    font-size: 13px;
    color: #777;
    margin: 4px 0;
}
.result-card .actions {
    margin-top: 8px;
}

.sep {
    border-top: 1px solid #ddd;
    margin: 25px 0;
}



/* =================== ANIMATIONS =================== */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* =================== EMPTY STATE / SPINNER =================== */
.spinner {
    border: 4px solid #ddd;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================== AI TRANSLATION =================== */
.ai-translation {
    background: #e9f7ff;
    border-left: 4px solid var(--primary);
    padding: 12px 14px;
    border-radius: 8px;
    margin-top: 15px;
    color: #004c91;
    font-size: 14px;
}
.ai-translation strong { color: var(--primary); }

/* =================== TABLES (GLOBAL) =================== */
.table-responsive {
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.table th,
.table td {
    border: 1px solid #dee2e6;
    padding: 8px 10px;
    font-size: 14px;
    text-align: left;
}
.table th {
    background: #f1f3f6;
    color: var(--primary);
    font-weight: bold;
}

/* =================== ALERTS =================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 10px 0;
    font-size: 15px;
}
.alert-success {
    background: #e6f9ed;
    color: #155724;
    border: 1px solid #b7e4c7;
}
.alert-error {
    background: #fdecea;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* =================== FOOTER =================== */
.footer {
    text-align: center;
    padding: 25px;
    color: #888;
    font-size: 14px;
    margin-top: 40px;
}

/* =================== RESPONSIVE (ZÁVĚR) =================== */
@media (max-width: 992px) {
    .series-item { width: 45%; }
    .detail-main { padding: 20px; }
    .info-cell { padding: 20px; }
}

@media (max-width: 768px) {
    .subs-content { max-height: 360px; }
    .subtitle-item { flex-direction: column; align-items: flex-start; }
    .subtitle-actions { width: 100%; justify-content: flex-end; margin-top: 8px; }
    .subs-pagination span { display: block; margin: 8px 0; }
}

@media (max-width: 576px) {
    body { font-size: 15px; }
    .navbar { flex-direction: column; align-items: flex-start; }
    .series-item { width: 100%; }
    .poster-img { max-width: 100%; }
    .btn-fav { width: 100%; }
    .login-box { padding: 20px; }
    .upload-form { padding: 20px; }
    .carousel-item { min-width: 160px; }
    .subs-header { font-size: 15px; }
}
.adsterra-banner {
    text-align: center;
    margin: 20px 0;
}
.banner-under-favorites {
    text-align: center;
    margin: 30px 0;
}
.ad-placeholder {
    background: #f1f1f1;
    border: 1px dashed #ccc;
    padding: 20px;
    color: #999;
    font-size: 14px;
}
/* =================== FAVORITES CAROUSEL =================== */
.favorites-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-bottom: 25px;
}

.favorites-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 10px 5px;
}

.favorite-card {
    position: relative;
    flex: 0 0 auto;
    width: 200px;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
    scroll-snap-align: start;
    transition: transform 0.2s ease;
}
.favorite-card:hover {
    transform: scale(1.03);
}

.favorite-card img.favorite-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.favorite-title {
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    color: var(--text-primary);
    margin: 6px 0;
}

/* Vlaječky nahoře vpravo */
.favorite-card .flag-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    align-items: center;
    background: rgba(0,0,0,0.6);
    border-radius: 8px;
    padding: 4px 6px;
    z-index: 5;
}
.favorite-card .flag-icon {
    width: 22px;
    height: 15px;
    border-radius: 3px;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
}

/* Šipky */
.favorites-arrow {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    z-index: 10;
}
.favorites-arrow:hover {
    background: rgba(0,0,0,0.8);
}
.favorites-arrow.left { left: 8px; }
.favorites-arrow.right { right: 8px; }
