/* ============================================================
   Astra — Premium Streaming Design System v2
   ============================================================ */

/* === 1. Design Tokens ===================================== */
:root {
  /* Core palette */
  --bg:       #09090d;
  --bg2:      #060608;
  --surface:  #111116;
  --surface2: #181820;
  --surface3: #202028;
  --surface4: #28283a;

  /* Text */
  --text:   #eceef5;
  --text2:  #a8aabb;
  --muted:  rgba(236,238,245,.42);

  /* Borders */
  --line:   rgba(236,238,245,.06);
  --line2:  rgba(236,238,245,.11);
  --line3:  rgba(236,238,245,.20);

  /* Brand accent (orange — constant) */
  --accent:     #e85d04;
  --accent-rgb: 232,93,4;
  --accent2:    #00c4a0;
  --accent-dim: rgba(232,93,4,.10);

  /* Section primary — overridden per section */
  --sp:     #e85d04;
  --sp-dim: rgba(232,93,4,.10);
  --sp-rgb: 232,93,4;

  /* Glass */
  --glass:        rgba(9,9,13,.82);
  --glass-border: rgba(236,238,245,.08);

  /* Radii */
  --r:  5px;
  --r2: 10px;
  --r3: 16px;

  /* Shadows */
  --shadow:    0 20px 60px rgba(0,0,0,.9);
  --shadow-sm: 0 4px 18px rgba(0,0,0,.65);

  /* Layout */
  --topbar-h:     64px;
  --bottom-nav-h: 60px;
  --pad:          18px;
  --gap:          14px;

  /* Easing */
  --ease: cubic-bezier(.4,0,.2,1);

  /* Compat aliases */
  --panel:    var(--surface);
  --ink:      var(--text);
  --page-gap: 12px;
}

/* Anime section: cyan / purple */
body[data-section="anime"] {
  --sp:     #22d3ee;
  --sp-dim: rgba(34,211,238,.08);
  --sp-rgb: 34,211,238;
}

/* Webtoon section: amber */
body[data-section="webtoon"] {
  --sp:     #f59e0b;
  --sp-dim: rgba(245,158,11,.08);
  --sp-rgb: 245,158,11;
}

/* === 2. Reset ============================================= */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
a    { color:inherit; text-decoration:none; }
img  { display:block; max-width:100%; }
button,input,textarea,select { font:inherit; color:inherit; }

/* === 3. Base ============================================== */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,h2,h3 { line-height: 1.2; font-weight: 800; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 15px; font-weight: 700; }

/* === 4. Scrollbar ========================================= */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--surface4); }

/* === 5. Container ========================================= */
.container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

main.container {
  padding-top: 28px;
  padding-bottom: 60px;
}

body.has-dock main.container { padding-bottom: 82px; }

/* === 6. Topbar ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: var(--glass);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  transition: height .25s var(--ease), box-shadow .25s var(--ease), opacity .2s;
}

.topbar.is-compact {
  height: 52px;
  box-shadow: 0 1px 0 var(--line2);
}

.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Brand */
.brand {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--accent);
  flex: 0 0 auto;
  transition: opacity .15s;
  position: relative;
}

.brand:hover { opacity: .82; }

.brand::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}

/* Nav tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-tab {
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--muted);
  border-radius: var(--r);
  transition: color .15s, background .15s;
  white-space: nowrap;
}

.nav-tab:hover { color: var(--text); background: var(--surface2); }

.nav-tab.active {
  color: var(--sp);
  background: var(--sp-dim);
}

/* Search trigger button */
.search-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r2);
  background: var(--surface2);
  border: 1px solid var(--line2);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  flex: 0 0 auto;
  font-size: 15px;
  color: var(--text2);
}

.search-trigger:hover {
  background: var(--surface3);
  border-color: var(--line3);
  color: var(--text);
}

/* User area */
.tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

/* === 7. Search Overlay ==================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(4,4,8,.92);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px var(--pad) var(--pad);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
}

.search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.search-overlay-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--surface2);
  border: 1px solid var(--line2);
  color: var(--text2);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 17px;
  transition: background .15s, color .15s;
  line-height: 1;
}

.search-overlay-close:hover { background: var(--surface3); color: var(--text); }

.search-overlay-inner {
  width: 100%;
  max-width: 640px;
}

.search-overlay-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1.5px solid var(--line3);
  border-radius: var(--r2);
  padding: 0 16px;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 16px;
}

.search-overlay-bar:focus-within {
  border-color: var(--sp);
  box-shadow: 0 0 0 3px var(--sp-dim);
}

.search-overlay-icon { font-size: 17px; color: var(--muted); flex: 0 0 auto; }

.search-overlay-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 17px 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}

.search-overlay-input::placeholder { color: var(--muted); }

.search-overlay-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.search-overlay-tab {
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  background: var(--surface2);
  border: 1px solid var(--line2);
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}

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

.search-overlay-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  letter-spacing: .3px;
}

/* === 8. Mobile Bottom Nav — Blob Dock ===================== */
.site-nav-mobile {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  /* floating pill */
  background: rgba(9,9,13,.94);
  border: 1px solid rgba(236,238,245,.09);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-radius: 999px;
  padding: 6px 8px;
  box-shadow:
    0 28px 72px rgba(0,0,0,.9),
    0 0 0 1px rgba(255,255,255,.025) inset;
  transition: transform .32s var(--ease), opacity .28s var(--ease);
  will-change: transform;
}

.site-nav-mobile.snm-hidden {
  transform: translateX(-50%) translateY(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
}

.site-nav-mobile-inner {
  display: flex;
  align-items: center;
  gap: 2px;
}

.snm-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .15s, background .15s;
  cursor: pointer;
  border: none;
  background: none;
  text-decoration: none;
  white-space: nowrap;
}

.snm-btn:hover  { color: var(--text);   background: rgba(255,255,255,.06); }
.snm-btn.active { color: var(--accent); background: var(--accent-dim);     }
.snm-icon { font-size: 18px; line-height: 1; }

/* === 8b. Page Progress Bar ================================ */
#page-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff));
  z-index: 9999;
  transition: width .3s var(--ease), opacity .3s;
  pointer-events: none;
}
#page-progress.pgdone { opacity: 0; }

/* === 8c. Scroll Reveal ==================================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }

/* === 8d. Page Fade ======================================== */
@keyframes astra-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
main.container {
  animation: astra-page-in .4s var(--ease) both;
}

/* === 9. Tags / Badges ===================================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--line2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}

.tag:hover { color: var(--text); border-color: var(--line3); }
.tag--accent { color: var(--accent); background: var(--accent-dim); border-color: rgba(var(--accent-rgb),.22); }
.tag--ok     { color: #10b981; background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.22); }
.tag--bad    { color: #f87171; background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.2); }
.tag--sp     { color: var(--sp); background: var(--sp-dim); border-color: rgba(var(--sp-rgb),.22); }

/* Avatar pill */
.avatar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--line2);
  transition: border-color .15s;
}

