/* ═══════════════ FANSUBSTREAM THEME ═══════════════ */
:root {
  --bg: #07090e;
  --bg-2: #0d1017;
  --surface: #12161f;
  --card: #161b27;
  --card-hover: #1c2230;
  --border: rgba(255, 255, 255, 0.07);
  --text: #eaeef6;
  --muted: #8a93a8;
  --accent: #ff4d7e;
  --accent-2: #7a5cff;
  --accent-grad: linear-gradient(135deg, #ff4d7e, #7a5cff);
  --green: #2fd6a0;
  --gold: #ffc93c;
  --radius: 14px;
  --radius-sm: 9px;
  --font-body: 'Poppins', system-ui, sans-serif;
  --font-head: 'Rajdhani', 'Poppins', sans-serif;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --navbar-h: 66px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: var(--accent); color: #fff; }

/* scrollbars */
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a3142; border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* ═══════════════ BUTTONS ═══════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border: none; border-radius: 999px;
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.3px;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(0.96); }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 8px 24px rgba(255, 77, 126, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255, 77, 126, 0.5); }
.btn-ghost { background: rgba(255, 255, 255, 0.07); color: var(--text); border: 1px solid var(--border); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-2px); }
.btn-ghost.active { background: var(--accent-grad); border-color: transparent; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border);
  border-radius: 50%; color: var(--text); position: relative;
  transition: background 0.2s, transform 0.2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-2px); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px;
  padding: 0 4px; border-radius: 20px; background: var(--accent);
  color: #fff; font-size: 0.66rem; font-weight: 700;
  display: grid; place-items: center;
}

/* ═══════════════ NAVBAR ═══════════════ */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--navbar-h);
  transition: background 0.3s, box-shadow 0.3s, height 0.3s;
  background: transparent;
}
.navbar.scrolled {
  background: rgba(9, 11, 17, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  height: 58px;
}
.watch-page .navbar { background: rgba(9, 11, 17, 0.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }

.nav-inner {
  max-width: 1380px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 22px; padding: 0 26px;
}

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; letter-spacing: 1px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-grad); display: grid; place-items: center;
  font-size: 0.8rem; color: #fff; box-shadow: 0 4px 14px rgba(255, 77, 126, 0.5);
}
.brand-name em { font-style: normal; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 6px; margin-left: 14px; }
.nav-link {
  position: relative; padding: 8px 14px; color: var(--muted);
  font-weight: 500; font-size: 0.92rem; border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--accent-grad);
}

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.search-box {
  position: relative; display: flex; align-items: center;
  transition: width 0.3s ease;
}
.search-icon { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search-box input {
  width: 230px; padding: 10px 16px 10px 40px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border);
  border-radius: 999px; color: var(--text); font-size: 0.88rem; outline: none;
  transition: border-color 0.25s, background 0.25s, width 0.3s;
}
.search-box input:focus { border-color: var(--accent); background: rgba(255, 255, 255, 0.09); width: 260px; }
.search-box input::placeholder { color: var(--muted); }

.menu-btn { display: none; }

.nav-cta { padding: 9px 18px; font-size: 0.85rem; }

