/* ============================
   FLEXORG — Custom UI Layer
   Uses variables from 1.css
   ============================ */


:root {
  --nav-h: 68px;
  --card-radius: 6px;
  --transition: .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: CustomFont, system-ui, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4%;
  z-index: 900;
  transition: background .4s ease, box-shadow .4s;
}
.nav.scrolled {
  background: rgba(10,10,10,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.nav::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
  pointer-events: none; z-index: -1;
  transition: opacity .4s;
}
.nav.scrolled::before { opacity: 0; }

.nav-logo {
  font-size: 28px; font-weight: 900; letter-spacing: -1px;
  color: var(--primary); text-decoration: none;
  font-family: 'Bebas Neue', CustomFont, sans-serif;
}
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a {
  color: var(--muted-foreground); text-decoration: none;
  font-size: 14px; transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--foreground); }

.nav-right { display: flex; align-items: center; gap: 16px; }

.btn-search {
  background: none; border: none; cursor: pointer;
  color: var(--muted-foreground); padding: 6px;
  transition: color var(--transition);
}
.btn-search:hover { color: var(--foreground); }
.btn-search svg { width: 20px; height: 20px; display: block; }

.avatar {
  width: 32px; height: 32px; border-radius: 4px;
  background: var(--primary); display: flex; align-items: center;
  justify-content: center; font-size: 14px; font-weight: 700;
  cursor: pointer; color: #fff;
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(0,0,0,.9);
  display: none; flex-direction: column; align-items: center;
  padding-top: 120px; gap: 32px;
}
.search-overlay.open { display: flex; }

.search-input-wrap {
  display: flex; align-items: center; gap: 12px;
  width: min(600px, 90vw);
  background: var(--secondary); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px;
}
.search-input-wrap svg { width: 20px; flex-shrink: 0; color: var(--muted-foreground); }
.search-input {
  background: none; border: none; outline: none;
  color: var(--foreground); font-size: 18px; flex: 1;
  font-family: inherit;
}
.btn-close-search {
  background: none; border: none; cursor: pointer;
  color: var(--muted-foreground); font-size: 24px;
  transition: color var(--transition);
}
.btn-close-search:hover { color: var(--foreground); }

.search-results {
  width: min(600px, 90vw);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px; max-height: 60vh; overflow-y: auto;
}

/* ===== HERO ===== */
.hero {
  position: relative; height: 90vh; min-height: 560px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero-backdrop {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 20%;
  transition: background-image .6s ease, opacity .6s ease;
}
.hero-backdrop::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(0,0,0,.92) 0%, rgba(0,0,0,.6) 45%, rgba(0,0,0,.05) 100%),
    linear-gradient(to top, var(--background) 0%, rgba(0,0,0,0) 35%),
    linear-gradient(to bottom, rgba(0,0,0,.5) 0%, transparent 20%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 0 5% 100px;
  max-width: 560px;
  animation: fade-in-right 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}
.hero-type {
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--primary); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.hero-type::before { content: ''; display: block; width: 20px; height: 2px; background: var(--primary); }

