:root {
  --bg:      #192852;
  --bg-card: #1e3265;
  --bg-deep: #111d3a;
  --accent:  #4f8ef7;
  --accent2: #7b5cf0;
  --glow:    #4f8ef799;
  --text:    #e8eeff;
  --muted:   #7b8fc0;
  --side-gap: 5%;
  --hero-overlay-bg: linear-gradient(to right,#192852f5 20%,#19285299 60%,transparent 100%);
  --hero-fade-bottom-bg: linear-gradient(to bottom, transparent 0%, #192852 100%);
  --player-overlay-bg: linear-gradient(to bottom, rgba(17, 29, 58, 0.95) 0%, rgba(17, 29, 58, 0.4) 60%, transparent 100%);
  --player-controls-bg: linear-gradient(to top, rgba(17, 29, 58, 0.95) 0%, rgba(17, 29, 58, 0.4) 80%, transparent 100%);
}

body.red-theme {
  --bg:      #210909;
  --bg-card: #3a1515;
  --bg-deep: #140404;
  --accent:  #ff4a4a;
  --accent2: #cc2424;
  --glow:    rgba(255, 74, 74, 0.6);
  --text:    #ffebeb;
  --muted:   #cca3a3;
  --hero-overlay-bg: linear-gradient(to right, rgba(33, 9, 9, 0.96) 20%, rgba(33, 9, 9, 0.6) 60%, transparent 100%);
  --hero-fade-bottom-bg: linear-gradient(to bottom, transparent 0%, #210909 100%);
  --player-overlay-bg: linear-gradient(to bottom, rgba(33, 9, 9, 0.96) 0%, rgba(33, 9, 9, 0.5) 60%, transparent 100%);
  --player-controls-bg: linear-gradient(to top, rgba(33, 9, 9, 0.96) 0%, rgba(33, 9, 9, 0.5) 80%, transparent 100%);
}

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

/* ── CUSTOM SCROLLBAR ── */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0b1426;
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
  border: 2px solid #0b1426;
}

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

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) #0b1426;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

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

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  transition: opacity 0.5s ease-in-out;
  background-color: rgba(255, 255, 255, 0.05);
}

img.lazy {
  opacity: 0;
}

img.loaded {
  opacity: 1;
}