/* drawer (mobile) */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(300px, 82vw); z-index: 300;
  background: var(--bg-2); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px; padding: 22px;
  transform: translateX(105%); transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.drawer.open { transform: translateX(0); }
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 250; background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer-link { padding: 13px 14px; border-radius: 10px; color: var(--text); font-weight: 500; transition: background 0.2s, padding-left 0.2s; }
.drawer-link:hover { background: rgba(255, 255, 255, 0.07); padding-left: 20px; }
.drawer-cta { justify-content: center; margin-top: 14px; }

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative; min-height: 86vh;
  display: flex; align-items: center;
  overflow: hidden; padding: 0 26px;
}
.hero-bg {
  position: absolute; inset: -10%;
  background: radial-gradient(ellipse at 20% 30%, var(--c1, #0e5a4d), transparent 55%),
              radial-gradient(ellipse at 85% 70%, var(--c2, #2fbfa8), transparent 55%),
              linear-gradient(160deg, #0a0c12 20%, #11141c 100%);
  animation: heroDrift 16s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
@keyframes heroDrift {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-2%, 3%); }
}
.hero-fade {
  position: absolute; inset: auto 0 0 0; height: 42%;
  background: linear-gradient(180deg, transparent, var(--bg) 92%);
}
.hero-content {
  position: relative; z-index: 2; max-width: 680px;
  animation: riseIn 0.8s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  margin-top: 40px;
}
@keyframes riseIn { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }

.hero-tag {
  display: inline-block; padding: 7px 15px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border);
  font-size: 0.74rem; font-weight: 600; letter-spacing: 2.5px; color: var(--accent);
  backdrop-filter: blur(6px); margin-bottom: 18px;
}
.hero-title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 4.3rem); line-height: 1.04; letter-spacing: 0.5px;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.hero-jp { margin-top: 8px; color: var(--muted); font-size: 1.02rem; letter-spacing: 2px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 14px; }
.chip-static {
  padding: 5px 13px; border-radius: 999px; font-size: 0.76rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--border); color: var(--text);
}
.chip-static.rating { color: var(--gold); border-color: rgba(255, 201, 60, 0.35); }
.hero-desc {
  color: #b9c0d2; font-size: 0.98rem; line-height: 1.65; max-width: 560px;
  margin-bottom: 26px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 7px;
}
.hero-scroll span {
  width: 4px; height: 8px; border-radius: 4px; background: var(--accent);
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ═══════════════ ROWS ═══════════════ */
.row-section { max-width: 1380px; margin: 0 auto; padding: 34px 26px 10px; }
.row-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.row-title { font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; letter-spacing: 0.5px; }
.row-more { color: var(--accent); font-size: 0.85rem; font-weight: 600; transition: gap 0.2s; display: inline-flex; align-items: center; gap: 4px; }
.row-more:hover { gap: 9px; }
.row-note { color: var(--muted); font-size: 0.8rem; }

.row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 172px;
  gap: 16px; overflow-x: auto; padding: 6px 4px 18px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.row-scroll > * { scroll-snap-align: start; }

/* ═══════════════ CARDS ═══════════════ */
.card {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  aspect-ratio: 2 / 3; background: var(--card);
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
  animation: cardIn 0.5s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.card:hover {
  transform: translateY(-8px); box-shadow: var(--shadow);
  border-color: rgba(255, 77, 126, 0.5);
  z-index: 2;
}

.card-cover {
  position: absolute; inset: 0;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  display: flex; align-items: center; justify-content: center;
}
.card-cover::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 45%);
}
.card-cover::after {
  content: ''; position: absolute; inset: 0; opacity: 0.28;
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 12px);
}
.card-jp {
  position: relative; font-size: 2.6rem; opacity: 0.5; font-weight: 300;
  letter-spacing: 6px; user-select: none;
}
.card-shine {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.card-shine::after {
  content: ''; position: absolute; top: -30%; left: -60%; width: 50%; height: 160%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: rotate(20deg); transition: left 0.6s ease;
}
.card:hover .card-shine::after { left: 130%; }

.card-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 4px 10px; border-radius: 999px; font-size: 0.68rem; font-weight: 700;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.card-badge.quality { top: 44px; right: auto; left: 10px; color: var(--green); }

.card-play {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  opacity: 0; transition: opacity 0.25s;
}
.card-play span {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-grad); display: grid; place-items: center;
  transform: scale(0.6); transition: transform 0.3s cubic-bezier(0.3, 1.5, 0.5, 1);
  box-shadow: 0 10px 30px rgba(255, 77, 126, 0.55);
}
.card-play svg { width: 26px; height: 26px; color: #fff; margin-left: 3px; }
.card:hover .card-play { opacity: 1; }
.card:hover .card-play span { transform: scale(1); }

.card-fav {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(6px); color: #fff;
  display: grid; place-items: center; opacity: 0; transform: translateY(-4px);
  transition: opacity 0.25s, transform 0.25s, background 0.25s;
}
.card:hover .card-fav { opacity: 1; transform: none; }
.card-fav:hover { background: var(--accent); }
.card-fav.active { opacity: 1; transform: none; background: var(--accent); }
.card-fav.active svg { fill: #fff; }
.card-fav svg { width: 16px; height: 16px; }

.card-info {
  position: absolute; inset: auto 0 0 0; z-index: 2; padding: 40px 13px 13px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88) 55%);
}
.card-title {
  font-weight: 600; font-size: 0.88rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-sub { color: #b9c0d2; font-size: 0.72rem; margin-top: 4px; }
.card-progress { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); margin-top: 9px; overflow: hidden; }
.card-progress span { display: block; height: 100%; background: var(--accent-grad); }

/* ═══════════════ CATALOG ═══════════════ */
.catalog-section { max-width: 1380px; margin: 0 auto; padding: 40px 26px; scroll-margin-top: 80px; }
.catalog-sub { color: var(--muted); font-size: 0.86rem; margin-top: 2px; }
.catalog-sub span { color: var(--accent); font-weight: 600; }

.chip-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0 14px; }
.chip {
  padding: 8px 17px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04); color: var(--muted);
  font-size: 0.82rem; font-weight: 500;
  transition: all 0.2s ease;
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); transform: translateY(-2px); }
.chip.active { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(255, 77, 126, 0.35); }

