/* ============================================================
   PrimeTime — styles.css
   Black & Purple Netflix-Style Theme
   ============================================================ */

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

:root {
  /* MONOCHROME THEME */
  --accent:        #ffffff;
  --accent-dim:    #d4d4d4;
  --accent-soft:   #888888;

  --bg:            #000000;
  --bg2:           #0a0a0a;
  --bg3:           #141414;
  --bg4:           #1c1c1c;

  --surface:       #222222;
  --surface2:      #2c2c2c;

  --text:          #ffffff;
  --text-muted:    #b3b3b3;
  --text-dim:      #6b6b6b;

  --border:        rgba(255,255,255,0.12);

  --nav-height:    68px;
  --radius:        10px;
  --radius-sm:     6px;
  --transition:    0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg3); }
::-webkit-scrollbar-thumb { background: var(--purple-dark); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease;
}

#splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.splash-logo {
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--purple);
  animation: logoPulse 1.5s ease-in-out infinite alternate;
  text-shadow:
    0 0 20px var(--purple-glow),
    0 0 60px var(--purple-glow),
    0 0 120px rgba(139, 92, 246, 0.3);
}

@keyframes logoPulse {
  from {
    text-shadow:
      0 0 10px var(--purple-glow),
      0 0 40px var(--purple-glow),
      0 0 80px rgba(139, 92, 246, 0.25);
    opacity: 0.85;
  }
  to {
    text-shadow:
      0 0 30px var(--purple-glow),
      0 0 80px var(--purple-glow),
      0 0 160px rgba(139, 92, 246, 0.5);
    opacity: 1;
  }
}

.splash-tagline {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.splash-loader {
  width: 200px;
  height: 3px;
  background: var(--surface);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 12px;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.splash-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--purple-dark), var(--purple), var(--purple-light));
  border-radius: 99px;
  animation: loadBar 2.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes loadBar {
  0%   { width: 0%; }
  40%  { width: 55%; }
  70%  { width: 75%; }
  90%  { width: 90%; }
  100% { width: 100%; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4%;
  transition: background var(--transition), backdrop-filter var(--transition);
  background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, transparent 100%);
}

#navbar.scrolled,
#navbar.navbar-solid {
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--purple);
  text-shadow: 0 0 20px var(--purple-glow-sm);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

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

/* Search */
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-btn {
  color: var(--text);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.search-btn svg { width: 20px; height: 20px; }
.search-btn:hover { color: var(--purple-light); }

#search-input {
  width: 0;
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: width 0.35s ease, opacity 0.35s ease;
  padding: 6px 0;
}

.nav-search.open #search-input,
.nav-search--open #search-input {
  width: 200px;
  opacity: 1;
  border-bottom: 1px solid var(--purple);
  padding: 6px 8px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav overlay */
.nav-links.mobile-open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(12px);
  padding: 20px 4%;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  z-index: 99;
}

/* ============================================================
   HERO / BILLBOARD
   ============================================================ */