@keyframes fadeInImg {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── HEADER ── */
header {
  position:absolute;
  top:0;
  left:0;
  width:100%;
  z-index:300;
  height:80px;
  display:flex;
  align-items:center;
  padding:0 var(--side-gap);
  gap:2rem;
  background:linear-gradient(to bottom, rgba(14, 26, 54, 0.8), transparent);
  backdrop-filter:blur(8px);
  transition: background 0.3s;
}

.logo {
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    gap: 0;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}
.logo span:first-child {
    font-weight: 900;
}
.logo .heart {
  width: 1.8rem; height: 1.8rem;
  flex-shrink: 0;
}

.nav-links {
  display:flex;
  gap:1.8rem;
  list-style:none;
  align-items: center;
}

.nav-links a, .nav-btn {
  font-size:0.9rem;
  color:var(--muted);
  text-decoration:none;
  transition: .2s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.nav-links a:hover, .nav-item:hover .nav-btn {
  color: #fff;
}

.nav-item {
  position: relative;
  padding: 1rem 0;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(17, 29, 58, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 0.8rem 0;
  min-width: 180px;
  display: none;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
}

.nav-item:hover .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  padding: 0.6rem 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.dropdown a:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.header-right {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:1rem;
}

.search-bar {
  display:flex;
  align-items:center;
  gap:.6rem;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:999px;
  padding:.45rem 1.2rem;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  z-index: 1000;
  overflow-y: auto;
  max-height: 450px;
  backdrop-filter: blur(10px);
}

.search-results.hidden {
  display: none;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background: rgba(255,255,255,0.05);
}

.search-item img {
  width: 45px;
  height: 65px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.search-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.search-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-meta {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-results-loading, .search-results-empty {
  padding: 15px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

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

.search-bar input {
  background:none;
  border:none;
  color:var(--text);
  outline:none;
  width:160px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 1024px) {
  .nav-links { gap: 1rem; }
  .search-bar input { width: 120px; }
}

@media (max-width: 850px) {
  header { gap: 1rem; }
  .logo .heart { width: 1.5rem; height: 1.5rem; }
  .logo { font-size: 1.2rem; }
}

@media (max-width: 768px) {
  header { 
    height: 70px;
    padding: 0 5%;
  }

  .search-results {
    position: fixed;
    top: 70px;
    left: 5%;
    right: 5%;
    width: auto;
    max-height: 60vh;
  }

  .menu-toggle {
    display: block;
    position: relative;
    z-index: 500;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-deep);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 2rem 2rem;
    gap: 0;
    transform: translateX(100%);
    display: none;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 400;
  }

  .nav-links.active {
    display: flex;
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .nav-links a, .nav-btn {
    display: block;
    padding: 1.2rem 0;
    font-size: 1.1rem;
    width: 100%;
    text-align: left;
  }

  .nav-item {
    padding: 0;
  }

  .dropdown {
    position: static;
    display: block;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0 0 1rem 1rem;
    min-width: 0;
    backdrop-filter: none;
  }

  .dropdown a {
    padding: 0.6rem 0;
    font-size: 0.95rem;
  }

  .search-bar {
    padding: 0.5rem 0.9rem;
    flex-shrink: 1;
    min-width: 40px;
  }

  .search-bar input {
    width: 0;
    padding: 0;
    transition: width 0.3s, padding 0.3s;
  }

  .search-bar:focus-within input,
  .search-bar input:not(:placeholder-shown) {
    width: clamp(80px, 30vw, 140px);
    padding-left: 0.6rem;
  }
}

@media (max-width: 480px) {
  .logo { font-size: 1.1rem; }
  .logo .heart { width: 1.3rem; height: 1.3rem; }
}

/* ── HERO SLIDER ── */
.hero {
  position:relative;
  height:100vh;
  overflow: hidden;
}

.hero-viewport { width: 100%; height: 100%; }

.hero-track {
  display: flex;
  height: 100%;
  transition: transform .6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
  flex: 0 0 100%;
  position: relative;
  height: 100vh;
  padding: 0 var(--side-gap);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position:absolute;
  inset:0;
  width: 100%;
  height: 100%;
  overflow:hidden;
  z-index: 0;
}

.hero-bg-inner {
  width:100%;
  height:100%;
  background:#0d1f4a;
  position: relative;
}

.hero-bg-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  transition: opacity 0.5s ease;
}

.hero-bg-inner.fade-out img { opacity: 0; }

.hero-overlay {
  position:absolute;
  inset:0;
  background: var(--hero-overlay-bg);
}

.hero-fade-bottom {
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  height:35vh;
  background: var(--hero-fade-bottom-bg);
  pointer-events:none;
  z-index: 3;
}

.hero-content {
  position:relative;
  z-index:5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
  width: 100%;
  max-width: 1300px;
  margin-top: 40px;
}

.hero-info-side { flex: 1; }

.hero-poster-side {
  flex-shrink: 0;
  width: 340px;
  aspect-ratio: 9 / 13;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  transform: rotate(2deg);
}

.hero-poster-side img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  display: inline-flex;
  background: var(--accent2);
  color: #fff;
  font-size: .75rem;
  font-family: 'Unbounded', sans-serif;
  padding: .35rem .9rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}

.hero-badge.ongoing {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.hero-badge.released {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.hero-badge.anons {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.hero-title {
  font-family:'Unbounded',sans-serif;
  font-weight:900;
  line-height:1.1;
  cursor: pointer;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--muted);
}

.hero-meta-romaji {
  cursor: pointer;
}

.hero-genres {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.genre-pill {
  font-size: .7rem;
  font-family: 'Unbounded', sans-serif;
  padding: .3rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

.genre-pill:hover {
  background: var(--accent);
  color: #fff;
}

.hero-desc {
  font-size:1.1rem;
  line-height:1.6;
  color:#b0bedd;
  margin-bottom:2.5rem;
  max-width: 700px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.btn-primary {
  background:var(--accent);
  color:#fff;
  border:none;
  cursor:pointer;
  font-family:'Unbounded',sans-serif;
  font-size:0.85rem;
  font-weight:700;
  padding:.9rem 2.2rem;
  border-radius:999px;
  box-shadow:0 0 25px var(--glow);
  transition: .2s;
  text-decoration: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  font-family: 'Unbounded', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: .9rem 2.2rem;
  border-radius: 999px;
}

.hero-screens {
  display:flex;
  gap:1rem;
}

.screen-thumb {
  width:160px;
  height:90px;
  border-radius:12px;
  background:#1a3370;
  border:2px solid rgba(255,255,255,0.1);
  overflow:hidden;
  cursor:pointer;
  opacity:.5;
  transition: .3s;
}

.screen-thumb img { width: 100%; height: 100%; object-fit: cover; }
.screen-thumb.active { border-color:var(--accent); opacity:1; }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 60px;
  height: 60px;
  background: rgba(10, 20, 50, 0.4);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.hero-arrow svg { width: 34px; height: 34px; stroke-width: 2.5px; }
.hero-arrow.prev { left: 30px; }
.hero-arrow.next { right: 30px; }

/* ── SLIDERS ── */
.section {
  padding:4rem var(--side-gap);
  position:relative;
  z-index:20;
}

.section-header {
  display:flex;
  align-items:baseline;
  gap:1rem;
  padding:0 0 1.5rem;
}

.section-title {
  font-family:'Unbounded',sans-serif;
  font-size:1.4rem;
  font-weight:700;
}

.section-title::before {
  content:'';
  display:inline-block;
  width:6px;
  height:24px;
  background:var(--bar, var(--accent));
  border-radius:3px;
  margin-right:.8rem;
  vertical-align:middle;
}

.see-all {
  font-size:0.85rem;
  color:var(--accent);
  text-decoration:none;
  margin-left:auto;
}

.slider-outer {
  position: relative;
  width: 100%;
}

.slider-viewport {
  overflow: hidden;
  width: 100%;
  cursor: grab;
}

.slider-track {
  display: flex;
  transition: transform .5s cubic-bezier(0.4, 0, 0.2, 1);
  width: max-content;
}

.slide-item { flex-shrink: 0; padding: 0 12px; }

/* ── CARD ── */
.card {
  border-radius:18px;
  overflow:hidden;
  background:var(--bg-card);
  border:1px solid rgba(255,255,255,0.05);
  cursor:pointer;
  transition: .3s;
  position: relative;
}

.card-img {
  width:100%;
  aspect-ratio: 9 / 13;
  background-color: #0d1f4a;
  position:relative;
  overflow:hidden;
  border-radius: 18px;
}

.card-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 10%;
  position: absolute; inset: 0; transition: transform 0.5s;
}

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

.card-overlay {
  position: absolute; inset: -1px; border-radius: 18px;
  background: linear-gradient(to top, rgba(10, 20, 45, 1) 0%, rgba(10, 20, 45, 0.1) 40%, transparent 80%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.2rem; z-index: 2; align-items: center; text-align: center;
}

.card:hover .card-overlay { background: rgba(10, 20, 45, 0.88); }

.ep-badge {
  background: var(--accent);
  font-size: .6rem;
  font-weight: 800;
  font-family: 'Unbounded', sans-serif;
  padding: .3rem .6rem;
  border-radius: 6px;
  color: #fff;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.card-name {
  font-family:'Unbounded',sans-serif;
  font-size:0.85rem;
  font-weight:700;
  line-height:1.3;
  color: #fff;
  margin-bottom: 2px;
  width: 100%;
  /* Max 2 lines to prevent overflow */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-romaji {
  font-size: 0.7rem; color: var(--muted);
  margin-bottom: 0.5rem; display: none; width: 100%;
  /* Also 2 lines max */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-hover-info {
  max-height: 0; opacity: 0; overflow: hidden;
  transition: all 0.4s; text-align: left; align-self: stretch;
  display: flex;
  flex-direction: column;
}

.card:hover .card-romaji { display: -webkit-box; }
.card:hover .card-hover-info { max-height: 300px; opacity: 1; margin-top: 10px; }

.card-genres { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 0.6rem; }
.card-genres a { text-decoration: none; }
.card-genres span {
  font-size: 0.6rem; color: var(--accent); border: 1px solid rgba(79, 142, 247, 0.3);
  padding: 2px 6px; border-radius: 4px;
  transition: all 0.3s ease;
}
.card-genres a:hover span {
  background: var(--accent);
  color: #fff;
}

.card-desc {
  font-size: 0.75rem; color: #b0bedd; line-height: 1.4;
  margin-bottom: 0.8rem; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  flex-grow: 1;
}

.btn-watch-sm {
  width: 100%; background: var(--accent); color: #fff; border: none;
  padding: 0.7rem; border-radius: 8px; font-family: 'Unbounded', sans-serif;
  font-size: 0.75rem; font-weight: 700; cursor: pointer;
  text-decoration: none; display: block; text-align: center;
  box-sizing: border-box;
  margin-top: auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
  .card-overlay {
    padding: 0.8rem;
    justify-content: flex-end;
  }
  .card-name {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
    margin-bottom: 4px;
  }
  .card-romaji {
    display: none !important;
  }
  .card-desc {
    display: none; /* Hide description on mobile cards to save space */
  }
  .card-genres {
    display: none; /* Hide genres on mobile to ensure button is visible */
  }
  .btn-watch-sm {
    padding: 0.6rem;
    font-size: 0.65rem;
    margin-top: 4px;
  }
  /* On touch devices, hover state is often triggered by first tap */
  .card:hover .card-hover-info {
    max-height: 120px;
  }
}

.btn-watch-sma {
  width: 100%;
}

.tr-arrow {
  position:absolute; z-index:20; top: 50%; transform:translateY(-50%);
  width:40px; height:40px; background:rgba(17, 29, 58, 0.8);
  border:1px solid rgba(255,255,255,0.1); border-radius:50%;
  cursor:pointer; display: inline-flex; align-items: center; justify-content: center;
  color:var(--text); backdrop-filter: blur(8px);
}

.tr-arrow svg { width: 22px; height: 22px; stroke-width: 3px; }
.tr-arrow.prev { left:-20px; }
.tr-arrow.next { right:-20px; }

footer {
  padding: 4rem var(--side-gap); text-align: left;
  border-top: 1px solid rgba(255,255,255,0.05); color: var(--muted);
}

/* ── TITLE PAGE SPECIFIC ── */

.title-hero {
  min-height: 60vh; /* Уменьшил высоту */
  padding-top: 80px; /* Поднял выше */
  display: flex;
  align-items: center;
  padding-bottom: 2rem;
}

.title-content {
  display: grid;
  grid-template-columns: 280px 1fr 600px; /* Увеличил колонку трейлера */
  gap: 2.5rem;
  align-items: flex-start;
  width: 100%;
  max-width: 1700px;
  margin: 0 auto;
  position: relative;
  z-index: 5;
  margin-top: 10vh;
}

.trailer-side {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Команда озвучки */
.cast-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cast-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255,255,255,0.05);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
}

.cast-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.cast-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Скриншоты */
.screens-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 1.5rem;
}

.screen-item {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
}

.screen-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: 0.3s;
}

.screen-item:hover img { transform: scale(1.05); }

/* Эпизоды */
.episodes-section {
  padding: 2rem var(--side-gap); /* Уменьшил отступ сверху */
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 2rem;
}

.ep-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

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

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

.ep-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.3s;
}

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

.play-btn-circle {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px var(--glow);
}

.play-btn-circle svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
  margin-left: 4px;
}

.ep-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  z-index: 2;
}

.ep-number {
  font-family: 'Unbounded', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

@media (max-width: 1400px) {
  .title-content {
    grid-template-columns: 250px 1fr 380px;
    gap: 2rem;
  }
}

@media (max-width: 1100px) {
  .title-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-poster-side, .trailer-side {
    max-width: 500px;
    margin: 0 auto;
  }
  .hero-poster-side { display: flex; transform: none; }
  .episodes-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .episodes-grid { grid-template-columns: 1fr; }
}


@media (max-width: 1200px) {
  .hero-title { font-size: 3.5rem; }
  .hero-poster-side { width: 300px; }
}

@media (max-width: 992px) {
  header { gap: 1rem; }
  .hero { height: auto; min-height: 100vh; padding: 0; display: block; }
  .hero-slide { height: auto; min-height: 100vh; padding-top: 100px; padding-bottom: 150px; display: flex; align-items: center; }
  .hero-content { flex-direction: column; text-align: center; gap: 2rem; margin-top: 0; }
  .hero-info-side { order: 1; width: 100%; }
  .hero-poster-side { display: none; }
  
  .hero-title { font-size: 2.8rem; }
  .hero-desc { margin-left: auto; margin-right: auto; opacity: 0.9; }
  .hero-screens { justify-content: center; }
  
  .hero-bg-inner img { opacity: 0.5; } 
  .hero-overlay { background: linear-gradient(to top, rgba(25, 40, 82, 0.9) 20%, rgba(25, 40, 82, 0.4) 100%); }
  
  .section-title { font-size: 1.2rem; }
  #sec-ongoing { margin-top: -100px; }
}

@media (max-width: 768px) {
  html { font-size: 16px; }
  header { 
    height: 70px;
    padding: 0 4%;
    gap: 0.5rem;
  }
  
  .search-bar {
    padding: 0.4rem 0.6rem;
  }
  
  .hero { padding-bottom: 0; }
  .hero-slide { padding-top: 80px; padding-bottom: 120px; }
  .hero-title { font-size: 2.2rem; }
  .hero-desc { font-size: 1rem; }
  
  .hero-arrow { width: 45px; height: 45px; }
  .hero-arrow svg { width: 24px; height: 24px; }
  
  .section { padding: 3rem 4%; }
  #sec-ongoing { margin-top: -80px; }
  
  .tr-arrow { display: none; }

  .screens-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .hero-desc { font-size: 0.9rem; margin-bottom: 1.5rem; }
  .hero-screens { gap: 0.5rem; }
  .screens-grid { gap: 8px; }
  .screen-thumb { width: 100px; height: 60px; border-radius: 8px; }
  .hero-btns { margin-bottom: 2rem; }
  .hero-arrow { display: none; }
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 45, 0.9);
  backdrop-filter: blur(15px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}

#fullTitleText {
   font-size: 1.2rem;
   line-height: 1.6;
   color: var(--text);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-card);
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 2.5rem;
  position: relative;
  overflow-y: auto;
  transform: translateY(30px);
  transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.05);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

#modalName:hover {
  opacity: 0.8;
  text-decoration: underline !important;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.char-card {
  text-align: center;
}

.char-img {
  width: 100%;
  aspect-ratio: 9 / 13;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 0.8rem;
  border: 1px solid rgba(255,255,255,0.1);
}

.char-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.char-role {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 3rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  padding: 0 20px;
}

.pagination-btn {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Unbounded', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.3s ease;
  min-width: 45px;
  text-align: center;
  text-decoration: none;
}

.pagination-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--glow);
}

.pagination-btn:hover:not(.active) {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* ── Player ── */

#fplayer {
  width: 100%;
  height: 100dvh;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
}

#fplayer #app {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100dvh;
  background: #000;
}

.player-container {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#player {
  width: 100% !important;
  height: 100% !important;
  flex-shrink: 0;
}

/* =========================
   TOP PANEL
========================= */
.player-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 30px 20px;
  background: var(--player-overlay-bg);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: opacity .3s, transform .3s;
}