.hero-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 16px;
  font-family: 'Bebas Neue', CustomFont, sans-serif;
  letter-spacing: 1px;
}
.hero-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--muted-foreground);
  margin-bottom: 16px;
}
.hero-meta .badge {
  background: var(--primary); color: #fff;
  padding: 2px 8px; border-radius: 3px; font-size: 11px;
  font-weight: 700; color: #fff;
}
.hero-desc {
  font-size: 15px; line-height: 1.6;
  color: rgba(255,255,255,.8); margin-bottom: 28px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-play {
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: #000;
  border: none; border-radius: 6px;
  padding: 13px 30px; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background .15s, transform .15s, box-shadow .15s;
  font-family: inherit; letter-spacing: .02em;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.btn-play:hover { background: rgba(255,255,255,.85); transform: scale(1.04); box-shadow: 0 6px 28px rgba(0,0,0,.5); }
.btn-play svg { width: 20px; }

.btn-info {
  display: flex; align-items: center; gap: 10px;
  background: rgba(109,109,110,.55); color: #fff;
  border: none; border-radius: 6px;
  padding: 13px 28px; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background .15s;
  font-family: inherit; letter-spacing: .02em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.btn-info:hover { background: rgba(109,109,110,.45); }
.btn-info svg { width: 20px; }

/* Hero pagination dots */
.hero-dots {
  position: absolute; bottom: 40px; right: 4%;
  display: flex; gap: 6px; z-index: 3;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.4); border: none; cursor: pointer;
  transition: all var(--transition); padding: 0;
}
.hero-dot.active { background: var(--primary); width: 20px; border-radius: 3px; }

/* ===== CONTENT ROWS ===== */
.main-content { padding-top: 0; }

.section { margin-bottom: 40px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4%; margin-bottom: 12px;
}
.section-title {
  font-size: 16px; font-weight: 700; letter-spacing: .02em;
  display: flex; align-items: center; gap: 10px;
  text-transform: uppercase;
}
.section-title::before {
  content: '';
  display: block; width: 3px; height: 16px;
  background: var(--primary); border-radius: 2px;
  flex-shrink: 0;
}
.section-title .accent { color: var(--primary); font-size: 13px; margin-left: 4px; }
.section-more {
  font-size: 12px; color: var(--primary); text-decoration: none;
  display: flex; align-items: center; gap: 4px;
  font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
  transition: gap var(--transition);
}
.section-more:hover { gap: 8px; }

.row-wrap { position: relative; }

.row {
  display: flex; gap: 8px;
  padding: 8px 4%;
  overflow-x: auto; overflow-y: visible;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }

.row-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.7); color: var(--foreground);
  border: 1px solid var(--border); border-radius: 50%;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5;
  transition: background var(--transition), transform var(--transition);
  opacity: 0; pointer-events: none;
}
.row-wrap:hover .row-btn { opacity: 1; pointer-events: auto; }
.row-btn:hover { background: rgba(255,255,255,.1); transform: translateY(-50%) scale(1.1); }
.row-btn.prev { left: 8px; }
.row-btn.next { right: 8px; }
.row-btn svg { width: 16px; }

/* ===== CARD (estilo 1flex — zinc-800, 16:9 thumb + info panel) ===== */
.card {
  flex: 0 0 auto;
  width: 220px;
  background: oklch(18% 0 0);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  z-index: 1;
}
.card:hover { transform: scale(1.03); z-index: 10; box-shadow: 0 8px 28px rgba(0,0,0,.6); }

/* Thumbnail area */
.card-thumb {
  position: relative;
  width: 100%; aspect-ratio: 16/9;
  background: oklch(22% 0 0);
  overflow: hidden;
}
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .3s;
}
.card-thumb.loaded img { opacity: 1; }

/* Loading spinner */
.card-thumb-spinner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.card-thumb.loaded .card-thumb-spinner { display: none; }
.card-thumb-spinner::after {
  content: '';
  width: 24px; height: 24px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Play button overlay */
.card-thumb-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.card:hover .card-thumb-overlay { opacity: 1; }
.card-play-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 1.5px solid rgba(255,255,255,.4);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: background .15s, border-color .15s;
}
.card-play-btn:hover { background: rgba(255,255,255,.3); border-color: #fff; }

/* Year/HD badge top-right */
.card-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.65);
  color: #fff; font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
  z-index: 2;
}

/* Title at bottom of thumb (hidden when loaded — shown via info panel) */
.card-thumb-title {
  position: absolute; bottom: 8px; left: 8px; right: 8px;
  font-size: 11px; font-weight: 600; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.9);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.card-thumb.loaded .card-thumb-title { display: none; }

.card-no-img {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: oklch(22% 0 0); color: var(--muted-foreground);
  font-size: 12px; text-align: center; padding: 8px;
}

