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

:root {
  color-scheme: dark;
  --bg:        #080810;
  --bg-elev:   #0e0e1a;
  --bg-soft:   #141422;
  --bg-card:   #111120;
  --line:      rgba(255,255,255,0.07);
  --line-glow: rgba(220,80,80,0.18);
  --text:      #f0f0f6;
  --muted:     #9090a8;
  --muted-2:   #606078;
  --accent:    #e84040;
  --accent-2:  #ff6a50;
  --accent-3:  #ffb86c;
  --glow:      rgba(232,64,64,0.18);
  --glow-lg:   rgba(232,64,64,0.08);
  --success:   #22d98a;
  --warning:   #ffb200;
  --radius-2xl:28px;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --sidebar-w: 260px;
  --topbar-h:  68px;
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.4);
  --shadow:    0 12px 40px rgba(0,0,0,0.55);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.7);
  font-family: 'Sora', ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: 'cv01','cv02','cv03';
}

/* ───────── Reset ───────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  background-image:
    radial-gradient(ellipse 60% 50% at 10% 0%, rgba(232,64,64,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 90% 100%, rgba(255,80,64,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 80% 40% at 50% 50%, rgba(20,20,60,0.4) 0%, transparent 80%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
#app { min-height: 100%; min-width: 0; overflow-x: clip; }

/* ───────── App Shell ───────── */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}

/* ───────── Sidebar ───────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 12px 16px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10,10,22,0.97) 0%, rgba(8,8,16,0.97) 100%);
  backdrop-filter: blur(32px) saturate(1.5);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(232,64,64,0.3), 0 8px 24px rgba(232,64,64,0.3);
  flex: 0 0 auto;
  transition: box-shadow 0.3s;
}
.brand-mark:hover {
  box-shadow: 0 0 0 1px rgba(232,64,64,0.5), 0 8px 32px rgba(232,64,64,0.45);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand h1 { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.brand p  { margin: 2px 0 0; font-size: 0.75rem; color: var(--muted); letter-spacing: 0.02em; }

.nav-group { display: grid; gap: 2px; margin-bottom: 4px; }
.nav-label {
  margin: 12px 12px 6px;
  font-size: 0.68rem;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.nav-link.active {
  color: #ffdcdc;
  background: rgba(232,64,64,0.12);
  border-color: rgba(232,64,64,0.2);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 25%; bottom: 25%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(232,64,64,0.6);
}
.nav-link .icon { width: 19px; height: 19px; flex: 0 0 auto; opacity: 0.85; }
.nav-link.active .icon { opacity: 1; }

.icon { width: 20px; height: 20px; display: block; flex: 0 0 auto; }
.brand-mark .icon { width: 22px; height: 22px; }
.search-submit .icon, .ghost-btn .icon, .primary-btn .icon,
.secondary-btn .icon, .small-btn .icon { width: 16px; height: 16px; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.sidebar-footer small { color: var(--muted-2); line-height: 1.6; font-size: 0.78rem; }

/* ───────── Main Area ───────── */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar, .topbar > *, .content, .page, .panel, .hero,
.watch-layout, .disclaimer-layout, .channel-hero { min-width: 0; }

/* ───────── Topbar ───────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(8,8,16,0.85);
  backdrop-filter: blur(28px) saturate(1.6);
}
.topbar .search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}
.search-input, .pill-input {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 18px;
  outline: none;
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search-input:focus, .pill-input:focus {
  border-color: rgba(232,64,64,0.5);
  background: rgba(232,64,64,0.05);
  box-shadow: 0 0 0 3px rgba(232,64,64,0.12);
}
.search-input::placeholder { color: var(--muted-2); }

/* ───────── Buttons ───────── */
.search-submit, .primary-btn, .secondary-btn, .ghost-btn, .chip, .small-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  transition: transform 0.15s, filter 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}
.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 20px rgba(232,64,64,0.28);
  font-weight: 600;
}
.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(232,64,64,0.38);
  filter: brightness(1.06);
}
.search-submit:hover, .secondary-btn:hover, .ghost-btn:hover, .small-btn:hover, .chip:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.09);
}
.secondary-btn { border-color: var(--line); }
.ghost-btn { background: transparent; border-color: var(--line); }

/* ───────── Top Actions / User Chip ───────── */
.top-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  transition: border-color 0.2s;
}
.user-chip:hover { border-color: var(--line-glow); }
.user-chip img, .user-chip .avatar {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
}
.user-chip .avatar { display: grid; place-items: center; font-weight: 700; color: white; font-size: 0.85rem; }
.user-chip .meta { display: grid; line-height: 1.1; }
.user-chip .meta strong { font-size: 0.88rem; font-weight: 600; }
.user-chip .meta span { font-size: 0.75rem; color: var(--muted); }