.back-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
}

.back-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--glow);
}

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

.player-title {
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  font-size: 1.1rem;
  line-height: 1.2;
  flex: 1;
}

.player-title span {
  display: block;
  margin-top: 4px;
  font-size: .85rem;
  font-family: 'Inter', sans-serif;
  color: var(--muted);
}

/* =========================
   FOOTER CONTROLS
========================= */
.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20 !important;
  display: flex;
  flex-direction: column;
  background: var(--player-controls-bg);
  transition: opacity .3s, transform .3s;
  padding-bottom: env(safe-area-inset-bottom);
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 15px;
  height: 48px;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ctrl-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.time {
  color: #eee;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  margin-left: 5px;
}

.progress-wrap {
  position: relative;
  height: 20px;
  margin: 0 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.progress-bg,
.buffered-bar,
.progress-fill {
  position: absolute;
  height: 4px;
  border-radius: 2px;
  left: 0;
  width: 0; /* progress-bg will be 100% */
  top: 50%;
  transform: translateY(-50%);
}

.progress-bg {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.buffered-bar {
  background: rgba(255, 255, 255, 0.15);
  z-index: 2;
  transition: width 0.3s;
}

.progress-fill {
  background: var(--accent);
  z-index: 3;
  box-shadow: 0 0 8px var(--glow);
}

#progress {
  width: 100%;
  appearance: none;
  height: 20px;
  background: transparent;
  cursor: pointer;
  outline: none;
  margin: 0;
  padding: 0;
  border: none;
  display: block;
  position: relative;
  z-index: 4;
}

#progress::-webkit-slider-runnable-track {
  width: 100%;
  height: 20px;
  background: transparent;
}

