/* =====================================================================
   ZENKAI WEB — Claymorphic UI: Creamy-White & Clay-Red Theme
   Anime, Manga & Light Novel Streaming & Reading Platform
   ===================================================================== */

:root {
  /* Creamy-White Base Palette */
  --bg-creamy: #F6F3EB;
  --bg-creamy-light: #FAF8F2;
  --bg-creamy-dark: #EDE7DC;
  --surface-clay: #FFFDF9;
  --surface-clay-recessed: #EAE3D6;
  
  /* Clay-Red Palette */
  --clay-red: #E54838;
  --clay-red-light: #F05545;
  --clay-red-dark: #C93627;
  --clay-red-soft: #FDECE9;
  --clay-coral: #FF6E5E;

  /* Accent Clay Tones */
  --clay-amber: #F4A236;
  --clay-emerald: #2EB872;
  --clay-blue: #3E8BFF;

  /* Typography Colors */
  --text-primary: #2C2420;
  --text-secondary: #6B5E57;
  --text-muted: #9E9189;
  --text-light: #FFFFFF;

  /* Radii */
  --radius-xs: 12px;
  --radius-sm: 18px;
  --radius-md: 26px;
  --radius-lg: 36px;
  --radius-pill: 9999px;

  /* Clay Shadows (Multi-layered 3D Pillowy Effect) */
  --clay-shadow-outer: 10px 14px 28px rgba(184, 160, 146, 0.26), -8px -8px 22px rgba(255, 255, 255, 0.95);
  --clay-shadow-card: 12px 18px 32px rgba(184, 160, 146, 0.28), -10px -10px 26px rgba(255, 255, 255, 0.98);
  --clay-shadow-hover: 16px 24px 38px rgba(184, 160, 146, 0.35), -12px -12px 30px rgba(255, 255, 255, 1);
  --clay-shadow-inner: inset 2px 2px 5px rgba(255, 255, 255, 0.9), inset -2px -2px 6px rgba(196, 178, 163, 0.22);
  --clay-shadow-inset: inset 4px 4px 8px rgba(186, 166, 150, 0.32), inset -3px -3px 6px rgba(255, 255, 255, 0.9);

  /* Clay-Red Button Shadows (Clean & crisp, no fuzzy colored glow) */
  --clay-red-shadow: 0 4px 12px rgba(35, 25, 20, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  --clay-red-shadow-pressed: inset 2px 2px 4px rgba(0, 0, 0, 0.25);

  --transition-clay: all 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-focus-ring-color: transparent !important;
  outline: none;
}

html, body, button, input, select, textarea {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Ensure FontAwesome pseudo-elements always render icon glyphs instead of font-family overrides */
.fa, .fas, .fa-solid, .far, .fa-regular, .fab, .fa-brands,
.fa::before, .fas::before, .fa-solid::before, .far::before, .fa-regular::before, .fab::before, .fa-brands::before,
[class*="fa-"]::before, [class*="fa-"]::after {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}
.fa-solid, .fas, .fa-solid::before, .fas::before {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}
.fa-regular, .far, .fa-regular::before, .far::before {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 400 !important;
}
.fa-brands, .fab, .fa-brands::before, .fab::before {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

*:not(input):not(textarea):not([contenteditable="true"]) {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  -khtml-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

input, textarea, [contenteditable="true"] {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

::selection {
  background: transparent !important;
  color: inherit !important;
}

::-moz-selection {
  background: transparent !important;
  color: inherit !important;
}

img, video, a, button {
  -webkit-user-drag: none;
  -webkit-touch-callout: none !important;
}

body {
  background-color: var(--bg-creamy);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Ambient Clay Glow Backdrops (Disabled to eliminate unmatching blurry halos) */
.ambient-glow {
  display: none !important;
}

/* Claymorphic Card Surface */
.clay-card {
  background: var(--surface-clay);
  border-radius: var(--radius-md);
  box-shadow: var(--clay-shadow-card), var(--clay-shadow-inner);
  border: 1px solid rgba(255, 255, 255, 0.85);
  transition: var(--transition-clay);
}

/* Header */
.clay-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(246, 243, 235, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(214, 196, 182, 0.35);
  padding: 12px 24px;
}
.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand & Logo Unified */
.brand, .brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo-container, .logo-box {
  width: 44px;
  height: 44px;
  min-width: 44px;
  max-width: 44px;
  min-height: 44px;
  max-height: 44px;
  border-radius: var(--radius-sm);
  background: var(--surface-clay);
  box-shadow: 4px 6px 14px rgba(184, 160, 146, 0.25), -3px -3px 8px #FFF, var(--clay-shadow-inner);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}
.brand-logo-img, .brand-icon {
  width: 100%;
  height: 100%;
  max-width: 36px;
  max-height: 36px;
  object-fit: contain;
  display: block;
}
.brand-navbar-img {
  height: 26px;
  max-height: 26px;
  width: auto;
  object-fit: contain;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--clay-red);
}
.brand-tagline {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Upper Media Mode Switcher (Hidden - replaced with bottom navigation dock) */
.media-switcher {
  display: none !important;
}
.mode-btn {
  background: none;
  border: none;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-clay);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mode-btn:hover {
  color: var(--text-primary);
}
.mode-btn.active {
  background: linear-gradient(145deg, var(--clay-red-light), var(--clay-red));
  color: #fff;
  box-shadow: var(--clay-red-shadow);
  transform: translateY(-1px);
}

/* Clay Search Bar */
.clay-search-bar {
  position: relative;
  flex: 1;
  max-width: 440px;
}
.clay-search-bar input {
  width: 100%;
  padding: 11px 18px 11px 44px;
  background: var(--surface-clay-recessed);
  box-shadow: var(--clay-shadow-inset);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-clay);
}
.clay-search-bar input:focus {
  background: var(--surface-clay);
  box-shadow: var(--clay-shadow-card), var(--clay-shadow-inner);
  border-color: var(--clay-red-light);
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}
.clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  max-height: 440px;
  overflow-y: auto;
  display: none;
  padding: 10px;
  z-index: 1001;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-clay);
}
.search-item:hover {
  background: var(--clay-red-soft);
  transform: translateX(4px);
}
.search-item img {
  width: 46px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.15);
}
.search-item-info {
  flex: 1;
  overflow: hidden;
}
.search-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Nav Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.download-pill-btn {
  padding: 8px 18px;
  background: linear-gradient(145deg, var(--clay-red-light), var(--clay-red));
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--clay-red-shadow);
  transition: var(--transition-clay);
}
.download-pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 8px 12px 24px rgba(229, 72, 56, 0.45);
}

/* Main Content */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px;
  position: relative;
  z-index: 1;
}

