/* ═══════════════════════════════════════════════════════
   CineVibe — Main Stylesheet
   ═══════════════════════════════════════════════════════ */

/* ── 1. CSS Variables ──────────────────────────────────── */
:root {
  --bg: #0d0d12;
  --bg-2: #13131a;
  --bg-3: #1a1a28;
  --surface: #1e1e2e;
  --accent: #e5173f;
  --accent-hover: #ff1f4d;
  --accent-dim: rgba(229, 23, 63, 0.15);
  --text: #ffffff;
  --text-2: #b0b0c0;
  --text-3: #6b6b80;
  --border: rgba(255, 255, 255, 0.07);
  --navbar-h: 68px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --font: 'Inter', system-ui, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

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 {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
}

input {
  font-family: var(--font);
}

/* ── 3. Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-3);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ── 4. Utility ────────────────────────────────────────── */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ── 5. Navbar ─────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 40px;
  background: linear-gradient(180deg, rgba(13, 13, 18, 0.98) 0%, rgba(13, 13, 18, 0) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.navbar.scrolled {
  background: rgba(13, 13, 18, 0.98);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.navbar-logo:hover {
  opacity: 0.85;
}

.logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--accent);
}

.browse-btn {
  position: relative;
  background: none;
}

.browse-btn .chevron-icon {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.browse-btn.open .chevron-icon {
  transform: rotate(180deg);
}

.browse-btn.open {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-2);
  transition: color var(--transition), background var(--transition);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hamburger {
  display: none;
}

/* ── 6. Browse Dropdown ────────────────────────────────── */
.browse-wrapper {
  position: relative;
}

.browse-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  background: rgba(22, 22, 32, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  display: none;
  z-index: 2000;
  animation: dropIn 0.2s var(--transition);
}

.browse-dropdown.open {
  display: block;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.dropdown-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 10px;
  margin-top: 4px;
}

.dropdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.dropdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: var(--radius);
  background: var(--bg-3);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.dropdown-item:hover {
  background: var(--accent-dim);
  border-color: rgba(229, 23, 63, 0.3);
  color: #fff;
}

.dropdown-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.dropdown-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

.dropdown-ads-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-3);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.ads-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #444;
  border-radius: 24px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--accent);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(20px);
}

/* ── 7. Hero Section ───────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  max-height: 900px;
  overflow: hidden;
  background: var(--bg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: blur(0px);
}

/* Gradient overlays */
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(13, 13, 18, 0.95) 0%,
      rgba(13, 13, 18, 0.7) 40%,
      rgba(13, 13, 18, 0.1) 70%,
      rgba(13, 13, 18, 0) 100%);
  z-index: 1;
}

.hero-slide::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 1;
}

.hero-content {
  position: absolute;
  bottom: 120px;
  left: 64px;
  z-index: 2;
  max-width: 560px;
}

.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1px;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  margin-bottom: 14px;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.meta-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.meta-chip svg {
  width: 13px;
  height: 13px;
}

.meta-star {
  color: #fbbf24;
}

.hero-desc {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-play {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: #fff;
  color: #0d0d12;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  transition: all var(--transition);
}

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

.btn-play:hover {
  background: rgba(255, 255, 255, 0.88);
  transform: scale(1.02);
}

.btn-more {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition);
}

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

.btn-more:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.02);
}

/* Hero Indicators */
.hero-indicators {
  position: absolute;
  bottom: 68px;
  left: 64px;
  z-index: 3;
  display: flex;
  gap: 6px;
}

.hero-dot {
  width: 24px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition);
}

.hero-dot.active {
  width: 36px;
  background: var(--accent);
}

/* ── 8. Top 10 Section ─────────────────────────────────── */
.top10-section {
  padding: 60px 48px 40px;
  background: var(--bg);
}

.top10-header {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
}

.top10-big-text {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  line-height: 1;
}

.top10-word {
  font-size: clamp(64px, 8vw, 96px);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  letter-spacing: -4px;
}

.top10-num {
  font-size: clamp(64px, 8vw, 96px);
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -4px;
}

.top10-subtitle {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 10px;
  padding-left: 4px;
  line-height: 1.5;
}

.top10-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.top10-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  flex: 1;
}

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

.top10-item {
  position: relative;
  flex-shrink: 0;
  width: 240px;
  padding-left: 48px;
  scroll-snap-align: start;
}

.top10-number {
  position: absolute;
  left: -10px;
  bottom: -12px;
  font-size: 130px;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 3px var(--accent);
  line-height: 1;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.top10-card {
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--bg-3);
  cursor: pointer;
  transition: transform var(--transition);
}

.top10-card:hover {
  transform: scale(1.04);
}

.top10-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── 9. Content Rows ───────────────────────────────────── */
.content-section {
  padding: 20px 48px 8px;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.row-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-accent {
  width: 4px;
  height: 22px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.row-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.row-tabs {
  display: flex;
  gap: 4px;
}

.row-tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
}

.row-tab::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--accent);
  border-radius: 99px;
  opacity: 0;
  transform: scaleX(0);
  transition: all var(--transition);
}