/* Info panel below thumb */
.card-info {
  padding: 10px 10px 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.card-info-row {
  display: flex; align-items: center; gap: 6px;
}
.card-tag {
  font-size: 10px; color: #fff;
  background: rgba(255,255,255,.18);
  padding: 1px 6px; border-radius: 3px;
}
.card-tag-border {
  background: transparent;
  border: 1px solid rgba(255,255,255,.4);
}
.card-year { font-size: 11px; color: var(--muted-foreground); }
.card-overview {
  font-size: 11px; line-height: 1.5;
  color: rgba(255,255,255,.75);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-info-actions {
  display: flex; justify-content: flex-end;
}
.card-list-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.4);
  background: transparent;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
  aspect-ratio: 1;
}
.card-list-btn:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.card-list-btn.in-list { background: #fff; border-color: #fff; color: #000; }

/* ===== INTRO SCREEN (estilo Netflix) ===== */
.intro-screen {
  position: fixed; inset: 0; z-index: 99999;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  transition: opacity 0.9s ease;
}
.intro-screen.fade-out { opacity: 0; }
.intro-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px, 12vw, 100px);
  color: var(--primary);
  letter-spacing: 5px;
  animation: intro-enter 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.intro-logo::after {
  content: '';
  display: block; margin: 0 auto; margin-top: 8px;
  width: 0; height: 3px;
  background: var(--primary);
  animation: intro-line 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
@keyframes intro-enter {
  0%   { opacity: 0; transform: scale(0.72); filter: blur(24px); }
  55%  { opacity: 1; transform: scale(1.05); filter: blur(0); }
  100% { opacity: 1; transform: scale(1);    filter: blur(0); }
}
@keyframes intro-line {
  0%   { width: 0;   opacity: 0; }
  50%  { width: 100%; opacity: 1; }
  100% { width: 100%; opacity: 1; }
}

/* ===== KEYFRAMES ===== */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in-right {
  from { opacity: 0; transform: translateX(-22px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===== SECTION SCROLL ANIMATIONS ===== */
.section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.section.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.85);
  /* visibility+opacity ao invés de display:none para permitir transições */
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.modal-overlay.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.modal {
  background: oklch(15% 0 0);
  border-radius: 12px; overflow: hidden;
  width: min(860px, 100%); max-height: 90vh;
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  /* Animação de entrada */
  transform: scale(0.93) translateY(40px);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

/* Hero */
.modal-hero {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: var(--secondary); overflow: hidden;
}
.modal-hero img { width: 100%; height: 100%; object-fit: cover; }
.modal-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, oklch(15% 0 0) 0%, rgba(0,0,0,.15) 55%);
}
.modal-hero-title {
  position: absolute; bottom: 24px; left: 28px;
  font-size: clamp(20px, 4vw, 36px); font-weight: 900;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
  max-width: 65%;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: rgba(20,20,20,.85); color: #fff;
  border: none; border-radius: 50%;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5; font-size: 18px;
  transition: background .15s;
}
.modal-close:hover { background: rgba(60,60,60,.9); }

/* Body */
.modal-body { padding: 20px 28px 28px; }

/* Action row */
.modal-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.modal-play-btn {
  display: flex; align-items: center; gap: 8px;
  background: #fff; color: #000;
  border: none; border-radius: 6px;
  padding: 10px 24px; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none; font-family: inherit;
  transition: background .15s;
}
.modal-play-btn:hover { background: rgba(255,255,255,.85); }
.modal-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.06);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
}
.modal-icon-btn:hover { border-color: #fff; background: rgba(255,255,255,.14); }

/* Two-column layout */
.modal-two-col {
  display: grid; grid-template-columns: 1fr 280px; gap: 28px;
  margin-bottom: 20px;
}
@media (max-width: 640px) { .modal-two-col { grid-template-columns: 1fr; } }

.modal-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: rgba(255,255,255,.85);
  margin-bottom: 10px;
}
.modal-year { color: #4caf50; font-weight: 700; }
.modal-badge {
  border: 1px solid rgba(255,255,255,.4); padding: 1px 6px;
  border-radius: 3px; font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,.8);
}
.modal-badge.sm { font-size: 9px; padding: 1px 4px; }
.modal-rate { color: #f5c518; font-weight: 700; }

.modal-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.modal-genre-tag {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  background: oklch(22% 0 0); color: rgba(255,255,255,.75);
}
.modal-overview { font-size: 14px; line-height: 1.7; color: rgba(255,255,255,.85); }

.modal-col-side { padding-top: 4px; }
.modal-side-row { margin-bottom: 10px; font-size: 13px; line-height: 1.5; }
.modal-side-label { color: var(--muted-foreground); margin-right: 4px; }
.modal-side-val { color: rgba(255,255,255,.85); }

.modal-section-title {
  font-size: 18px; font-weight: 700; margin-bottom: 14px;
}

/* Similar grid — 3 cards */
.modal-similar-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
@media (max-width: 600px) { .modal-similar-grid { grid-template-columns: 1fr 1fr; } }

.modal-sim-card {
  background: oklch(18% 0 0); border-radius: 6px; overflow: hidden;
  cursor: pointer; position: relative;
  transition: background .15s;
}
.modal-sim-card:hover { background: oklch(22% 0 0); }
.modal-sim-thumb {
  width: 100%; aspect-ratio: 16/9; overflow: hidden; position: relative;
}
.modal-sim-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-sim-duration {
  position: absolute; top: 5px; right: 6px;
  background: rgba(0,0,0,.75); color: #f5c518;
  font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 3px;
}
.modal-sim-info { padding: 8px 10px 10px; }
.modal-sim-meta {
  display: flex; align-items: center; gap: 6px; margin-bottom: 5px; font-size: 11px;
  color: rgba(255,255,255,.6);
}
.modal-sim-desc { font-size: 11px; color: rgba(255,255,255,.55); line-height: 1.5; }
.modal-sim-add {
  position: absolute; bottom: 8px; right: 8px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.4);
  background: transparent; color: #fff;
  font-size: 16px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s;
}
.modal-sim-add:hover { border-color: #fff; }

/* Season tabs */
.season-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.season-tab {
  padding: 6px 14px; border-radius: 4px; font-size: 12px;
  background: var(--secondary); border: 1px solid var(--border);
  cursor: pointer; color: var(--muted-foreground);
  transition: all var(--transition); font-family: inherit;
}
.season-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.ep-list { display: flex; flex-direction: column; gap: 10px; }
.ep-item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px; background: var(--secondary); border-radius: 6px;
  cursor: pointer; transition: background var(--transition);
}
.ep-item:hover { background: var(--muted); }
.ep-thumb {
  flex: 0 0 120px; aspect-ratio: 16/9;
  background: var(--muted); border-radius: 4px; overflow: hidden;
}
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-info { flex: 1; }
.ep-title { font-size: 13px; font-weight: 600; }
.ep-meta { font-size: 11px; color: var(--muted-foreground); margin-top: 3px; }

