/* ============================================================
   BONICINEMA - Netflix-style UI
   ============================================================ */

:root {
  --bg-primary: #0A0A2A;
  --bg-secondary: #12124A;
  --bg-card: #1c1c6b;
  --bg-overlay: rgba(0, 0, 50, .8);
  --accent: #FF003C;
  --accent-hover: #ff3366;
  --text-primary: #fff;
  --text-secondary: #D9D9F2;
  --text-muted: #8080B3;
  --border: rgba(255, 255, 255, .2);
  --radius: 12px;
  --nav-height: 72px;
  --transition: .2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

input {
  outline: none;
  font-family: inherit;
}

ul,
ol {
  list-style: none;
}

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #888;
}

/* ── NAVBAR ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 4%;
  gap: 2rem;
  background: var(--bg-primary);
  border-bottom: 4px solid #000;
  box-shadow: 0 4px 0 #000;
  transition: transform var(--transition);
}

/* Navbar styling is now persistent, removed scroll gradient switching */

.nav-logo {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--accent);
  flex-shrink: 0;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #000;
}

.nav-logo span {
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
  font-size: .9rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: .3rem .6rem;
  border-radius: 6px;
  border: 2px solid transparent;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: var(--accent);
  border-color: #000;
  box-shadow: 2px 2px 0 #000;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-search-form {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg-card);
  border: 3px solid #000;
  border-radius: 8px;
  padding: .3rem .8rem;
  box-shadow: 2px 2px 0 #000;
  transition: transform var(--transition);
}

.nav-search-form:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 #000;
}

.nav-search-form input {
  background: none;
  border: none;
  color: #fff;
  font-size: .9rem;
  width: 180px;
}

.nav-search-form input::placeholder {
  color: var(--text-muted);
}

.nav-search-form button {
  background: none;
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 0;
  line-height: 1;
}

.nav-search-form button:hover {
  color: #fff;
}

.nav-avatar {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 2px 2px 0 #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
}

/* Mobile menu toggle */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: var(--accent);
  color: #fff;
  padding: 8px;
  border: 3px solid #000;
  border-radius: 6px;
  box-shadow: 2px 2px 0 #000;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile nav drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 4px solid #000;
  padding: 1rem 4%;
  z-index: 999;
  flex-direction: column;
  gap: .8rem;
}

.nav-drawer.open {
  display: flex;
}

.nav-drawer a {
  font-size: 1rem;
  padding: .4rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-drawer .nav-drawer-search {
  display: flex;
  gap: .5rem;
}

.nav-drawer .nav-drawer-search input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem .8rem;
  color: #fff;
  font-size: .9rem;
}

.nav-drawer .nav-drawer-search button {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: .5rem 1rem;
  font-size: .9rem;
}

/* ── HERO / BANNER ─────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 550px;
  max-height: 900px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transform: scale(1.03);
  transition: transform 8s ease;
}

.hero:hover .hero-bg {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
      rgba(0, 0, 0, .85) 0%,
      rgba(0, 0, 0, .5) 50%,
      rgba(0, 0, 0, .1) 100%),
    linear-gradient(to top,
      rgba(20, 20, 20, 1) 0%,
      rgba(20, 20, 20, .2) 30%,
      transparent 60%);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .35) 48%, rgba(0, 0, 0, .1) 100%),
    linear-gradient(to top, rgba(20, 20, 20, 1) 0%, rgba(20, 20, 20, .45) 34%, transparent 65%);
  z-index: 1;
}

.hero-content {
  position: absolute;
  bottom: 25%;
  left: 4%;
  max-width: 520px;
  z-index: 2;
}

@media (max-width: 768px) {
  .hero-content {
    bottom: 20%;
  }
}

.hero-logo-text {
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1.2rem;
  color: #fff;
  text-shadow: 4px 4px 0 #000;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: .8rem;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, .6);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.match-score {
  color: #46d369;
  font-weight: 700;
}

.age-rating {
  border: 1px solid rgba(255, 255, 255, .35);
  padding: .08rem .35rem;
  border-radius: 3px;
  font-size: .72rem;
  color: #ddd;
}

.hd-badge {
  border: 1px solid rgba(255, 255, 255, .35);
  padding: .08rem .35rem;
  border-radius: 3px;
  font-size: .72rem;
  color: #ddd;
  font-weight: 600;
}

.hero-meta .rating {
  color: #f5c518;
  font-weight: 700;
}

.hero-meta .year,
.hero-meta .duration {
  color: var(--text-secondary);
}

.hero-meta .genre-badge {
  background: rgba(255, 255, 255, .12);
  padding: .2rem .6rem;
  border-radius: 3px;
  font-size: .75rem;
}

.hero-desc {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: 1rem;
}

.hero-dot {
  width: 20px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .35);
  border: none;
  transition: var(--transition);
}

.hero-dot.active {
  width: 30px;
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.8rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  white-space: nowrap;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

.btn-play {
  background: #fff;
  color: #000;
}

.btn-play:hover {
  background: rgba(255, 255, 255, .8);
}

.btn-info {
  background: rgba(109, 109, 110, .7);
  color: #fff;
}

.btn-info:hover {
  background: rgba(109, 109, 110, .5);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .5);
}

.btn-ghost:hover {
  border-color: #fff;
}

.btn-sm {
  padding: .45rem 1.1rem;
  font-size: .85rem;
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  background: rgba(109, 109, 110, .7);
  color: #fff;
  font-size: 1.1rem;
}

.btn-icon:hover {
  background: rgba(109, 109, 110, .5);
}

/* ── ROWS / SECTIONS ───────────────────────────────────────── */
.sections-wrapper {
  position: relative;
  z-index: 5;
  margin-top: -1rem;
  padding-bottom: 4rem;
}