.avatar-pill:hover { border-color: var(--line3); }

.avatar-pill img {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-name { font-size: 13px; font-weight: 700; }

/* Badges */
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }

.badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* === 10. Buttons ========================================== */
.neo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  background: var(--surface2);
  color: var(--text);
  transition: filter .18s, transform .12s, box-shadow .18s, background .15s;
  position: relative;
}

.neo-btn:hover  { filter: brightness(1.15); transform: translateY(-1px); }
.neo-btn:active { transform: none; filter: brightness(.9); }

.neo-btn .icon {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: var(--r);
  background: rgba(255,255,255,.12);
  flex: 0 0 auto;
  font-size: 11px;
}

/* Anime: sky blue — fixed, never changes */
.neo-btn--anime {
  background: #0ea5e9;
  color: #fff;
  border-color: #0ea5e9;
}
.neo-btn--anime:hover { box-shadow: 0 4px 20px rgba(14,165,233,.45); }

/* Webtoon: amber — fixed */
.neo-btn--webtoon {
  background: #d97706;
  color: #fff;
  border-color: #d97706;
}
.neo-btn--webtoon:hover { box-shadow: 0 4px 20px rgba(217,119,6,.45); }

/* Brand accent */
.neo-btn--accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Ghost */
.neo-btn--ghost {
  background: transparent;
  border-color: var(--line2);
  color: var(--text2);
}
.neo-btn--ghost:hover {
  background: var(--surface2);
  border-color: var(--line3);
  filter: none;
  color: var(--text);
  transform: none;
}

/* Section primary */
.neo-btn--sp {
  background: var(--sp);
  color: #fff;
  border-color: var(--sp);
}
.neo-btn--sp:hover { box-shadow: 0 4px 20px rgba(var(--sp-rgb),.45); }

/* === 11. Form inputs ====================================== */
.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1.5px solid var(--line2);
  border-radius: var(--r);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.form-input:focus {
  border-color: var(--sp);
  box-shadow: 0 0 0 3px var(--sp-dim);
}

.form-input::placeholder { color: var(--muted); }
textarea.form-input { resize: vertical; }

/* === 12. Search bar (inline) ============================== */
.search {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 24px;
}

.search input {
  flex: 1;
  padding: 12px 16px;
  background: var(--surface);
  border: 1.5px solid var(--line2);
  border-radius: var(--r);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.search input:focus {
  border-color: var(--sp);
  box-shadow: 0 0 0 3px var(--sp-dim);
}

.search input::placeholder { color: var(--muted); }

/* === 13. Panel ============================================ */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: var(--pad);
}

.panel + .panel { margin-top: var(--gap); }

/* === 14. Muted ============================================ */
.muted { color: var(--muted); font-size: 13px; }

/* ============================================================
   HOME HERO
   ============================================================ */
.home-hero {
  position: relative;
  border-radius: var(--r3);
  overflow: hidden;
  padding: 64px 24px 52px;
  text-align: center;
  border: 1px solid var(--line2);
  margin-bottom: 38px;
  isolation: isolate;
  background: var(--surface);
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -20%, rgba(232,93,4,.16), transparent 55%),
    radial-gradient(ellipse 700px 450px at 85% 120%, rgba(0,196,160,.12), transparent 55%),
    radial-gradient(ellipse 500px 300px at 50% 50%, rgba(232,93,4,.05), transparent 60%);
  animation: heroPulse 9s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

.home-hero-content { position: relative; z-index: 1; }

.home-hero-wordmark {
  font-size: clamp(48px, 9vw, 88px);
  font-weight: 900;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
  margin-bottom: 12px;
}

.home-hero-wordmark span {
  color: var(--accent);
  text-shadow: 0 0 48px rgba(232,93,4,.45);
}

.home-hero-sub {
  font-size: 15px;
  color: var(--text2);
  max-width: 44ch;
  margin: 0 auto 30px;
  line-height: 1.65;
}

.home-hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.home-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: var(--r2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
  border: none;
}

.home-hero-cta--anime {
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(14,165,233,.32);
}

.home-hero-cta--anime:hover {
  box-shadow: 0 8px 36px rgba(14,165,233,.55);
  transform: translateY(-2px);
}

.home-hero-cta--webtoon {
  background: linear-gradient(135deg, #d97706 0%, #ef4444 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(217,119,6,.32);
}

.home-hero-cta--webtoon:hover {
  box-shadow: 0 8px 36px rgba(217,119,6,.55);
  transform: translateY(-2px);
}

.home-hero-divider {
  width: 1px;
  height: 48px;
  background: var(--line3);
  margin: 0 8px;
  display: none;
}

.home-hero-stats {
  display: flex;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0 24px;
  border-right: 1px solid var(--line2);
}

.hero-stat:last-child { border-right: none; }

.hero-stat-num {
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.hero-stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .9px;
  padding-left: 12px;
  position: relative;
  margin-bottom: 14px;
  color: var(--text);
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 1px; bottom: 1px;
  width: 3px;
  background: var(--sp, var(--accent));
  border-radius: 99px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

/* ============================================================
   CAROUSEL
   ============================================================ */
.carousel { position: relative; margin: 0 calc(-1 * var(--pad)); }

.carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--pad) 12px;
}

.carousel-head h2 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  position: relative;
  padding-left: 12px;
}

.carousel-head h2::before {
  content: '';
  position: absolute;
  left: 0; top: 1px; bottom: 1px;
  width: 3px;
  background: var(--sp, var(--accent));
  border-radius: 99px;
}

.carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px var(--pad) 18px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

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

.carousel-card {
  flex: 0 0 160px;
  position: relative;
  border-radius: var(--r2);
  overflow: hidden;
  background: var(--surface2);
  scroll-snap-align: start;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
  border: 1px solid var(--line);
}

.carousel-card:hover {
  transform: scale(1.04) translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,.75), 0 0 0 1px var(--line3);
  z-index: 2;
}

.carousel-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  transition: filter .25s;
}

.carousel-card:hover img { filter: brightness(1.08); }

.carousel-meta {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 36px 10px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.92) 55%);
}

.carousel-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
}

/* ============================================================
   LIBRARY GRID
   ============================================================ */
.library { margin-top: 28px; }

.library-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.library-head h2 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  position: relative;
  padding-left: 12px;
}

.library-head h2::before {
  content: '';
  position: absolute;
  left: 0; top: 1px; bottom: 1px;
  width: 3px;
  background: var(--sp, var(--accent));
  border-radius: 99px;
}

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

.mini-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow: hidden;
  display: block;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
  position: relative;
}

.mini-card:hover {
  transform: translateY(-4px);
  border-color: var(--line3);
  box-shadow: 0 14px 36px rgba(0,0,0,.72), 0 0 0 1px rgba(var(--sp-rgb),.14);
}

.mini-thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  filter: brightness(.88);
  transition: filter .25s, transform .35s var(--ease);
}