.sort-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.sort-label { color: var(--muted); font-size: 0.83rem; }
.sort-select {
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 0.85rem; outline: none;
  cursor: pointer;
}
.sort-select:focus { border-color: var(--accent); }

.switch { position: relative; display: inline-block; width: 42px; height: 23px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); transition: 0.25s;
}
.switch .slider::before {
  content: ''; position: absolute; width: 17px; height: 17px; border-radius: 50%;
  left: 3px; top: 3px; background: #fff; transition: 0.25s;
}
.switch input:checked + .slider { background: var(--accent-grad); }
.switch input:checked + .slider::before { transform: translateX(19px); }
.switch.small { width: 34px; height: 19px; }
.switch.small .slider::before { width: 13px; height: 13px; }
.switch.small input:checked + .slider::before { transform: translateX(15px); }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 18px;
}
.grid .card { animation-duration: 0.45s; }

.empty-state { text-align: center; padding: 60px 0; color: var(--muted); }
.empty-emoji { font-size: 2.6rem; display: block; margin-bottom: 12px; }

/* ═══════════════ SCHEDULE ═══════════════ */
.schedule-section { max-width: 1380px; margin: 0 auto; padding: 40px 26px 10px; scroll-margin-top: 80px; }
.schedule-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px;
  padding-bottom: 26px;
}
.sched-day {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; transition: transform 0.25s, border-color 0.25s;
}
.sched-day:hover { transform: translateY(-4px); border-color: rgba(255, 77, 126, 0.4); }
.sched-day h4 { font-family: var(--font-head); font-size: 1.05rem; letter-spacing: 1px; margin-bottom: 10px; color: var(--accent); }
.sched-day ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.sched-day li { font-size: 0.83rem; color: #c3cad9; display: flex; align-items: center; gap: 8px; }
.sched-day li::before { content: '▸'; color: var(--muted); font-size: 0.7rem; }
.sched-day li b { color: var(--text); font-weight: 600; }

/* ═══════════════ FOOTER ═══════════════ */
.footer { margin-top: 50px; border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-inner {
  max-width: 1380px; margin: 0 auto; padding: 40px 26px 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px;
}
.footer-brand { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; }
.footer-desc { color: var(--muted); font-size: 0.82rem; line-height: 1.6; max-width: 380px; margin-top: 10px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--muted); font-size: 0.85rem; transition: color 0.2s, padding-left 0.2s; }
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.footer-copy { text-align: center; color: #5b6476; font-size: 0.76rem; padding: 0 20px 26px; }

/* ═══════════════ AUTH MODAL + USER CHIP ═══════════════ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(4, 6, 10, 0.72); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.auth-modal {
  position: relative; width: min(400px, 100%);
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 34px 30px 26px; box-shadow: var(--shadow);
  animation: modalPop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
@keyframes modalPop { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }

.auth-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.07);
  color: var(--muted); font-size: 0.85rem; transition: background 0.2s, color 0.2s;
}
.auth-close:hover { background: rgba(255, 255, 255, 0.16); color: var(--text); }

.auth-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: rgba(255, 255, 255, 0.05); padding: 5px; border-radius: 12px; margin-bottom: 22px; }
.auth-tab {
  padding: 9px; border: none; border-radius: 9px; background: none;
  color: var(--muted); font-weight: 600; font-size: 0.88rem; transition: all 0.2s;
}
.auth-tab.active { background: var(--accent-grad); color: #fff; box-shadow: 0 4px 14px rgba(255, 77, 126, 0.35); }

.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-label { color: var(--muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.6px; margin-top: 6px; }
.auth-input {
  padding: 13px 16px; border-radius: 11px; outline: none;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  font-size: 0.92rem; transition: border-color 0.25s, box-shadow 0.25s;
}
.auth-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 77, 126, 0.15); }
.auth-submit { justify-content: center; margin-top: 16px; padding: 13px; }
.auth-submit:disabled { opacity: 0.6; cursor: wait; }

.auth-error { color: #ff6b6b; font-size: 0.82rem; min-height: 18px; margin-top: 4px; }
.auth-error.ok { color: var(--green); }
.auth-note { color: var(--muted); font-size: 0.78rem; text-align: center; margin-top: 2px; }
.auth-power { color: #5b6476; font-size: 0.7rem; text-align: center; margin-top: 16px; letter-spacing: 0.5px; }

.nav-user { display: flex; align-items: center; }
.nav-demo-chip {
  padding: 6px 12px; border-radius: 999px; font-size: 0.72rem; font-weight: 600;
  color: var(--gold); border: 1px dashed rgba(255, 201, 60, 0.4);
  background: rgba(255, 201, 60, 0.07); cursor: help;
}
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }

.user-chip {
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 6px 12px 6px 6px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s, background 0.2s;
}
.user-chip:hover { border-color: rgba(255, 77, 126, 0.5); background: rgba(255, 255, 255, 0.09); }
.avatar-sm {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.8rem;
  background: var(--accent-grad);
}
.user-name { font-size: 0.82rem; font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-caret { color: var(--muted); font-size: 0.7rem; }
.user-menu {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; box-shadow: var(--shadow); animation: menuIn 0.18s ease;
}
.user-menu-head { padding: 8px 12px; font-size: 0.78rem; color: var(--muted); word-break: break-all; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-btn-plain {
  display: block; width: 100%; text-align: left; padding: 9px 12px;
  background: none; border: none; color: #ff6b6b; border-radius: 8px;
  font-size: 0.85rem; font-weight: 600; transition: background 0.15s;
}
.menu-btn-plain:hover { background: rgba(255, 107, 107, 0.1); }

.comments-empty { color: var(--muted); font-size: 0.86rem; padding: 10px 0; }

/* ═══════════════ TOAST ═══════════════ */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px);
  z-index: 500; background: var(--surface); border: 1px solid rgba(255, 77, 126, 0.45);
  color: var(--text); padding: 12px 22px; border-radius: 999px;
  font-size: 0.86rem; font-weight: 500; opacity: 0; pointer-events: none;
  box-shadow: var(--shadow); transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.3s;
  backdrop-filter: blur(10px);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ═══════════════════════════════════════════════
   WATCH PAGE
   ═══════════════════════════════════════════════ */
.watch-page { background: var(--bg); }
.watch-main { max-width: 1380px; margin: 0 auto; padding: calc(var(--navbar-h) + 24px) 26px 0; }

.watch-layout { display: grid; grid-template-columns: 1fr 330px; gap: 24px; align-items: start; }

/* ── player shell ── */
.video-shell {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: #000; aspect-ratio: 16 / 9;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.player-gradient {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(140deg, var(--c1, #1b1b4b), var(--c2, #7a5cff));
  animation: heroDrift 14s ease-in-out infinite alternate;
}
.video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }

.subtitle-layer {
  position: absolute; left: 0; right: 0; bottom: 78px; z-index: 4;
  text-align: center; pointer-events: none;
}
.subtitle-layer span {
  display: inline-block; background: rgba(0, 0, 0, 0.78); color: #fff;
  padding: 7px 16px; border-radius: 8px; font-size: clamp(0.9rem, 2.2vw, 1.25rem);
  font-weight: 500; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  animation: subIn 0.25s ease;
  max-width: 90%;
}
@keyframes subIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.big-play {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.35); opacity: 0; pointer-events: none;
  transition: opacity 0.3s; cursor: pointer;
}
.big-play.visible { opacity: 1; pointer-events: auto; }
.big-play svg {
  width: 88px; height: 88px; color: #fff; filter: drop-shadow(0 10px 30px rgba(255, 77, 126, 0.6));
  transform: scale(0.85); transition: transform 0.25s;
}
.big-play.visible:hover svg { transform: scale(1); }

.spinner {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.5);
}
.spinner::after {
  content: ''; width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── controls ── */
.controls {
  position: absolute; inset: auto 0 0 0; z-index: 6;
  padding: 40px 18px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82) 70%);
  opacity: 0; transform: translateY(10px); transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.controls.show { opacity: 1; transform: none; pointer-events: auto; }
.controls.show .controls-glow { opacity: 1; }
.controls-glow {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(ellipse at 50% 110%, rgba(122, 92, 255, 0.25), transparent 60%);
}

.progress-row { position: relative; margin-bottom: 12px; cursor: pointer; padding: 8px 0; }
.progress {
  position: relative; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.22);
  transition: height 0.15s;
}
.progress-row:hover .progress { height: 7px; }
.progress-buffer { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: rgba(255, 255, 255, 0.32); width: 0; }
.progress-played {
  position: absolute; inset: 0 auto 0 0; border-radius: 5px; width: 0;
  background: var(--accent-grad); box-shadow: 0 0 12px rgba(255, 77, 126, 0.7);
}
.progress-thumb {
  position: absolute; top: 50%; left: 0; width: 15px; height: 15px; border-radius: 50%;
  background: #fff; transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); transition: transform 0.15s;
}
.progress-row:hover .progress-thumb { transform: translate(-50%, -50%) scale(1); }
.time-tip {
  position: absolute; bottom: 26px; left: 0; padding: 4px 10px; border-radius: 7px;
  background: rgba(0, 0, 0, 0.85); font-size: 0.75rem; font-weight: 600;
  opacity: 0; pointer-events: none; white-space: nowrap;
}
.time-tip.show { opacity: 1; }

.controls-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.controls-left, .controls-right { display: flex; align-items: center; gap: 6px; }

.ctl {
  position: relative; background: none; border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; transition: background 0.2s, transform 0.15s;
}
.ctl:hover { background: rgba(255, 255, 255, 0.12); transform: scale(1.06); }
.ctl svg { width: 22px; height: 22px; }
.ctl .ic-pause { display: none; }
.playing .ic-pause { display: block; }
.playing .ic-play { display: none; }
.ctl .ic-mute { display: none; }
.muted .ic-vol { display: none; }
.muted .ic-mute { display: block; }

#speedBtn { font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: 1px; }

.volume-wrap { display: flex; align-items: center; gap: 4px; }
.volume {
  width: 0; opacity: 0; appearance: none; height: 4px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.3); outline: none; transition: width 0.25s, opacity 0.25s;
}
.volume-wrap:hover .volume { width: 76px; opacity: 1; }
.volume::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; cursor: pointer; }

.time-display { color: #dfe4ee; font-size: 0.8rem; font-weight: 500; margin-left: 4px; letter-spacing: 0.5px; }

/* menus */
.menu {
  position: absolute; bottom: 68px; right: 18px; z-index: 7; min-width: 170px;
  background: rgba(15, 18, 26, 0.95); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: 12px; padding: 8px;
  box-shadow: var(--shadow); animation: menuIn 0.18s ease;
}
.menu-speed { right: 60px; }
@keyframes menuIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.menu-title { font-size: 0.7rem; letter-spacing: 1.6px; color: var(--muted); padding: 8px 12px 6px; font-weight: 600; }
.menu-item {
  display: block; width: 100%; text-align: left; padding: 9px 12px;
  background: none; border: none; color: var(--text); border-radius: 8px;
  font-size: 0.86rem; font-weight: 500; transition: background 0.15s, color 0.15s;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.08); }
.menu-item.active { color: var(--accent); font-weight: 600; }
.menu-item.active::after { content: ' ✓'; }