@media (max-width: 768px) {
  .sections-wrapper {
    margin-top: 0;
  }
}

.row {
  margin-bottom: 2rem;
  padding: 0 4%;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.row-title {
  font-size: 1.2rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  padding: .4rem 1rem;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 4px 4px 0 #000;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.row-header a {
  font-size: .8rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .2rem;
  font-weight: 800;
  text-transform: uppercase;
}

.row-header a:hover {
  transform: translate(1px, 1px);
}

.row-title a:hover {
  color: #fff;
}

.slider-wrap {
  position: relative;
}

.slider {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 1rem 0 1.5rem;
}

.slider::-webkit-scrollbar {
  display: none;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  background: rgba(20, 20, 20, .9);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0;
}

.slider-wrap:hover .slider-btn {
  opacity: 1;
}

.slider-btn:hover {
  background: rgba(20, 20, 20, 1);
  border-color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
  left: -22px;
}

.slider-btn.next {
  right: -22px;
}

/* ── CARDS ─────────────────────────────────────────────────── */
.card {
  flex-shrink: 0;
  width: 180px;
  border-radius: var(--radius);
  overflow: visible;
  cursor: pointer;
  transition: transform .25s, z-index 0s .25s;
  scroll-snap-align: start;
  position: relative;
}

@media (max-width: 768px) {
  .card {
    width: 130px;
  }
}

.card:hover {
  transform: scale(1.1) translateY(-6px);
  z-index: 50;
  transition: transform .25s, z-index 0s 0s;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  position: relative;
  border: 4px solid #000;
  box-shadow: 4px 4px 0 #000;
  transition: var(--transition);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.card:hover .card-thumb {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 #000;
}

.card:hover .card-thumb img {
  transform: scale(1.05);
}

.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  background: linear-gradient(135deg, #222 0%, #2a2a2a 100%);
  color: var(--text-muted);
  font-size: .75rem;
  text-align: center;
  padding: .5rem;
}

.card-thumb-placeholder .icon {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--text-secondary);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .9) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .2s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: .6rem;
  gap: .3rem;
}

.card:hover .card-overlay {
  opacity: 1;
}

.card-play-btn {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: .9rem;
  align-self: flex-end;
  flex-shrink: 0;
  transition: transform .15s;
}

.card-play-btn:hover {
  transform: scale(1.1);
}

.card-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .7rem;
  color: var(--text-secondary);
}

.card-info .rating {
  color: #f5c518;
}

.card-title {
  font-size: .85rem;
  font-weight: 800;
  color: #000;
  background: #fff;
  border: 2px solid #000;
  border-radius: 6px;
  padding: .3rem .5rem;
  margin-top: -1rem;
  position: relative;
  z-index: 10;
  box-shadow: 2px 2px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Wide card (16:9) for featured/recent */
.card.wide .card-thumb {
  aspect-ratio: 16/9;
}

/* Card tooltip on hover */
.card-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem;
  width: 220px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s .1s;
  z-index: 100;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
}

.card:hover .card-tooltip {
  opacity: 1;
  pointer-events: auto;
}

.card-tooltip-title {
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.card-tooltip-meta {
  font-size: .75rem;
  color: var(--text-secondary);
  margin-bottom: .5rem;
}

.card-tooltip-desc {
  font-size: .75rem;
  color: var(--text-secondary);
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tooltip-actions {
  display: flex;
  gap: .4rem;
  margin-top: .6rem;
}

/* ── GRID PAGES ────────────────────────────────────────────── */
.page-container {
  padding-top: calc(var(--nav-height) + 2rem);
  min-height: 100vh;
}

.page-content {
  padding: 0 4% 4rem;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.page-subtitle {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  margin-top: -.8rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.grid .card {
  width: 100%;
}

.grid .card.wide .card-thumb {
  aspect-ratio: 16/9;
}

/* ── FILTERS BAR ───────────────────────────────────────────── */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
  align-items: center;
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  padding: .5rem 1rem;
  font-size: .85rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  padding-right: 2rem;
}

.filter-select:focus {
  border-color: var(--accent);
}

.filter-label {
  font-size: .85rem;
  color: var(--text-secondary);
  align-self: center;
}

.filter-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .35rem .85rem;
  font-size: .8rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── DETAIL PAGE (Netflix-style cinematic) ─────────────────── */
.detail-hero {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
  background: #000;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  transform: scale(1.02);
}

.detail-hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(20, 20, 20, .95) 0%, rgba(20, 20, 20, .6) 34%, transparent 68%),
    linear-gradient(to top, var(--bg-primary) 0%, rgba(20, 20, 20, .25) 34%, transparent 66%);
  z-index: 1;
}

.detail-hero-gradient-left {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(20, 20, 20, .95) 0%, rgba(20, 20, 20, .6) 30%, transparent 60%);
  z-index: 1;
}

.detail-hero-gradient-bottom {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-primary) 0%, rgba(20, 20, 20, .3) 30%, transparent 60%);
  z-index: 1;
}

.detail-hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 4rem 4% 3rem;
}

.detail-hero-text {
  max-width: 600px;
}

.detail-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: .8rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .6);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  margin-bottom: .8rem;
}

.detail-rating {
  color: #f5c518;
  font-weight: 700;
  font-size: 1rem;
}

.detail-year {
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-duration {
  color: var(--text-secondary);
}

.detail-genres {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.detail-genre-tag {
  padding: .2rem .7rem;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 20px;
  font-size: .78rem;
  color: var(--text-secondary);
  letter-spacing: .02em;
}

.detail-synopsis {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 540px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
}

.detail-actions {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
}

.btn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #000;
  background: var(--bg-card);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 2px 2px 0 #000;
}

.btn-circle:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
  background: var(--accent);
}