.mini-card:hover .mini-thumb {
  filter: brightness(1.06);
  transform: scale(1.03);
}

.mini-body {
  padding: 9px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-title {
  font-weight: 700;
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.mini-badges { display: flex; flex-wrap: wrap; gap: 4px; }

/* ============================================================
   WEBTOON GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow: hidden;
  display: block;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line3);
  box-shadow: 0 14px 36px rgba(0,0,0,.72);
}

.card > img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  filter: brightness(.88);
  transition: filter .25s;
}

.card:hover > img { filter: brightness(1.05); }

.card-body { padding: 9px 10px 10px; }

.card-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   ANIME DETAIL HERO
   ============================================================ */
.anime-hero {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: start;
  padding: 28px;
  border-radius: var(--r2);
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 28px;
}

.anime-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: blur(32px) brightness(.22) saturate(1.7);
  transform: scale(1.1);
  z-index: 0;
}

.anime-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(9,9,13,.6), rgba(9,9,13,.2));
}

.anime-hero > *:not(.anime-hero-bg) { position: relative; z-index: 1; }

.cover {
  width: 100%;
  border-radius: var(--r2);
  display: block;
  border: 1px solid var(--line2);
  box-shadow: 0 20px 60px rgba(0,0,0,.85);
}

.meta h1 { margin-bottom: 10px; font-size: 24px; }
.meta .tags { margin-bottom: 10px; }

.desc {
  color: var(--text2);
  line-height: 1.72;
  margin: 12px 0;
  font-size: 14px;
  max-width: 68ch;
}

/* Episode grid */
.episodes { margin-top: 28px; }

.episodes h2 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding-left: 12px;
  position: relative;
  margin-bottom: 14px;
}

.episodes h2::before {
  content: '';
  position: absolute;
  left: 0; top: 1px; bottom: 1px;
  width: 3px;
  background: var(--sp, var(--accent));
  border-radius: 99px;
}

.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.ep {
  display: block;
  text-align: center;
  padding: 9px 6px;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text2);
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .12s;
}

.ep:hover {
  background: var(--sp, var(--accent));
  border-color: var(--sp, var(--accent));
  color: #fff;
  box-shadow: 0 4px 14px rgba(var(--sp-rgb, var(--accent-rgb)),.38);
  transform: translateY(-1px);
}

/* ============================================================
   ANIME PLAYER
   ============================================================ */
.player-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  align-items: start;
}

.player { min-width: 0; }

.player-top {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.crumb {
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  transition: color .15s;
}

.crumb:hover { color: var(--sp, var(--accent)); }

.nav {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
}

/* Sidebar */
.sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r2);
  overflow: hidden;
}

.sidebar h3 {
  padding: 12px 14px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.ep-list { max-height: 480px; overflow-y: auto; }

.ep-row {
  display: block;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text2);
  border-bottom: 1px solid var(--line);
  transition: background .12s, color .12s;
}

.ep-row:hover { background: var(--surface2); color: var(--text); }

.ep-row.active {
  background: var(--sp-dim, var(--accent-dim));
  color: var(--sp, var(--accent));
  border-left: 3px solid var(--sp, var(--accent));
  padding-left: 11px;
}

/* ============================================================
   VIDEO PLAYER
   ============================================================ */
.vid-wrap {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--r2);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.vid-el {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  cursor: pointer;
}

.vid-wrap:fullscreen        { border-radius: 0; }
.vid-wrap:-webkit-full-screen { border-radius: 0; }

.vid-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.88));
  padding: 32px 14px 12px;
  transition: opacity .25s var(--ease);
}

.vid-progress {
  position: relative;
  height: 4px;
  background: rgba(255,255,255,.22);
  border-radius: 4px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: height .15s;
}

.vid-progress:hover { height: 6px; margin-bottom: 8px; }

.vid-buf, .vid-fill {
  position: absolute;
  top: 0; left: 0; height: 100%;
  border-radius: 4px;
  pointer-events: none;
}

.vid-buf  { background: rgba(255,255,255,.28); }
.vid-fill { background: var(--sp, var(--accent)); }

.vid-progress input[type=range] {
  position: absolute;
  inset: -8px 0;
  width: 100%;
  height: calc(100% + 16px);
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

.vid-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vid-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.85);
  font-size: 15px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r);
  transition: background .12s, color .12s;
  line-height: 1;
  flex: 0 0 auto;
}

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

.vid-time {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  letter-spacing: .3px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.vid-speed {
  background: rgba(255,255,255,.12);
  border: none;
  color: rgba(255,255,255,.85);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--r);
  cursor: pointer;
  letter-spacing: .4px;
}

.vid-speed option { background: #111; }

.vid-skip-overlay {
  position: absolute;
  top: 50%;
  left: 18%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.62);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .5px;
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  user-select: none;
}

.vid-skip-overlay--right { left: auto; right: 18%; transform: translate(50%,-50%); }

.tap-zone {
  position: absolute;
  top: 0; bottom: 48px;
  width: 32%;
  cursor: pointer;
  z-index: 10;
}

.tap-zone--left  { left: 0; }
.tap-zone--right { right: 0; }

/* ============================================================
   WEBTOON SERIES HERO
   ============================================================ */
.series-hero {
  position: relative;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 22px;
  align-items: start;
  padding: 28px;
  border-radius: var(--r2);
  overflow: hidden;
  isolation: isolate;
}

.series-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: blur(32px) brightness(.2) saturate(1.9);
  transform: scale(1.1);
  z-index: 0;
}

.series-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(9,9,13,.7) 0%, rgba(9,9,13,.3) 100%);
}

.series-cover, .series-meta { position: relative; z-index: 1; }

.series-cover img {
  width: 100%;
  border-radius: var(--r);
  border: 1px solid var(--line2);
  box-shadow: 0 20px 60px rgba(0,0,0,.85);
}

.series-meta h1 { font-size: 22px; margin-bottom: 8px; }

.series-desc {
  font-size: 14px;
  line-height: 1.72;
  color: var(--text2);
  max-width: 60ch;
}

/* ============================================================
   CHAPTER READER
   ============================================================ */
.reader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: 800px;
  margin: 0 auto;
}

.page { width: 100%; position: relative; line-height: 0; }

.page img {
  width: 100%;
  height: auto;
  display: block;
}

/* Reading progress bar */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sp, var(--accent)), var(--sp, var(--accent2)));
  z-index: 200;
  pointer-events: none;
  transition: width .1s linear;
}

/* Focus mode toggle button */
.focus-btn {
  position: fixed;
  top: calc(var(--topbar-h) + 12px);
  right: 14px;
  z-index: 95;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text2);
  border-radius: var(--r2);
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, color .15s, opacity .2s;
}

.focus-btn:hover { background: var(--surface2); color: var(--text); }

