/* ============================================================
   AniBlaga — Main Stylesheet
   Theme: Deep Space Dark × Sakura × Electric
   Fonts: Cinzel Decorative + Outfit
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ===== Variables ===== */
:root {
  --bg-void:     #070711;
  --bg-deep:     #0c0c1a;
  --bg-card:     #111128;
  --bg-card-h:   #171732;
  --bg-glass:    rgba(17,17,40,0.85);
  --accent:      #ff3c6e;
  --accent2:     #00d4ff;
  --accent3:     #b06eff;
  --gold:        #ffd060;
  --text-hi:     #f0f2ff;
  --text-md:     #8e95b8;
  --text-lo:     #454870;
  --border:      rgba(255,255,255,0.06);
  --border-a:    rgba(255,60,110,0.25);
  --glow-r:      rgba(255,60,110,0.35);
  --glow-b:      rgba(0,212,255,0.3);
  --glow-p:      rgba(176,110,255,0.3);
  --grad-hero:   linear-gradient(135deg,#ff3c6e 0%,#b06eff 50%,#00d4ff 100%);
  --grad-card:   linear-gradient(160deg,#ff3c6e,#b06eff);
  --font-display:'Cinzel Decorative', serif;
  --font-body:   'Outfit', sans-serif;
  --radius:      14px;
  --radius-lg:   20px;
  --shadow:      0 8px 40px rgba(0,0,0,0.5);
  --shadow-a:    0 0 24px rgba(255,60,110,0.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-hi);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font-body); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== Background grain texture ===== */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; opacity: 0.5;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 68px;
  background: rgba(7,7,17,0.92);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  max-width: 1440px; margin: 0 auto;
  padding: 0 24px; height: 100%;
  display: flex; align-items: center; gap: 20px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 900;
  background: var(--grad-hero);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}
.nav-logo span { font-size: 0.65em; opacity: 0.7; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  padding: 7px 13px; border-radius: 9px;
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-md); transition: all 0.2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-hi); background: rgba(255,255,255,0.06); }

/* Lang switcher */
.lang-switcher { position: relative; flex-shrink: 0; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-md); padding: 6px 12px; border-radius: 9px;
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s; letter-spacing: 0.5px;
}
.lang-btn:hover { border-color: var(--accent); color: var(--text-hi); }
.lang-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
  min-width: 140px; display: none;
  box-shadow: var(--shadow); z-index: 10;
}
.lang-dropdown.open { display: block; }
.lang-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; font-size: 0.88rem; font-weight: 600;
  color: var(--text-md); cursor: pointer; transition: all 0.15s;
  border: none; background: none; width: 100%; text-align: left;
}
.lang-opt:hover { background: var(--bg-card-h); color: var(--text-hi); }
.lang-opt.active { color: var(--accent); }

/* Search bar */
.nav-search { flex: 1; max-width: 360px; position: relative; }
.nav-search form {
  display: flex; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 26px; overflow: hidden;
  transition: border-color 0.2s;
}
.nav-search form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,60,110,0.1); }
.nav-search input {
  flex: 1; background: none; border: none; outline: none;
  padding: 8px 16px; font-family: var(--font-body);
  font-size: 0.88rem; color: var(--text-hi);
}
.nav-search input::placeholder { color: var(--text-lo); }
.nav-search button {
  padding: 8px 16px; background: none; border: none;
  color: var(--accent); cursor: pointer; font-size: 0.9rem;
}
.search-drop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: none; z-index: 100; box-shadow: var(--shadow);
}
.search-drop.open { display: block; }
.sdrop-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.sdrop-item:last-child { border-bottom: none; }
.sdrop-item:hover { background: var(--bg-card-h); }
.sdrop-item img { width: 36px; height: 50px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.sdrop-title { font-weight: 700; font-size: 0.88rem; }
.sdrop-meta { font-size: 0.75rem; color: var(--text-lo); margin-top: 2px; }

/* User menu */
.nav-user { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.user-menu { position: relative; }
.user-trigger {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-hi); padding: 6px 14px; border-radius: 26px;
  cursor: pointer; font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
  transition: all 0.2s;
}
.user-trigger:hover { border-color: var(--accent); }
.user-drop {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; width: 190px; padding: 8px;
  display: none; z-index: 100; box-shadow: var(--shadow);
}
.user-drop.open { display: block; }
.user-drop a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  font-size: 0.88rem; font-weight: 600; color: var(--text-md); transition: all 0.15s;
}
.user-drop a:hover { background: var(--bg-card-h); color: var(--text-hi); }
.btn-login, .btn-reg {
  padding: 7px 18px; border-radius: 26px;
  font-size: 0.85rem; font-weight: 700; transition: all 0.2s;
}
.btn-login {
  background: none; border: 1px solid var(--border); color: var(--text-md);
}
.btn-login:hover { border-color: var(--accent); color: var(--accent); }
.btn-reg {
  background: var(--accent); border: none; color: white;
  box-shadow: 0 4px 16px rgba(255,60,110,0.3);
}
.btn-reg:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,60,110,0.4); }
.mob-toggle {
  display: none; background: none; border: none;
  color: var(--text-hi); font-size: 1.3rem; cursor: pointer; margin-left: auto;
}
.mob-nav {
  display: none; position: fixed; top: 68px; left: 0; right: 0;
  background: var(--bg-deep); z-index: 999; padding: 16px 20px;
  border-bottom: 1px solid var(--border); flex-direction: column; gap: 4px;
}
.mob-nav.open { display: flex; }
.mob-nav a, .mob-nav button {
  padding: 11px 14px; border-radius: 10px;
  font-weight: 600; font-size: 0.9rem; color: var(--text-md); transition: all 0.2s;
  background: none; border: none; text-align: left; cursor: pointer;
  font-family: var(--font-body); width: 100%;
}
.mob-nav a:hover, .mob-nav button:hover { background: var(--bg-card); color: var(--text-hi); }