.btn-lg {
  padding: .8rem 2rem;
  font-size: 1.05rem;
}

.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.5rem;
  background: var(--bg-card);
  color: #fff;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 900;
  transition: transform var(--transition);
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  text-transform: uppercase;
}

.btn-ghost-light:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
  background: var(--accent);
}

.detail-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: .8rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(255, 255, 255, .1);
  border-radius: 3px;
  padding: .2rem .6rem;
  font-size: .78rem;
  font-weight: 600;
}

.badge-accent {
  background: var(--accent);
}

.badge-yellow {
  background: #f5c518;
  color: #000;
}

.badge-green {
  background: #1db954;
  color: #000;
}

.badge-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .3);
}

.detail-body {
  padding: 2rem 4%;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 1.3rem;
  margin-top: 1rem;
  max-width: 920px;
}

.detail-synopsis-col {
  min-width: 0;
}

.detail-meta-col {
  min-width: 0;
}

.meta-row {
  margin-bottom: .55rem;
  font-size: .86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.meta-label {
  color: var(--text-muted);
  margin-right: .35rem;
}

.meta-value {
  color: #e0e0e0;
}

.episodes-section,
.more-like-this {
  max-width: 1200px;
  margin: 0 auto;
}

.episodes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

.season-selector select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: var(--radius);
  padding: .45rem .8rem;
}

.episode-card {
  display: grid;
  grid-template-columns: 34px 160px minmax(0, 1fr);
  gap: .9rem;
  align-items: center;
  padding: .75rem 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-decoration: none;
  color: inherit;
}

.episode-card:hover {
  background: rgba(255, 255, 255, .03);
}

.ep-thumb {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.ep-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ep-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  transition: var(--transition);
  font-size: 1.1rem;
}

.episode-card:hover .ep-play-icon {
  opacity: 1;
}

.ep-details {
  min-width: 0;
}

.ep-title-row {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
}

.ep-duration {
  color: var(--text-muted);
  font-size: .8rem;
}

.ep-desc {
  font-size: .82rem;
  color: var(--text-secondary);
  margin-top: .3rem;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  max-width: 1200px;
}

.detail-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.detail-section {
  margin-top: 2rem;
}

.detail-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

/* Episodes accordion */
.season-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.season-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .45rem 1rem;
  font-size: .85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.season-tab:hover,
.season-tab.active {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.episodes-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.episode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1rem .6rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s;
  text-align: center;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}

.episode-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
  background: rgba(255, 255, 255, .08);
}

.ep-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  background: var(--bg-primary);
  border: 3px solid #000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 3px 3px 0 #000;
  margin-bottom: .2rem;
  z-index: 2;
}

.ep-thumb {
  display: none;
  /* Hide thumbnail for the boxy layout to match watch page */
}

.ep-details {
  width: 100%;
  overflow: hidden;
  z-index: 2;
}

.ep-title-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.ep-title {
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.ep-duration {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

.ep-desc {
  display: none;
  /* Hide description to keep grid compact */
}

/* Info sidebar */
.info-table {
  font-size: .88rem;
}

.info-row {
  display: flex;
  gap: .8rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
}

.info-key {
  color: var(--text-muted);
  min-width: 100px;
  flex-shrink: 0;
}

.info-val {
  color: var(--text-secondary);
}

/* Cast */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .8rem;
}

.cast-item {
  text-align: center;
  font-size: .78rem;
  color: var(--text-secondary);
}

.cast-avatar {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--accent);
  border: 3px solid #000;
  box-shadow: 2px 2px 0 #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  margin: 0 auto .4rem;
}

/* -- Trailer Modal ------------------------------------------- */
.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity .3s, visibility .3s;
}

.trailer-modal.hidden {
  opacity: 0;
  visibility: hidden;
}

.trailer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  backdrop-filter: blur(4px);
}

.trailer-modal-content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 900px;
  background: #000;
  border: 4px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .8);
  overflow: hidden;
}

.trailer-close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  background: #fff;
  color: #000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 10;
  transition: transform .2s;
  box-shadow: 2px 2px 0 #000;
}

.trailer-close-btn:hover {
  transform: scale(1.1);
  background: var(--accent);
  color: #fff;
}

.trailer-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  height: 0;
}

.trailer-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ── PLAYER PAGE ───────────────────────────────────────────── */
.watch-page {
  background: #000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-height);
}

/* -- Player HUD Buttons (Cartoon Style) ------------------------ */
.player-back-btn,
.player-eps-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-card);
  color: #fff;
  border: 3px solid #000;
  box-shadow: 2px 2px 0 #000;
  transition: transform var(--transition);
}

.player-back-btn:hover,
.player-eps-toggle:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
  background: var(--accent);
}

.player-ep-badge {
  font-size: .8rem;
  font-weight: 800;
  background: var(--bg-card);
  color: #fff;
  padding: .25rem .6rem;
  border-radius: 6px;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
}

.watch-video-wrapper {
  width: 100%;
  max-height: calc(100vh - 60px);
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
  flex-shrink: 0;
}

#main-video {
  width: 100%;
  height: 100%;
  display: block;
}

/* -- Big Center Play Button ----------------------------------- */
.player-center-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
  background: rgba(0, 0, 0, .4);
  backdrop-filter: blur(2px);
  cursor: pointer;
  transition: opacity .2s ease, visibility .2s ease;
}

.player-center-play.hidden {
  opacity: 0;
  visibility: hidden;
  z-index: 20;
}

.player-center-play-btn {
  width: 70px;
  height: 70px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 4px solid #000;
  box-shadow: 4px 4px 0 #000;
  transition: transform .2s, box-shadow .2s;
}

.player-center-play:hover .player-center-play-btn {
  transform: scale(1.1);
  box-shadow: 6px 6px 0 #000;
}