/* Focus mode hides topbar */
body.focus-mode .topbar {
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

body.focus-mode .focus-btn {
  top: 12px;
  color: var(--sp, var(--accent));
}

body.focus-mode .site-nav-mobile {
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   CHAPTER DOCK
   ============================================================ */
.dock {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: stretch;
  height: 54px;
  background: var(--glass);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.dock-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text2);
  background: none;
  border: none;
  cursor: pointer;
  transition: background .12s, color .12s;
  text-decoration: none;
}

.dock-btn:hover { background: rgba(255,255,255,.06); color: var(--text); }

.dock-center {
  background: var(--sp, var(--accent));
  color: #fff;
  flex: 1.4;
}

.dock-center:hover { filter: brightness(1.1); }
.dock-btn.disabled { opacity: .3; pointer-events: none; }

/* Drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
}

.drawer.open { opacity: 1; pointer-events: auto; }

.drawer-panel {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  max-height: 70dvh;
  background: var(--surface);
  border-top: 1px solid var(--line2);
  border-radius: var(--r2) var(--r2) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}

.drawer.open .drawer-panel { transform: none; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.drawer-title {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.drawer-close {
  background: var(--surface2);
  border: 1px solid var(--line2);
  border-radius: var(--r);
  color: var(--text2);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: background .12s, color .12s;
}

.drawer-close:hover { background: var(--surface3); color: var(--text); }

.drawer-list { overflow-y: auto; flex: 1; padding: 6px 0; }

.drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  border-bottom: 1px solid var(--line);
  transition: background .12s, color .12s;
}

.drawer-item:hover { background: var(--surface2); color: var(--text); }

.drawer-item.active {
  color: var(--sp, var(--accent));
  background: var(--sp-dim, var(--accent-dim));
  border-left: 3px solid var(--sp, var(--accent));
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comment {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
}

.comment-avatar {
  flex: 0 0 auto;
  display: block;
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line2);
}

.comment-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.comment-body { min-width: 0; flex: 1; }

.comment-meta {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.comment-del-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  opacity: .5;
  transition: opacity .15s, color .15s, background .15s;
  margin-left: auto;
}
.comment-del-btn:hover {
  opacity: 1;
  color: #f87171;
  background: rgba(248,113,113,.12);
}

.comment-text {
  font-size: 14px;
  line-height: 1.62;
  word-break: break-word;
  white-space: pre-wrap;
  color: var(--text2);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes heroPulse {
  0%   { opacity: .85; transform: scale(1); }
  100% { opacity: 1;   transform: scale(1.03); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Staggered card entrance */
.mini-card, .card {
  animation: fadeInUp .32s var(--ease) both;
}

.mini-grid .mini-card:nth-child(1)  { animation-delay: .03s; }
.mini-grid .mini-card:nth-child(2)  { animation-delay: .07s; }
.mini-grid .mini-card:nth-child(3)  { animation-delay: .11s; }
.mini-grid .mini-card:nth-child(4)  { animation-delay: .15s; }
.mini-grid .mini-card:nth-child(5)  { animation-delay: .18s; }
.mini-grid .mini-card:nth-child(6)  { animation-delay: .21s; }
.mini-grid .mini-card:nth-child(n+7){ animation-delay: .24s; }

.grid .card:nth-child(1)  { animation-delay: .03s; }
.grid .card:nth-child(2)  { animation-delay: .07s; }
.grid .card:nth-child(3)  { animation-delay: .11s; }
.grid .card:nth-child(4)  { animation-delay: .15s; }
.grid .card:nth-child(5)  { animation-delay: .18s; }
.grid .card:nth-child(6)  { animation-delay: .21s; }
.grid .card:nth-child(n+7){ animation-delay: .24s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .mini-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .grid      { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 980px) {
  .player-layout { grid-template-columns: 1fr; }
  .anime-hero    { grid-template-columns: 180px 1fr; gap: 18px; }
}

@media (max-width: 760px) {
  .anime-hero     { grid-template-columns: 130px 1fr; gap: 16px; padding: 18px; }
  .cover          { max-width: 100%; }
  .series-hero    { grid-template-columns: 110px 1fr; gap: 14px; padding: 16px; }
  .search         { flex-direction: column; }
  .nav-tabs       { display: none; }
  .site-nav-mobile { display: block; } /* blob: not flex, uses inner flex */
  main.container  { padding-bottom: 96px; } /* space for floating blob */
  body.has-dock main.container { padding-bottom: 96px; }
}

@media (max-width: 620px) {
  :root { --pad: 12px; }
  .carousel-card  { flex-basis: 140px; }
  .mini-grid      { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid           { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topbar-inner   { gap: 8px; }
  .avatar-name    { display: none; }
  .home-hero      { padding: 44px 16px 36px; }
  .home-hero-wordmark { letter-spacing: 2px; }
  .hero-stat      { padding: 0 14px; }
  .hero-stat-num  { font-size: 20px; }
  .anime-hero     { grid-template-columns: 1fr; }
  .cover          { max-width: 200px; margin: 0 auto; }
}

@media (min-width: 761px) {
  .dock { display: none; }
  .site-nav-mobile { display: none !important; }
  .focus-btn { display: block; }
}

@media (max-width: 760px) {
  .focus-btn { display: none; }
}

/* body.has-dock no longer suppresses the blob dock */

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   BURGER BUTTON + USER DROPDOWN MENU
   ============================================================ */
.burger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r);
  border: none;
  background: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  flex: 0 0 auto;
  transition: color .15s, background .15s;
}
.burger-btn:hover { color: var(--text); background: var(--surface2); }

.topbar-user-full {
  display: contents; /* desktop: render children inline */
}

.user-menu {
  position: fixed;
  top: calc(var(--topbar-h) + 6px);
  right: var(--pad);
  min-width: 196px;
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: var(--r2);
  box-shadow: 0 20px 56px rgba(0,0,0,.82);
  z-index: 150;
  display: none;
  flex-direction: column;
  padding: 6px;
  animation: fadeInUp .16s var(--ease);
}
.user-menu.open { display: flex; }

.user-menu-avatar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 8px;
}
.user-menu-avatar img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line2);
  flex: 0 0 auto;
}
.user-menu-avatar span {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.user-menu-divider { height: 1px; background: var(--line); margin: 4px 0; }
.user-menu-item {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  border-radius: var(--r);
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.user-menu-item:hover { background: var(--surface2); color: var(--text); }
.user-menu-item--accent { color: var(--accent); }

@media (max-width: 760px) {
  .burger-btn { display: inline-flex; }
  .topbar-user-full { display: none; }
}

/* ============================================================
   ANIME INDEX — HERO BANNER
   ============================================================ */
.idx-hero {
  position: relative;
  border-radius: var(--r3);
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  margin-bottom: 28px;
  border: 1px solid var(--line2);
}

.idx-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: brightness(.28) saturate(1.6);
  transform: scale(1.05);
  z-index: 0;
  transition: transform 7s ease, filter .4s;
}
.idx-hero:hover .idx-hero-bg {
  transform: scale(1.08);
  filter: brightness(.34) saturate(1.6);
}
.idx-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(9,9,13,.98) 0%,
    rgba(9,9,13,.6)  42%,
    transparent      74%);
  z-index: 1;
}
.idx-hero-body {
  position: relative; z-index: 2;
  padding: 28px;
  width: 100%;
}
.idx-hero-kicker {
  display: block;
  font-size: 10px; font-weight: 800;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--sp, var(--accent));
  margin-bottom: 9px;
}
.idx-hero-title {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 900; line-height: 1.1;
  margin-bottom: 9px;
  text-shadow: 0 2px 24px rgba(0,0,0,.9);
}
.idx-hero-desc {
  font-size: 13px; color: var(--text2);
  line-height: 1.65; max-width: 52ch;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.idx-hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

@media (max-width: 620px) {
  .idx-hero { min-height: 260px; }
  .idx-hero-body { padding: 18px; }
  .idx-hero-desc { display: none; }
}

/* ============================================================
   CONTINUE WATCHING BADGE
   ============================================================ */
.cw-ep-badge {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 26px 10px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.92) 55%);
}
.cw-ep-label {
  font-size: 10px; font-weight: 800;
  letter-spacing: .6px; text-transform: uppercase;
  color: var(--sp, var(--accent));
  display: block; margin-bottom: 2px;
}
.cw-ep-title {
  font-size: 12px; font-weight: 700;
  color: #fff; line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   ROLE-BASED USERNAME STYLING
   ============================================================ */

/* Shared gradient-text helper */
.ur-admin,
.ur-mod,
.ur-otaku3,
.ur-otaku2,
.ur-otaku1,
.ur-otaku {
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  font-weight: 800;
  display: inline-block;
}

/* ── Administrator — animated red/orange fire ── */
.ur-admin {
  background-image: linear-gradient(90deg, #ff2e2e, #ff7b00, #ff2e2e, #ff0066, #ff2e2e);
  background-size: 300%;
  animation: urShift 3s linear infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 6px rgba(255,60,0,.55));
}

/* ── Moderator — cool electric blue ── */
.ur-mod {
  background-image: linear-gradient(90deg, #3b82f6, #06b6d4, #6366f1, #3b82f6);
  background-size: 250%;
  animation: urShift 4s linear infinite;
  filter: drop-shadow(0 0 5px rgba(59,130,246,.45));
}

/* ── Otaku III — prestige gold shimmer ── */
.ur-otaku3 {
  background-image: linear-gradient(90deg, #f59e0b, #fde68a, #f59e0b, #fffbeb, #d97706, #f59e0b);
  background-size: 300%;
  animation: urShift 2.5s linear infinite;
  filter: drop-shadow(0 0 6px rgba(245,158,11,.6));
}

/* ── Otaku II — royal purple ── */
.ur-otaku2 {
  background-image: linear-gradient(90deg, #a855f7, #ec4899, #a855f7, #8b5cf6, #a855f7);
  background-size: 250%;
  animation: urShift 4s linear infinite;
  filter: drop-shadow(0 0 5px rgba(168,85,247,.4));
}

/* ── Otaku I — teal/cyan ── */
.ur-otaku1 {
  background-image: linear-gradient(90deg, #22d3ee, #10b981, #22d3ee);
  background-size: 200%;
  animation: urShift 4s linear infinite;
  filter: drop-shadow(0 0 4px rgba(34,211,238,.35));
}

/* ── Otaku — site accent orange, static ── */
.ur-otaku {
  background-image: linear-gradient(90deg, #e85d04, #fb923c, #e85d04);
  background-size: 200%;
  animation: urShift 5s linear infinite;
}

/* ── Member — plain, no special treatment ── */
.ur-member {
  color: var(--text2) !important;
  -webkit-text-fill-color: unset !important;
}

@keyframes urShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ── Role badge chip ── */
.rbadge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.rbadge.ur-admin {
  background: rgba(255,46,46,.12);
  border: 1px solid rgba(255,46,46,.28);
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  color: #ff6b6b !important;
  filter: none;
}

.rbadge.ur-mod {
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.28);
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  color: #60a5fa !important;
  filter: none;
}

.rbadge.ur-otaku3 {
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.32);
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  color: #fbbf24 !important;
  filter: none;
}

.rbadge.ur-otaku2 {
  background: rgba(168,85,247,.12);
  border: 1px solid rgba(168,85,247,.28);
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  color: #c084fc !important;
  filter: none;
}

.rbadge.ur-otaku1 {
  background: rgba(34,211,238,.1);
  border: 1px solid rgba(34,211,238,.24);
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  color: #22d3ee !important;
  filter: none;
}

.rbadge.ur-otaku {
  background: rgba(232,93,4,.1);
  border: 1px solid rgba(232,93,4,.24);
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  color: #fb923c !important;
  filter: none;
}

.rbadge.ur-member {
  background: var(--surface2);
  border: 1px solid var(--line2);
  color: var(--muted) !important;
  -webkit-text-fill-color: unset !important;
}

/* user-menu username in dropdown */
.user-menu-uname {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* ============================================================
   STATUS FILTER  (anime/index.php)
   ============================================================ */
.status-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.status-pill {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: var(--surface2);
  border: 1px solid var(--line2);
  color: var(--text2);
  transition: background .14s, color .14s, border-color .14s;
  white-space: nowrap;
}

.status-pill:hover {
  background: var(--surface3);
  border-color: var(--line3);
  color: var(--text);
}

.status-pill.active {
  background: var(--sp-dim);
  border-color: rgba(var(--sp-rgb), .38);
  color: var(--sp);
}

/* ============================================================
   TAG FILTER PILLS  (anime/index.php)
   ============================================================ */
.tag-filter-wrap {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tag-filter-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tag-filter-label {
  flex: 0 0 52px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 6px;
  white-space: nowrap;
}

.tag-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .45px;
  background: var(--surface2);
  border: 1px solid var(--line2);
  color: var(--text2);
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, color .14s, border-color .14s, box-shadow .14s;
}

.tag-pill:hover {
  background: var(--surface3);
  border-color: var(--line3);
  color: var(--text);
}

.tag-pill.active {
  background: var(--sp-dim);
  border-color: rgba(var(--sp-rgb), .38);
  color: var(--sp);
  box-shadow: 0 0 0 1px rgba(var(--sp-rgb), .18);
}

.tag-pill-count {
  font-size: 9px;
  font-weight: 700;
  opacity: .55;
  letter-spacing: 0;
}

@media (max-width: 620px) {
  .tag-filter-group { flex-direction: column; gap: 6px; }
  .tag-filter-label { padding-top: 0; }
}

/* ============================================================
   HOME — SPOTLIGHT HERO  (index.php)
   ============================================================ */
.hl-hero {
  position: relative;
  border-radius: var(--r3);
  overflow: hidden;
  isolation: isolate;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0;
  border: 1px solid var(--line2);
}

.hl-hero-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 15%;
  filter: blur(2px) brightness(.22) saturate(1.8);
  transform: scale(1.06);
  z-index: 0;
  transition: transform 8s ease;
}
.hl-hero:hover .hl-hero-backdrop { transform: scale(1.09); }

.hl-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(9,9,13,.97) 0%,
    rgba(9,9,13,.72) 48%,
    rgba(9,9,13,.24) 100%
  );
  z-index: 1;
}

.hl-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: flex-end;
  padding: 36px 36px 36px;
  width: 100%;
}

.hl-hero-poster {
  flex: 0 0 auto;
  display: flex;
}

.hl-hero-poster img {
  width: 100%;
  border-radius: var(--r2);
  border: 1px solid var(--line2);
  box-shadow: 0 24px 64px rgba(0,0,0,.9);
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hl-hero-copy { min-width: 0; }

.hl-hero-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sp, var(--accent));
  margin-bottom: 10px;
}