main { padding-top: 68px; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 580px;
  display: flex; align-items: flex-end; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  filter: brightness(0.25) saturate(1.2);
  transition: all 0.8s ease;
}
.hero-grad {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg-void) 0%, rgba(7,7,17,0.7) 40%, transparent 80%),
    linear-gradient(to right, rgba(7,7,17,0.85) 0%, transparent 55%);
}
/* Animated glowing orbs */
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(80px);
  pointer-events: none; opacity: 0.15;
  animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb-1 { width: 500px; height: 500px; background: var(--accent); top: -100px; right: 10%; animation-delay: 0s; }
.hero-orb-2 { width: 350px; height: 350px; background: var(--accent3); top: 100px; right: 30%; animation-delay: -3s; }
.hero-orb-3 { width: 250px; height: 250px; background: var(--accent2); bottom: 50px; right: 20%; animation-delay: -6s; }

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.08); }
}

.hero-content {
  position: relative; z-index: 2;
  padding: 0 40px 60px; max-width: 680px;
  animation: heroIn 0.8s ease both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 14px;
  background: rgba(255,60,110,0.15); border: 1px solid rgba(255,60,110,0.3);
  color: var(--accent); font-size: 0.75rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.5px;
}
.hero-title {
  font-family: var(--font-display); font-size: 2.8rem; font-weight: 900;
  line-height: 1.1; margin-bottom: 14px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.6);
}
.hero-meta {
  display: flex; gap: 18px; margin-bottom: 14px;
  font-size: 0.88rem; color: var(--text-md); flex-wrap: wrap;
}
.hero-star { color: var(--gold); font-weight: 800; }
.hero-desc {
  color: var(--text-md); font-size: 0.95rem; line-height: 1.75;
  margin-bottom: 26px; max-width: 540px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-watch {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: white; border: none;
  padding: 13px 28px; border-radius: 50px;
  font-weight: 800; font-size: 1rem; cursor: pointer;
  box-shadow: 0 6px 24px rgba(255,60,110,0.4);
  transition: all 0.3s;
}
.btn-watch:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(255,60,110,0.5); }
.btn-info-hero {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,0.08); color: var(--text-hi);
  padding: 13px 24px; border-radius: 50px;
  font-weight: 700; font-size: 0.95rem; border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(10px); transition: all 0.2s;
}
.btn-info-hero:hover { background: rgba(255,255,255,0.15); }
.hero-dots {
  position: absolute; bottom: 28px; right: 40px; z-index: 2;
  display: flex; gap: 8px;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.25); border: none; cursor: pointer;
  transition: all 0.3s;
}
.hero-dot.on { background: var(--accent); width: 26px; border-radius: 5px; box-shadow: 0 0 10px var(--accent); }

/* ===== Container ===== */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 24px; }

