/* ═══════════════════════════════════════════════════════════════
   Fethi Döşeme — Main Stylesheet
   Netflix-style dark theme, Fethi Baba
   Geceleri yavru kurtlar değil avcı kurtlar gezer.
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --red:          #E50914;
    --red-dark:     #b0060f;
    --red-glow:     rgba(229, 9, 20, 0.35);
    --bg:           #141414;
    --bg-card:      #1a1a1a;
    --bg-elevated:  #222;
    --bg-overlay:   rgba(0, 0, 0, 0.75);
    --text:         #fff;
    --text-muted:   #aaa;
    --text-dim:     #777;
    --border:       rgba(255,255,255,0.08);
    --gold:         #f5c518;
    --green:        #46d369;
    --radius:       8px;
    --radius-lg:    14px;
    --shadow:       0 8px 32px rgba(0,0,0,0.6);
    --transition:   0.25s ease;
    --navbar-h:     68px;
    --font:         'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 2rem); }
h3 { font-size: clamp(1rem, 2vw, 1.4rem); }

/* ── Utility ─────────────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-red    { color: var(--red) !important; }
.text-muted  { color: var(--text-muted); }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
}
.badge-red   { background: var(--red);   color: #fff; }
.badge-dark  { background: rgba(255,255,255,0.1); color: var(--text); }
.badge-gold  { background: var(--gold);  color: #000; }
.badge-green { background: var(--green); color: #000; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 24px; border-radius: var(--radius);
    font-size: 0.95rem; font-weight: 600;
    transition: transform var(--transition), opacity var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}
.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(0.97); }

.btn-red {
    background: var(--red); color: #fff;
    box-shadow: 0 4px 16px var(--red-glow);
}
.btn-red:hover { background: var(--red-dark); box-shadow: 0 6px 24px var(--red-glow); }

.btn-white {
    background: rgba(255,255,255,0.9); color: #000;
}
.btn-white:hover { background: #fff; }

.btn-ghost {
    background: rgba(255,255,255,0.15); color: #fff;
    backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.25); }

.btn-outline {
    background: transparent; color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { border-color: #fff; }

.btn-icon {
    width: 42px; height: 42px;
    padding: 0; border-radius: 50%;
    justify-content: center;
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--navbar-h);
    transition: background var(--transition), box-shadow var(--transition);
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
}
.navbar.scrolled {
    background: rgba(20, 20, 20, 0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex; align-items: center; gap: 32px;
    height: 100%; padding: 0 32px;
    max-width: 1600px; margin: 0 auto;
}

/* Logo */
.nav-logo {
    font-size: 1.7rem; font-weight: 900; letter-spacing: -1px;
    flex-shrink: 0;
}
.logo-k    { color: var(--red); }
.logo-flix { color: #fff; }

/* Nav Links */
.nav-links {
    display: flex; gap: 6px; margin: 0;
}
.nav-links a {
    padding: 6px 14px; border-radius: var(--radius);
    color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
    transition: color var(--transition), background var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(255,255,255,0.08);
}
.nav-links a.active { color: var(--red); }

/* Search */
.nav-search { position: relative; margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search-toggle {
    color: var(--text-muted); font-size: 1.1rem;
    transition: color var(--transition);
}
.search-toggle:hover { color: #fff; }

.search-form {
    display: flex; align-items: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    transition: width var(--transition), border-color var(--transition);
    width: 0; opacity: 0; pointer-events: none;
}
.search-form.open {
    width: 280px; opacity: 1; pointer-events: all;
    border-color: rgba(255,255,255,0.2);
}
.search-input {
    flex: 1; background: none; border: none;
    padding: 8px 16px; color: #fff;
    font-size: 0.9rem; outline: none;
}
.search-input::placeholder { color: var(--text-dim); }
.search-btn {
    padding: 8px 14px; color: var(--text-muted);
    transition: color var(--transition);
}
.search-btn:hover { color: var(--red); }

/* Live search dropdown */
.search-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    width: 340px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    max-height: 480px; overflow-y: auto;
    display: none;
}
.search-dropdown.show { display: block; }
.search-drop-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; cursor: pointer;
    transition: background var(--transition);
    text-decoration: none; color: inherit;
}
.search-drop-item:hover { background: rgba(255,255,255,0.06); }
.search-drop-img {
    width: 44px; height: 62px; object-fit: cover;
    border-radius: 4px; flex-shrink: 0; background: #333;
}
.search-drop-info { flex: 1; min-width: 0; }
.search-drop-title { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-drop-meta  { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.search-drop-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; justify-content: space-between;
    width: 26px; height: 18px; margin-left: 8px;
}
.hamburger span {
    display: block; height: 2px; width: 100%;
    background: #fff; border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
    display: none; flex-direction: column; gap: 4px;
    padding: 12px 20px 20px;
    background: rgba(20,20,20,0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
}
.mobile-menu.show { display: flex; }
.mobile-menu a {
    padding: 12px 8px; font-size: 1rem; font-weight: 500;
    color: var(--text-muted); border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
}
.mobile-menu a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.mobile-search-form {
    display: flex; margin-top: 8px;
    background: rgba(255,255,255,0.08); border-radius: 24px; overflow: hidden;
}
.mobile-search-form input {
    flex: 1; background: none; border: none;
    padding: 10px 16px; color: #fff; outline: none;
}
.mobile-search-form button {
    padding: 10px 16px; color: var(--text-muted);
}

/* ── Hero / Slider ───────────────────────────────────────── */
.hero {
    position: relative; width: 100%;
    height: 90vh; min-height: 520px; max-height: 860px;
    overflow: hidden;
}

.hero-slides { position: relative; width: 100%; height: 100%; }

.hero-slide {
    position: absolute; inset: 0;
    opacity: 0; transition: opacity 0.8s ease;
    pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: all; }

.hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center top;
    transform: scale(1.05);
    transition: transform 8s linear;
}
.hero-slide.active .hero-bg { transform: scale(1); }

.hero-gradient {
    position: absolute; inset: 0;
    background:
        linear-gradient(to right, rgba(20,20,20,0.95) 30%, rgba(20,20,20,0.2) 70%, transparent),
        linear-gradient(to top, var(--bg) 0%, transparent 30%);
}

.hero-content {
    position: absolute; bottom: 15%; left: 0;
    padding: 0 80px;
    max-width: 700px;
    animation: heroFadeUp 0.6s ease;
}
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-badge { margin-bottom: 12px; }
.hero-title {
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 900; line-height: 1.1;
    text-shadow: 0 4px 24px rgba(0,0,0,0.6);
    margin-bottom: 14px;
}
.hero-meta {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 14px; flex-wrap: wrap;
    font-size: 0.9rem; color: var(--text-muted);
}
.hero-meta .vote {
    display: flex; align-items: center; gap: 4px;
    font-weight: 700; color: var(--gold);
}
.hero-overview {
    font-size: 0.97rem; line-height: 1.65;
    color: rgba(255,255,255,0.8);
    max-width: 500px; margin-bottom: 24px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Slider Controls */
.hero-controls {
    position: absolute; bottom: 10%; right: 80px;
    display: flex; align-items: center; gap: 12px;
}
.hero-dots {
    display: flex; gap: 6px;
}
.hero-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: background var(--transition), transform var(--transition);
    cursor: pointer;
}
.hero-dot.active { background: var(--red); transform: scale(1.4); }

.hero-arrow {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.9rem;
    transition: background var(--transition);
    backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: var(--red); }

/* Scroll indicator */
.hero-scroll {
    position: absolute; bottom: 24px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    color: rgba(255,255,255,0.4); font-size: 0.7rem;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── Section / Row ───────────────────────────────────────── */
.section { padding: 0 0 40px; }
.section + .section { padding-top: 8px; }

.section-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 40px 16px;
}
.section-title {
    font-size: 1.25rem; font-weight: 700;
    display: flex; align-items: center; gap: 10px;
}
.section-title i { color: var(--red); font-size: 1rem; }
.section-link {
    font-size: 0.82rem; color: var(--text-muted);
    display: flex; align-items: center; gap: 4px;
    transition: color var(--transition);
}
.section-link:hover { color: var(--red); }

/* Horizontal scroll row */
.row-scroll {
    display: flex; gap: 12px;
    padding: 8px 40px 20px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; flex-shrink: 0; }

/* Row nav arrows */
.row-wrapper { position: relative; }
.row-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 10; width: 44px; height: 80px;
    background: rgba(20,20,20,0.8);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.2rem;
    border-radius: 0 4px 4px 0;
    transition: background var(--transition), opacity var(--transition);
    opacity: 0;
}
.row-btn.left  { left: 0; border-radius: 0 4px 4px 0; }
.row-btn.right { right: 0; border-radius: 4px 0 0 4px; }
.row-wrapper:hover .row-btn { opacity: 1; }
.row-btn:hover { background: var(--red); }

/* ── Media Card ─────────────────────────────────────────── */
.card {
    position: relative; border-radius: var(--radius);
    overflow: visible; cursor: pointer;
    transition: transform var(--transition), z-index 0s 0.25s;
    width: 180px;
}
.card:hover {
    transform: scale(1.08);
    z-index: 50;
    transition: transform var(--transition), z-index 0s;
}

.card-poster {
    position: relative; border-radius: var(--radius);
    overflow: hidden; aspect-ratio: 2/3;
    background: var(--bg-card);
}
.card-poster img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform var(--transition);
}
.card:hover .card-poster img { transform: scale(1.05); }