.hl-hero-title {
  font-size: clamp(26px, 4.5vw, 48px);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 12px;
  text-shadow: 0 2px 28px rgba(0,0,0,.9);
}

.hl-hero-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 56ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hl-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.hl-hero-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .hl-hero-inner {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .hl-hero-poster { display: none; }
  .hl-hero { min-height: 320px; align-items: flex-end; }
}

/* Fallback wordmark hero */
.hl-wordmark-hero {
  position: relative;
  border-radius: var(--r3);
  overflow: hidden;
  isolation: isolate;
  padding: 80px 24px 64px;
  text-align: center;
  border: 1px solid var(--line2);
  background: var(--surface);
}
.hl-wh-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 800px 400px at 20% -10%, rgba(14,165,233,.14), transparent 60%),
    radial-gradient(ellipse 600px 400px at 80% 110%, rgba(99,102,241,.1), transparent 60%);
  animation: heroPulse 9s ease-in-out infinite alternate;
  pointer-events: none;
}
.hl-wh-content { position: relative; z-index: 1; }
.hl-wh-name {
  font-size: clamp(52px, 10vw, 96px);
  font-weight: 900;
  letter-spacing: 8px;
  color: var(--accent);
  text-shadow: 0 0 56px rgba(232,93,4,.45);
  margin-bottom: 16px;
}
.hl-wh-sub {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 28px;
}