.player-center-play-btn svg {
  width: 32px;
  height: 32px;
  margin-left: 4px;
  /* visually center play icon */
}

/* -- Screen Unlock Button ------------------------------------ */
.player-unlock-btn {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  z-index: 50;
  background: rgba(0, 0, 0, .8);
  border: 3px solid #000;
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  transition: transform .2s;
}

.player-unlock-btn:hover {
  transform: translateY(-50%) scale(1.05);
  background: rgba(20, 20, 20, .9);
}

.player-unlock-btn svg {
  width: 20px;
  height: 20px;
}

.cartoon-loader {
  font-size: 3rem;
  animation: cartoonBounce .6s cubic-bezier(0.28, 0.84, 0.42, 1) infinite alternate;
  filter: drop-shadow(2px 4px 0 rgba(0, 0, 0, 0.8));
}

.cartoon-loading-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #000;
  animation: pulseOpacity 1s ease-in-out infinite alternate;
}

@keyframes cartoonBounce {
  0% {
    transform: scale(1) translateY(0);
  }

  100% {
    transform: scale(1.1) translateY(-15px);
  }
}

@keyframes pulseOpacity {
  0% {
    opacity: 0.7;
  }

  100% {
    opacity: 1;
  }
}

.watch-meta-bar {
  background: var(--bg-primary);
  padding: 1.2rem 4%;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.watch-title-block {
  flex: 1;
  min-width: 0;
}

.watch-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: .3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.watch-ep-info {
  font-size: .85rem;
  color: var(--text-secondary);
}

.watch-controls-bar {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Quality/subtitle selector */
.quality-menu,
.sub-menu {
  position: relative;
  display: inline-block;
}

.quality-btn,
.sub-btn {
  background: var(--bg-card);
  border: 3px solid #000;
  color: #fff;
  border-radius: 8px;
  padding: .4rem .8rem;
  font-size: .85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
  transition: transform var(--transition);
}

.quality-btn:hover,
.sub-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
  background: var(--accent);
}

.quality-dropdown,
.sub-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 3px solid #000;
  border-radius: 8px;
  min-width: 140px;
  overflow: hidden;
  display: none;
  z-index: 200;
  box-shadow: 4px 4px 0 #000;
}

.quality-dropdown.open,
.sub-dropdown.open {
  display: block;
}

.quality-item,
.sub-item {
  padding: .6rem 1rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quality-item:hover,
.sub-item:hover {
  background: var(--accent);
  color: #fff;
}

.quality-item.active,
.sub-item.active {
  color: var(--accent);
}

.quality-item.active::after,
.sub-item.active::after {
  content: '✓';
}

/* Episode list for watch page */
.watch-episodes {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 1.5rem 4%;
}

.watch-episodes-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.watch-ep-scroll {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  padding-bottom: .5rem;
}

.watch-ep-scroll::-webkit-scrollbar {
  display: none;
}

.watch-ep-item {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem .9rem;
  font-size: .82rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  min-width: 72px;
}

.watch-ep-item:hover {
  background: #333;
  border-color: #555;
}

.watch-ep-item.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── SEARCH PAGE ───────────────────────────────────────────── */
.search-hero {
  padding-top: calc(var(--nav-height) + 2rem);
  padding: calc(var(--nav-height) + 2rem) 4% 2rem;
}

.search-bar-big {
  display: flex;
  gap: .8rem;
  max-width: 600px;
  margin-bottom: 2rem;
}

.search-bar-big input {
  flex: 1;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  font-size: 1.1rem;
  padding: .7rem 1rem;
  transition: border-color var(--transition);
}

.search-bar-big input:focus {
  border-color: #fff;
}

.search-bar-big button {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: .7rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition);
}

.search-bar-big button:hover {
  background: var(--accent-hover);
}

.search-empty {
  padding: 4rem 0;
  text-align: center;
  color: var(--text-secondary);
}

.search-empty .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* ── LOADING SKELETON ──────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.skeleton-card {
  width: 180px;
  aspect-ratio: 2/3;
  flex-shrink: 0;
}