/* Clay Hero Section */
.hero-section {
  position: relative;
  min-height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  box-shadow: var(--clay-shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  transition: background-image 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.85);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(35, 26, 22, 0.92) 0%, rgba(35, 26, 22, 0.72) 42%, rgba(35, 26, 22, 0.3) 75%, rgba(35, 26, 22, 0.5) 100%),
              linear-gradient(0deg, rgba(35, 26, 22, 0.94) 0%, transparent 55%);
  pointer-events: none;
}
.hero-content-wrapper {
  position: relative;
  width: 100%;
  padding: 38px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  z-index: 2;
  color: #fff;
}
.hero-details {
  max-width: 480px;
  flex: 1;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.clay-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-red {
  background: linear-gradient(145deg, var(--clay-red-light), var(--clay-red));
  color: #fff;
  box-shadow: 3px 5px 12px rgba(229, 72, 56, 0.4);
}
.badge-gold {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: #ffd700;
  backdrop-filter: blur(8px);
}
.badge-glass {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  backdrop-filter: blur(8px);
}
.badge-creamy {
  background: var(--surface-clay);
  color: var(--text-primary);
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.15);
}
.hero-title-logo {
  display: block;
  max-height: 85px;
  max-width: 320px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.75));
  transition: opacity 0.3s ease;
}
.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.hero-sub-title {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 10px;
  font-weight: 600;
}
.hero-synopsis {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 440px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.btn-hero-watch {
  background: #fff;
  color: #111;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3);
  font-weight: 800;
}
.btn-hero-watch:hover {
  background: var(--clay-red);
  color: #fff;
  transform: translateY(-2px) scale(1.03);
}
.btn-hero-details {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  backdrop-filter: blur(10px);
}
.btn-hero-details:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

/* 3D Hero Poster Showcase (matching APK center card) */
.hero-poster-showcase {
  flex-shrink: 0;
  cursor: pointer;
  perspective: 1000px;
}
.hero-poster-card {
  position: relative;
  width: 190px;
  height: 270px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
  transform: rotateY(-6deg) rotateX(4deg);
}
.hero-poster-showcase:hover .hero-poster-card {
  transform: rotateY(0deg) rotateX(0deg) scale(1.05) translateY(-4px);
  box-shadow: 0 20px 45px rgba(229, 72, 56, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.hero-poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-poster-score {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  color: #ffd700;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Hero Carousel Arrows */
.hero-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(8px);
  transition: var(--transition-clay);
}
.hero-arrow-btn:hover {
  background: var(--clay-red);
  border-color: #fff;
  transform: translateY(-50%) scale(1.1);
}
.hero-arrow-btn.prev { left: 16px; }
.hero-arrow-btn.next { right: 16px; }

/* Interactive Morphing Hero Dots */
.hero-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 5;
}
.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
  cursor: pointer;
}
.hero-dot.active {
  width: 24px;
  background: var(--clay-red);
  box-shadow: 0 0 10px rgba(229, 72, 56, 0.8);
}

/* Clay Buttons */
.btn-clay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition-clay);
}
.btn-clay-red {
  background: linear-gradient(145deg, var(--clay-red-light), var(--clay-red));
  color: #fff;
  box-shadow: var(--clay-red-shadow);
}
.btn-clay-red:hover {
  transform: translateY(-2px);
  box-shadow: 8px 14px 26px rgba(229, 72, 56, 0.5);
}
.btn-clay-red:active {
  transform: translateY(1px);
  box-shadow: var(--clay-red-shadow-pressed);
}
.btn-clay-creamy {
  background: var(--surface-clay);
  color: var(--text-primary);
  box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.btn-clay-creamy:hover {
  transform: translateY(-2px);
  background: #FFF;
  box-shadow: var(--clay-shadow-hover);
}

/* Sections */
.section {
  margin-bottom: 48px;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}
.section-title i {
  color: var(--clay-red);
}
.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Cards Row & Grid */
.cards-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 4px 22px;
  scroll-snap-type: x mandatory;
}
.cards-row::-webkit-scrollbar,
.episodes-grid::-webkit-scrollbar,
.search-dropdown::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.cards-row::-webkit-scrollbar-thumb,
.episodes-grid::-webkit-scrollbar-thumb,
.search-dropdown::-webkit-scrollbar-thumb {
  background: rgba(184, 160, 146, 0.4);
  border-radius: var(--radius-pill);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

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


/* Unified Media Cards (Border & Image Match on Mobile and Laptop) */
.clay-anime-card,
.media-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-clay);
  position: relative;
  background: var(--surface-clay);
  box-shadow: var(--clay-shadow-card), var(--clay-shadow-inner);
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}
.cards-grid .clay-anime-card,
.cards-grid .media-card,
.media-grid .media-card {
  flex: none;
}
.clay-anime-card:hover,
.media-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--clay-shadow-hover);
  border-color: var(--clay-red-light);
}
.card-poster,
.card-cover-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.3;
  overflow: hidden;
  border-radius: 17px 17px 0 0;
  background: var(--surface-clay-recessed);
}
.card-poster img,
.card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 17px 17px 0 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.clay-anime-card:hover .card-poster img,
.media-card:hover .card-cover {
  transform: scale(1.06);
}
.card-score,
.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: auto !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  max-width: max-content;
  background: rgba(0, 0, 0, 0.75);
  border: 0.5px solid rgba(255, 255, 255, 0.35);
  color: #ffd700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}