/* ===== PLAYER PAGE ===== */
.player-page { min-height: 100vh; display: flex; flex-direction: column; }
.player-wrap {
  flex: 1; position: relative; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.player-wrap iframe {
  width: 100%; height: 100%; position: absolute; inset: 0; border: none;
}
.player-back {
  position: absolute; top: 20px; left: 20px; z-index: 10;
  background: rgba(0,0,0,.7); color: var(--foreground);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 16px; cursor: pointer; text-decoration: none;
  font-size: 14px; display: flex; align-items: center; gap: 6px;
  transition: background var(--transition);
}
.player-back:hover { background: rgba(255,255,255,.1); }
.player-info {
  padding: 20px 4%;
  background: var(--card); border-top: 1px solid var(--border);
}
.player-info h1 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.player-sources {
  display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap;
}
.source-btn {
  padding: 6px 14px; border-radius: 4px; font-size: 12px;
  background: var(--secondary); border: 1px solid var(--border);
  cursor: pointer; color: var(--muted-foreground);
  transition: all var(--transition); font-family: inherit;
}
.source-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--secondary) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--card-radius);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sk-card { width: 220px; flex: 0 0 220px; aspect-ratio: 16/9; border-radius: 8px; }

.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin .7s linear infinite;
  margin: 60px auto;
}