#progress::-webkit-slider-thumb {
  appearance: none;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  margin-top: 4px; /* (20 - 12) / 2 */
  border: 2px solid var(--accent);
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.2s;
}

.progress-wrap:hover #progress::-webkit-slider-thumb {
  opacity: 1;
}

#progress::-moz-range-thumb {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  opacity: 0;
}

.progress-wrap:hover #progress::-moz-range-thumb {
  opacity: 1;
}

.progress-wrap:hover .progress-bg,
.progress-wrap:hover .buffered-bar,
.progress-wrap:hover .progress-fill {
  height: 6px;
}

.speed {
  width: 75px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 8px;
  font-family: 'Unbounded', sans-serif;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.2s;
  text-align: center;
}

.speed:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--glow);
}

.speed option {
  background: var(--bg-deep);
  color: #fff;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 42px;
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.3s ease;
  margin-left: 5px;
}

.volume-wrap:hover {
  width: 140px;
}

.volume {
  flex: 1;
  appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  min-width: 80px;
}

.volume::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

/* =========================
   UI HIDDEN
========================= */
.ui-hidden {
  cursor: none;
}

.ui-hidden .player-overlay {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.ui-hidden .player-controls {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* =========================
   MENUS
========================= */
.speed-wrap, .quality-wrap, .settings-wrap, .episodes-wrap, .download-wrap {
  position: relative;
}

.quality-menu, .speed-menu {
  position: absolute;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, .95);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 50;
  min-width: 120px;
}

.settings-menu, .download-menu {
  position: absolute;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, .95);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  display: none;
  flex-direction: column;
  padding: 10px 0;
  z-index: 50;
  min-width: 160px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
}