.card-badge,
.format-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  top: auto !important;
  right: auto !important;
  width: auto !important;
  height: auto !important;
  max-width: max-content;
  background: rgba(35, 26, 22, 0.85);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  z-index: 2;
  pointer-events: none;
}
.card-content,
.card-info {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface-clay);
  flex-grow: 1;
}
.card-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Continue Watching Shelf (Matches APK OttContinueWatchingRow) */
.continue-watching-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.continue-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface-clay);
  box-shadow: var(--clay-shadow-card), var(--clay-shadow-inner);
  border: 1px solid rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: var(--transition-clay);
  display: flex;
  flex-direction: column;
  padding: 0 !important;
}
.continue-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--clay-shadow-hover);
  border-color: var(--clay-red-light);
}
.continue-thumb-box {
  position: relative;
  width: 100%;
  height: 125px;
  background: #111;
  overflow: hidden;
}
.continue-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.continue-card:hover .continue-thumb-img {
  transform: scale(1.08);
}
.continue-play-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  backdrop-filter: blur(8px);
  transition: var(--transition-clay);
}
.continue-card:hover .continue-play-circle {
  background: var(--clay-red);
  border-color: #fff;
  transform: translate(-50%, -50%) scale(1.12);
}
.continue-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
}
.continue-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--clay-red), #ff7a6b);
  border-radius: 0 2px 2px 0;
}
.continue-meta-box {
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.continue-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continue-sub {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.clear-history-btn {
  background: var(--surface-clay-recessed);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-clay);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.clear-history-btn:hover {
  background: rgba(184, 80, 56, 0.12);
  color: var(--clay-red);
  border-color: var(--clay-red-light);
}

.card-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Skeletons */
.card-skeleton {
  flex: 0 0 210px;
  aspect-ratio: 3 / 4.8;
  background: var(--surface-clay-recessed);
  border-radius: var(--radius-md);
  box-shadow: var(--clay-shadow-inset);
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 0.3; } }

/* =====================================================================
   CINEPLAYER THEATER (Framed in Clay Enclosure)
   ===================================================================== */
.player-section {
  margin-bottom: 44px;
}
.clay-theater {
  background: var(--surface-clay);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--clay-shadow-card), var(--clay-shadow-inner);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 12px;
  flex-wrap: nowrap;
  gap: 12px;
  overflow: hidden;
}
.player-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.player-title-box h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-title-box p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.back-circle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-clay-recessed);
  box-shadow: var(--clay-shadow-inset);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition-clay);
}
.back-circle-btn:hover {
  background: var(--clay-red);
  color: #fff;
  transform: scale(1.05);
}

.player-controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.direct-servers-group {
  display: flex;
  gap: 6px;
  background: var(--surface-clay-recessed);
  box-shadow: var(--clay-shadow-inset);
  border-radius: var(--radius-pill);
  padding: 3px;
}
.direct-srv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-clay);
}
.direct-srv-btn .srv-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,0.06);
  color: var(--text-muted);
}
.direct-srv-btn:hover {
  color: var(--text-primary);
}
.direct-srv-btn.active {
  background: var(--clay-red);
  color: #fff;
  box-shadow: 2px 4px 10px rgba(229, 72, 56, 0.4);
}
.direct-srv-btn.active .srv-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.embed-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.embed-stage iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.embed-servers-card {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--surface-clay);
  box-shadow: var(--clay-shadow-sm);
}
.embed-servers-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.embed-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(70, 130, 180, 0.12);
  color: #4682B4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.embed-servers-header h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.embed-servers-header p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.embed-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.embed-pill-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-clay-recessed);
  box-shadow: var(--clay-shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-clay);
}
.embed-pill-btn .badge {
  font-size: 0.65rem;
  opacity: 0.7;
}
.embed-pill-btn:hover {
  background: var(--surface-clay);
  transform: translateY(-2px);
  color: var(--text-primary);
}
.embed-pill-btn.active {
  background: var(--text-primary);
  color: #fff;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.25);
}

.clay-select {
  background: var(--surface-clay-recessed);
  box-shadow: var(--clay-shadow-inset);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
}
.clay-toggle-group {
  display: flex;
  background: var(--surface-clay-recessed);
  box-shadow: var(--clay-shadow-inset);
  border-radius: var(--radius-pill);
  padding: 3px;
}
.clay-toggle-btn {
  background: none;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-clay);
}
.clay-toggle-btn.active {
  background: var(--clay-red);
  color: #fff;
  box-shadow: 2px 3px 8px rgba(229, 72, 56, 0.4);
}

/* Video Stage */
.video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-loader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  background: rgba(18, 14, 12, 0.86);
  backdrop-filter: blur(14px);
  z-index: 50;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.player-loader .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--clay-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 16px rgba(184, 80, 56, 0.35);
}
.player-loader p {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #f7f2ed;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}
@keyframes spin { to { transform: rotate(360deg); } }

.subtitle-overlay {
  position: absolute;
  bottom: 84px;
  left: 5%;
  right: 5%;
  text-align: center;
  color: #FFF;
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 4px #000;
  pointer-events: none;
  z-index: 5;
}

.skip-pill {
  position: absolute;
  right: 24px;
  bottom: 88px;
  background: var(--surface-clay);
  color: var(--clay-red);
  box-shadow: var(--clay-shadow-outer), var(--clay-shadow-inner);
  border: 1px solid var(--clay-red-light);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-clay);
}
.skip-pill:hover {
  background: var(--clay-red);
  color: #fff;
  transform: scale(1.05);
}

/* =========================================================================
   CINEPLAYER OVERLAY SYSTEM (Matches Zenkai Android APK CinePlayer UI)
   ========================================================================= */

.cine-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 15;
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(10, 8, 7, 0.85) 0%, rgba(10, 8, 7, 0.2) 28%, transparent 45%),
              linear-gradient(0deg, rgba(10, 8, 7, 0.92) 0%, rgba(10, 8, 7, 0.3) 28%, transparent 45%);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #fff;
}
.cine-overlay.hide-controls {
  opacity: 0;
  pointer-events: none;
}

/* Top Bar: Title & Circular Actions */
.cine-top-bar {
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  z-index: 2;
}
.cine-top-meta {
  flex: 1;
  min-width: 0;
}
.cine-show-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.cine-ep-subtitle {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  margin: 3px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
.cine-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.cine-icon-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 0.92rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
}
.cine-icon-circle-btn:hover {
  background: var(--clay-red);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
}
.cine-badge-text {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.cine-audio-tag {
  font-size: 0.62rem;
  font-weight: 800;
  background: var(--clay-red);
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 2px;
}

/* Center Controls (Previous Ep, -10s, Main Play/Pause, +10s, Next Ep) */
.cine-center-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: auto 0;
  z-index: 2;
}
.cine-center-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.cine-center-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.08);
}
.cine-step-btn {
  width: 44px;
  height: 44px;
  font-size: 1.05rem;
}
.cine-seek-btn {
  width: 50px;
  height: 50px;
  font-size: 1.15rem;
}
.cine-play-main-btn {
  width: 68px;
  height: 68px;
  font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.24);
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
.cine-play-main-btn:hover {
  background: var(--clay-red);
  border-color: #fff;
  transform: scale(1.12);
}

/* Bottom Bar: Current Time, Sleek Track, Duration */
.cine-bottom-bar {
  padding: 12px 20px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 2;
}
.cine-time-text {
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
.progress-bar-container {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: height 0.15s ease;
}
.progress-bar-container:hover {
  height: 9px;
}
.progress-buffer {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 999px;
}
.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #e54838, #ff6b57);
  border-radius: 999px;
}
.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(229, 72, 56, 0.8);
  pointer-events: none;
}
.progress-hover-time {
  position: absolute;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(20, 16, 14, 0.92);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  display: none;
}

/* In-Player Settings Modal Sheet */
.cine-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}
.cine-modal-card {
  background: rgba(26, 20, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 18px 20px;
  max-width: 440px;
  width: 92%;
  max-height: 86vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color: #fff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75);
  box-sizing: border-box;
}
.cine-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 8px;
}
.cine-modal-header h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cine-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px;
}
.cine-modal-section {
  margin-bottom: 12px;
}
.cine-modal-section label {
  font-size: 0.74rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.65);
  display: block;
  margin-bottom: 6px;
}
.cine-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cine-chip-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cine-chip-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}
.cine-chip-btn.active {
  background: var(--clay-red);
  border-color: #fff;
  color: #fff;
  box-shadow: 0 2px 10px rgba(229, 72, 56, 0.6);
}
.cine-chip-btn .badge {
  font-size: 0.65rem;
  opacity: 0.8;
}

/* In-Player Episodes Drawer Sheet */
.cine-episodes-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85%;
  background: rgba(24, 18, 15, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  z-index: 25;
  display: flex;
  flex-direction: column;
  padding: 16px;
  color: #fff;
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.5);
}
.cine-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.cine-drawer-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cine-drawer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}
.cine-drawer-ep-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}
.cine-drawer-ep-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
.cine-drawer-ep-btn.active {
  background: var(--clay-red);
  border-color: #fff;
  box-shadow: 0 2px 10px rgba(229, 72, 56, 0.7);
}

/* Episodes Grid */
.episodes-browser {
  padding: 22px 10px 10px;
}
.episodes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.episodes-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}
.ep-jump-input {
  padding: 8px 16px;
  background: var(--surface-clay-recessed);
  box-shadow: var(--clay-shadow-inset);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  outline: none;
  width: 140px;
  color: var(--text-primary);
}
.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding: 4px;
}
.clay-ep-btn {
  background: var(--surface-clay);
  box-shadow: 4px 6px 12px rgba(184, 160, 146, 0.2), -3px -3px 8px #FFF, var(--clay-shadow-inner);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  padding: 12px 0;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-clay);
}
.clay-ep-btn:hover {
  background: var(--clay-red-soft);
  color: var(--clay-red);
  transform: translateY(-2px);
}
.clay-ep-btn.active {
  background: linear-gradient(145deg, var(--clay-red-light), var(--clay-red));
  color: #fff;
  box-shadow: var(--clay-red-shadow);
}

/* =====================================================================
   MANGA & NOVEL READER SECTION
   ===================================================================== */
.reader-section {
  margin-bottom: 44px;
}
.clay-reader-box {
  background: var(--surface-clay);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--clay-shadow-card), var(--clay-shadow-inner);
}
.reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}
.reader-mode-toggle {
  display: flex;
  background: var(--surface-clay-recessed);
  box-shadow: var(--clay-shadow-inset);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
}
.reader-mode-btn {
  background: none;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}
.reader-mode-btn.active {
  background: var(--clay-red);
  color: #fff;
  box-shadow: 2px 3px 8px rgba(229, 72, 56, 0.4);
}

/* Manga Page Viewports */
.manga-viewport {
  background: #0D0A08;
  border-radius: var(--radius-md);
  min-height: 600px;
  max-height: 80vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  position: relative;
}
.manga-page {
  max-width: 820px;
  width: 100%;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}
.manga-paged-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70vh;
  width: 100%;
}
.manga-paged-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Novel Reader Viewport */
.novel-viewport {
  background: #FAF7F0;
  border-radius: var(--radius-md);
  padding: 40px;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: var(--clay-shadow-inset);
  border: 1px solid rgba(214, 196, 182, 0.4);
  font-size: 1.15rem;
  line-height: 1.85;
  color: #2F251F;
}
.novel-title-header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px dashed rgba(214, 196, 182, 0.6);
  padding-bottom: 20px;
}
.novel-paragraph {
  margin-bottom: 20px;
  text-indent: 2em;
}

/* Floating Reader Bar */
.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

/* =====================================================================
   APP SHOWCASE & DOWNLOAD BANNER (Claymorphic)
   ===================================================================== */
.app-banner {
  margin: 60px 0 40px;
}
.clay-app-card {
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: var(--surface-clay);
  box-shadow: var(--clay-shadow-card), var(--clay-shadow-inner);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.app-banner-content {
  max-width: 620px;
}
.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, var(--clay-red-light), var(--clay-red));
  box-shadow: var(--clay-red-shadow);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.app-banner-content h2 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.app-banner-content p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
}
.app-features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 30px;
}
.feat-item {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.feat-item i {
  color: var(--clay-red);
}

/* Mockup Phone in Clay */
.app-mockup {
  flex-shrink: 0;
}
.clay-phone-frame {
  width: 230px;
  height: 400px;
  border-radius: 40px;
  padding: 12px;
  background: var(--surface-clay);
  box-shadow: 18px 24px 44px rgba(184, 160, 146, 0.35), -12px -12px 28px #FFF, var(--clay-shadow-inner);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.phone-notch {
  width: 80px;
  height: 16px;
  background: var(--surface-clay-recessed);
  border-radius: 0 0 12px 12px;
  margin: 0 auto 10px;
}
.phone-screen {
  background: linear-gradient(145deg, #1C1512, #291F1A);
  border-radius: 28px;
  height: calc(100% - 26px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
}
.phone-screen i {
  font-size: 3rem;
  color: var(--clay-red);
}
.phone-screen span {
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(35, 26, 22, 0.65);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.clay-modal-card {
  width: 100%;
  max-width: 740px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  overflow-y: auto;
  position: relative;
  padding: 32px;
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface-clay-recessed);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-header {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}
.modal-header img {
  width: 150px;
  height: 215px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--clay-shadow-card);
}
.modal-info {
  flex: 1;
}
.modal-info h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}
.modal-stats {
  display: flex;
  gap: 14px;
  margin: 12px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.modal-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.modal-genres span {
  font-size: 0.78rem;
  background: var(--surface-clay-recessed);
  color: var(--text-primary);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
}
.modal-body h3 {
  font-size: 1.15rem;
  margin: 20px 0 10px;
  color: var(--text-primary);
}
.modal-synopsis {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}
.modal-chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 10px;
}

/* Toast */
.clay-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, var(--clay-red-light), var(--clay-red));
  box-shadow: var(--clay-red-shadow);
  z-index: 3000;
  display: none;
}

/* Footer */
.clay-footer {
  border-top: 1px solid rgba(214, 196, 182, 0.4);
  background: var(--bg-creamy-light);
  padding: 36px 24px;
  margin-top: 60px;
}
.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 6px;
}
.footer-links {
  display: flex;
  gap: 16px;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-clay);
}
.footer-links a:hover {
  color: var(--clay-red);
}

/* =====================================================================
   DESKTOP TOP NAVIGATION (Laptops & Desktops)
   ===================================================================== */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.desktop-nav-link {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.desktop-nav-link:hover {
  color: var(--clay-red);
  background: rgba(184, 80, 56, 0.08);
}
.desktop-nav-link.active {
  color: #fff;
  background: var(--clay-red);
  box-shadow: var(--clay-red-shadow);
}

/* =====================================================================
   BOTTOM NAVIGATION BAR DOCK (Mobile Devices)
   ===================================================================== */
.bottom-nav-dock {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
}
.bottom-nav-container {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-pill);
  box-shadow: 12px 18px 36px rgba(175, 160, 145, 0.45), inset 2px 2px 4px rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.85);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  transition: var(--transition-clay);
}
.bottom-nav-item i {
  font-size: 1.15rem;
}
.bottom-nav-item:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}
.bottom-nav-item.active {
  background: var(--clay-red);
  color: #fff;
  box-shadow: var(--clay-red-shadow);
  transform: translateY(-2px);
}

/* =====================================================================
   1. LAPTOP & DESKTOP UI (Min-Width: 1024px)
   ===================================================================== */
@media (min-width: 1024px) {
  /* Hide mobile bottom dock on laptop in favor of top desktop nav */
  .bottom-nav-dock {
    display: none !important;
  }
  .desktop-nav {
    display: flex !important;
  }

  /* Spacious content padding */
  .main-content {
    padding-bottom: 60px;
    max-width: 1360px;
    margin: 0 auto;
  }

  /* Laptop Header */
  .clay-header {
    padding: 16px 36px;
  }
  .clay-search-bar {
    max-width: 360px;
  }

  /* Laptop Hero Spotlight */
  .hero-section {
    min-height: 480px;
  }
  .hero-container {
    padding: 56px 64px;
    max-width: 65%;
  }
  .hero-title {
    font-size: 1.85rem;
    line-height: 1.2;
  }

  /* Laptop Cards Grid (6 - 7 items per row) */
  .cards-grid, .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 24px;
  }
  .cards-row {
    gap: 20px;
  }
  .clay-anime-card {
    flex: 0 0 195px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  .clay-anime-card:hover {
    transform: translateY(-6px) scale(1.02);
  }

  /* Laptop Widescreen CinePlayer Theater */
  .clay-theater {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 36px;
    border-radius: 28px;
  }
  .video-stage {
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  }
  .episodes-grid {
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 10px;
  }
  .embed-pills-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
  }

  /* Laptop Manga & Novel Reading Columns */
  #canvasContainer {
    max-width: 820px;
  }
  .novel-container {
    max-width: 780px;
    font-size: 1.18rem;
  }
}

/* =====================================================================
   2. MOBILE & TABLET UI (Max-Width: 1023px)
   ===================================================================== */