/* ───────── Mobile Nav ───────── */
.mobile-nav {
  display: none;
  position: sticky;
  bottom: 0;
  z-index: 40;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(8,8,16,0.94);
  backdrop-filter: blur(24px);
}
.mobile-nav .mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.mobile-nav .nav-link {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  font-size: 0.72rem;
  padding: 9px 6px;
  gap: 5px;
  border-radius: var(--radius-sm);
}
.mobile-nav .nav-link .label { line-height: 1; }

/* ───────── Content & Page ───────── */
.content { min-width: 0; padding: 20px 24px 40px; }
.page { display: grid; gap: 28px; }
.panel {
  border: 1px solid var(--line);
  background: rgba(14,14,26,0.7);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

/* ───────── Hero ───────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 20px;
}
.hero-copy {
  padding: 36px;
  display: grid;
  gap: 18px;
  align-content: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  color: #ffd4d4;
  background: rgba(232,64,64,0.12);
  border: 1px solid rgba(232,64,64,0.22);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hero h2, .section-title, .watch-title { margin: 0; }
.hero h2 {
  font-size: clamp(1.9rem, 3.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 40%, rgba(255,200,200,0.85));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 60ch;
  font-size: 0.95rem;
}
.hero-actions, .inline-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.stat {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}
.stat strong { display: block; font-size: 1.2rem; font-weight: 700; }
.stat span { color: var(--muted); font-size: 0.8rem; margin-top: 2px; display: block; }

.highlight-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 340px;
}
.highlight-media {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0a0a14;
  flex: 1;
}
.highlight-media img, .card-thumb img, .channel-avatar img { width: 100%; height: 100%; object-fit: cover; }
.highlight-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,16,0.6) 0%, transparent 50%);
  pointer-events: none;
}
.duration-badge, .live-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
  z-index: 1;
  backdrop-filter: blur(4px);
}
.live-badge { left: 10px; right: auto; background: rgba(232,64,64,0.9); color: #fff; }
.highlight-body { display: grid; gap: 12px; padding: 20px; }
.highlight-body h3, .card-title, .watch-title, .channel-name { margin: 0; font-size: 1.06rem; line-height: 1.4; font-weight: 600; }
.meta-row, .card-meta, .channel-meta, .watch-meta, .comment-meta, .section-subtitle {
  color: var(--muted); font-size: 0.84rem; line-height: 1.5;
}

/* ───────── Chip Row ───────── */
.chip-row {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap;
  padding: 9px 16px;
  border-color: var(--line);
  font-size: 0.86rem;
  font-weight: 500;
}
.chip.active {
  background: rgba(232,64,64,0.14);
  border-color: rgba(232,64,64,0.3);
  color: #ffdcdc;
}

/* ───────── Section ───────── */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.section-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.section-subtitle { margin-top: 4px; }

/* ───────── Video Grid ───────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card-pressable {
  display: block; width: 100%; padding: 0; border: 0;
  background: transparent; color: inherit; text-align: left;
}
.card-pressable:focus-visible {
  outline: 2px solid rgba(232,64,64,0.6);
  outline-offset: 3px;
  border-radius: inherit;
}

/* ───────── Video Card ───────── */
.video-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-card);
  transition: transform 0.2s cubic-bezier(0.25,0.46,0.45,0.94),
              border-color 0.2s, box-shadow 0.2s;
}
.video-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232,64,64,0.2);
  box-shadow: 0 12px 36px rgba(0,0,0,0.4), 0 0 0 1px rgba(232,64,64,0.08);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #0a0a16;
  overflow: hidden;
}
.card-thumb img { transition: transform 0.35s ease; }
.video-card:hover .card-thumb img { transform: scale(1.03); }

.card-body { padding: 12px 13px 14px; display: grid; gap: 10px; }
.card-top { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 11px; }

.channel-avatar {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(145deg, rgba(232,64,64,0.85), rgba(255,154,154,0.8));
  flex: 0 0 auto; display: grid; place-items: center;
}
.channel-avatar .avatar { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; }