.download-menu {
  min-width: 180px;
}

.download-item {
  display: block;
  padding: 12px 16px;
  color: #fff;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: 0.2s;
}

.download-item:hover {
  background: rgba(255, 255, 255, .08);
}

.menu-label {
  padding: 8px 16px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.speed-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 5px 10px;
}

.speed-options button {
  padding: 8px !important;
  text-align: center !important;
  border-radius: 8px;
  font-size: 12px !important;
}

.divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 10px 0;
}

.episodes-menu {
  position: absolute;
  bottom: 65px;
  right: 0;
  width: 450px;
  max-width: 90vw;
  max-height: 70vh;
  background: rgba(17, 29, 58, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  padding: 15px;
  backdrop-filter: blur(25px);
}

@media (max-width: 1200px) {
  .episodes-menu {
    width: 380px;
  }
  .ep-img {
    width: 130px;
    height: 73px;
  }
}

.episode-item {
  display: flex;
  gap: 15px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
  margin-bottom: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
}

.episode-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(-5px);
}

.episode-item.active {
  background: rgba(79, 142, 247, 0.15);
  border-color: var(--accent);
}

.ep-img {
  width: 150px;
  height: 84px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
  flex-shrink: 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.episode-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.episode-num {
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.episode-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.speed-menu {
  min-width: 80px;
}

.quality-menu button, .settings-menu button, .speed-menu button {
  background: none;
  border: none;
  color: #fff;
  padding: 12px 16px;
  cursor: pointer;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: 0.2s;
}

.quality-menu button:hover, .settings-menu button:hover, .speed-menu button:hover {
  background: rgba(255, 255, 255, .08);
}

.settings-menu button.active {
  color: var(--accent);
  font-weight: bold;
}

/* =========================
   CENTER CONTROLS
========================= */
.mouse-layer {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.center-play-btn {
  width: 88px;
  height: 88px;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  transition: transform 0.2s, opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 25;
}

.center-play-btn:hover {
  transform: scale(1.1);
}

.center-play-btn svg {
  width: 100%;
  height: 100%;
}

.center-play-btn .fill {
  fill: currentColor;
}

.center-play-btn .hover {
  display: none;
}

.center-play-btn:hover .normal {
  display: none;
}

.center-play-btn:hover .hover {
  display: block;
}

.loading-spinner {
  display: none;
}

.is-loading .play-svg {
  display: none;
}

.is-loading .loading-spinner {
  display: block;
}

.loading-spinner svg {
  transform-origin: center;
  animation: spinner_S1_S 1.5s linear infinite;
}

@keyframes spinner_S1_S {
  100% {
    transform: rotate(360deg);
  }
}

/* =========================
   MOBILE ADAPTATION (MUST BE LAST)
========================= */
@media (max-width: 1024px) {
  #progress {
    height: 20px;
  }
}

@media (max-width: 768px) {
  .player-overlay {
    padding: 15px;
  }
  .player-title {
    font-size: 0.95rem;
  }
  .player-title span {
    font-size: 0.75rem;
  }
  .back-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 600px) {
  .player-controls {
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .controls-row {
    padding: 0 8px;
    gap: 4px;
    height: 38px;
    display: flex;
    justify-content: space-between;
  }

  .progress-wrap {
    width: auto;
    margin: 0 12px;
    padding: 0;
    order: -1;
    flex: 1 0 100%;
    height: 20px;
  }

  .controls-left, .controls-right {
    gap: 2px;
  }

  .time {
    font-size: 10px;
    white-space: nowrap;
  }

  .speed {
    display: none;
  }

  .ctrl-btn {
    width: 32px;
    height: 32px;
  }

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

  .volume-wrap {
    display: none;
  }

  /* Episodes Menu Mobile */
  .episodes-menu {
    position: fixed !important;
    bottom: 70px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-height: 65vh !important;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .player-overlay {
    padding: 10px 20px;
  }
  .player-controls {
    height: auto;
  }
  .controls-row {
    height: 42px;
    padding: 0 20px;
    gap: 10px;
  }
  .progress-wrap {
    order: -1;
    width: auto;
    margin: 0 20px;
    padding: 0;
    height: 20px;
    flex: none;
  }
  .player-title span {
    display: inline;
    margin-left: 10px;
  }
}

/* ── SEARCH PAGE SPECIFIC ── */
.search-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 1.5rem;
}

@media (max-width: 1400px) {
  .search-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1100px) {
  .search-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .search-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
}

/* ── LOADER ── */
#fplayer header, 
#fplayer #global-footer { 
  display: none !important; 
}

#app.loading {
  opacity: 0;
  pointer-events: none;
}

.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s;
  visibility: visible;
  opacity: 1;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  display: none !important;
}