.skeleton-text {
  height: 14px;
  margin: 6px 0;
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-hero {
  height: 70vh;
  min-height: 450px;
  margin-top: -1px;
}

/* ── TOAST ─────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: .8rem 1.2rem;
  font-size: .9rem;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .5);
  animation: slideIn .3s ease;
  max-width: 300px;
}

.toast.success {
  border-left-color: #1db954;
}

.toast.error {
  border-left-color: var(--accent);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ── FOOTER ────────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  padding: 3rem 4% 2rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  grid-column: span 1;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: .5rem;
}

.footer-logo span {
  color: #fff;
}

.footer-tagline {
  font-size: .82rem;
  color: var(--text-muted);
}

.footer-col-title {
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: .8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer-col a {
  font-size: .82rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .78rem;
  color: var(--text-muted);
}

/* ── ERROR / EMPTY STATES ──────────────────────────────────── */
.state-box {
  padding: 5rem 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.state-box .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: .5;
}

.state-box h3 {
  font-size: 1.3rem;
  margin-bottom: .5rem;
  color: #fff;
}

.state-box p {
  font-size: .9rem;
  margin-bottom: 1.5rem;
}

/* ── MODAL ─────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-secondary);
  border-radius: 12px;
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.95);
  transition: transform .2s;
  position: relative;
}

.modal-backdrop.open .modal {
  transform: scale(1);
}

.modal-close {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  padding: 1rem;
  background: var(--bg-secondary);
  z-index: 10;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, .1);
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, .2);
}

.modal-body {
  padding: 0 2rem 2rem;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 70vh;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .nav-links {
    display: none;
  }

  .nav-search-form {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .nav-avatar {
    display: none;
  }

  .hero {
    height: 60vh;
    min-height: 380px;
  }

  .hero-content {
    max-width: 90%;
  }

  .hero-desc {
    line-clamp: 2;
    -webkit-line-clamp: 2;
  }

  .hero-logo-text {
    font-size: clamp(1.4rem, 8vw, 2.2rem);
  }

  .card {
    width: 130px;
  }

  .skeleton-card {
    width: 130px;
  }

  .detail-hero {
    height: 65vh;
    min-height: 400px;
  }

  .detail-hero-content {
    padding: 3rem 4% 2rem;
  }

  .detail-hero-gradient-left {
    background: linear-gradient(to right, rgba(20, 20, 20, .98) 0%, rgba(20, 20, 20, .7) 40%, transparent 70%);
  }

  .detail-title {
    font-size: 1.6rem;
  }

  .detail-synopsis {
    font-size: .85rem;
    max-width: 90%;
  }

  .detail-info-grid {
    grid-template-columns: 1fr;
    gap: .8rem;
  }

  .episode-card {
    grid-template-columns: 28px 120px minmax(0, 1fr);
  }

  .watch-meta-bar {
    flex-direction: column;
    gap: 1rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  :root {
    --nav-height: 56px;
  }

  .hero {
    height: 55vh;
    min-height: 320px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-actions .btn {
    padding: .55rem 1.2rem;
    font-size: .9rem;
  }

  .hero-logo-text {
    font-size: 1.45rem;
  }

  .card {
    width: 110px;
  }

  .skeleton-card {
    width: 110px;
  }

  .row {
    padding: 0 3%;
  }

  .navbar {
    padding: 0 3%;
  }

  .sections-wrapper {
    margin-top: -5rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    height: 55vh;
    min-height: 350px;
  }

  .detail-hero-content {
    padding: 2rem 3% 1.5rem;
  }

  .detail-hero-gradient-left {
    background: linear-gradient(to top, rgba(20, 20, 20, 1) 10%, rgba(20, 20, 20, .8) 40%, transparent 70%);
  }

  .detail-title {
    font-size: 1.3rem;
  }

  .detail-synopsis {
    display: none;
  }

  .btn-lg {
    padding: .6rem 1.4rem;
    font-size: .9rem;
  }

  .episode-card {
    grid-template-columns: 24px 96px minmax(0, 1fr);
    gap: .6rem;
  }
}

/* ── UTILS ─────────────────────────────────────────────────── */
.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.mt-1 {
  margin-top: .5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: .5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.gap-1 {
  gap: .5rem;
}

.gap-2 {
  gap: 1rem;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* ================================================================
  WATCH PAGE - Netflix-style redesign
  ================================================================ */

/* -- Wrap & Layout -------------------------------------------- */
.watch-wrap {
  min-height: 100vh;
  background: var(--bg-primary);
  padding-bottom: 4rem;
}

/* -- Player Section ------------------------------------------- */
.watch-player-section {
  width: 100%;
  background: #000;
  position: sticky;
  top: 0;
  z-index: 200;
}

.watch-player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 60vh;
  background: #000;
  overflow: hidden;
}

.watch-player-container #main-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* -- Player overlay (loading/error) --------------------------- */
.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  gap: .6rem;
  z-index: 10;
  font-size: .95rem;
  text-align: center;
  padding: 1rem;
}

.player-overlay.hidden {
  display: none !important;
}

.player-overlay-error {
  background: rgba(0, 0, 0, .88);
}

.player-overlay-icon {
  font-size: 2.5rem;
}

.player-overlay-msg {
  font-size: 1.1rem;
  font-weight: 600;
}

.player-overlay-sub {
  color: var(--text-secondary);
  font-size: .85rem;
}

.player-overlay-btns {
  display: flex;
  gap: .6rem;
  margin-top: .3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.player-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* -- HUD Top bar ---------------------------------------------- */
.player-hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .8rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .8) 0%, transparent 100%);
  z-index: 30;
  transition: opacity .3s ease;
}

.player-hud-top.hud-hidden {
  opacity: 0;
  pointer-events: none;
}

.player-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  transition: background .2s;
}

.player-back-btn:hover {
  background: rgba(255, 255, 255, .3);
}

.player-hud-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .5rem;
  overflow: hidden;
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.player-ep-badge {
  background: var(--accent);
  color: #fff;
  padding: .15rem .4rem;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.player-eps-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background .2s;
}

.player-eps-toggle:hover {
  background: rgba(255, 255, 255, .3);
}

/* -- Bottom controls overlay ---------------------------------- */
.player-controls-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .5rem .8rem .7rem;
  background: linear-gradient(to top, rgba(0, 0, 0, .8) 0%, transparent 100%);
  z-index: 30;
  transition: opacity .3s ease;
  pointer-events: none;
}

.player-controls-overlay>* {
  pointer-events: auto;
}

.player-controls-overlay.hud-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Prev/Next episode nav */
.player-ep-nav {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
}

.player-ep-nav-btn {
  background: var(--bg-card);
  color: #fff;
  padding: .4rem .9rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 800;
  text-decoration: none;
  border: 3px solid #000;
  box-shadow: 2px 2px 0 #000;
  transition: transform .2s, box-shadow .2s;
}

.player-ep-nav-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 #000;
  background: var(--accent);
}

.player-ep-nav-btn.player-ep-next {
  margin-left: auto;
}

/* Selector bar */
.player-selectors {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .4rem;
  flex-wrap: wrap;
}

/* -- Custom Playbar Base -------------------------------------- */
.custom-playbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 3px solid #000;
  border-radius: 12px;
  padding: .5rem .8rem;
  box-shadow: 4px 4px 0 #000;
  width: 100%;
}

.playbar-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  transition: background .2s, transform .2s;
}

.playbar-btn svg {
  width: 20px;
  height: 20px;
}