.card-title { font-size: 0.92rem; font-weight: 600; line-height: 1.4; }
.card-meta { display: flex; flex-wrap: wrap; gap: 3px 8px; color: var(--muted); font-size: 0.8rem; }
.card-meta span { position: relative; }
.card-meta span:not(:last-child)::after {
  content: '·'; margin-left: 8px; color: var(--muted-2);
}
.card-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 13px 12px; }
.small-btn { padding: 7px 12px; font-size: 0.8rem; font-weight: 500; }
.small-btn[data-saved="true"] { background: rgba(232,64,64,0.14); border-color: rgba(232,64,64,0.28); color: #ffd8d8; }

/* ───────── Shorts ───────── */
.short-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(148px, 178px);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.short-card { overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-card); }
.short-card .card-thumb { aspect-ratio: 9/16; }
.short-card .card-body { gap: 6px; padding: 10px 11px 11px; }
.short-card .card-title { font-size: 0.84rem; }

/* ───────── Watch Layout ───────── */
.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
  gap: 20px;
}
.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: #000;
  box-shadow: var(--shadow);
}
.player-wrap iframe { width: 100%; height: 100%; border: 0; }

.watch-main, .watch-side, .channel-banner, .comments-panel,
.library-section, .auth-panel, .notice-panel, .empty-state { display: grid; gap: 16px; }
.watch-main > .panel, .watch-side > .panel, .library-section > .panel,
.comments-panel > .panel, .auth-panel > .panel, .notice-panel > .panel,
.empty-state > .panel { padding: 20px; }

.watch-title { font-size: clamp(1.3rem, 2.5vw, 1.85rem); line-height: 1.2; font-weight: 700; letter-spacing: -0.025em; }
.watch-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 0.88rem; }
.watch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.watch-channel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}
.watch-channel .channel-avatar { width: 52px; height: 52px; }
.watch-channel .channel-name { font-size: 1rem; font-weight: 700; }
.watch-desc { white-space: pre-wrap; line-height: 1.75; color: #ccccd8; font-size: 0.92rem; }

/* ───────── Comments ───────── */
.comments-list { display: grid; gap: 12px; }
.comment {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  transition: background 0.15s;
}
.comment:hover { background: rgba(255,255,255,0.03); }
.comment .avatar {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(145deg, rgba(232,64,64,0.85), rgba(255,177,177,0.8));
  display: grid; place-items: center; flex: 0 0 auto;
}
.comment .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.comment .text { line-height: 1.7; color: #d8d8e8; white-space: pre-wrap; font-size: 0.9rem; }

/* ───────── Related Cards ───────── */
.related-list { display: grid; gap: 10px; }
.related-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 11px;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.related-card:hover { border-color: var(--line); background: rgba(255,255,255,0.025); }
.related-thumb {
  position: relative; border-radius: 10px; overflow: hidden;
  aspect-ratio: 16/9; background: #0a0a14;
}
.related-info { display: grid; align-content: start; gap: 5px; padding-top: 2px; }
.related-info .card-title { font-size: 0.86rem; line-height: 1.4; }
.related-meta { display: flex; flex-wrap: wrap; gap: 4px; font-size: 0.78rem; color: var(--muted); }

/* ───────── Channel ───────── */
.channel-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
}
.channel-hero .channel-avatar { width: 88px; height: 88px; border: 2px solid var(--line); box-shadow: var(--shadow); }
.channel-banner-box {
  height: 200px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(232,64,64,0.22), rgba(8,8,24,0.8));
  position: relative;
  border-bottom: 1px solid var(--line);
}
.channel-banner-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(232,64,64,0.3) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(100,100,240,0.15) 0%, transparent 35%);
}
.channel-banner-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(8,8,16,0.7) 100%);
}
.channel-hero .channel-info { display: grid; gap: 8px; }
.channel-hero .channel-name { font-size: clamp(1.4rem, 2.8vw, 2rem); font-weight: 800; letter-spacing: -0.03em; }
.uploads-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

/* ───────── Notice Grid ───────── */
.notice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.notice-card {
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.025);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s;
}
.notice-card:hover { border-color: var(--line-glow); }
.notice-card h4 { margin: 0 0 8px; font-size: 0.94rem; font-weight: 600; }
.notice-card p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 0.86rem; }

/* ───────── Empty State ───────── */
.empty-state { place-items: center; text-align: center; padding: 48px 14px; }
.empty-state .panel { max-width: 660px; width: 100%; padding: 40px 32px; }
.empty-state h3 { margin: 0; font-size: 1.4rem; font-weight: 700; }
.empty-state p { margin: 0; color: var(--muted); line-height: 1.75; }