.loader-content {
  text-align: center;
}

.loader-svg {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}

.loader-text {
  margin-top: 20px;
  font-family: 'Unbounded', sans-serif;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 2px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hidden {
  display: none !important;
}

#app {
  min-height: 100vh;
  transition: opacity 0.3s ease;
}

#app.loading {
  opacity: 0;
  pointer-events: none;
}

/* ── CAPTCHA MODAL ── */
.captcha-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: none; /* Hidden by default */
  padding: 20px;
  box-sizing: border-box;
}

.captcha-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-content {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 25px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.captcha-header {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #fff;
}

.captcha-task-img {
  margin-bottom: 15px;
  background: #fff;
  border-radius: 8px;
  padding: 5px;
  display: inline-block;
}

.captcha-task-img img {
  max-width: 100%;
  display: block;
}

.captcha-main-img-wrap {
  position: relative;
  margin-bottom: 20px;
  cursor: crosshair;
  background: #fff;
  border-radius: 8px;
  padding: 0;
  line-height: 0;
  overflow: hidden;
  display: inline-block;
}

.captcha-main-img-wrap img {
  display: block;
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

#captchaDots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.captcha-dot {
  position: absolute;
  width: 24px;
  height: 24px;
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  font-family: 'Unbounded', sans-serif;
  cursor: pointer;
  pointer-events: all;
  user-select: none;
  transition: transform 0.2s;
}

.captcha-dot:hover {
  transform: translate(-50%, -50%) scale(1.2);
  filter: brightness(1.1);
}

.captcha-footer {
  display: flex;
  gap: 10px;
}

.captcha-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-family: 'Unbounded', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.captcha-btn:not(.secondary) {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 15px var(--glow);
}

.captcha-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.captcha-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* ── SCHEDULE PAGE ── */
.schedule-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 2rem;
  flex-wrap: wrap; /* Allow wrapping on PC */
  justify-content: center; /* Center on PC */
}