/* ── Stats bar ─────────────────────────────────────────────── */
.hl-stats-bar {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line2);
  border-top: none;
  border-radius: 0 0 var(--r3) var(--r3);
  margin-bottom: 32px;
  overflow: hidden;
}

.hl-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 0;
  border-right: 1px solid var(--line2);
}
.hl-stat:last-child { border-right: none; }

.hl-stat-n {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.hl-stat-l {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Section wrapper ───────────────────────────────────────── */
.hl-section {}

.hl-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hl-section-title {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding-left: 12px;
  position: relative;
  color: var(--text);
}
.hl-section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 1px; bottom: 1px;
  width: 3px;
  background: var(--sp, var(--accent));
  border-radius: 99px;
}

/* ── Trending scroll row ───────────────────────────────────── */
.hl-scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--pad));
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.hl-scroll-row::-webkit-scrollbar { display: none; }

.hl-card {
  flex: 0 0 156px;
  scroll-snap-align: start;
  display: block;
  text-decoration: none;
}

.hl-card-img-wrap {
  position: relative;
  border-radius: var(--r2);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: box-shadow .22s, transform .22s;
  background: var(--surface2);
}
.hl-card:hover .hl-card-img-wrap {
  box-shadow: 0 14px 36px rgba(0,0,0,.8), 0 0 0 1px var(--line3);
  transform: translateY(-3px);
}

.hl-card-img-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  transition: filter .22s;
}
.hl-card:hover .hl-card-img-wrap img { filter: brightness(1.08); }

.hl-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.38);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.hl-card:hover .hl-card-overlay { opacity: 1; }

.hl-card-play {
  font-size: 28px;
  color: #fff;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.7));
}

.hl-card-foot {
  padding: 8px 2px 0;
}

.hl-card-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
  margin-bottom: 4px;
}

.hl-card-meta { display: flex; flex-wrap: wrap; gap: 4px; }

/* ── Genre grid ────────────────────────────────────────────── */
.hl-genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.hl-genre-card {
  position: relative;
  border-radius: var(--r2);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line2);
  isolation: isolate;
  transition: transform .2s var(--ease), box-shadow .2s;
  text-decoration: none;
}

.hl-genre-card:hover {
  transform: scale(1.03) translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.75);
}

.hl-genre-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(3px) brightness(.28) saturate(1.9);
  transform: scale(1.1);
  z-index: 0;
  transition: filter .25s;
}
.hl-genre-card:hover .hl-genre-bg { filter: blur(2px) brightness(.36) saturate(2); }

.hl-genre-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(14,165,233,.22), rgba(99,102,241,.12));
  z-index: 1;
}

.hl-genre-name {
  position: relative;
  z-index: 2;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0,0,0,.8);
  text-align: center;
  padding: 0 10px;
}

/* ── New arrivals grid ─────────────────────────────────────── */
.hl-new-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.hl-new-card {
  display: block;
  border-radius: var(--r2);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
  text-decoration: none;
}

.hl-new-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0,0,0,.72), 0 0 0 1px rgba(var(--sp-rgb),.15);
  border-color: var(--line3);
}

.hl-new-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  filter: brightness(.88);
  transition: filter .25s, transform .35s;
}
.hl-new-card:hover img { filter: brightness(1.06); transform: scale(1.03); }

.hl-new-info {
  padding: 8px 9px 10px;
  display: flex;
  flex-direction: column;
}

.hl-new-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

/* ── CTA strip ─────────────────────────────────────────────── */
.hl-cta-strip {
  margin-top: 28px;
  margin-bottom: 12px;
  background: linear-gradient(120deg,
    rgba(14,165,233,.08) 0%,
    rgba(99,102,241,.06) 100%
  );
  border: 1px solid rgba(14,165,233,.14);
  border-radius: var(--r2);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.hl-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hl-cta-copy strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.hl-cta-copy span {
  font-size: 13px;
  color: var(--text2);
}

@media (max-width: 560px) {
  .hl-cta-strip { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hl-genre-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Keyframes shared ──────────────────────────────────────── */
@keyframes heroPulse {
  from { opacity: .8; }
  to   { opacity: 1; }
}

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

/* ============================================================
   Community Landing + Forum
   ============================================================ */

/* ── Community two-column grid ─────────────────────────────── */
.community-grid {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 24px;
  align-items: start;
}
.community-main  { min-width: 0; }
.community-sidebar { display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 860px) {
  .community-grid { grid-template-columns: 1fr; }
  .community-sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar-box { flex: 1 1 240px; }
}

/* ── Sidebar boxes ─────────────────────────────────────────── */
.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 14px 16px;
}
.sidebar-box-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin: 0 0 10px;
}
.sidebar-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.sidebar-stat-row:last-child { border-bottom: none; }
.sidebar-stat-val {
  font-weight: 800;
  color: var(--sp, #e85d04);
  font-variant-numeric: tabular-nums;
}

/* ── Staff edit panel (anime detail page) ──────────────────── */
.staff-edit-panel {
  background: var(--surface);
  border: 1px solid rgba(232,93,4,.25);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.staff-edit-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent, #e85d04);
  list-style: none;
  user-select: none;
}
.staff-edit-summary::-webkit-details-marker { display: none; }
.staff-edit-summary::before {
  content: '▶';
  font-size: 10px;
  transition: transform .2s;
  color: var(--muted);
}
details[open] .staff-edit-summary::before { transform: rotate(90deg); }
.staff-edit-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ── Online dot ────────────────────────────────────────────── */
.online-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 5px rgba(34,197,94,.6);
  flex-shrink: 0;
}

/* ── Role distribution ─────────────────────────────────────── */
.role-dist-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}
.role-dist-row:last-child { border-bottom: none; }