/* ───────── Modal ───────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  display: none; place-items: center;
  padding: 20px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(14px);
}
.modal-backdrop.open { display: grid; animation: fadeIn 0.22s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(900px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(12,12,22,0.98);
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 0 1px rgba(232,64,64,0.08);
  animation: slideUp 0.24s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  background: rgba(12,12,22,0.95);
  backdrop-filter: blur(10px);
  z-index: 2;
}
.modal-body { padding: 24px; display: grid; gap: 20px; }
.modal h3 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.modal p { margin: 0; color: var(--muted); line-height: 1.75; }

/* ───────── Disclaimer ───────── */
.disclaimer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
}
.disclaimer-card, .login-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.025);
}
.disclaimer-actions, .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.disclaimer-steps { display: grid; gap: 10px; }
.step {
  display: flex; gap: 13px; padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
}
.step strong { display: block; font-weight: 600; font-size: 0.92rem; }
.step span { display: block; color: var(--muted); line-height: 1.6; margin-top: 3px; font-size: 0.85rem; }
.step-index {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(232,64,64,0.14); color: #ffd9d9;
  font-weight: 700; flex: 0 0 auto; font-size: 0.85rem;
}

/* ───────── Login Code ───────── */
.login-code { display: grid; gap: 14px; align-content: start; }
.code-box {
  display: grid; gap: 12px; padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(232,64,64,0.1), rgba(255,255,255,0.025));
  border: 1px solid rgba(232,64,64,0.2);
}
.code-box code {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: 0.22em;
  font-weight: 700;
  color: #ffdcdc;
}
.code-box a { color: #ffd6d6; text-decoration: underline; font-size: 0.88rem; }
.status-line { color: var(--muted); min-height: 1.5em; font-size: 0.88rem; }
.progress {
  height: 4px; border-radius: 999px;
  background: rgba(255,255,255,0.08); overflow: hidden;
}
.progress > span {
  display: block; height: 100%; width: 28%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: pulse 1.4s ease-in-out infinite alternate;
}
@keyframes pulse { from { transform: translateX(-18%); } to { transform: translateX(320%); } }

/* ───────── Toast ───────── */
.toast-wrap {
  position: fixed; left: 18px; bottom: 18px; z-index: 120;
  display: grid; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(14,14,24,0.97);
  box-shadow: var(--shadow);
  min-width: 220px; max-width: 340px;
  transition: opacity 0.25s, transform 0.25s;
  backdrop-filter: blur(20px);
  animation: toastIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast strong { display: block; margin-bottom: 3px; font-size: 0.9rem; }
.toast p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 0.83rem; }

/* ───────── Skeleton ───────── */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 0%,
    rgba(255,255,255,0.07) 50%,
    rgba(255,255,255,0.03) 100%);
  background-size: 240% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-md);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skeleton-card { display: grid; gap: 12px; border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 12px; }
.skeleton-thumb { aspect-ratio: 16/9; border-radius: var(--radius-md); }
.skeleton-line { height: 13px; }
.skeleton-line.short { width: 65%; }
.skeleton-avatar { width: 38px; height: 38px; border-radius: 50%; }

/* ───────── Route Banner ───────── */
.route-banner-inner {
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 4px;
}

/* ───────── Responsive ───────── */
@media (max-width: 1280px) {
  .video-grid, .uploads-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .watch-layout { grid-template-columns: 1fr; }
  .watch-side { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .watch-side > .panel:first-child { grid-column: 1 / -1; }
  .hero { grid-template-columns: 1fr; }
  .notice-grid { grid-template-columns: repeat(2, 1fr); }
  .disclaimer-layout { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; overflow-x: clip; }
  .sidebar { display: none; }
  .topbar {
    height: auto;
    display: flex; flex-direction: column; align-items: stretch; gap: 10px;
    padding: 12px 14px;
  }
  .topbar .search-form { width: 100%; max-width: none; margin: 0; }
  .top-actions { justify-content: flex-start; }
  .content { padding: 14px 14px 32px; }
  .mobile-nav { display: block; }
  .video-grid, .uploads-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel-hero { grid-template-columns: 1fr; }
  .watch-side { grid-template-columns: 1fr; }
  .watch-channel { grid-template-columns: auto 1fr; }
  .watch-channel > *:last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .video-grid, .uploads-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 22px; }
  .hero h2 { font-size: 1.85rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .notice-grid { grid-template-columns: 1fr; }
  .topbar { padding: 10px 12px; }
  .modal { border-radius: var(--radius-xl); }
  .modal-body { padding: 16px; }
  .related-card { grid-template-columns: 120px 1fr; }
  .channel-hero { padding: 16px; }
}
@media (max-width: 400px) {
  .hero-stats { grid-template-columns: 1fr; }
  .short-strip { grid-auto-columns: minmax(130px, 160px); }
}