/* ===== Section ===== */
.section { padding: 48px 0; }
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.sec-title {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  display: flex; align-items: center; gap: 12px; letter-spacing: -0.3px;
}
.sec-title::before {
  content: '';
  display: block; width: 4px; height: 26px;
  background: var(--grad-card); border-radius: 4px;
  box-shadow: 0 0 12px var(--glow-r);
}
.view-all {
  display: flex; align-items: center; gap: 5px;
  color: var(--accent); font-size: 0.88rem; font-weight: 700;
  transition: gap 0.2s;
}
.view-all:hover { gap: 9px; }

/* ===== Anime Cards ===== */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 22px;
}
.anime-card {
  background: var(--bg-card); border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  border: 1px solid var(--border); transition: all 0.35s;
  position: relative;
}
.anime-card::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255,60,110,0);
  transition: box-shadow 0.35s;
}
.anime-card:hover { transform: translateY(-8px) scale(1.01); border-color: var(--border-a); box-shadow: 0 20px 50px rgba(0,0,0,0.5), var(--shadow-a); }
.anime-card:hover::after { box-shadow: inset 0 0 0 1px rgba(255,60,110,0.3); }
.card-poster {
  position: relative; aspect-ratio: 2/3; overflow: hidden;
}
.card-poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.45s ease;
}
.anime-card:hover .card-poster img { transform: scale(1.07); }
.card-hover-layer {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,7,17,0.9) 0%, transparent 55%);
  opacity: 0; transition: opacity 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.anime-card:hover .card-hover-layer { opacity: 1; }
.card-play {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: white; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer;
  transform: scale(0.7); transition: transform 0.3s;
  box-shadow: 0 0 20px rgba(255,60,110,0.5);
}
.anime-card:hover .card-play { transform: scale(1); }
.card-status {
  position: absolute; top: 9px; left: 9px;
  padding: 3px 9px; border-radius: 5px;
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
}
.st-ongoing { background: rgba(39,174,96,0.9); color: white; }
.st-completed { background: rgba(52,152,219,0.9); color: white; }
.st-upcoming { background: rgba(243,156,18,0.9); color: white; }
.card-rating {
  position: absolute; top: 9px; right: 9px;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(6px);
  color: var(--gold); padding: 3px 8px; border-radius: 6px;
  font-size: 0.75rem; font-weight: 800;
  display: flex; align-items: center; gap: 3px;
}
.card-info { padding: 12px 14px; }
.card-title {
  font-weight: 700; font-size: 0.88rem; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4;
}
.card-meta { font-size: 0.75rem; color: var(--text-lo); display: flex; gap: 8px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.tag {
  padding: 2px 8px; border-radius: 20px; font-size: 0.68rem; font-weight: 700;
  background: rgba(255,60,110,0.1); color: var(--accent);
  border: 1px solid rgba(255,60,110,0.18);
}

/* ===== Anime Detail ===== */
.detail-banner {
  position: relative; height: 420px; overflow: hidden;
}
.detail-banner img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.25);
}
.detail-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 0%, var(--bg-void) 100%);
}
.detail-wrap {
  max-width: 1440px; margin: 0 auto; padding: 0 24px;
  margin-top: -180px; position: relative; z-index: 1;
  display: grid; grid-template-columns: 240px 1fr; gap: 36px;
  align-items: start;
}
.detail-poster img {
  width: 240px; height: 345px; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  border: 2px solid rgba(255,255,255,0.06);
}
.detail-title {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 900;
  margin-bottom: 12px; line-height: 1.2; letter-spacing: -0.5px;
}
.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; font-size: 0.88rem; color: var(--text-md); }
.detail-meta-item { display: flex; align-items: center; gap: 6px; }
.detail-meta-item i { color: var(--accent); }
.detail-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.genre-pill {
  padding: 5px 14px; border-radius: 20px; font-size: 0.82rem; font-weight: 700;
  background: rgba(255,60,110,0.08); color: var(--accent);
  border: 1px solid rgba(255,60,110,0.22); transition: all 0.2s;
}
.genre-pill:hover { background: rgba(255,60,110,0.18); }
.detail-desc { color: var(--text-md); line-height: 1.8; margin-bottom: 24px; font-size: 0.95rem; }
.detail-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: white; border: none;
  padding: 10px 24px; border-radius: 50px;
  font-weight: 800; cursor: pointer; transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(255,60,110,0.3);
  font-family: var(--font-body); font-size: 0.95rem;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,60,110,0.45); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-card); color: var(--text-hi);
  padding: 10px 20px; border-radius: 50px;
  font-weight: 700; border: 1px solid var(--border); cursor: pointer; transition: all 0.2s;
  font-family: var(--font-body); font-size: 0.9rem;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost.wl-active { background: rgba(255,60,110,0.1); border-color: var(--accent); color: var(--accent); }