.hero {
  position: relative;
  height: 82vh;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transform: scale(1.04);
  transition: opacity 0.6s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.3) 40%,
    rgba(0,0,0,0.85) 80%,
    rgba(0,0,0,1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 4% 60px;
  max-width: 600px;
  animation: fadeInUp 0.8s ease both;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 14px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-desc {
  font-size: 0.95rem;
  color: #d1d5db;
  line-height: 1.65;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.hero-meta .rating {
  color: var(--purple-light);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-meta .rating svg { width: 14px; height: 14px; fill: var(--purple); }

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: #fff;
  box-shadow: 0 4px 20px var(--purple-glow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  box-shadow: 0 6px 28px var(--purple-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* ============================================================
   CATEGORY ROWS
   ============================================================ */
.categories {
  padding: 0 0 60px;
  background: var(--bg);
}

.row-wrapper {
  padding: 0 4%;
  margin-bottom: 36px;
  position: relative;
}

.row-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.row-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  position: relative;
}

.row-title::after {
  content: '';
  display: block;
  width: 30px;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
  margin-top: 5px;
}

.row-track-container {
  position: relative;
}

.row-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 2px 16px;
  scrollbar-width: none;
}

.row-track::-webkit-scrollbar { display: none; }

/* Scroll arrows */
.row-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(8px);
}

.row-arrow svg { width: 18px; height: 18px; }
.row-arrow.arrow-left  { left: -18px; }
.row-arrow.arrow-right { right: -18px; }

.row-track-container:hover .row-arrow { opacity: 1; }
.row-arrow:hover {
  background: var(--purple-dark);
  box-shadow: 0 0 14px var(--purple-glow-sm);
}

/* ---- Movie Card ---- */
.movie-card {
  flex: 0 0 auto;
  width: 180px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  background: var(--bg4);
}

.movie-card:hover {
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 0 22px var(--purple-glow), 0 10px 30px rgba(0,0,0,0.6);
  z-index: 5;
}

.movie-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  transition: opacity var(--transition);
}

.movie-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
}

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

.movie-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 4px;
}

.movie-card-meta {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.movie-card-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
}

.movie-card:hover .movie-card-actions { opacity: 1; }

.card-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.card-action-btn svg { width: 12px; height: 12px; }
.card-action-btn:hover { background: var(--purple-dark); }
.card-action-btn.in-list { background: var(--purple-dark); }

/* Skeleton / shimmer cards */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  flex: 0 0 auto;
  width: 180px;
  aspect-ratio: 2/3;
  border-radius: var(--radius-sm);
}

/* ============================================================
   DETAIL PAGE (movie.html / tv.html)
   ============================================================ */
.detail-page { background: var(--bg2); }

.detail-main {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.detail-backdrop-wrap {
  position: relative;
  height: 55vh;
  min-height: 340px;
  overflow: hidden;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
}

.detail-backdrop-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3) 0%,
    rgba(0,0,0,0.5) 50%,
    var(--bg2) 100%
  );
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4%;
}

.detail-content {
  margin-top: -80px;
  position: relative;
  z-index: 2;
  padding-bottom: 60px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 24px;
  transition: color var(--transition);
}

.back-btn svg { width: 18px; height: 18px; }
.back-btn:hover { color: var(--purple-light); }

/* Detail Header */
.detail-header { margin-bottom: 28px; }

.detail-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.15;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.detail-meta .rating-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--purple-light);
  font-weight: 600;
}

.detail-meta .rating-badge svg { width: 14px; height: 14px; fill: var(--purple); }

.genre-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--border);
  color: var(--purple-light);
  font-size: 0.75rem;
  font-weight: 500;
}

.detail-overview {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #d1d5db;
  max-width: 760px;
}

.detail-list-btn {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--border);
  color: var(--purple-light);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.detail-list-btn svg { width: 16px; height: 16px; }
.detail-list-btn:hover,
.detail-list-btn.in-list {
  background: var(--purple-dark);
  border-color: var(--purple);
  color: #fff;
  box-shadow: 0 0 14px var(--purple-glow-sm);
}

/* ---- Player ---- */
.player-section { margin-bottom: 36px; }

.player-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.25), 0 20px 60px rgba(0,0,0,0.5);
  background: #000;
}

.player-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--surface2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---- Detail Info ---- */
.detail-info {
  margin-bottom: 36px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  background: var(--bg3);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}

.info-item label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 4px;
}

.info-item span {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

/* ---- Detail Sections ---- */
.detail-section { margin-bottom: 40px; }

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 28px;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
  margin-top: 5px;
}

/* Cast */
.cast-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scrollbar-width: none;
}

.cast-row::-webkit-scrollbar { display: none; }

.cast-card {
  flex: 0 0 auto;
  width: 100px;
  text-align: center;
}

.cast-img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg4);
  margin-bottom: 6px;
  border: 1px solid rgba(255,255,255,0.07);
}