.schedule-tab {
  background: var(--bg-card);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 12px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Unbounded', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.schedule-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--glow);
}

.schedule-tab:hover:not(.active) {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.schedule-item {
  position: relative;
}

.schedule-timer {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-empty {
  text-align: center;
  padding: 4rem 0;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ── RESPONSIVE SCHEDULE ── */
@media (max-width: 768px) {
  .schedule-tabs {
    gap: 8px;
    margin-bottom: 1.5rem;
  }
  
  .schedule-tab {
    padding: 10px 18px;
    font-size: 0.8rem;
    border-radius: 10px;
  }

  .schedule-timer {
    padding: 3px 8px;
    font-size: 0.65rem;
    left: 8px;
    top: 8px;
  }
}

@media (max-width: 480px) {
  .schedule-tab {
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  .schedule-timer {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
}

/* =========================
   PLAYER SKIP BUTTONS & NAVIGATION
   ========================= */
.player-skip-container {
  position: absolute;
  bottom: 80px; /* Shifted up when player controls are visible */
  right: 30px;
  z-index: 30;
  display: flex;
  flex-direction: row;
  gap: 12px;
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
  pointer-events: auto;
}

/* When player controls are hidden via .ui-hidden, move skip buttons down */
.ui-hidden .player-skip-container {
  bottom: 30px;
}

.player-skip-container.faded {
  opacity: 0;
}

/* Force show on hover even if faded */
.player-skip-container:hover {
  opacity: 1 !important;
}

.player-skip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(17, 29, 58, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-family: 'Unbounded', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.player-skip-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
  transform: translateY(-2px) scale(1.03);
}

.player-skip-btn:active {
  transform: translateY(0) scale(0.98);
}

.player-skip-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.player-skip-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.player-skip-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

/* Mobile responsive adaptivity */
@media (max-width: 768px) {
  .player-skip-container {
    right: 15px;
    bottom: 75px;
    gap: 8px;
  }
  .ui-hidden .player-skip-container {
    bottom: 20px;
  }
  .player-skip-btn {
    padding: 10px 18px;
    font-size: 12px;
    border-radius: 10px;
  }
  .player-skip-btn svg {
    width: 14px;
    height: 14px;
  }
}

@media (orientation: portrait) {
  .player-container {
    width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }
}

.episode-info:not(.has-desc) {
  justify-content: center;
}

.episode-info:not(.has-desc) .episode-num {
  font-size: 18px;
  margin-bottom: 0;
}