/* ===== TOAST ===== */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--secondary); border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 12px 16px; border-radius: 6px;
  font-size: 13px; max-width: 300px;
  animation: fade-in-right .3s ease-out both;
}

/* ===== FOOTER ===== */
.footer {
  padding: 40px 4% 24px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px; margin-bottom: 24px;
}
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.footer-col a {
  display: block; color: var(--muted-foreground); text-decoration: none;
  font-size: 13px; margin-bottom: 8px; transition: color var(--transition);
}
.footer-col a:hover { color: var(--foreground); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted-foreground);
}
.footer-logo { color: var(--primary); font-weight: 900; font-size: 18px; font-family: 'Bebas Neue', sans-serif; }

/* ===== CARD GRID (movies/series pages) ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  padding-bottom: 40px;
}
.card-grid .card { width: 100%; flex: none; }

/* ===== GENRES PAGE ===== */
.genre-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; padding: 0 4%;
}
.genre-card {
  aspect-ratio: 16/9; border-radius: 8px; overflow: hidden;
  position: relative; cursor: pointer;
  transition: transform var(--transition);
}
.genre-card:hover { transform: scale(1.04); }
.genre-card img { width: 100%; height: 100%; object-fit: cover; }
.genre-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.7), transparent);
  display: flex; align-items: flex-end; padding: 12px;
}
.genre-card h3 { font-size: 14px; font-weight: 700; }

/* ===== PAGE TITLE ===== */
.page-header {
  padding: calc(var(--nav-h) + 40px) 4% 24px;
  background: linear-gradient(180deg, rgba(0,0,0,.6) 0%, transparent 100%);
}
.page-header h1 { font-size: 28px; font-weight: 900; font-family: 'Bebas Neue', CustomFont, sans-serif; letter-spacing: 1px; }
.page-header p { color: var(--muted-foreground); font-size: 14px; margin-top: 4px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 24px 0; }
.page-btn {
  width: 36px; height: 36px; border-radius: 4px;
  background: var(--secondary); border: 1px solid var(--border);
  color: var(--foreground); cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); font-family: inherit;
}
.page-btn.active { background: var(--primary); border-color: var(--primary); }
.page-btn:hover:not(.active) { background: var(--muted); }

/* ===== API KEY WARNING ===== */
.api-warning {
  background: rgba(229, 57, 53, .15); border: 1px solid rgba(229, 57, 53, .3);
  border-radius: 8px; padding: 16px 20px; margin: 20px 4%;
  font-size: 14px; display: flex; align-items: flex-start; gap: 12px;
}
.api-warning a { color: var(--primary); }

/* ===== FONT OVERRIDE — Inter (Netflix-style clean) ===== */
/* Same selector as 1.css + later in cascade = Inter wins */
:not([style*=font-bebas-neue]):not([style*=Bebas\ Neue]) {
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
/* Keep Bebas Neue only for display headings */
.nav-logo,
.hero-title,
.page-header h1,
.footer-logo {
  font-family: 'Bebas Neue', 'Inter', system-ui, sans-serif !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { height: 70vh; }
  .hero-content { max-width: 100%; }
  .hero-title { font-size: 28px; }
  .hero-desc { -webkit-line-clamp: 2; }
  .card { width: 140px; }
  .sk-card { width: 140px; flex: 0 0 140px; }
  .modal { border-radius: 0; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-body { padding: 16px; }
}