.cast-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cast-char {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Skeleton placeholders */
.skeleton-title {
  height: 42px;
  width: 380px;
  max-width: 100%;
  margin-bottom: 12px;
}

.skeleton-text {
  height: 20px;
  width: 260px;
  max-width: 100%;
}

/* ============================================================
   EPISODE SELECTOR (tv.html)
   ============================================================ */
.episode-selector {
  margin-bottom: 36px;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 20px;
}

.season-selector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.season-dropdown {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.season-dropdown:focus { border-color: var(--purple); }
.season-dropdown option { background: var(--surface); }

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.episode-card {
  display: flex;
  gap: 12px;
  background: var(--bg4);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.episode-card:hover {
  border-color: var(--purple);
  box-shadow: 0 0 12px var(--purple-glow-sm);
  transform: translateY(-2px);
}

.episode-card.active {
  border-color: var(--purple);
  background: rgba(139, 92, 246, 0.08);
}

.episode-thumb {
  flex: 0 0 120px;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--surface);
}

.episode-info {
  padding: 10px 12px 10px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.episode-num {
  font-size: 0.7rem;
  color: var(--purple-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.episode-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.episode-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-page { background: var(--bg2); }

.search-main {
  padding-top: calc(var(--nav-height) + 40px);
  min-height: 100vh;
  padding-bottom: 60px;
}

.search-header { margin-bottom: 32px; }

.search-bar-wrap {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 4px 16px;
  gap: 10px;
  margin-bottom: 18px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar-wrap:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 16px var(--purple-glow-sm);
}

.search-bar-icon { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }

.search-bar-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1.05rem;
  padding: 12px 0;
}

.search-bar-input::placeholder { color: var(--text-dim); }

.search-clear {
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.search-clear svg { width: 16px; height: 16px; }
.search-clear:hover { color: var(--text); }

.search-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  transition: all var(--transition);
}

.filter-btn:hover { border-color: var(--purple); color: var(--text); }

.filter-btn.active {
  background: var(--purple-dark);
  border-color: var(--purple);
  color: #fff;
  box-shadow: 0 0 10px var(--purple-glow-sm);
}

.search-status {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 24px;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.search-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.search-card:hover {
  transform: scale(1.04) translateY(-3px);
  box-shadow: 0 0 20px var(--purple-glow), 0 8px 24px rgba(0,0,0,0.5);
  z-index: 2;
}

.search-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

.search-card .no-poster {
  width: 100%;
  aspect-ratio: 2/3;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.75rem;
  text-align: center;
  padding: 12px;
}

.search-card .no-poster svg { width: 32px; height: 32px; opacity: 0.4; }

.search-card-info {
  padding: 10px;
}

.search-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.search-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  align-items: center;
}

.type-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.type-badge.movie { background: rgba(139, 92, 246, 0.2); color: var(--purple-light); }
.type-badge.tv    { background: rgba(109, 40, 217, 0.2); color: #c4b5fd; }

/* No results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-results svg {
  width: 56px;
  height: 56px;
  opacity: 0.3;
  margin: 0 auto 16px;
}

.no-results h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.no-results p { font-size: 0.9rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg3);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 4%;
  text-align: center;
  margin-top: auto;
}

.footer-inner {
  max-width: 700px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--purple);
  display: block;
  margin-bottom: 12px;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 6px;
}

.footer a { color: var(--purple-light); }
.footer a:hover { text-decoration: underline; }

.footer-disclaimer { color: var(--text-dim) !important; font-size: 0.72rem !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .movie-card { width: 150px; }
  .skeleton-card { width: 150px; }
  .search-results-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (max-width: 600px) {
  .hero { height: 72vh; }
  .hero-desc { display: none; }
  .movie-card { width: 130px; }
  .skeleton-card { width: 130px; }
  .episodes-grid { grid-template-columns: 1fr; }
  .detail-info-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-backdrop-wrap { height: 40vh; }
  .search-results-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .cast-card { width: 82px; }
}

/* ============================================================
   UTILITY ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-in { animation: fadeIn 0.5s ease both; }