.playbar-btn:hover {
  background: rgba(255, 255, 255, .15);
  transform: scale(1.1);
}

.playbar-time {
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  letter-spacing: .5px;
}

/* -- Progress Bar --------------------------------------------- */
.playbar-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  cursor: pointer;
  height: 24px;
}

.playbar-progress-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, .2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  border: 1px solid #000;
}

.playbar-progress-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0%;
  background: var(--accent);
  border-right: 2px solid #000;
}

/* -- Volume Slider -------------------------------------------- */
.playbar-volume-wrap {
  display: flex;
  align-items: center;
  gap: .2rem;
}

.playbar-volume-slider-wrap {
  width: 0;
  overflow: hidden;
  transition: width .2s ease;
  display: flex;
  align-items: center;
}

.playbar-volume-wrap:hover .playbar-volume-slider-wrap,
.playbar-volume-slider-wrap:focus-within {
  width: 60px;
}

.playbar-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 50px;
  height: 6px;
  background: rgba(255, 255, 255, .3);
  border-radius: 3px;
  outline: none;
  margin-left: 4px;
}

.playbar-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #000;
  cursor: pointer;
}

.player-select-wrap {
  position: relative;
}

.player-select-btn {
  display: flex;
  align-items: center;
  gap: .25rem;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  padding: .3rem .6rem;
  border-radius: 6px;
  font-size: .78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
  backdrop-filter: blur(4px);
}

.player-select-btn:hover {
  background: rgba(255, 255, 255, .2);
  border-color: rgba(255, 255, 255, .5);
}

.player-select-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 130px;
  background: rgba(20, 20, 20, .97);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .6);
  display: none;
  z-index: 100;
}

.player-select-menu.open {
  display: block;
}

.player-select-item {
  padding: .5rem .85rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: .82rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: background .15s, color .15s;
}

.player-select-item:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.player-select-item.active {
  color: var(--accent);
  font-weight: 600;
}

.player-select-item small {
  margin-left: auto;
  color: var(--text-muted);
  font-size: .72rem;
}

/* -- Episode side panel --------------------------------------- */
.player-ep-panel {
  position: absolute;
  top: 0;
  right: -320px;
  bottom: 0;
  width: 300px;
  background: rgba(15, 15, 15, .98);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transition: right .3s ease;
  border-left: 1px solid rgba(255, 255, 255, .1);
}

.player-ep-panel.open {
  right: 0;
}

.player-ep-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 49;
}

.player-ep-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-weight: 600;
  color: #fff;
  font-size: .9rem;
}

.player-ep-panel-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: .2rem;
}

.player-ep-panel-close:hover {
  color: #fff;
}

.player-ep-panel-list {
  flex: 1;
  overflow-y: auto;
  padding: .4rem 0;
}

.player-ep-season-label {
  padding: .4rem 1rem .2rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  font-weight: 600;
}

.player-ep-panel-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1rem;
  text-decoration: none;
  color: var(--text-secondary);
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
}

.player-ep-panel-item:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.player-ep-panel-item.active {
  background: rgba(229, 9, 20, .1);
  color: #fff;
  border-left-color: var(--accent);
}

.player-ep-num {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 28px;
  flex-shrink: 0;
}

.player-ep-info {
  flex: 1;
  overflow: hidden;
}

.player-ep-title {
  font-size: .82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-ep-sub {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .1rem;
}

.player-ep-playing {
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* -- Info section --------------------------------------------- */
.watch-info-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.4rem 1.2rem 0;
}

.watch-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .6rem;
}

.watch-main-title {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin: 0;
  text-shadow: 2px 2px 0 #000;
}

.watch-ep-label {
  margin-top: .3rem;
  font-size: .9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.watch-title-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-shrink: 0;
}

/* -- Meta badges --------------------------------------------- */
.watch-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .8rem;
  align-items: center;
}

.watch-badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 4px;
  font-size: .76rem;
  font-weight: 800;
  background: var(--bg-card);
  color: #fff;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
}

.watch-badge-star {
  color: #f5c518;
  border-color: rgba(245, 197, 24, .3);
  background: rgba(245, 197, 24, .08);
}

.watch-badge-rated {
  background: rgba(255, 255, 255, .12);
  color: #ccc;
  font-family: monospace;
}

.watch-badge-quality {
  background: var(--accent);
  color: #fff;
  border-color: #000;
}

.watch-badge-sub {
  background: rgba(255, 255, 255, .1);
  color: #aaa;
}

/* -- Genre tags ----------------------------------------------- */
.watch-genres-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .9rem;
}

.watch-genre-tag {
  padding: .2rem .6rem;
  border-radius: 6px;
  border: 2px solid #000;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  background: transparent;
  transition: transform .2s, box-shadow .2s;
}

.watch-genre-tag:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
  background: var(--accent);
  color: #fff;
}

/* -- Synopsis ------------------------------------------------- */
.watch-synopsis-section {
  margin-bottom: 1.2rem;
}

.watch-synopsis {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.6;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 .4rem;
}

.watch-synopsis.expanded {
  display: block;
  overflow: visible;
}

.watch-synopsis-toggle {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: .83rem;
  padding: 0;
  font-weight: 600;
}

.watch-synopsis-toggle:hover {
  text-decoration: underline;
}

/* -- Dubs ----------------------------------------------------- */
.watch-dubs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1rem;
  font-size: .82rem;
  color: var(--text-muted);
}

.watch-dubs-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.watch-dub-badge {
  padding: .15rem .5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  font-size: .75rem;
  color: var(--text-muted);
}

.watch-dub-badge.active {
  background: rgba(229, 9, 20, .12);
  border-color: var(--accent);
  color: var(--accent);
}

/* -- Section title -------------------------------------------- */
.watch-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 .75rem;
}