/* ===== Episodes ===== */
.ep-section { padding: 40px 0; }
.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px; max-height: 320px; overflow-y: auto; padding-right: 4px;
}
.ep-pill {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-md); padding: 10px 6px; border-radius: 10px;
  text-align: center; font-weight: 700; font-size: 0.88rem;
  cursor: pointer; transition: all 0.2s; display: block;
}
.ep-pill:hover, .ep-pill.active {
  background: var(--accent); border-color: var(--accent); color: white;
  box-shadow: 0 4px 16px rgba(255,60,110,0.3);
}

/* ===== Watch Page ===== */
.watch-grid {
  max-width: 1440px; margin: 0 auto; padding: 20px 24px;
  display: grid; grid-template-columns: 1fr 360px; gap: 24px;
}
.player-box {
  background: #000; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 16/9; position: relative;
}
.player-box iframe { width: 100%; height: 100%; border: none; }
.player-box video { width: 100%; height: 100%; }
.no-video {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 14px; color: var(--text-lo);
}
.no-video i { font-size: 3.5rem; }
.player-info { padding: 18px 0; }
.ep-breadcrumb { font-size: 0.82rem; color: var(--text-lo); margin-bottom: 8px; }
.ep-breadcrumb a { color: var(--accent); font-weight: 700; }
.ep-main-title {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-bottom: 8px;
}
.ep-stat { display: flex; gap: 18px; color: var(--text-md); font-size: 0.88rem; margin-bottom: 18px; }
.ep-nav-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Watch sidebar */
.watch-side {}
.w-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px; margin-bottom: 18px;
}
.w-panel-title {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.w-panel-title::before {
  content: ''; width: 3px; height: 16px;
  background: var(--grad-card); border-radius: 2px; display: block;
}
.ep-side-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  transition: background 0.2s; margin-bottom: 4px;
  border: 1px solid transparent;
}
.ep-side-item:hover { background: var(--bg-card-h); }
.ep-side-item.on {
  background: rgba(255,60,110,0.08);
  border-color: var(--border-a);
}
.ep-side-num {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-deep); display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 0.8rem; flex-shrink: 0;
}
.ep-side-item.on .ep-side-num { background: var(--accent); color: white; }
.ep-side-title { font-size: 0.83rem; font-weight: 600; }
.ep-side-views { font-size: 0.72rem; color: var(--text-lo); margin-top: 2px; }

/* ===== Comments ===== */
.comments-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px; margin-top: 24px;
}
.comments-title {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
  margin-bottom: 22px; display: flex; align-items: center; gap: 9px;
}
.comment-form-wrap { margin-bottom: 26px; }
.comment-ta {
  width: 100%; background: var(--bg-deep); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px;
  color: var(--text-hi); font-family: var(--font-body); font-size: 0.92rem;
  resize: vertical; min-height: 84px; outline: none; transition: border-color 0.2s;
}
.comment-ta:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,60,110,0.1); }
.comment-submit {
  margin-top: 10px; float: right;
  background: var(--accent); color: white; padding: 8px 22px;
  border-radius: 24px; border: none; font-weight: 800; cursor: pointer;
  font-family: var(--font-body); transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(255,60,110,0.3);
}
.comment-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,60,110,0.4); }
.comment-login-prompt {
  background: var(--bg-deep); padding: 16px; border-radius: 12px;
  text-align: center; color: var(--text-md); margin-bottom: 26px;
}
.comment-login-prompt a { color: var(--accent); font-weight: 700; }
.comment-item { display: flex; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-av {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad-card); display: flex; align-items: center;
  justify-content: center; font-weight: 800; color: white; font-size: 0.9rem;
}
.comment-uname { font-weight: 700; font-size: 0.88rem; }
.comment-time { font-size: 0.75rem; color: var(--text-lo); margin-left: 8px; }
.comment-body { font-size: 0.9rem; color: var(--text-md); margin-top: 4px; line-height: 1.5; }

/* ===== Auth Pages ===== */
.auth-page {
  min-height: calc(100vh - 68px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(255,60,110,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(176,110,255,0.06) 0%, transparent 50%);
}
.auth-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 22px; padding: 44px 40px;
  width: 100%; max-width: 430px;
  box-shadow: var(--shadow);
}
.auth-logo {
  text-align: center; margin-bottom: 32px;
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 900;
  background: var(--grad-hero); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.auth-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }
.auth-sub { color: var(--text-md); font-size: 0.88rem; margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 700; font-size: 0.82rem; margin-bottom: 8px; color: var(--text-md); letter-spacing: 0.3px; }
.form-input {
  width: 100%; background: var(--bg-deep); border: 1px solid var(--border);
  border-radius: 11px; padding: 11px 16px;
  color: var(--text-hi); font-family: var(--font-body); font-size: 0.92rem;
  outline: none; transition: all 0.2s;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,60,110,0.1); }
.form-input::placeholder { color: var(--text-lo); }
.form-select { cursor: pointer; }
.form-submit {
  width: 100%; background: var(--accent); color: white;
  padding: 13px; border-radius: 50px; border: none;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all 0.25s; margin-top: 8px;
  box-shadow: 0 6px 22px rgba(255,60,110,0.3);
}
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,60,110,0.45); }
.auth-alt { text-align: center; margin-top: 20px; font-size: 0.88rem; color: var(--text-lo); }
.auth-alt a { color: var(--accent); font-weight: 700; }

/* ===== Alerts ===== */
.alert {
  padding: 12px 16px; border-radius: 11px; margin-bottom: 18px;
  font-size: 0.88rem; display: flex; align-items: center; gap: 9px;
}
.alert-err { background: rgba(255,60,110,0.1); border: 1px solid rgba(255,60,110,0.25); color: #ff6b8a; }
.alert-ok  { background: rgba(39,174,96,0.1);  border: 1px solid rgba(39,174,96,0.25);  color: #4ec97e; }

/* ===== Browse Page ===== */
.browse-bar { padding: 32px 0 20px; }
.browse-title {
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 900;
  margin-bottom: 6px; letter-spacing: -0.5px;
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.filter-sel {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-hi); padding: 8px 16px; border-radius: 9px;
  font-family: var(--font-body); font-size: 0.88rem; outline: none; cursor: pointer;
  transition: border-color 0.2s;
}
.filter-sel:focus { border-color: var(--accent); }
.filter-sel option { background: var(--bg-card); }

/* ===== Pagination ===== */
.pages { display: flex; gap: 6px; justify-content: center; margin: 36px 0; }
.pg-btn {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-md); cursor: pointer; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; font-family: var(--font-body); font-size: 0.88rem;
}
.pg-btn:hover, .pg-btn.on { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 4px 14px rgba(255,60,110,0.3); }

/* ===== Loading ===== */
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite; margin: 48px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Admin Panel ===== */
.admin-wrap { display: flex; min-height: calc(100vh - 68px); }
.admin-side {
  width: 250px; background: var(--bg-deep);
  border-right: 1px solid var(--border); padding: 22px 0;
  flex-shrink: 0; position: sticky; top: 68px;
  height: calc(100vh - 68px); overflow-y: auto;
}
.admin-side-logo {
  padding: 4px 22px 22px;
  font-size: 0.72rem; font-weight: 800; color: var(--text-lo);
  text-transform: uppercase; letter-spacing: 2px;
}
.adm-nav {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 22px; color: var(--text-md);
  font-weight: 600; font-size: 0.88rem; cursor: pointer;
  transition: all 0.2s; border-left: 3px solid transparent;
}
.adm-nav:hover { background: var(--bg-card); color: var(--text-hi); }
.adm-nav.on { background: rgba(255,60,110,0.07); color: var(--accent); border-left-color: var(--accent); }
.adm-nav i { width: 18px; text-align: center; }
.admin-content { flex: 1; padding: 32px; overflow-x: auto; }
.adm-title {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 700;
  margin-bottom: 28px; display: flex; align-items: center; gap: 12px;
}
.adm-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px; margin-bottom: 32px;
}
.stat-c {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  display: flex; align-items: center; gap: 16px;
  transition: transform 0.2s;
}
.stat-c:hover { transform: translateY(-3px); }
.stat-ico {
  width: 52px; height: 52px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.ico-r { background: rgba(255,60,110,0.13); color: var(--accent); }
.ico-b { background: rgba(0,212,255,0.13);  color: var(--accent2); }
.ico-g { background: rgba(39,174,96,0.13);  color: #4ec97e; }
.ico-o { background: rgba(255,208,96,0.13); color: var(--gold); }
.stat-val { font-family: var(--font-display); font-size: 2rem; font-weight: 900; }
.stat-lbl { font-size: 0.78rem; color: var(--text-lo); margin-top: 2px; }
.adm-tbl-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.adm-tbl { width: 100%; border-collapse: collapse; }
.adm-tbl th {
  background: var(--bg-deep); padding: 13px 16px;
  text-align: left; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-lo); font-weight: 800;
}
.adm-tbl td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 0.88rem; vertical-align: middle; }
.adm-tbl tr:last-child td { border-bottom: none; }
.adm-tbl tr:hover td { background: rgba(255,255,255,0.02); }
.adm-tbl img { width: 42px; height: 58px; object-fit: cover; border-radius: 7px; }
.act-btn {
  padding: 5px 12px; border-radius: 7px; border: none;
  font-size: 0.78rem; font-weight: 800; cursor: pointer; transition: all 0.2s;
}
.act-edit { background: rgba(0,212,255,0.12); color: var(--accent2); }
.act-edit:hover { background: var(--accent2); color: var(--bg-void); }
.act-del { background: rgba(255,60,110,0.12); color: var(--accent); }
.act-del:hover { background: var(--accent); color: white; }
.act-add-ep { background: rgba(255,208,96,0.12); color: var(--gold); }
.act-add-ep:hover { background: var(--gold); color: var(--bg-void); }
.btn-add-new {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: white; border: none;
  padding: 9px 20px; border-radius: 9px; font-weight: 800;
  cursor: pointer; font-size: 0.88rem; transition: all 0.2s;
  font-family: var(--font-body); box-shadow: 0 4px 16px rgba(255,60,110,0.25);
}
.btn-add-new:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,60,110,0.35); }
.adm-form {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px; max-width: 720px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.adm-form textarea.form-input { resize: vertical; min-height: 90px; }
.check-group { display: flex; flex-wrap: wrap; gap: 8px; }
.check-lbl {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-deep); border: 1px solid var(--border);
  padding: 6px 13px; border-radius: 7px; cursor: pointer;
  font-size: 0.82rem; font-weight: 600; transition: all 0.2s;
}
.check-lbl:has(input:checked) { border-color: var(--accent); background: rgba(255,60,110,0.08); color: var(--accent); }
.check-lbl input { accent-color: var(--accent); }
.upload-area {
  border: 2px dashed var(--border); border-radius: 12px; padding: 22px;
  text-align: center; color: var(--text-lo); font-size: 0.88rem;
  transition: border-color 0.2s; cursor: pointer;
}
.upload-area:hover { border-color: var(--accent); color: var(--text-md); }
.upload-area input[type=file] { display: none; }
.upload-preview { max-width: 120px; max-height: 80px; object-fit: cover; border-radius: 8px; margin: 10px auto 0; }
.or-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-lo); font-size: 0.8rem; font-weight: 700; margin: 10px 0;
}
.or-divider::before, .or-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-deep); border-top: 1px solid var(--border);
  margin-top: 60px; padding: 50px 0 0;
}
.footer-grid {
  max-width: 1440px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.footer-brand-name {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 900;
  background: var(--grad-hero); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 12px;
}
.footer-brand-desc { color: var(--text-lo); font-size: 0.88rem; line-height: 1.7; }
.footer-socials { display: flex; gap: 10px; margin-top: 16px; }
.footer-socials a {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-md); transition: all 0.2s;
}
.footer-socials a:hover { border-color: var(--accent); color: var(--accent); }
.footer-col h5 {
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 700;
  color: var(--text-hi); margin-bottom: 14px; letter-spacing: 0.5px;
}
.footer-col a { display: block; color: var(--text-lo); font-size: 0.85rem; margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border); margin-top: 40px;
  padding: 18px 24px; text-align: center;
  font-size: 0.8rem; color: var(--text-lo); max-width: 1440px; margin: 40px auto 0;
  padding: 18px 24px;
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .watch-grid { grid-template-columns: 1fr; }
  .watch-side { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
}
@media (max-width: 900px) {
  .nav-links, .nav-search, .nav-user { display: none; }
  .mob-toggle { display: flex; }
  .detail-wrap { grid-template-columns: 1fr; }
  .detail-poster img { width: 160px; height: 230px; margin: 0 auto; }
  .hero-title { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .anime-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 14px; }
  .hero-content { padding: 0 20px 48px; }
  .hero { min-height: 480px; }
  .hero-cta { flex-direction: column; }
  .auth-card { padding: 28px 22px; }
  .admin-wrap { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: static; }
  .form-row { grid-template-columns: 1fr; }
  .watch-side { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== Animations ===== */
.fade-in { animation: fadeUp 0.5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.stagger > * { animation: fadeUp 0.5s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }
