/* =========================================================
   ANIME NEURIX · premium.css
   Premium polish layer — all 10 problem fixes + UI upgrades
   Loaded AFTER style.css so these rules win specificity
   ========================================================= */

/* ---------- DETAILS POSTER FIX ----------
   Container gets explicit 420:620 ratio; img fills it with
   position:absolute so there's zero gap regardless of layout.
*/
.details-poster {
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 22px 50px rgba(0,0,0,.6);
  border: 1px solid var(--glass-border-strong);
  position: relative;
  /* drive height from width via the actual image ratio */
  aspect-ratio: 420 / 620;
}
.details-poster img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
}

/* ---------- CARD REDESIGN — POSTER-FIRST, NO TEXT-OVER-POSTER ----------
   Root cause of the old overlap bug: .card-body (title + metadata) was
   still `position:absolute` from style.css, which pulls it out of normal
   flow and stacks it on top of .poster-wrap no matter what display mode
   .anime-card uses. Same story for the rating/type badges and the heart/
   plus buttons — all absolutely positioned across the *entire* poster
   with no room reserved for them.

   Fix: .poster-wrap is now ONLY the image (aspect-ratio 2:3, matching the
   reference catalog screenshots). Badges stay as small pills tucked into
   the poster's top corners. The heart/plus buttons are small and confined
   to the top-right, below the type pill, never near the title. .card-body
   is pulled back into normal document flow, below the poster, so the
   title and metadata can never overlap the artwork again.
*/
.anime-card {
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: var(--r-md);
  overflow: visible; /* poster keeps its own overflow:hidden below; the card itself must not clip .card-body */
  background: transparent;
  box-shadow: none;
  border: 1px solid transparent;
  transition: transform .35s cubic-bezier(.22,.9,.32,1);
}
.anime-card:hover { transform: translateY(-4px); }

.anime-card .poster-wrap {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;         /* clean poster ratio, matches the reference catalog design */
  overflow: hidden;
  border-radius: var(--r-md);
  background: #0d0a1e;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
}
.anime-card .poster-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .5s cubic-bezier(.22,.9,.32,1);
  display: block;
}
.anime-card:hover .poster-wrap img { transform: scale(1.06); }
/* The old bottom-of-poster shade existed only to keep text legible when
   the title sat on top of the artwork. The title has moved below the
   poster now, so a heavy shade is no longer needed — keep only a soft
   one so the top badges stay readable on bright posters. */
.anime-card .poster-shade {
  background: linear-gradient(180deg, rgba(5,3,9,.4) 0%, transparent 26%, transparent 78%, rgba(5,3,9,.22) 100%);
  opacity: 1;
}

/* Grid cards expand to fill column */
.anime-grid .anime-card { width: 100%; }
/* Row cards fixed width */
.row-scroller .anime-card  { width: 190px; }
.row-scroller .cw-card     { width: 260px; }

/* ---------- Badges: small pills, confined to poster corners (never over the title) ---------- */
.card-rating {
  top: 8px; left: 8px;
  padding: 3px 8px;
  font-size: .7rem; font-weight: 800; color: #ffc94a;
  gap: 3px;
  z-index: 2;
}
.card-type-tag {
  top: 8px; right: 8px;
  padding: 3px 8px;
  font-size: .6rem; font-weight: 800; letter-spacing: .6px;
  z-index: 2;
}

/* ---------- Heart / watchlist buttons: small, top-right, below the type pill ---------- */
.card-quick-actions {
  top: 38px;
  right: 8px;
  gap: 6px;
  z-index: 2;
}
.card-action-btn {
  width: 30px;
  height: 30px;
  position: relative;
}
/* Keep the visible icon small and clean while still giving touch users
   a comfortable ~42px hit target, via an invisible expanded tap area. */
.card-action-btn::after {
  content: "";
  position: absolute;
  inset: -6px;
}
.card-action-btn svg { width: 13px; height: 13px; }

/* ---------- Card body: BELOW the poster, in normal flow — never overlapping it ---------- */
.card-body {
  position: static;
  padding: 10px 2px 0;
  background: none;
}
.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .84rem;
  line-height: 1.32;
  /* Reserve space for 2 lines so single-line titles don't make some
     cards shorter than their neighbours in the same row. */
  min-height: calc(1.32em * 2);
  margin-bottom: 4px;
  color: var(--text-primary);
}
.card-meta {
  font-size: .7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  gap: 6px;
}

/* Continue-watching "72% watched" label: style.css has this as
   position:absolute (a leftover from the old overlapping-card layout).
   With .card-body now in normal flow below the poster, that absolute
   rule would make this label collide with .card-meta right above it.
   Pull it back into normal flow so it simply sits underneath. */
.cw-progress-label {
  position: static;
  margin-top: 4px;
  padding: 0;
}

/* Continue-watching progress bar: now rendered inside .poster-wrap (see
   anime-loader.js renderCwCard), so style.css's existing
   `.card-progress { position:absolute; left:0; bottom:0; ... }` already
   anchors correctly to the poster's own bottom edge — no override needed,
   it just naturally paints above .poster-shade since it comes later in
   the DOM. This comment documents that dependency for future edits. */

/* ---------- SKELETON POSTER ---------- */
.skeleton-card .skeleton-block.poster { aspect-ratio: 2 / 3; } /* matches the new .poster-wrap ratio so loading skeletons don't jump when real cards mount */

/* ---------- PREMIUM SKELETON SHIMMER ---------- */
.skeleton-card {
  width: 190px; border-radius: var(--r-md); overflow: hidden;
  background: var(--bg-card); flex: 0 0 auto;
  border: 1px solid rgba(139,42,240,.06);
}
.skeleton-block {
  background: linear-gradient(
    100deg,
    rgba(19,15,38,1) 0%,
    rgba(35,24,65,.9) 38%,
    rgba(55,34,90,.6) 50%,
    rgba(35,24,65,.9) 62%,
    rgba(19,15,38,1) 100%
  );
  background-size: 250% 100%;
  animation: skeletonShimmer 1.7s ease-in-out infinite;
  border-radius: 5px;
}
.skeleton-card .skeleton-block.line { height: 11px; margin: 10px 12px; }
.skeleton-card .skeleton-block.line.short { width: 55%; margin-top: 5px; }
.skeleton-card .skeleton-extra { height: 9px; margin: 4px 12px 12px; border-radius: 4px; background: rgba(139,42,240,.06); animation: skeletonPulse 1.7s ease-in-out .15s infinite; width: 38%; }

@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes skeletonPulse {
  0%, 100% { opacity: .35; }
  50%       { opacity: .85; }
}

/* grid-layout skeleton (genre/watchlist/favorites pages) */
.anime-grid .skeleton-card { width: 100%; }

/* ============ 4. BRAND — NAVBAR ============ */
.brand img {
  height: 34px; width: auto; object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(178,27,197,.45));
}
.brand:hover img { filter: drop-shadow(0 0 14px rgba(178,27,197,.8)); }

/* ============ 5. PREMIUM LOADING SCREEN ============ */
#loading-screen {
  background: radial-gradient(ellipse 80% 60% at 50% 40%,
    rgba(90,20,160,.22) 0%, #050309 65%);
}
.loader-brand-img {
  width: min(200px, 55vw); height: auto; display: block; margin: 0 auto 4px;
  filter: drop-shadow(0 0 24px rgba(178,27,197,.65)) drop-shadow(0 0 60px rgba(139,42,240,.35));
  animation: logoReveal 1.2s cubic-bezier(.22,.9,.32,1) both, logoPulse 3s ease-in-out infinite 1.2s;
}
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 22px rgba(178,27,197,.65)) drop-shadow(0 0 55px rgba(139,42,240,.35)); }
  50%       { filter: drop-shadow(0 0 40px rgba(224,64,251,.9)) drop-shadow(0 0 90px rgba(139,42,240,.6)); }
}

/* ============ 6. GENRE TILES — PREMIUM REDESIGN ============ */
.genre-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
  padding-inline: var(--gutter);
}
.genre-tile {
  min-height: 170px; border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 20px;
  background-size: cover; background-position: center;
  position: relative; cursor: pointer;
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .4s cubic-bezier(.22,.9,.32,1),
              box-shadow .4s cubic-bezier(.22,.9,.32,1),
              border-color .3s;
}
.genre-tile::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,4,16,.15) 0%, rgba(8,4,16,.85) 60%, rgba(8,4,16,.97) 100%);
  transition: background .35s;
}
.genre-tile:hover {
  transform: translateY(-8px) scale(1.025);
  border-color: var(--tile-glow, var(--purple-glow));
}
.genre-tile:hover::before {
  background: linear-gradient(180deg, rgba(8,4,16,.05) 0%, rgba(8,4,16,.7) 55%, rgba(8,4,16,.96) 100%);
}
/* SVG icon replaces emoji */
.genre-tile-icon {
  position: relative; z-index: 1; margin-bottom: 10px;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .35s cubic-bezier(.22,.9,.32,1), box-shadow .35s;
}
.genre-tile-icon svg { width: 24px; height: 24px; }
.genre-tile:hover .genre-tile-icon {
  transform: scale(1.18) rotate(-6deg);
  box-shadow: 0 0 24px var(--tile-glow, var(--purple-glow-soft));
}
.genre-tile-name { position: relative; z-index: 1; font-size: 1.1rem; font-weight: 700; line-height: 1.2; }
.genre-tile-tagline { position: relative; z-index: 1; font-size: .76rem; color: rgba(255,255,255,.65); margin-top: 4px; line-height: 1.4; }
.genre-tile-count { position: relative; z-index: 1; font-size: .7rem; color: rgba(255,255,255,.45); margin-top: 10px; display: inline-flex; align-items: center; gap: 5px; }
.genre-tile-count::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tile-glow, var(--purple-soft)); display: inline-block; }
/* Explore button that reveals on hover */
.genre-tile-explore {
  position: absolute; bottom: 18px; right: 18px; z-index: 2;
  font-size: .76rem; font-weight: 700; letter-spacing: .5px;
  padding: 7px 16px; border-radius: 99px;
  background: var(--tile-glow, var(--purple-1)); color: #fff;
  opacity: 0; transform: translateX(10px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.genre-tile:hover .genre-tile-explore { opacity: 1; transform: translateX(0); }

/* Floating animation on idle genre tiles */
.genre-tile { animation: tileFloat 6s ease-in-out infinite; }
.genre-tile:nth-child(odd) { animation-delay: .8s; }
.genre-tile:nth-child(3n) { animation-delay: 1.6s; }
@keyframes tileFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}
.genre-tile:hover { animation: none; }

/* ============ 7. DOWNLOAD APP SECTION ============ */
.app-download-section {
  padding: 80px var(--gutter) 60px;
  position: relative; overflow: hidden;
}
.app-download-section::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%,
    rgba(139,42,240,.18) 0%, transparent 70%);
  pointer-events: none;
}
.app-download-card {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: center;
  padding: 48px 52px; border-radius: 28px; position: relative; overflow: hidden;
  background: linear-gradient(135deg,
    rgba(19,15,38,.9) 0%, rgba(29,18,58,.9) 60%, rgba(40,15,60,.9) 100%);
  border: 1px solid rgba(139,42,240,.35);
  box-shadow: 0 24px 80px rgba(0,0,0,.5), 0 0 60px rgba(139,42,240,.12);
}
.app-download-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: 28px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(178,27,197,.6), rgba(139,42,240,.3), rgba(255,42,90,.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.app-download-left {}
.app-download-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 99px; margin-bottom: 18px;
  background: rgba(139,42,240,.18); border: 1px solid rgba(139,42,240,.4);
  font-size: .76rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--purple-soft);
}
.app-download-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4caf50; box-shadow: 0 0 8px #4caf50; }
.app-download-title {
  font-family: var(--font-display); font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 800; margin-bottom: 14px; line-height: 1.15;
}
.app-download-title span { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.app-download-desc { color: var(--text-secondary); line-height: 1.75; font-size: .97rem; margin-bottom: 28px; max-width: 500px; }
.app-download-meta { display: flex; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.app-meta-item { display: flex; align-items: center; gap: 8px; font-size: .84rem; }
.app-meta-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(139,42,240,.15); border: 1px solid rgba(139,42,240,.2); }
.app-meta-icon svg { width: 16px; height: 16px; color: var(--purple-soft); }
.app-meta-text strong { display: block; font-weight: 700; font-size: .88rem; }
.app-meta-text span { font-size: .74rem; color: var(--text-muted); }
.app-download-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-apk {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 99px; font-weight: 700; font-size: .94rem;
  background: var(--grad-brand); color: #fff;
  box-shadow: 0 8px 28px rgba(139,42,240,.45);
  transition: transform .25s, box-shadow .25s;
}
.btn-apk:hover { transform: translateY(-3px); box-shadow: 0 14px 38px rgba(139,42,240,.6); }
.btn-apk svg { width: 20px; height: 20px; }
.btn-gdrive {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 99px; font-weight: 700; font-size: .94rem;
  background: rgba(255,255,255,.08); color: var(--text-primary);
  border: 1px solid rgba(255,255,255,.18);
  transition: background .25s, transform .25s;
}
.btn-gdrive:hover { background: rgba(255,255,255,.15); transform: translateY(-3px); }
.btn-gdrive svg { width: 20px; height: 20px; }
.app-download-phone {
  display: flex; align-items: center; justify-content: center;
  animation: appPhoneFloat 5s ease-in-out infinite;
}
@keyframes appPhoneFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-16px) rotate(2deg); }
}
.phone-mockup {
  width: 220px; height: 440px; border-radius: 36px;
  background: linear-gradient(160deg, #1a1030 0%, #0a0616 100%);
  border: 2px solid rgba(139,42,240,.4);
  box-shadow: 0 0 40px rgba(139,42,240,.25), 0 30px 60px rgba(0,0,0,.6),
              inset 0 1px 0 rgba(255,255,255,.06);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; position: relative; overflow: hidden;
}
.phone-mockup::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 30%,
    rgba(139,42,240,.15), transparent 70%);
}
.phone-logo-inner {
  position: relative; z-index: 1; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; gap: 10px;
}
.phone-logo-inner img { width: 80px; height: 80px; border-radius: 18px; margin-bottom: 0; }
.phone-app-name {
  font-family: var(--font-display); font-weight: 700; font-size: .88rem;
  letter-spacing: 1px; color: #fff;
}
.phone-app-sub { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }
.phone-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 26px; background: #050309; border-radius: 13px;
}
.phone-glow {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 160px; height: 80px;
  background: radial-gradient(ellipse, rgba(139,42,240,.35), transparent 70%);
  filter: blur(20px);
}

@media (max-width: 860px) {
  .app-download-card { grid-template-columns: 1fr; padding: 32px 26px; }
  .app-download-phone { order: -1; }
  .phone-mockup { width: 160px; height: 320px; border-radius: 26px; }
  .phone-mockup img { width: 58px; height: 58px; }
}
@media (max-width: 560px) {
  .app-download-phone { display: none; }
}

/* ============ 8. CONTACT SECTION ============ */
.contact-section {
  padding: 0 var(--gutter) 60px; max-width: 800px; margin: 0 auto;
}
.contact-card {
  padding: 32px 36px; border-radius: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: rgba(19,15,38,.7); border: 1px solid rgba(139,42,240,.25);
  backdrop-filter: blur(14px);
}
.contact-info-left {}
.contact-section-label { font-size: .72rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 8px; }
.contact-email-row { display: flex; align-items: center; gap: 14px; }
.contact-email-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(139,42,240,.2), rgba(178,27,197,.2));
  border: 1px solid rgba(139,42,240,.3); flex-shrink: 0;
}
.contact-email-icon svg { width: 22px; height: 22px; color: var(--purple-soft); }
.contact-email-link {
  font-size: 1.1rem; font-weight: 700; color: var(--text-primary);
  transition: color .2s;
}
.contact-email-link:hover { color: var(--purple-soft); }
.contact-future { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.contact-future-label { font-size: .76rem; color: var(--text-muted); }
.contact-future-icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.12);
  color: var(--text-muted); opacity: .5;
}
.contact-future-icon svg { width: 16px; height: 16px; }