/* -- Cast scroll ---------------------------------------------- */
.watch-cast-section {
  margin-bottom: 1.5rem;
}

.watch-cast-scroll {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .1) transparent;
}

.watch-cast-scroll::-webkit-scrollbar {
  height: 4px;
}

.watch-cast-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.watch-cast-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .15);
  border-radius: 2px;
}

.watch-cast-card {
  flex-shrink: 0;
  width: 72px;
  text-align: center;
}

.watch-cast-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #b00010);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 auto .4rem;
  border: 2px solid rgba(255, 255, 255, .1);
}

.watch-cast-name {
  font-size: .72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.watch-cast-role {
  font-size: .67rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: .15rem;
}

/* -- Episodes section ----------------------------------------- */
.watch-episodes-section {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding-top: 1.2rem;
  margin-top: .5rem;
}

.watch-season-tabs {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .9rem;
}

.watch-season-tab {
  padding: .35rem .9rem;
  border-radius: 8px;
  border: 3px solid #000;
  background: var(--bg-card);
  color: #fff;
  font-size: .85rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
  transition: transform .2s, box-shadow .2s;
}

.watch-season-tab:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
  background: var(--accent);
}

.watch-season-tab.active {
  background: var(--accent);
  color: #fff;
}

.watch-ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .8rem;
  max-height: 460px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .1) transparent;
  padding-right: .4rem;
  padding-bottom: .5rem;
}

.watch-ep-grid::-webkit-scrollbar {
  width: 4px;
}

.watch-ep-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .15);
  border-radius: 2px;
}

.watch-ep-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: 1rem .5rem;
  border-radius: 12px;
  background: var(--bg-card);
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s;
  text-align: center;
  aspect-ratio: 1;
  position: relative;
}

.watch-ep-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
  background: rgba(255, 255, 255, .08);
}

.watch-ep-card.active {
  border-color: var(--accent);
  box-shadow: 4px 4px 0 var(--accent);
}

.watch-ep-card-num {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
  background: var(--bg-primary);
  border: 3px solid #000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 3px 3px 0 #000;
  margin-bottom: .2rem;
}

.watch-ep-card-info {
  width: 100%;
  overflow: hidden;
}

.watch-ep-card-title {
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.watch-ep-card-meta {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

.watch-ep-card-now {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--accent);
  color: #fff;
  border: 2px solid #000;
  padding: .2rem .5rem;
  border-radius: 6px;
  font-size: .65rem;
  font-weight: 800;
  box-shadow: 2px 2px 0 #000;
  transform: rotate(6deg);
  z-index: 2;
}

/* -- Error page ----------------------------------------------- */
.watch-error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.watch-error-inner {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.watch-error-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.25) blur(6px);
  transform: scale(1.05);
}

.watch-error-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 420px;
}

.watch-error-icon {
  font-size: 3rem;
  margin-bottom: .5rem;
}

.watch-error-content h2 {
  font-size: 1.5rem;
  margin-bottom: .5rem;
}