/* ── watch info ── */
.watch-info { margin-top: 26px; }
.watch-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.watch-title { font-family: var(--font-head); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: 0.5px; }
.watch-jp { color: var(--muted); margin-top: 4px; letter-spacing: 2px; font-size: 0.92rem; }
.watch-meta { display: flex; flex-wrap: wrap; gap: 9px; margin: 16px 0; }
.episode-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 16px; margin: 18px 0;
  flex-wrap: wrap; gap: 12px;
}
.ep-num { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: 1px; color: var(--accent); }
.ep-actions { display: flex; gap: 10px; }
.ep-actions .btn { padding: 8px 16px; font-size: 0.84rem; }
#prevEp:disabled, #nextEp:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none; }
.watch-desc { color: #b9c0d2; line-height: 1.7; font-size: 0.93rem; max-width: 860px; }

/* ── comments ── */
.comments { margin-top: 34px; max-width: 860px; }
.comments-title { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: 0.5px; margin-bottom: 16px; }
.comments-count {
  font-size: 0.8rem; color: var(--muted); background: rgba(255, 255, 255, 0.07);
  padding: 2px 10px; border-radius: 999px; vertical-align: middle; font-family: var(--font-body);
}
.comment-form { display: flex; gap: 10px; margin-bottom: 20px; }
.comment-form input {
  flex: 1; padding: 13px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 0.88rem; outline: none; transition: border-color 0.25s;
}
.comment-form input:focus { border-color: var(--accent); }
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment {
  display: flex; gap: 13px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px;
  animation: cardIn 0.35s ease;
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; color: #fff;
  background: var(--accent-grad);
}
.comment-body { flex: 1; min-width: 0; }
.comment-name { font-weight: 600; font-size: 0.86rem; display: flex; gap: 10px; align-items: baseline; }
.comment-time { color: var(--muted); font-size: 0.7rem; font-weight: 400; }
.comment-text { color: #c6cddc; font-size: 0.87rem; margin-top: 4px; line-height: 1.55; word-break: break-word; }

/* ── episode sidebar ── */
.episodes-sidebar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; position: sticky; top: 84px; max-height: calc(100vh - 110px);
  display: flex; flex-direction: column;
}
.sidebar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.sidebar-title { font-family: var(--font-head); font-size: 1.15rem; letter-spacing: 0.5px; }
.autoplay { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.78rem; }
.episode-list { overflow-y: auto; display: flex; flex-direction: column; gap: 7px; padding-right: 4px; }
.episode-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.episode-item:hover { background: rgba(255, 255, 255, 0.06); transform: translateX(3px); }
.episode-item.active { background: rgba(255, 77, 126, 0.12); border-color: rgba(255, 77, 126, 0.4); }
.ep-thumb {
  width: 74px; height: 42px; border-radius: 7px; flex-shrink: 0;
  background: linear-gradient(140deg, var(--c1), var(--c2));
  display: grid; place-items: center; color: #fff; font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.5px;
}
.ep-info { flex: 1; min-width: 0; }
.ep-name { font-size: 0.84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-meta { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }
.ep-play { color: var(--muted); font-size: 0.8rem; opacity: 0; transition: opacity 0.2s, color 0.2s; }
.episode-item:hover .ep-play { opacity: 1; }
.episode-item.active .ep-play { opacity: 1; color: var(--accent); }
.episode-item.more-item { justify-content: center; color: var(--muted); font-size: 0.8rem; cursor: default; }
.episode-item.more-item:hover { background: none; transform: none; }

/* ── related ── */
.related-section { padding-top: 48px; }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1180px) {
  .watch-layout { grid-template-columns: 1fr; }
  .episodes-sidebar { position: static; max-height: none; }
  .episode-list { flex-direction: row; overflow-x: auto; }
  .episode-item { min-width: 230px; }
}

@media (max-width: 960px) {
  .nav-links, .search-box { display: none; }
  .menu-btn { display: grid; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .nav-inner { padding: 0 16px; gap: 10px; }
  .nav-cta { display: none; }
  .hero { padding: 0 18px; min-height: 78vh; }
  .row-section, .catalog-section, .schedule-section, .watch-main { padding-left: 16px; padding-right: 16px; }
  .row-scroll { grid-auto-columns: 148px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .watch-title-row .btn { width: 100%; justify-content: center; }
  .comment-form { flex-direction: column; }
}