@media (max-width: 1023px) {
  /* Hide desktop top nav, show floating thumb dock */
  .desktop-nav {
    display: none !important;
  }
  .bottom-nav-dock {
    display: flex !important;
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  .bottom-nav-container {
    width: 92%;
    max-width: 440px;
    padding: 6px 10px;
    justify-content: space-around;
  }
  .bottom-nav-item {
    padding: 6px 10px;
    font-size: 0.65rem;
  }
  .bottom-nav-item i {
    font-size: 1.05rem;
  }

  /* Reserve safe scrolling room above mobile dock */
  .main-content {
    padding-bottom: 120px !important;
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Compact Mobile Header */
  .clay-header {
    padding: 10px 14px;
  }
  .clay-header .header-container {
    gap: 10px;
  }
  .brand-text .brand-tagline {
    display: none;
  }
  .brand-text .brand-name {
    font-size: 1.15rem;
  }
  .download-pill-btn span {
    display: none;
  }
  .download-pill-btn {
    padding: 8px 12px;
  }
  .clay-search-bar {
    max-width: none;
    flex: 1;
    padding: 6px 14px;
  }

  /* Touch-Optimized Mobile Hero (Matches APK OttHeroBanner) */
  .hero-section {
    min-height: 380px;
    max-height: 440px;
    border-radius: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    position: relative;
  }
  .hero-backdrop {
    background-position: center 18%;
    filter: brightness(0.88);
  }
  .hero-overlay {
    background: linear-gradient(0deg, rgba(24, 18, 15, 0.96) 0%, rgba(24, 18, 15, 0.65) 50%, rgba(24, 18, 15, 0.15) 80%, transparent 100%);
  }
  .hero-content-wrapper {
    padding: 14px 14px 24px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    z-index: 2;
  }
  .hero-details {
    max-width: 100%;
    width: 100%;
  }
  .hero-tags {
    gap: 5px;
    margin-bottom: 4px;
  }
  .hero-tags .clay-badge {
    font-size: 0.64rem;
    padding: 3px 8px;
    letter-spacing: 0.3px;
  }
  .hero-poster-showcase {
    display: none !important;
  }
  .hero-arrow-btn {
    display: none !important;
  }
  .hero-title-logo {
    max-height: 44px;
    max-width: 180px;
    margin-bottom: 4px;
    object-fit: contain;
  }
  .hero-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 3px;
  }
  .hero-sub-title {
    display: none !important;
  }
  .hero-synopsis {
    font-size: 0.75rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    max-width: 100%;
    color: rgba(255, 255, 255, 0.85);
  }
  .hero-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
  }
  .hero-actions .btn-hero-watch {
    flex: 1;
    justify-content: center;
    padding: 9px 16px;
    font-size: 0.84rem;
  }
  .hero-actions .btn-hero-details {
    padding: 9px 14px;
    font-size: 0.84rem;
  }

  /* Mobile Media Grids & Cards (Seamless Border Match) */
  .media-grid, .cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  .cards-row {
    gap: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .clay-anime-card, .media-card {
    flex: 0 0 145px;
    border-radius: 14px !important;
    padding: 0 !important;
    overflow: hidden !important;
    scroll-snap-align: start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  .card-poster, .card-cover-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4.3 !important;
    height: auto !important;
    border-radius: 13px 13px 0 0 !important;
  }
  .card-poster img, .card-cover {
    border-radius: 13px 13px 0 0 !important;
  }
  .card-content, .card-info {
    padding: 8px 10px 10px !important;
  }
  .card-title {
    font-size: 0.8rem !important;
    line-height: 1.25;
  }
  .card-score, .score-badge {
    top: 6px;
    right: 6px;
    font-size: 0.68rem;
    padding: 2px 7px;
  }
  .card-badge, .format-badge {
    bottom: 6px;
    left: 6px;
    font-size: 0.65rem;
    padding: 2px 7px;
  }

  /* Mobile Continue Watching Shelf */
  .continue-card {
    flex: 0 0 190px !important;
    border-radius: 14px !important;
  }
  .continue-thumb-box {
    height: 105px !important;
  }
  .continue-title {
    font-size: 0.82rem;
  }
  .continue-sub {
    font-size: 0.72rem;
  }

  /* Mobile CinePlayer Stage & Controls */
  .clay-theater {
    padding: 8px 6px;
    border-radius: 14px;
  }
  .player-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 2px 2px 8px;
  }
  .player-title-box {
    width: 100%;
    gap: 8px;
    display: flex;
    align-items: center;
    min-width: 0;
  }
  .player-title-box h2 {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
  }
  .player-title-box p {
    font-size: 0.74rem;
    white-space: nowrap;
  }
  .back-circle-btn {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }
  .player-controls-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .direct-servers-group {
    display: flex;
    gap: 2px;
    flex: 1;
    min-width: 0;
    padding: 2px;
    overflow: hidden;
  }
  .direct-srv-btn {
    padding: 5px 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    justify-content: center;
    gap: 3px;
  }
  .srv-badge {
    display: none;
  }
  .clay-toggle-group {
    flex-shrink: 0;
    display: flex;
    gap: 2px;
    padding: 2px;
  }
  .clay-toggle-btn {
    padding: 5px 10px;
    font-size: 0.72rem;
    font-weight: 800;
  }
  .player-viewport-stage {
    border-radius: 10px;
  }
  .cine-controls {
    padding: 6px 8px 8px;
  }
  .progress-bar-container {
    height: 6px;
    margin-bottom: 10px;
  }
  .controls-row {
    gap: 4px;
  }
  .controls-left, .controls-right {
    gap: 4px;
  }
  .ctrl-circle-btn {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
  }
  .ctrl-pill-btn {
    padding: 4px 8px;
    font-size: 0.68rem;
    gap: 3px;
  }
  .time-display {
    font-size: 0.68rem;
    white-space: nowrap;
  }
  #volumeBtn, .volume-slider, #pipBtn {
    display: none !important;
  }
  .episodes-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px;
  }
  .clay-ep-btn {
    padding: 8px 4px;
    font-size: 0.74rem;
  }
  .embed-pills-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .embed-pill-btn {
    padding: 8px 6px;
    font-size: 0.72rem;
  }

  /* Mobile App Download Banner */
  .clay-app-card {
    flex-direction: column;
    padding: 24px;
    text-align: center;
  }
  .app-mockup {
    display: none;
  }
  .app-banner-content h2 {
    font-size: 1.4rem;
  }

  /* Mobile Modal */
  .modal-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .modal-header img {
    width: 110px;
    height: 155px;
  }
  .modal-stats, .modal-genres {
    justify-content: center;
  }
}

/* =========================================================
   CinePlayer Subtitles, Gestures & Feedback UI
   ========================================================= */