/* ── Forum quick-links in sidebar ──────────────────────────── */
.sidebar-forum-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color .15s;
}
.sidebar-forum-link:last-child { border-bottom: none; }
.sidebar-forum-link:hover { color: var(--sp, #e85d04); }

/* ── Activity feed (forum + comments) ──────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: 6px; }
.activity-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background .14s, border-color .14s;
}
.activity-item:hover { background: var(--surface2); border-color: var(--line3); }
.activity-av {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line2);
  margin-top: 1px;
}
.activity-body  { flex: 1; min-width: 0; }
.activity-snippet {
  font-size: 12px;
  color: var(--text2);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.5;
}

/* ============================================================
   Forum Pages
   ============================================================ */

.forum-layout {
  max-width: 840px;
  margin: 0 auto;
  padding-bottom: 48px;
}
.forum-head { margin-bottom: 22px; }
.forum-title {
  font-size: 24px; font-weight: 900; margin: 0;
  letter-spacing: .2px;
}

/* ── Breadcrumbs ───────────────────────────────────────────── */
.forum-crumbs {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.forum-crumbs a { color: var(--sp, #e85d04); text-decoration: none; }
.forum-crumbs a:hover { text-decoration: underline; }

/* ── Category list ─────────────────────────────────────────── */
.forum-cat-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line2);
  border: 1px solid var(--line2);
  border-radius: 12px;
  overflow: hidden;
}
.forum-cat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: background .14s;
}
.forum-cat-card:hover { background: var(--surface2); }
.forum-cat-icon { font-size: 22px; flex: 0 0 auto; margin-top: 1px; }
.forum-cat-body { flex: 1; min-width: 0; }
.forum-cat-name { font-size: 15px; font-weight: 800; margin-bottom: 3px; }
.forum-cat-desc { font-size: 12px; color: var(--text2); }
.forum-cat-stats {
  display: flex;
  gap: 18px;
  flex: 0 0 auto;
  text-align: center;
  align-self: center;
}
.forum-cat-stat-n { display: block; font-size: 18px; font-weight: 900; color: var(--text); }
.forum-cat-stat-l { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }

@media (max-width: 560px) {
  .forum-cat-card { flex-wrap: wrap; }
  .forum-cat-stats { gap: 12px; }
}

/* ── Category page header ──────────────────────────────────── */
.forum-cat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ── Thread list ───────────────────────────────────────────── */
.forum-thread-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line2);
  border: 1px solid var(--line2);
  border-radius: 12px;
  overflow: hidden;
}
.forum-thread-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 16px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: background .14s;
}
.forum-thread-row:hover { background: var(--surface2); }
.forum-thread-main { flex: 1; min-width: 0; }
.forum-thread-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.forum-thread-stats { flex: 0 0 auto; text-align: right; }

/* ── Thread / post view ────────────────────────────────────── */
.forum-thread-header { margin-bottom: 0; }
.forum-posts { display: flex; flex-direction: column; gap: 8px; }

.forum-post {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 10px;
  overflow: hidden;
}
.forum-post-author {
  flex: 0 0 110px;
  padding: 16px 10px;
  background: var(--surface2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  border-right: 1px solid var(--line2);
}
.forum-post-av {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line2);
}
.forum-post-author-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}
.forum-post-author-info a { text-decoration: none; font-weight: 700; }
.forum-post-author-info a:hover { text-decoration: underline; }

.forum-post-body  { flex: 1; padding: 14px 16px; min-width: 0; }
.forum-post-text  {
  font-size: 14px;
  line-height: 1.72;
  word-break: break-word;
}

/* ── Internal links in posts ───────────────────────────────── */
.forum-link {
  color: var(--sp, #e85d04);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted rgba(232,93,4,.4);
  transition: border-color .15s;
}
.forum-link:hover { border-color: var(--sp, #e85d04); }

/* ── Reply / new-thread forms ──────────────────────────────── */
.forum-reply-panel { }
.forum-field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 6px;
}

@media (max-width: 600px) {
  .forum-post { flex-direction: column; }
  .forum-post-author {
    flex-direction: row;
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--line2);
    padding: 10px 14px;
    justify-content: flex-start;
    text-align: left;
    gap: 10px;
  }
  .forum-post-av { width: 34px; height: 34px; }
  .forum-post-author-info { flex-direction: row; align-items: center; gap: 6px; }
}

/* ============================================================
   Admin — User Management
   ============================================================ */

/* Table */
.um-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.um-table thead tr {
  background: var(--surface2);
  border-bottom: 1px solid var(--line2);
}
.um-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text2);
  white-space: nowrap;
}

/* Rows */
.um-row {
  border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.um-row:hover { background: var(--surface2); }
.um-row:last-child { border-bottom: none; }
.um-row--banned { opacity: .6; }
.um-row--banned:hover { opacity: .85; }

.um-cell {
  padding: 10px 14px;
  vertical-align: middle;
}
.um-cell-user {
  padding: 10px 14px;
  vertical-align: middle;
  min-width: 170px;
}

/* Avatar */
.um-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line2);
  display: block;
}

/* Online dot */
.um-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--surface);
}

/* Role select */
.um-role-select {
  padding: 4px 8px !important;
  font-size: 12px !important;
  height: auto !important;
  width: auto !important;
  min-width: 110px;
}

/* Action buttons */
.um-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap;
}
.um-action-btn--warn {
  color: #f59e0b;
  border-color: rgba(245,158,11,.25);
  background: rgba(245,158,11,.08);
}
.um-action-btn--warn:hover {
  background: rgba(245,158,11,.18);
  border-color: rgba(245,158,11,.45);
}
.um-action-btn--ok {
  color: #10b981;
  border-color: rgba(16,185,129,.25);
  background: rgba(16,185,129,.08);
}
.um-action-btn--ok:hover {
  background: rgba(16,185,129,.18);
  border-color: rgba(16,185,129,.45);
}
.um-action-btn--danger {
  color: #ef4444;
  border-color: rgba(239,68,68,.25);
  background: rgba(239,68,68,.08);
}
.um-action-btn--danger:hover {
  background: rgba(239,68,68,.18);
  border-color: rgba(239,68,68,.45);
}