.row-tab.active {
  color: #fff;
}

.row-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.row-tab:hover {
  color: var(--text);
}

.carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cards-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  flex: 1;
}

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

/* Carousel Buttons */
.carousel-btn {
  position: absolute;
  z-index: 10;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(20, 20, 30, 0.9);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: all var(--transition);
  opacity: 0;
}

.carousel-wrap:hover .carousel-btn {
  opacity: 1;
}

.carousel-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.08);
}

.carousel-btn.prev {
  left: -16px;
}

.carousel-btn.next {
  right: -16px;
}

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

/* ── 10. Cards ─────────────────────────────────────────── */
.card {
  flex-shrink: 0;
  width: 160px;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform var(--transition);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.card:hover {
  transform: scale(1.05);
  z-index: 5;
}

.card-poster {
  position: relative;
  aspect-ratio: 2/3;
  background: var(--bg-3);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-img {
  transform: scale(1.08);
}

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 10px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

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

.card-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  background: var(--accent);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-2);
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 3px;
}

.card-rating svg {
  width: 11px;
  height: 11px;
  color: #fbbf24;
}

.card-type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-type-badge svg {
  width: 12px;
  height: 12px;
  color: #fff;
}

/* ── 11. Genre Section ─────────────────────────────────── */
.genre-section {
  padding: 20px 48px 40px;
}

.genre-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.genre-tabs::-webkit-scrollbar {
  display: none;
}

.genre-tab {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  border: 1px solid var(--border);
  transition: all var(--transition);
  background: transparent;
}

.genre-tab:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.genre-tab.active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ── 12. Footer ────────────────────────────────────────── */
.site-footer {
  padding: 40px 48px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.footer-logo-icon {
  width: 28px;
  height: 28px;
}

.footer-logo-text {
  font-size: 16px;
  font-weight: 800;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-3);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 8px;
}

.footer-contact {
  font-size: 13px;
  color: var(--accent);
}

/* ── 13. Search Overlay ────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 10, 16, 0.96);
  backdrop-filter: blur(12px);
  display: none;
  flex-direction: column;
  align-items: center;
  padding-top: 100px;
  animation: fadeIn 0.2s ease;
}

.search-overlay.open {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.search-container {
  width: 100%;
  max-width: 720px;
  padding: 0 24px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 0 16px;
  margin-bottom: 28px;
  transition: border-color var(--transition);
}

.search-input-wrap:focus-within {
  border-color: var(--accent);
}

.search-input-wrap svg {
  width: 20px;
  height: 20px;
  color: var(--text-3);
  flex-shrink: 0;
}

#search-input {
  flex: 1;
  background: none;
  border: none;
  padding: 18px 0;
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  outline: none;
}

#search-input::placeholder {
  color: var(--text-3);
}

.search-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-3);
  flex-shrink: 0;
  transition: all var(--transition);
}

.search-close svg {
  width: 18px;
  height: 18px;
}

.search-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

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

.search-status {
  text-align: center;
  color: var(--text-3);
  font-size: 15px;
  padding: 30px 0;
}

/* ── 14. Auth Modal ────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  position: relative;
  width: 420px;
  max-width: calc(100vw - 40px);
  background: rgba(22, 22, 34, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close-btn svg {
  width: 18px;
  height: 18px;
}

.modal-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.modal-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  margin-bottom: -1px;
}

.modal-tab.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

.modal-tab:hover {
  color: var(--text);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-group {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 14px;
  transition: border-color var(--transition);
}

.field-group svg {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  flex-shrink: 0;
}

.field-group:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
}

.field-group input {
  flex: 1;
  background: none;
  border: none;
  padding: 14px 0;
  font-size: 14px;
  color: #fff;
  outline: none;
}

.field-group input::placeholder {
  color: var(--text-3);
}

.forgot-link {
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
  transition: color var(--transition);
}

.forgot-link:hover {
  color: var(--accent);
}

.modal-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

/* ── 15. Buttons ───────────────────────────────────────── */
.btn-primary {
  padding: 13px 24px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-align: center;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-primary.full {
  width: 100%;
}

.btn-dark {
  padding: 13px 24px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-align: center;
}

.btn-dark:hover {
  background: var(--surface);
  color: #fff;
}

.btn-dark.full {
  width: 100%;
}

/* ── 16. Detail Page ───────────────────────────────────── */
.detail-page {
  min-height: 100vh;
  padding-top: var(--navbar-h);
}

.detail-hero {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 480px;
  overflow: hidden;
}

.detail-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(13, 13, 18, 0.97) 0%,
      rgba(13, 13, 18, 0.7) 50%,
      rgba(13, 13, 18, 0.15) 100%);
  z-index: 1;
}