/* Card ribbon */
.card-ribbon {
    position: absolute; top: 8px; left: 8px;
    padding: 2px 8px; border-radius: 4px;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.5px;
    text-transform: uppercase; z-index: 2;
}
.card-ribbon.red   { background: var(--red); color: #fff; }
.card-ribbon.gold  { background: var(--gold); color: #000; }
.card-ribbon.green { background: var(--green); color: #000; }

/* Card vote */
.card-vote {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.75); border: 1px solid var(--border);
    border-radius: 20px; padding: 2px 8px;
    font-size: 0.72rem; font-weight: 700; color: var(--gold);
    display: flex; align-items: center; gap: 3px;
    backdrop-filter: blur(4px);
}

/* Card hover panel */
.card-hover {
    position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 220px;
    background: var(--bg-elevated);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow);
    opacity: 0; pointer-events: none;
    transition: opacity var(--transition);
    z-index: 60;
    border: 1px solid var(--border);
}
.card:hover .card-hover { opacity: 1; pointer-events: all; }

.card-hover-title {
    font-size: 0.92rem; font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-hover-meta {
    font-size: 0.75rem; color: var(--text-muted);
    margin-bottom: 10px;
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.card-hover-overview {
    font-size: 0.78rem; line-height: 1.55;
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-hover-actions {
    display: flex; gap: 6px; flex-wrap: wrap;
}

/* Wide card variant (backdrops) */
.card-wide {
    width: 280px;
}
.card-wide .card-poster { aspect-ratio: 16/9; }

/* ── Detail Page ─────────────────────────────────────────── */
.detail-hero {
    position: relative; min-height: 70vh;
    display: flex; align-items: flex-end;
    padding-bottom: 60px;
    margin-bottom: 40px;
}
.detail-backdrop {
    position: absolute; inset: 0;
    background-size: cover; background-position: center top;
}
.detail-gradient {
    position: absolute; inset: 0;
    background:
        linear-gradient(to right, rgba(20,20,20,0.97) 35%, rgba(20,20,20,0.3) 65%, transparent),
        linear-gradient(to top, var(--bg) 0%, transparent 40%);
}
.detail-content { position: relative; z-index: 2; display: flex; gap: 48px; padding: 0 60px; align-items: flex-end; }

.detail-poster {
    width: 220px; flex-shrink: 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0,0,0,0.7);
    overflow: hidden;
}
.detail-poster img { width: 100%; display: block; }

.detail-info { flex: 1; }

.detail-genres {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.detail-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900; margin-bottom: 12px;
    line-height: 1.1;
}
.detail-tagline {
    font-size: 1rem; color: var(--text-muted);
    font-style: italic; margin-bottom: 16px;
}
.detail-meta {
    display: flex; gap: 20px; flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 0.9rem; color: var(--text-muted);
}
.detail-meta-item { display: flex; align-items: center; gap: 6px; }
.detail-meta-item i { color: var(--red); }
.detail-meta strong { color: #fff; }

.detail-score-ring {
    display: inline-flex; align-items: center; gap: 12px;
    margin-bottom: 20px;
}
.score-circle {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: conic-gradient(var(--gold) var(--pct, 0%), rgba(255,255,255,0.1) 0%);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.score-inner {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--bg-elevated);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; font-weight: 800; color: var(--gold);
}
.score-label { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }
.score-label strong { display: block; color: #fff; font-size: 1rem; }

.detail-overview {
    font-size: 0.97rem; line-height: 1.75;
    color: rgba(255,255,255,0.85);
    max-width: 620px; margin-bottom: 24px;
}
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Trailer Modal ─────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.9);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(6px);
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal-box {
    position: relative; width: 90vw; max-width: 900px;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.8);
    background: #000;
    transform: scale(0.9);
    transition: transform 0.3s;
}
.modal-overlay.show .modal-box { transform: scale(1); }
.modal-box iframe { width: 100%; height: 100%; border: none; }
.modal-close {
    position: absolute; top: -48px; right: 0;
    color: rgba(255,255,255,0.7); font-size: 1.8rem;
    transition: color var(--transition);
}
.modal-close:hover { color: var(--red); }

/* ── Cast Row ────────────────────────────────────────────── */
.cast-card {
    width: 120px; text-align: center; cursor: pointer;
}
.cast-card:hover .cast-img { border-color: var(--red); }
.cast-img {
    width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 8px;
    overflow: hidden; border: 2px solid transparent;
    transition: border-color var(--transition);
    background: var(--bg-card);
}
.cast-img img { width: 100%; height: 100%; object-fit: cover; }
.cast-name { font-size: 0.78rem; font-weight: 600; margin-bottom: 2px; }
.cast-char { font-size: 0.7rem; color: var(--text-muted); }

/* ── Stats Grid ─────────────────────────────────────────── */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px; margin-bottom: 40px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px; text-align: center;
}
.stat-card i { font-size: 1.4rem; color: var(--red); margin-bottom: 8px; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 1.1rem; font-weight: 700; margin-top: 4px; }

/* ── Season/Episode ─────────────────────────────────────── */
.season-tabs {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.season-tab {
    padding: 8px 18px; border-radius: var(--radius);
    background: var(--bg-card); color: var(--text-muted);
    font-size: 0.85rem; font-weight: 600;
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.season-tab:hover,
.season-tab.active { background: var(--red); color: #fff; border-color: var(--red); }

.episode-list { display: flex; flex-direction: column; gap: 12px; }
.episode-item {
    display: flex; gap: 16px;
    background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--border);
    transition: border-color var(--transition);
}
.episode-item:hover { border-color: var(--red); }
.episode-thumb {
    width: 160px; flex-shrink: 0;
    background: var(--bg-elevated);
}
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/9; }
.episode-body { padding: 14px; flex: 1; }
.episode-num { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.episode-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.episode-overview { font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; }

/* ── User Rating ─────────────────────────────────────────── */
.user-rating { display: flex; flex-direction: column; gap: 8px; }
.star-row {
    display: flex; gap: 4px;
}
.star-btn {
    font-size: 1.5rem; color: rgba(255,255,255,0.2);
    transition: color var(--transition), transform var(--transition);
}
.star-btn.active,
.star-btn:hover { color: var(--gold); transform: scale(1.15); }
.rating-label { font-size: 0.82rem; color: var(--text-muted); }

/* ── Search Page ─────────────────────────────────────────── */
.page-hero {
    padding: calc(var(--navbar-h) + 40px) 60px 40px;
}
.page-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 900; margin-bottom: 4px;
}
.page-subtitle { color: var(--text-muted); font-size: 0.95rem; }

.filter-bar {
    display: flex; gap: 10px; flex-wrap: wrap;
    padding: 0 60px 32px;
}
.filter-select, .filter-input {
    background: var(--bg-card); color: #fff;
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 9px 14px; font-size: 0.85rem; outline: none;
    transition: border-color var(--transition);
}
.filter-select:focus, .filter-input:focus { border-color: var(--red); }
.filter-select option { background: var(--bg-elevated); }

.grid-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 0 60px 60px;
}

/* ── Discover ────────────────────────────────────────────── */
.discover-layout {
    display: grid; grid-template-columns: 260px 1fr;
    gap: 32px; padding: 0 60px 60px;
    align-items: start;
}
.sidebar {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 20px; border: 1px solid var(--border);
    position: sticky; top: calc(var(--navbar-h) + 16px);
}
.sidebar h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 10px; }
.sidebar-group { margin-bottom: 24px; }
.genre-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.genre-btn {
    padding: 5px 12px; border-radius: 20px; font-size: 0.78rem;
    background: rgba(255,255,255,0.06); color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.genre-btn:hover, .genre-btn.active {
    background: var(--red); color: #fff; border-color: var(--red);
}

/* ── Person Page ─────────────────────────────────────────── */
.person-hero {
    padding: calc(var(--navbar-h) + 60px) 60px 60px;
    display: flex; gap: 48px; align-items: flex-start;
}
.person-photo {
    width: 200px; flex-shrink: 0;
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow);
}
.person-photo img { width: 100%; display: block; }
.person-name { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 900; margin-bottom: 10px; }
.person-meta { color: var(--text-muted); margin-bottom: 16px; font-size: 0.9rem; display: flex; gap: 16px; flex-wrap: wrap; }
.person-bio { font-size: 0.93rem; line-height: 1.7; color: rgba(255,255,255,0.8); max-width: 700px; }

/* ── Favorites ───────────────────────────────────────────── */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    padding: 80px 20px; text-align: center; gap: 16px;
}
.empty-state i { font-size: 4rem; color: var(--red); opacity: 0.4; }
.empty-state h2 { font-size: 1.4rem; }
.empty-state p { color: var(--text-muted); max-width: 360px; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
    display: flex; justify-content: center; gap: 6px;
    padding: 20px 0 40px;
}
.page-btn {
    width: 40px; height: 40px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); color: var(--text-muted);
    border: 1px solid var(--border); font-size: 0.9rem;
    transition: all var(--transition);
}
.page-btn:hover, .page-btn.active { background: var(--red); color: #fff; border-color: var(--red); }
.page-btn.disabled { opacity: 0.3; pointer-events: none; }

/* ── Loading Spinner ─────────────────────────────────────── */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius);
}
@keyframes shimmer { to { background-position: -400% 0; } }