.watch-error-content p {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.watch-error-actions {
  display: flex;
  gap: .6rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* -- Watch page responsive ------------------------------------ */
@media (max-width: 768px) {
  .watch-player-container {
    max-height: 55vw;
  }

  .watch-player-section {
    position: static;
  }

  .watch-info-section {
    padding: 1rem .8rem 0;
  }

  .watch-main-title {
    font-size: 1.2rem;
  }

  .watch-title-row {
    gap: .6rem;
  }

  .watch-title-actions {
    gap: .35rem;
  }
}

@media (max-width: 480px) {
  .player-select-btn {
    padding: .25rem .45rem;
    font-size: .73rem;
  }

  .player-hud-title {
    font-size: .78rem;
  }

  .player-ep-panel {
    width: 280px;
    right: -280px;
  }

  .watch-cast-card {
    width: 62px;
  }

  .watch-cast-avatar {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .watch-ep-grid {
    max-height: 360px;
  }
}

/* ================================================================
   NETFLIX PIXEL POLISH (Desktop + Mobile)
   ================================================================ */

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.navbar {
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled,
.navbar.solid {
  border-bottom-color: rgba(255, 255, 255, .08);
}

.nav-logo {
  letter-spacing: -.03em;
  font-weight: 900;
}

.nav-links a {
  position: relative;
  font-weight: 500;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.hero {
  height: min(86vh, 920px);
}

.hero-bg {
  transition: transform 1.2s ease, filter .6s ease;
  filter: saturate(1.05);
}

.hero:hover .hero-bg {
  transform: scale(1.02);
}

.hero-content {
  max-width: 620px;
}

.hero-desc {
  max-width: 560px;
  color: rgba(255, 255, 255, .9);
}

.sections-wrapper {
  margin-top: -7.4rem;
}

.row {
  margin-bottom: 2.4rem;
}

.row-title {
  font-size: 1.22rem;
  letter-spacing: .01em;
}

.slider {
  gap: .55rem;
}

.slider-btn {
  width: 48px;
  height: 84%;
  border-radius: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, .55);
}

.slider-btn.prev {
  left: -12px;
}

.slider-btn.next {
  right: -12px;
}

.card {
  width: 196px;
}

.card:hover {
  transform: scale(1.16) translateY(-8px);
}

.card-thumb {
  border-radius: 8px;
}

.card-title {
  margin-top: .5rem;
  font-size: .82rem;
}

.detail-hero {
  height: min(88vh, 920px);
}

.detail-hero-text {
  max-width: 740px;
}

.detail-title {
  max-width: 760px;
}

.detail-body {
  padding-top: 2.4rem;
}

.episodes-section {
  margin-bottom: 2.2rem;
}

.watch-player-container {
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.watch-info-section {
  max-width: 1040px;
}

@media (max-width: 1024px) {
  .card {
    width: 170px;
  }

  .slider-btn {
    width: 42px;
  }
}

@media (max-width: 768px) {

  .nav-links,
  .nav-search-form {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .hero {
    height: 62vh;
    min-height: 380px;
  }

  .sections-wrapper {
    margin-top: -4.8rem;
  }

  .row {
    margin-bottom: 1.8rem;
  }

  .row-title {
    font-size: 1.02rem;
  }

  .slider {
    gap: .45rem;
    padding-bottom: .35rem;
  }

  .card {
    width: 132px;
  }

  .card:hover {
    transform: none;
  }

  .card-tooltip {
    display: none;
  }

  .slider-btn {
    display: none;
  }

  .detail-hero {
    height: 66vh;
    min-height: 420px;
  }

  .detail-hero-content {
    padding-bottom: 1.4rem;
  }
}

@media (max-width: 480px) {
  .hero {
    height: 56vh;
    min-height: 330px;
  }

  .hero-content {
    bottom: 12%;
    left: 3%;
    right: 3%;
  }

  .hero-meta {
    gap: .5rem;
    font-size: .76rem;
  }

  .hero-actions {
    gap: .45rem;
  }

  .hero-actions .btn {
    padding: .5rem .95rem;
    font-size: .82rem;
  }

  .sections-wrapper {
    margin-top: -4.1rem;
  }

  .card {
    width: 114px;
  }

  .detail-title {
    font-size: 1.28rem;
  }

  .section-title {
    font-size: 1.05rem;
  }
}

/* -- Final hover-card upgrade ----------------------------------- */
.card-tooltip {
  background: #181818;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  width: 250px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .45), 0 10px 10px rgba(0, 0, 0, .32);
  transition: opacity .2s .1s, transform .2s .1s;
}

.card:hover .card-tooltip {
  transform: translateX(-50%) translateY(-2px);
}

.card-hover-top {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .65rem;
}

.card-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .5);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  background: transparent;
  transition: var(--transition);
}

.card-icon-btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .12);
}

.card-tooltip-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.mini-pill {
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  padding: .06rem .32rem;
  border-radius: 3px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.mini-pill-outline {
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, .2);
}

/* -- Micro-polish typography/icons ------------------------------- */
.btn svg {
  width: 18px;
  height: 18px;
}

.watch-main-title,
.detail-title,
.hero-logo-text {
  letter-spacing: -.018em;
}

/* -- Precision finishing pass ------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(229, 9, 20, .8);
  outline-offset: 2px;
}

.card-thumb img {
  filter: saturate(1.03) contrast(1.02);
}

.card:hover .card-thumb img {
  filter: saturate(1.08) contrast(1.05);
}

.row,
.watch-info-section,
.detail-body,
.page-content {
  scroll-margin-top: calc(var(--nav-height) + 12px);
}

.watch-meta-row .watch-badge,
.detail-meta .badge,
.hero-meta span {
  font-weight: 600;
  letter-spacing: .02em;
}

/* -- Mobile Adjustments for Player ------------------------------- */
@media (max-width: 768px) {
  .custom-playbar {
    gap: .4rem;
    padding: .4rem .4rem;
    border-radius: 8px;
    border-width: 2px;
  }

  .playbar-btn {
    width: 28px;
    height: 28px;
  }

  .playbar-btn svg {
    width: 16px;
    height: 16px;
  }

  .playbar-time {
    font-size: .65rem;
    display: none;
    /* Hide time to save space */
  }

  .player-selectors {
    gap: .2rem;
  }

  .player-select-btn {
    padding: .2rem .4rem;
    font-size: .7rem;
  }

  .playbar-volume-wrap {
    display: none;
    /* Hide volume slider on mobile as they have hardware buttons */
  }

  .player-controls-overlay {
    bottom: 20px;
    /* Adjust bottom offset so it doesn't get cut off */
    padding: .3rem .5rem .5rem;
    gap: .8rem;
    /* Add more gap between ep nav and playbar on mobile */
  }

  .player-ep-nav-btn {
    padding: .3rem .6rem;
    font-size: .75rem;
    border-width: 2px;
  }
}

@media (max-width: 480px) {

  /* For very small screens, make quality/sub labels just icons or shorter text */
  #quality-label {
    display: none;
  }

  .player-select-btn::after {
    content: "⚙️";
    font-size: .8rem;
  }

  #sub-label {
    display: none;
  }

  .player-select-wrap:nth-child(2) .player-select-btn::after {
    content: "CC";
  }
}

.footer {
  margin-top: 4rem;
}

@media (max-width: 768px) {
  .watch-player-container {
    border-bottom-color: rgba(255, 255, 255, .12);
  }

  .watch-title-actions .btn {
    padding: .45rem .8rem;
    font-size: .8rem;
  }

  .watch-meta-row {
    gap: .3rem;
  }

  .watch-badge {
    font-size: .72rem;
    padding: .18rem .45rem;
  }
}

@media (max-width: 390px) {

  .navbar,
  .row,
  .page-content,
  .detail-body,
  .watch-info-section {
    padding-left: 10px;
    padding-right: 10px;
  }

  .hero-content {
    left: 10px;
    right: 10px;
  }

  .hero-logo-text {
    font-size: 1.32rem;
  }

  .hero-desc {
    font-size: .8rem;
    line-height: 1.45;
  }

  .card {
    width: 104px;
  }

  .card-title {
    font-size: .72rem;
  }

  .watch-main-title,
  .detail-title {
    font-size: 1.12rem;
  }

  .watch-ep-card {
    padding: .5rem .55rem;
    gap: .5rem;
  }

  .watch-ep-card-title {
    font-size: .79rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover,
  .hero:hover .hero-bg,
  .card:hover .card-tooltip {
    transform: none !important;
  }
}