/* Responsive — stack on small screens */
@media (max-width: 768px) {
  .um-table th:nth-child(2),
  .um-table td:nth-child(2) { display: none; } /* hide email column */
  .um-table th:nth-child(4),
  .um-table td:nth-child(4) { display: none; } /* hide joined column */
}

/* ============================================================
   Episode player — resume toast + CW progress bar
   ============================================================ */

/* Resume toast (bottom-centre, slides up) */
.resume-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(14,14,20,.92);
  border: 1px solid rgba(232,93,4,.35);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 9000;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(0,0,0,.6);
}
.resume-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Continue Watching progress bar */
.cw-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,.12);
  border-radius: 0 0 var(--r2) var(--r2);
  overflow: hidden;
}
.cw-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width .3s ease;
}

/* ============================================================
   Profile page — two-column layout + forum activity
   ============================================================ */

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
}

.profile-main   { min-width: 0; }
.profile-sidebar { min-width: 0; }

/* Thread row */
.pf-thread-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 18px;
  text-decoration: none;
  color: var(--text);
  transition: background .12s;
}
.pf-thread-row:hover { background: var(--surface2); }
.pf-thread-row--sep  { border-bottom: 1px solid var(--line); }

.pf-thread-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.pf-thread-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.pf-post-excerpt {
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 2px;
}

.pf-thread-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding-left: 2px;
}

/* Sidebar stat rows */
.pf-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.pf-stat-row:last-child { border-bottom: none; }

/* Responsive */
@media (max-width: 860px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }
}

/* ============================================================
   Anime score / MAL-style rating block
   ============================================================ */

/* Score badge on mini-cards */
.mini-card  { position: relative; }
.mini-score-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(9,9,13,.82);
  border: 1px solid rgba(232,93,4,.35);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  z-index: 2;
  white-space: nowrap;
}

/* Score block layout */
.score-block {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 14px 0;
}

/* Average column */
.score-avg-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}
.score-avg-num {
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -1px;
}
.score-avg-num--na {
  font-size: 28px;
  color: var(--muted);
}
.score-avg-star {
  font-size: 18px;
  color: var(--accent);
  margin-top: 2px;
}
.score-avg-count {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
}

/* Distribution column */
.score-dist-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 140px;
  max-width: 220px;
}
.score-dist-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.score-dist-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text2);
  width: 12px;
  text-align: right;
  flex-shrink: 0;
}
.score-dist-track {
  flex: 1;
  height: 6px;
  background: var(--surface3);
  border-radius: 3px;
  overflow: hidden;
}
.score-dist-fill {
  height: 100%;
  border-radius: 3px;
  min-width: 2px;
  transition: width .3s ease;
}
.score-dist-fill--hi  { background: #10b981; }
.score-dist-fill--mid { background: var(--accent); }
.score-dist-fill--lo  { background: #ef4444; }
.score-dist-count {
  font-size: 10px;
  color: var(--muted);
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

/* User score column */
.score-user-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 160px;
}
.score-select {
  width: 100% !important;
  padding: 7px 10px !important;
  font-size: 13px !important;
  cursor: pointer;
}
.score-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  padding: 0;
  text-align: left;
  transition: color .15s;
}

/* ═══════════════════════════════════════════════════════════
   ANNOUNCEMENT BANNER
═══════════════════════════════════════════════════════════ */
.announce-bar {
  background: linear-gradient(90deg, #92400e, #b45309, #92400e);
  border-bottom: 1px solid rgba(251,191,36,.25);
  padding: 9px 0;
  position: sticky;
  top: 0;
  z-index: 999;
  animation: announceSlide .3s ease;
}
@keyframes announceSlide {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.announce-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
.announce-icon { font-size: 16px; flex-shrink: 0; }
.announce-text {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #fef3c7;
  line-height: 1.5;
}
.announce-close {
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 50%;
  color: #fef3c7;
  cursor: pointer;
  font-size: 12px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.announce-close:hover { background: rgba(255,255,255,.3); }

/* ═══════════════════════════════════════════════════════════
   ADMIN PANEL — NAVBAR TAG & MENU ITEM
═══════════════════════════════════════════════════════════ */
.tag--admin {
  background: rgba(234,179,8,.15);
  border-color: rgba(234,179,8,.4);
  color: #fbbf24;
  font-weight: 700;
}
.tag--admin:hover {
  background: rgba(234,179,8,.25);
  color: #fde68a;
}
.user-menu-item--admin {
  color: #fbbf24 !important;
}
.user-menu-item--admin:hover {
  background: rgba(234,179,8,.1) !important;
}

/* ═══════════════════════════════════════════════════════════
   ADMIN DASHBOARD — CARD GRID
═══════════════════════════════════════════════════════════ */
.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 18px 0 0;
}
.admin-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.admin-card:hover {
  border-color: var(--sp);
  background: rgba(255,255,255,.03);
}
.admin-card-icon { font-size: 28px; }
.admin-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.admin-card-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   FORUM — QUOTE BLOCKS
═══════════════════════════════════════════════════════════ */
.forum-quote {
  background: rgba(255,255,255,.04);
  border-left: 3px solid var(--sp);
  border-radius: 0 8px 8px 0;
  margin: 10px 0;
  padding: 10px 14px;
  font-size: 13px;
}
.forum-quote-author {
  display: block;
  color: var(--sp);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.forum-quote-body {
  color: var(--muted);
  line-height: 1.6;
}

/* Forum post meta row — quote button */
.forum-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  margin-bottom: 10px;
}
.forum-quote-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  padding: 2px 7px;
  transition: border-color .15s, color .15s;
}
.forum-quote-btn:hover {
  border-color: var(--sp);
  color: var(--sp);
}

/* Thread mod actions */
.thread-mod-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.thread-mod-btn {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  padding: 4px 10px;
  transition: border-color .15s, color .15s, background .15s;
}
.thread-mod-btn:hover {
  background: rgba(255,255,255,.09);
  border-color: var(--sp);
  color: var(--text);
}
.thread-mod-btn--lock  { border-color: rgba(239,68,68,.3);   color: #f87171; }
.thread-mod-btn--lock:hover  { background: rgba(239,68,68,.1); border-color: #ef4444; }
.thread-mod-btn--pin   { border-color: rgba(234,179,8,.3);   color: #fbbf24; }
.thread-mod-btn--pin:hover   { background: rgba(234,179,8,.1); border-color: #eab308; }
.thread-mod-btn--ok    { border-color: rgba(16,185,129,.3);  color: #34d399; }
.thread-mod-btn--ok:hover    { background: rgba(16,185,129,.1); border-color: #10b981; }
.score-remove-btn:hover { color: #ef4444; }