/* ── Toast Notifications ─────────────────────────────────── */
.toast-container {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 9000; display: flex; flex-direction: column; gap: 8px;
}
.toast {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 18px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: var(--shadow); min-width: 240px;
    animation: toastIn 0.3s ease;
    font-size: 0.9rem;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid #4fc3f7; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    background: #0a0a0a; border-top: 1px solid var(--border);
    padding: 60px 0 0;
    margin-top: 40px;
}
.footer-container {
    max-width: 1200px; margin: 0 auto; padding: 0 40px;
    display: grid; grid-template-columns: 1fr 2fr;
    gap: 60px; padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}
.footer-brand .nav-logo { font-size: 2rem; }
.footer-tagline { color: var(--text-muted); margin-top: 10px; font-size: 0.9rem; }

.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 14px; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-dim); font-size: 0.88rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--red); }

.footer-bottom {
    max-width: 1200px; margin: 0 auto;
    padding: 20px 40px 28px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { color: var(--text-dim); font-size: 0.8rem; }
.footer-bottom a { color: var(--text-muted); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--red); }
.footer-sig {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-muted); font-size: 0.82rem;
}
.sig-badge {
    background: linear-gradient(135deg, var(--red) 0%, #ff6b35 100%);
    padding: 2px 10px; border-radius: 20px;
    font-size: 0.78rem; font-weight: 700; color: #fff;
    letter-spacing: 0.5px;
}
.tmdb-attr { display: flex; align-items: center; gap: 8px; opacity: 0.4; }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs {
    display: flex; gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
}
.tab-btn {
    padding: 12px 20px;
    font-size: 0.9rem; font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover { color: #fff; }
.tab-btn.active { color: var(--red); border-color: var(--red); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Misc / Detail sections ─────────────────────────────── */
.section-inner { padding: 0 60px 32px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 8px 0 24px; }

/* Fact rows */
.fact-table { display: flex; flex-direction: column; gap: 10px; }
.fact-row { display: flex; gap: 20px; font-size: 0.88rem; }
.fact-key { color: var(--text-muted); min-width: 120px; flex-shrink: 0; }
.fact-val { color: var(--text); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .detail-content    { padding: 0 32px; flex-direction: column; gap: 28px; align-items: flex-start; }
    .detail-poster     { width: 160px; }
    .hero-content      { padding: 0 40px; }
    .hero-controls     { right: 40px; }
    .section-header,
    .row-scroll        { padding-left: 24px; padding-right: 24px; }
    .grid-results,
    .filter-bar,
    .page-hero,
    .section-inner     { padding-left: 24px; padding-right: 24px; }
    .discover-layout   { grid-template-columns: 1fr; padding: 0 24px 40px; }
    .sidebar           { position: static; }
    .person-hero       { padding: calc(var(--navbar-h) + 32px) 24px 32px; }
}

@media (max-width: 768px) {
    .nav-links         { display: none; }
    .hamburger         { display: flex; }
    .search-form.open  { width: 200px; }
    .hero-content      { padding: 0 20px; max-width: 100%; }
    .hero-controls     { right: 20px; bottom: 8%; }
    .hero              { height: 80vh; }
    .detail-content    { padding: 0 20px; }
    .detail-poster     { display: none; }
    .footer-container  { grid-template-columns: 1fr; gap: 32px; }
    .footer-links      { grid-template-columns: repeat(2, 1fr); }
    .person-hero       { flex-direction: column; }
    .stats-grid        { grid-template-columns: repeat(2, 1fr); }
    .grid-results      { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); padding: 0 16px 40px; }
    .row-scroll        { padding-left: 16px; }
    .section-header    { padding-left: 16px; padding-right: 16px; }
    .card              { width: 140px; }
    .card-wide         { width: 220px; }
}

@media (max-width: 480px) {
    :root { --navbar-h: 60px; }
    .footer-links { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .card { width: 120px; }
}