/* ============ 9. LOADING SCREEN HERO RE-STYLE ============ */
.loader-icon-brand {
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.loader-brand-img {
  width: min(100px, 28vw); height: auto;
  margin-bottom: 20px;
  animation: logoReveal 1s cubic-bezier(.22,.9,.32,1) both, logoPulse 3s ease-in-out infinite 1s;
  filter: drop-shadow(0 0 26px rgba(224,64,251,.7));
}
.loader-wordmark-new {
  font-family: var(--font-display); font-size: clamp(1.5rem, 5vw, 2.2rem);
  font-weight: 800; letter-spacing: 4px; text-transform: uppercase;
  color: #fff; margin-bottom: 6px;
  animation: fadeUp .7s ease .5s both;
}
.loader-wordmark-new span { color: #c084fc; }

/* ============ 10. SECTION SCROLL ANCHORS ============ */
/* Invisible anchors ABOVE each section to account for sticky nav */
.scroll-target {
  position: relative; display: block;
  height: 0; pointer-events: none;
  margin-top: calc(var(--nav-h) * -1 - 8px);
  visibility: hidden;
}

/* ============ NAV LINKS ON HOMEPAGE ============ */
.nav-links a { padding: 8px 4px; font-size: .93rem; }
.nav-links a[data-section]:hover { color: #fff; }

/* ============ PREMIUM BUTTON POLISH ============ */
.btn {
  letter-spacing: .2px;
  transition: transform .22s cubic-bezier(.22,.9,.32,1),
              box-shadow .22s, background .22s, color .22s;
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 36px rgba(0,0,0,.5), 0 0 28px rgba(139,42,240,.18);
}
.btn-glow { background: linear-gradient(135deg, #8b2af0, #b21bc5 50%, #ff2a5a); }
.btn-glow:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 38px rgba(139,42,240,.6);
}

/* ============ FOOTER SOCIAL ICONS ============ */
.social-icon {
  transition: transform .3s cubic-bezier(.22,.9,.32,1), box-shadow .3s, background .3s;
}
.social-icon:hover {
  transform: translateY(-6px) scale(1.12);
  box-shadow: 0 12px 30px rgba(139,42,240,.4);
}

/* ============ NEWS CARD UPGRADE ============ */
.news-card { transition: transform .35s cubic-bezier(.22,.9,.32,1), box-shadow .35s; }
.news-card:hover { transform: translateY(-8px); box-shadow: 0 20px 48px rgba(0,0,0,.55), 0 0 24px rgba(139,42,240,.2); }

/* ============ SEARCH OVERLAY UPGRADE ============ */
.search-overlay { align-items: flex-start; }
.search-panel { margin-top: 0; }
.search-input-wrap { border-radius: 18px; }

/* ============ DOWNLOAD PAGE (download.html) ============ */
.download-page-section { padding: calc(var(--nav-h) + 48px) var(--gutter) 70px; display: flex; justify-content: center; }
.download-page-card {
  width: 100%; max-width: 760px; padding: 34px; display: flex; flex-direction: column; gap: 26px;
}
.dl-thumb {
  width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r-md);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.dl-info .genre-eyebrow { margin-bottom: 8px; }
.dl-info .details-title { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 14px; }
.dl-quality-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dl-quality-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 14px;
  border-radius: var(--r-md); background: var(--glass-bg-strong); border: 1px solid var(--glass-border-strong);
  backdrop-filter: blur(10px); text-align: center;
  transition: transform var(--fast) var(--ease), box-shadow var(--fast), background var(--fast), border-color var(--fast);
}
.dl-quality-card svg { width: 26px; height: 26px; color: var(--purple-soft); }
.dl-quality-label { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--text-primary); }
.dl-quality-status { font-size: .76rem; color: var(--text-muted); }
.dl-quality-card:hover:not(.is-disabled) {
  transform: translateY(-4px); background: var(--grad-brand); border-color: transparent;
  box-shadow: 0 14px 34px var(--purple-glow);
}
.dl-quality-card:hover:not(.is-disabled) svg,
.dl-quality-card:hover:not(.is-disabled) .dl-quality-label,
.dl-quality-card:hover:not(.is-disabled) .dl-quality-status { color: #fff; }
.dl-quality-card.is-disabled { opacity: .45; cursor: not-allowed; }

/* ============ RESPONSIVE PATCHES ============ */
@media (max-width: 760px) {
  .genre-tiles-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .genre-tile { min-height: 130px; padding: 14px; }
  .genre-tile-icon { width: 36px; height: 36px; }
  .genre-tile-icon svg { width: 18px; height: 18px; }
  .genre-tile-name { font-size: .92rem; }
  .genre-tile-tagline { font-size: .7rem; }
  .genre-tile-explore { display: none; }
  .app-download-card { padding: 24px 20px; }
  .contact-card { padding: 22px 20px; }
  .download-page-card { padding: 22px 18px; }
  .dl-quality-grid { grid-template-columns: 1fr; }
}
/* =========================================================
   PROBLEM #8 — WATCH PAGE: Like/Dislike, Download, 3-dot,
   Next Episode card, All Episodes toggle
   ========================================================= */
.watch-actions-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin: 4px 0 16px; flex-wrap: wrap;
}
.watch-vote-group { display: flex; align-items: center; gap: 8px; }
.watch-vote-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border-strong);
  color: var(--text-secondary); font-size: .82rem; font-weight: 600;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}