/* CinePlayer Subtitle Overlay */
.subtitle-overlay {
  position: absolute;
  bottom: 40px;
  left: 3%;
  right: 3%;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 22 !important;
  transition: bottom 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.cine-overlay:not(.hide-controls) ~ .subtitle-overlay,
.player-viewport-stage:hover .subtitle-overlay {
  bottom: 84px;
}
.cine-subtitle-text {
  background: rgba(10, 8, 7, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 10px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  line-height: 1.45;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95), 0 0 3px #000;
  white-space: pre-wrap;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.cine-subtitle-text.size-small { font-size: 0.92rem; }
.cine-subtitle-text.size-medium { font-size: 1.25rem; }
.cine-subtitle-text.size-large { font-size: 1.55rem; }
@media (max-width: 768px) {
  .subtitle-overlay {
    bottom: 24px;
    left: 2%;
    right: 2%;
  }
  .cine-overlay:not(.hide-controls) ~ .subtitle-overlay,
  .player-viewport-stage:hover .subtitle-overlay {
    bottom: 64px;
  }
  .cine-subtitle-text.size-small { font-size: 0.8rem; padding: 4px 10px; }
  .cine-subtitle-text.size-medium { font-size: 0.98rem; padding: 5px 12px; }
  .cine-subtitle-text.size-large { font-size: 1.18rem; padding: 6px 14px; }
}

/* Double-Tap Seek Ripples */
.cine-seek-ripple {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  z-index: 22;
  pointer-events: none;
  animation: seekRipplePop 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.cine-seek-ripple.left { left: 14%; }
.cine-seek-ripple.right { right: 14%; }
@keyframes seekRipplePop {
  0% { transform: translateY(-50%) scale(0.6); opacity: 0; }
  40% { transform: translateY(-50%) scale(1.12); opacity: 1; }
  100% { transform: translateY(-50%) scale(1); opacity: 0; }
}

/* Hold-to-2x Speed Pill Indicator */
.cine-hold-2x-pill {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 16, 14, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 26;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: pulse2xGlow 1s infinite alternate;
}
@keyframes pulse2xGlow {
  from { box-shadow: 0 0 10px rgba(229, 72, 56, 0.4); }
  to { box-shadow: 0 0 22px rgba(229, 72, 56, 0.85); }
}

/* Subtitle Track Selector Modal */
.sub-tracks-list {
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-right: 4px;
}
.sub-track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.82rem;
  color: #fff;
}
.sub-track-item:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}
.sub-track-item.active {
  background: rgba(229, 72, 56, 0.25);
  border-color: var(--clay-red);
  color: #fff;
  font-weight: 700;
}
.sub-source-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  color: #ddd;
}
.sub-source-tag.direct {
  background: rgba(46, 160, 67, 0.28);
  color: #56d364;
  border: 1px solid rgba(46, 160, 67, 0.4);
}
.sub-source-tag.opensubs {
  background: rgba(31, 111, 235, 0.28);
  color: #79c0ff;
  border: 1px solid rgba(31, 111, 235, 0.4);
}
.sub-track-item.active .sub-source-tag {
  background: var(--clay-red);
  color: #fff;
}

/* Subtitle Track Live Status Indicators */
.sub-status-tag {
  font-size: 0.70rem;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}
.sub-status-tag.loading {
  background: rgba(245, 158, 11, 0.25);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.45);
}
.sub-status-tag.ready {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45);
}
.sub-status-tag.error {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

/* Switch UI Component */
.cine-switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 6px 4px;
}
.cine-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.cine-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cine-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.25);
  transition: .25s ease;
  border-radius: 34px;
}
.cine-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s ease;
  border-radius: 50%;
}
.cine-switch input:checked + .cine-switch-slider {
  background-color: #34C759;
}
.cine-switch input:checked + .cine-switch-slider:before {
  transform: translateX(18px);
}

/* =========================================================================
   SMART MOBILE APK BANNER & LAPTOP PAGE OPTIMIZATIONS
   ========================================================================= */

/* By default (laptop/desktop): hide mobile banner and mobile-only prompts */
.mobile-app-banner {
  display: none !important;
}

@media (min-width: 769px) {
  .mobile-only-cta {
    display: none !important;
  }
}

/* On mobile screens / devices: show prominent Download APK banner */
@media (max-width: 768px) {
  .mobile-app-banner {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(229, 72, 56, 0.96), rgba(180, 35, 24, 0.98));
    color: #fff;
    padding: 9px 14px;
    position: sticky;
    top: 0;
    z-index: 10000;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    animation: slideDownBanner 0.25s ease-out;
  }

  .mobile-app-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  .mobile-app-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .mobile-app-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    flex-shrink: 0;
  }

  .mobile-app-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .mobile-app-meta strong {
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    color: #fff;
  }

  .mobile-app-meta span {
    font-size: 0.7rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    color: rgba(255,255,255,0.85);
  }

  .mobile-app-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .btn-download-apk-banner {
    padding: 6px 13px;
    background: #ffffff;
    color: var(--clay-red);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    white-space: nowrap;
  }

  .btn-download-apk-banner:active {
    transform: scale(0.96);
  }

  .banner-dismiss-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    padding: 4px 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  @keyframes slideDownBanner {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  .download-pill-btn span {
    display: inline !important;
  }
}

/* =========================================================================
   CAPTION STYLE CUSTOMIZER (Sliders, Bars, Backgrounds & Stroke)
   ========================================================================= */

.cine-slider-bar {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  margin: 8px 0;
  transition: background 0.2s ease;
}

.cine-slider-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--clay-red);
  box-shadow: 0 0 10px rgba(229, 72, 56, 0.7);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.cine-slider-bar::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.cine-slider-bar::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--clay-red);
  box-shadow: 0 0 10px rgba(229, 72, 56, 0.7);
  cursor: pointer;
  border: none;
}

.caption-preview-stage {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(30, 24, 20, 0.95), rgba(10, 8, 7, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 6px;
  text-align: center;
}