.detail-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, var(--bg), transparent);
  z-index: 1;
}

.detail-content {
  position: absolute;
  bottom: 40px;
  left: 64px;
  z-index: 2;
  max-width: 600px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--transition);
  cursor: pointer;
}

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

.back-btn:hover {
  color: #fff;
}

.detail-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 14px;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-desc {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-watchlist {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.btn-watchlist svg {
  width: 16px;
  height: 16px;
}

.btn-watchlist:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-watchlist.in-list {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* Detail Info Sections */
.detail-sections {
  padding: 0 48px 60px;
  background: var(--bg);
}

.detail-section {
  margin-bottom: 48px;
}

.detail-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

/* Cast Row */
.cast-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

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

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

.cast-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-3);
  margin: 0 auto 8px;
  border: 2px solid var(--border);
}

.cast-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}

.cast-char {
  font-size: 11px;
  color: var(--text-3);
}

/* Season / Episode Selector */
.season-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.season-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
}

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

.episode-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.episode-card:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.ep-thumb {
  width: 100px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg);
}

.ep-info {
  flex: 1;
  min-width: 0;
}

.ep-num {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 3px;
}

.ep-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-desc {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ep-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.ep-play-btn svg {
  width: 14px;
  height: 14px;
}

.episode-card:hover .ep-play-btn {
  transform: scale(1.1);
}

/* ── 17. Player Page ───────────────────────────────────── */
.player-page {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #000;
  display: flex;
  flex-direction: column;
}

.player-topbar {
  position: relative;
  z-index: 10;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.player-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: color var(--transition);
}

.player-back svg {
  width: 20px;
  height: 20px;
}

.player-back:hover {
  color: #fff;
}

.player-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

/* Source bar — lives BELOW the iframe, never overlapping */
.source-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #0d0d12;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  flex-wrap: wrap;
  opacity: 1;
  pointer-events: all;
}

.source-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-right: 4px;
  flex-shrink: 0;
}

.source-btn {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.source-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.source-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.player-embed {
  flex: 1;
  width: 100%;
  border: none;
  min-height: 0;
}

/* ── 18. Browse Page ───────────────────────────────────── */
.browse-page {
  min-height: 100vh;
  padding: calc(var(--navbar-h) + 40px) 48px 60px;
}

.browse-page-header {
  margin-bottom: 32px;
}

.browse-page-title {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 20px;
}

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

.filter-chip {
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  border: 1px solid var(--border);
  background: transparent;
  transition: all var(--transition);
  cursor: pointer;
}

.filter-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-chip.active {
  color: #fff;
  background: var(--accent-dim);
  border-color: var(--accent);
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.browse-grid .card {
  width: 100%;
}

/* Load More */
.load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  margin-top: 28px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
}

.load-more-btn:hover {
  background: var(--surface);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── 19. Skeletons ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--surface) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

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

  100% {
    background-position: -200% 0;
  }
}

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

.skeleton-hero {
  width: 100%;
  height: 100vh;
  max-height: 900px;
}

/* ── 20. Toast ─────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  border-left: 3px solid #22c55e;
}

.toast.error {
  border-left: 3px solid var(--accent);
}

/* ── 21. Responsive ────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-content {
    left: 40px;
    max-width: 480px;
  }

  .hero-indicators {
    left: 40px;
  }

  .top10-section {
    padding: 40px 28px;
  }

  .content-section {
    padding: 20px 28px 8px;
  }

  .genre-section {
    padding: 20px 28px 40px;
  }

  .detail-sections {
    padding: 0 28px 60px;
  }

  .browse-page {
    padding: calc(var(--navbar-h) + 24px) 28px 40px;
  }

  .site-footer {
    padding: 32px 28px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 16px;
    gap: 16px;
  }

  .navbar-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    max-width: 100%;
  }

  .hero-indicators {
    left: 20px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .btn-play,
  .btn-more {
    padding: 11px 18px;
    font-size: 14px;
  }

  .top10-section {
    padding: 32px 16px;
  }

  .top10-item {
    width: 160px;
    padding-left: 32px;
  }

  .top10-number {
    font-size: 90px;
    left: -6px;
  }

  .content-section {
    padding: 16px 16px 8px;
  }

  .genre-section {
    padding: 16px 16px 32px;
  }

  .card {
    width: 130px;
  }

  .detail-content {
    left: 20px;
    right: 20px;
    max-width: 100%;
  }

  .detail-sections {
    padding: 0 16px 40px;
  }

  .browse-page {
    padding: calc(var(--navbar-h) + 16px) 16px 40px;
  }

  .browse-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .site-footer {
    padding: 28px 16px;
  }

  .episodes-grid {
    grid-template-columns: 1fr;
  }

  .top10-word,
  .top10-num {
    font-size: clamp(48px, 12vw, 72px);
  }
}

@media (max-width: 480px) {
  .hero {
    max-height: 600px;
  }

  .browse-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .search-results {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}