.watch-vote-btn svg { width: 16px; height: 16px; }
.watch-vote-btn:hover { color: var(--text-primary); }
.watch-vote-btn.is-active { color: #fff; border-color: transparent; background: var(--grad-brand); }
.watch-vote-btn#w-dislike-btn.is-active { background: linear-gradient(135deg, #ff6b81, #e0405b); }

.watch-actions-right { display: flex; align-items: center; gap: 8px; }
.watch-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border-strong);
  color: var(--text-secondary); transition: background var(--fast), color var(--fast);
}
.watch-icon-btn:hover { color: var(--text-primary); background: rgba(255,255,255,.12); }
.watch-icon-btn svg { width: 17px; height: 17px; }

.watch-more-wrap { position: relative; }
.watch-more-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20;
  min-width: 170px; padding: 6px; border-radius: 12px;
  background: rgba(10,8,16,.97); border: 1px solid var(--glass-border-strong);
  backdrop-filter: blur(10px); box-shadow: 0 16px 40px rgba(0,0,0,.5);
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.watch-more-wrap.open .watch-more-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.watch-more-menu a, .watch-more-menu button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px;
  font-size: .85rem; color: var(--text-primary); background: none; border: 0;
}
.watch-more-menu a:hover, .watch-more-menu button:hover { background: var(--glass-bg-strong); }

.watch-next-ep-section { padding: 6px var(--gutter) 0; }
.watch-next-ep-card {
  display: flex; align-items: center; gap: 14px; padding: 10px;
  border-radius: var(--r-md); background: var(--bg-card); border: 1px solid var(--glass-border);
  transition: border-color var(--fast), background var(--fast);
}
.watch-next-ep-card:hover { border-color: var(--purple-2, rgba(139,42,240,.4)); background: var(--bg-card-hover); }
.wnec-thumb { position: relative; width: 132px; aspect-ratio: 16/9; flex-shrink: 0; border-radius: var(--r-sm); overflow: hidden; }
.wnec-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wnec-info { flex: 1; min-width: 0; }
.wnec-title {
  font-weight: 600; font-size: .92rem; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wnec-duration { font-size: .78rem; color: var(--text-muted); }
.wnec-download { flex-shrink: 0; }

.watch-all-episodes-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 14px 4px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--text-primary); border-bottom: 1px solid var(--glass-border); margin-bottom: 14px;
}
.watch-all-episodes-toggle .chev { transition: transform .25s ease; color: var(--text-secondary); }

/* =========================================================
   PROBLEM #13 — Episode 3-dot menu (Mark as Watched / Share)
   + subtle ✓ Watched indicator
   ========================================================= */
.ep-more-wrap { position: relative; flex-shrink: 0; }
.ep-more-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; color: var(--text-secondary);
  background: transparent; border: 0;
}
.ep-more-btn:hover { background: var(--glass-bg-strong); color: var(--text-primary); }
.ep-more-btn svg { width: 16px; height: 16px; }
.ep-more-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20;
  min-width: 170px; padding: 6px; border-radius: 12px;
  background: rgba(10,8,16,.97); border: 1px solid var(--glass-border-strong);
  backdrop-filter: blur(10px); box-shadow: 0 16px 40px rgba(0,0,0,.5);
  display: none; flex-direction: column; gap: 2px;
}
.ep-more-wrap.open .ep-more-menu { display: flex; }
.ep-more-item {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px;
  font-size: .85rem; color: var(--text-primary); background: none; border: 0;
}
.ep-more-item:hover { background: var(--glass-bg-strong); }
.episode-row.is-watched .ep-duration::after,
.watch-ep-row.is-watched .ep-duration::after {
  content: " \00b7 \2713 Watched";
  color: var(--purple-soft, #c9a6ff);
  font-weight: 600;
}

/* =========================================================
   PROBLEM #11 — Screenshots: single preview + gallery page
   ========================================================= */
.screenshot-preview-link {
  display: block; max-width: 480px; border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-card); margin-inline: var(--gutter);
}
.screenshot-preview-link img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; transition: transform var(--fast); }
.screenshot-preview-link:hover img { transform: scale(1.03); }
.view-all-link {
  display: inline-block; margin: 14px var(--gutter) 0; font-weight: 600; font-size: .88rem; color: var(--purple-soft, #c9a6ff);
}

.shots-header { display: flex; align-items: center; gap: 16px; padding: 26px var(--gutter) 18px; }
.shots-back-btn { position: static; }
.shots-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.3rem, 3vw, 1.8rem); }
.shots-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 0 var(--gutter) 60px; }
.shots-item { border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-card); }
.shots-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }

/* =========================================================
   PROBLEM #13 — Watched Episodes management page
   ========================================================= */
.watched-groups { padding: 20px var(--gutter) 60px; display: flex; flex-direction: column; gap: 22px; }
.watched-anime-group { padding: 16px; border-radius: var(--r-md); background: var(--bg-card); border: 1px solid var(--glass-border); }
.watched-anime-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.watched-anime-thumb { width: 40px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--bg-elevated); flex-shrink: 0; }
.watched-anime-title { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.watched-season-block + .watched-season-block { margin-top: 12px; }
.watched-season-label { font-size: .78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.watched-ep-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.watched-ep-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: var(--r-pill);
  background: var(--glass-bg-strong); border: 1px solid var(--purple-2, rgba(139,42,240,.4));
  color: var(--purple-soft, #c9a6ff); font-size: .78rem; font-weight: 600;
}
.watched-ep-chip-x { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); font-size: .85rem; line-height: 1; }
.watched-ep-chip:hover { border-color: var(--red-accent, #e0405b); color: var(--red-soft, #ff8fa3); }

/* =========================================================
   PROBLEM #14 — Comments redesign: compact, minimal glow
   ========================================================= */
.comments-identity { gap: 8px; }
.comments-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; font-weight: 700; font-size: .68rem;
}
.comments-change-btn {
  font-size: .78rem; font-weight: 600; color: var(--purple-soft, #c9a6ff);
  background: none; border: 0; padding: 4px 6px;
}
.comments-change-btn:hover { text-decoration: underline; }
.comment-form {
  margin-bottom: 20px; padding: 8px 8px 8px 16px; border-radius: var(--r-pill);
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border); align-items: center;
}
.comment-form textarea {
  min-height: 0; height: 22px; max-height: 90px; padding: 6px 0; border: 0; background: none;
  align-self: center;
}
.comment-form .btn { flex-shrink: 0; padding: 9px 18px; }
.comments-empty-state { padding: 34px 10px; }
.comments-empty-state .state-icon { font-size: 1.8rem; margin-bottom: 8px; }
.comments-empty-state h3 { font-size: .95rem; margin-bottom: 4px; }
.comments-empty-state p { font-size: .82rem; }

/* =========================================================
   PROBLEM #4 — FOOTER CLEANUP: compact, community + credit only
   ========================================================= */
.site-footer { margin-top: 40px; padding-top: 8px; }
.footer-compact .social-hub { border-top: 0; }
.footer-bottom-compact { justify-content: flex-end; border-top: 1px solid var(--glass-border); }

/* =========================================================
   PROBLEM #5 — Trailer player: direct/Backblaze <video> sibling to
   the existing YouTube <iframe>, same box (aspect-ratio 16/9 from
   .trailer-frame-inner already covers both — just needs object-fit).
   ========================================================= */
.trailer-frame-inner .trailer-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }

/* =========================================================
   4-SECOND CINEMATIC INTRO (index.html only)
   ---------------------------------------------------------
   object-fit:contain (not cover) is deliberate — the brief asks not to
   crop the video unnecessarily, so it always shows the full frame,
   letterboxed on aspect mismatches, rather than cropping edges to fill
   the screen.
   ========================================================= */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000; /* above #loading-screen and everything else */
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity .5s ease;
}
#intro-overlay.intro-fading { opacity: 0; pointer-events: none; }
#intro-video { width: 100%; height: 100%; object-fit: contain; background: #000; }

#intro-skip-btn {
  position: absolute;
  right: 18px; bottom: 18px;
  z-index: 2;
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  background: rgba(10,8,16,.55);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-weight: 600;
  font-size: .82rem;
  backdrop-filter: blur(6px);
  opacity: 0;
  animation: introControlsIn .4s ease .6s forwards;
}
#intro-skip-btn svg { width: 15px; height: 15px; }

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

@media (max-width: 767px) {
  #intro-skip-btn { padding: 8px 13px; font-size: .76rem; bottom: 14px; }
  #intro-skip-btn { right: 14px; }
}