/* ── Tuberalytics Custom Styles ── */
/* Extracted from theme-d-viewfinder mockup */

:root {
  --yt-bg: #0f0f0f;
  --yt-surface: #1a1a1a;
  --yt-card: #212121;
  --yt-hover: #272727;
  --yt-border: #303030;
  --yt-text: #f1f1f1;
  --yt-text-muted: #aaaaaa;
  --yt-red: #ff0000;
  --yt-red-hover: #cc0000;
  --yt-red-glow: rgba(255, 0, 0, 0.3);
  --yt-blue: #3ea6ff;
  --yt-green: #2ba640;
  --yt-pill: #303030;
  --yt-pill-active: #f1f1f1;
  --font-body: 'Barlow', sans-serif;
  --font-display: 'Bebas Neue', sans-serif;
}

/* ── Light Theme ── */
html[data-theme="light"] {
  --yt-bg: #f6f8fa;
  --yt-surface: #eef1f5;
  --yt-card: #ffffff;
  --yt-hover: #e8ecf0;
  --yt-border: #d1d5db;
  --yt-text: #1f2328;
  --yt-text-muted: #4b5563;
  --yt-blue: #0969da;
  --yt-red: #cf222e;
  --yt-red-hover: #a40e26;
  --yt-red-glow: rgba(207, 34, 46, 0.2);
  --yt-green: #1a7f37;
  --yt-pill: #e8ecf1;
  --yt-pill-active: #1f2328;
}

/* Light theme: keep nav dark */
html[data-theme="light"] nav.site-nav { background: rgba(15, 15, 15, 0.95); border-bottom-color: #303030; }
html[data-theme="light"] nav.site-nav,
html[data-theme="light"] nav.site-nav .nav-link,
html[data-theme="light"] nav.site-nav .nav-cta,
html[data-theme="light"] nav.site-nav a { color: #f1f1f1; }
html[data-theme="light"] nav.site-nav .nav-link--active { color: #ffffff; }
html[data-theme="light"] nav.site-nav .nav-cta { background: #ff0000; color: white; }

/* Light theme: keep footer dark */
html[data-theme="light"] .site-footer { background: #0f0f0f; border-top-color: #303030; }
html[data-theme="light"] .site-footer,
html[data-theme="light"] .site-footer a,
html[data-theme="light"] .site-footer span { color: #aaaaaa; }

/* ── Theme Toggle ── */
.docs-theme-toggle { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; color: #aaaaaa; cursor: pointer; transition: all 0.15s; }
.docs-theme-toggle:hover { color: #f1f1f1; border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.12); }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--yt-bg);
  color: var(--yt-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.site-content {
  min-height: calc(100vh - 56px);
}

/* ── FILM GRAIN ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: 0.035;
  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.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── NAV (YouTube-style) ── */
nav.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--yt-border);
  height: 56px;
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo styled like YouTube logo area */
.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--yt-text);
}

.logo-icon {
  width: 32px;
  height: 32px;
  position: relative;
  flex-shrink: 0;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
  line-height: 1;
}

.logo-wordmark .red { color: var(--yt-red); }

/* YouTube-style search bar */
.nav-search {
  display: flex;
  align-items: center;
  max-width: 540px;
  flex: 1;
  margin: 0 32px;
}

.nav-search-input {
  flex: 1;
  height: 40px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-right: none;
  border-radius: 20px 0 0 20px;
  padding: 0 16px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--yt-text);
  outline: none;
}

.nav-search-input::placeholder { color: var(--yt-text-muted); }
.nav-search-input:focus { border-color: var(--yt-blue); }

.nav-search-btn {
  height: 40px;
  width: 64px;
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 0 20px 20px 0;
  color: var(--yt-text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yt-red);
  color: white;
  padding: 8px 16px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-cta:hover { background: var(--yt-red-hover); }

.nav-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--yt-text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.nav-icon-btn:hover { background: var(--yt-hover); }

/* ── APP SIDEBAR (logged-in users) ── */
.app-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 220px; background: var(--yt-surface); border-right: 1px solid var(--yt-border); display: flex; flex-direction: column; z-index: 100; overflow-y: auto; transition: width 0.2s ease; }
.app-sidebar--collapsed { width: 56px; }
.app-sidebar-top { flex: 1; }
.app-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 0; min-height: 48px; }
.app-sidebar-brand { display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.app-sidebar-brand .logo { white-space: nowrap; }
.app-sidebar-toggle { background: none; border: none; color: var(--yt-text-muted); cursor: pointer; padding: 6px; border-radius: 6px; transition: all 0.15s; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.app-sidebar-toggle:hover { background: var(--yt-hover); color: var(--yt-text); }
.app-sidebar-link { display: flex; align-items: center; gap: 10px; padding: 7px 16px; font-size: 13px; font-weight: 500; color: var(--yt-text-muted); text-decoration: none; transition: all 0.15s; border-left: 3px solid transparent; white-space: nowrap; overflow: hidden; }
.app-sidebar-link:hover { background: var(--yt-hover); color: var(--yt-text); }
.app-sidebar-link--active { color: white; border-left-color: var(--yt-red); background: var(--yt-hover); }
.app-sidebar-icon { width: 16px; height: 16px; flex-shrink: 0; }
.app-sidebar-user { border-top: 1px solid var(--yt-border); padding-top: 12px; }
.app-sidebar-email { font-size: 12px; color: var(--yt-text-muted); padding: 0 16px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar-signout { display: flex; align-items: center; gap: 8px; width: calc(100% - 24px); margin: 0 12px 12px; padding: 6px 8px; background: none; border: 1px solid var(--yt-border); border-radius: 6px; color: var(--yt-text-muted); font-size: 12px; font-weight: 500; font-family: var(--font-body); cursor: pointer; transition: all 0.15s; white-space: nowrap; overflow: hidden; }
.app-sidebar-signout:hover { background: var(--yt-hover); color: var(--yt-text); }

/* Collapsed state */
.app-sidebar--collapsed .app-sidebar-header { justify-content: center; padding: 12px 0 0; }
.app-sidebar--collapsed .app-sidebar-link { justify-content: center; padding: 9px 0; border-left: none; }
.app-sidebar--collapsed .app-sidebar-link--active { background: var(--yt-hover); border-left: none; position: relative; }
.app-sidebar--collapsed .app-sidebar-link--active::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; background: var(--yt-red); border-radius: 0 2px 2px 0; }
.app-sidebar--collapsed .app-sidebar-signout { justify-content: center; width: calc(100% - 16px); margin: 0 8px 12px; padding: 6px; }
.app-sidebar--collapsed .app-sidebar-channels { display: none; }
.app-sidebar--collapsed .app-sidebar-subtabs { display: none; }

/* Sidebar channel sub-links */
.app-sidebar-channels { padding: 2px 0 4px 0; }
.app-sidebar-channel { display: flex; align-items: center; gap: 8px; padding: 5px 16px 5px 32px; font-size: 12px; font-weight: 500; color: var(--yt-text-muted); text-decoration: none; transition: all 0.15s; border-left: 3px solid transparent; white-space: nowrap; overflow: hidden; }
.app-sidebar-channel:hover { background: var(--yt-hover); color: var(--yt-text); }
.app-sidebar-channel--active { color: white; border-left-color: var(--yt-red); background: var(--yt-hover); }
.app-sidebar-channel-avatar { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.app-sidebar-channel-name { overflow: hidden; text-overflow: ellipsis; }

/* Sidebar sub-tabs (channel tabs, niche tabs) */
.app-sidebar-subtabs { padding: 2px 0 4px 0; }
.app-sidebar-subtab { display: block; padding: 4px 16px 4px 44px; font-size: 11px; font-weight: 500; color: var(--yt-text-muted); text-decoration: none; transition: all 0.15s; }
.app-sidebar-subtab:hover { color: var(--yt-text); background: var(--yt-hover); }
.app-sidebar-subtab--active { color: var(--yt-red); }

.app-layout { padding-left: 220px; min-height: 100vh; transition: padding-left 0.2s ease; }
.app-layout--collapsed { padding-left: 56px; }
.app-container { max-width: 1440px; margin: 0 auto; padding: 32px 24px; }

/* ── HERO (split — text left, lens right) ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 48px 32px;
  position: relative;
  overflow: hidden;
}

.hero-split {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  max-width: 1200px;
  width: 100%;
}

.hero-text-col {
  flex: 1 1 auto;
  max-width: 600px;
}

/* Logo column — sized to match text height */
.hero-logo-col {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Cinematic glow behind lens */
.hero-logo-col::before {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 0, 0, 0.15) 0%,
    rgba(255, 0, 0, 0.06) 30%,
    rgba(62, 166, 255, 0.04) 50%,
    transparent 70%
  );
  animation: glowPulse 4s ease-in-out infinite;
  z-index: 0;
}

.hero-logo-col::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(62, 166, 255, 0.12) 0%,
    rgba(62, 166, 255, 0.04) 40%,
    transparent 65%
  );
  animation: glowPulse 4s ease-in-out infinite 2s;
  z-index: 0;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Lens flare streaks */
.lens-flare {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.lens-flare-h {
  width: 440px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,80,80,0.0) 15%, rgba(255,80,80,0.25) 35%, rgba(255,255,255,0.4) 50%, rgba(80,160,255,0.25) 65%, rgba(80,160,255,0.0) 85%, transparent 100%);
  filter: blur(1px);
  animation: flareShimmer 6s ease-in-out infinite;
}

.lens-flare-v {
  width: 2px;
  height: 280px;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.0) 20%, rgba(255,255,255,0.15) 45%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.15) 55%, rgba(255,255,255,0.0) 80%, transparent 100%);
  filter: blur(1px);
  animation: flareShimmer 6s ease-in-out infinite 1s;
}

.lens-flare-anamorphic {
  width: 480px;
  height: 24px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,60,60,0.0) 10%, rgba(255,100,80,0.06) 25%, rgba(255,200,150,0.08) 40%, rgba(255,255,255,0.1) 50%, rgba(150,200,255,0.08) 60%, rgba(80,120,255,0.06) 75%, rgba(80,120,255,0.0) 90%, transparent 100%);
  filter: blur(12px);
  animation: flareShimmer 8s ease-in-out infinite 0.5s;
}

@keyframes flareShimmer {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.hero-logo-img {
  width: 240px;
  height: 240px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  animation: lensFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 0 60px rgba(255, 0, 0, 0.1)) drop-shadow(0 0 120px rgba(62, 166, 255, 0.06));
}

@keyframes lensFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Inline stats above headline */
.hero-stats-inline {
  font-size: 13px;
  color: var(--yt-text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.hsi-dot {
  margin: 0 8px;
  opacity: 0.4;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: 3px;
  margin-bottom: 16px;
}

.hero h1 .red { color: var(--yt-red); }

.hero-sub {
  font-size: 16px;
  color: var(--yt-text-muted);
  max-width: 480px;
  margin-bottom: 24px;
  line-height: 1.6;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Pill chips (reusable) */
.pill {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: var(--yt-pill);
  color: var(--yt-text);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.pill.active {
  background: var(--yt-pill-active);
  color: var(--yt-bg);
}

.pill:hover:not(.active) { background: var(--yt-hover); }

.btn-yt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--yt-red);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-yt:hover {
  background: var(--yt-red-hover);
  box-shadow: 0 0 24px var(--yt-red-glow);
}

.btn-yt-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--yt-blue);
  border: 1px solid var(--yt-border);
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-yt-outline:hover {
  background: rgba(62, 166, 255, 0.08);
  border-color: var(--yt-blue);
}

/* ── STATS BAR (like YouTube channel stats) ── */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 20px 0;
  margin-top: 32px;
  width: 100%;
  max-width: 1280px;
  border-top: 1px solid var(--yt-border);
  position: relative;
  z-index: 2;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 1px;
  color: var(--yt-text);
}

.stat-label {
  font-size: 12px;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--yt-border);
}

/* ── BUILT FOR (ICP) SECTION ── */
.built-for-section {
  padding: 80px 24px;
  background: var(--yt-surface);
  border-top: 1px solid var(--yt-border);
  border-bottom: 1px solid var(--yt-border);
}

.built-for-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.built-for-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.built-for-card {
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 16px;
  padding: 36px 28px 28px;
  transition: all 0.3s;
  position: relative;
}

.built-for-card:hover {
  border-color: var(--yt-red);
  box-shadow: 0 0 32px rgba(255, 0, 0, 0.08);
}

.bfc-icon {
  color: var(--yt-red);
  margin-bottom: 20px;
}

.bfc-label {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--yt-text-muted);
  margin-bottom: 8px;
}

.built-for-card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1px;
  margin-bottom: 12px;
  line-height: 1.1;
}

.built-for-card p {
  font-size: 15px;
  color: var(--yt-text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.bfc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bfc-tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: var(--yt-pill);
  color: var(--yt-text-muted);
}

/* ── FEATURES TAB SHOWCASE ── */
.features-section {
  padding: 32px 24px 80px;
  position: relative;
}

.features-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-header {
  max-width: 1200px;
  margin: 0 auto 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 2px;
}

.section-pills {
  display: flex;
  gap: 8px;
}

/* Horizontal feature tabs — two rows of pills */
.features-tabs-horizontal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.features-tabs-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ftab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  background: transparent;
  color: var(--yt-text-muted);
  border: 1px solid var(--yt-border);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.ftab:hover {
  color: var(--yt-text);
  border-color: var(--yt-text-muted);
  background: var(--yt-surface);
}

.ftab.active {
  color: var(--yt-bg);
  background: var(--yt-pill-active);
  border-color: var(--yt-pill-active);
}

.ftab-icon {
  font-size: 14px;
}

/* Demo preview area */
.features-demo {
  max-width: 1080px;
  margin: 0 auto;
}

.feature-panel {
  display: none;
}

.feature-panel.active {
  display: block;
}

/* Video placeholder slot */
.fp-video-slot {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  border: 1px solid var(--yt-border);
}

/* Embed variant: padding-bottom trick for universal iframe sizing (iOS Safari compat) */
.fp-video-slot--embed {
  aspect-ratio: auto;
  height: 0;
  padding-bottom: 56.25%; /* 9/16 */
}

.fp-video-slot--embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.fp-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.fp-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}

.fp-play-btn:hover {
  background: var(--yt-red);
  transform: scale(1.1);
  box-shadow: 0 0 32px var(--yt-red-glow);
}

.fp-placeholder-label {
  font-size: 13px;
  color: var(--yt-text-muted);
}

/* Feature info below video */
.fp-info {
  text-align: center;
}

.fp-info h3 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.fp-info p {
  font-size: 15px;
  color: var(--yt-text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.fp-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.fp-tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: var(--yt-pill);
  color: var(--yt-text-muted);
}

.fp-tag-highlight {
  background: rgba(255, 0, 0, 0.12);
  color: var(--yt-red);
}

/* ── SKOOL SECTION (YouTube channel page style) ── */
.skool-section {
  padding: 80px 24px;
  background: var(--yt-surface);
  border-top: 1px solid var(--yt-border);
  border-bottom: 1px solid var(--yt-border);
  position: relative;
  overflow: hidden;
}

/* Large decorative lens ring */
.skool-lens-ring {
  position: absolute;
  top: 50%;
  right: -200px;
  transform: translateY(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  border: 40px solid var(--yt-card);
  opacity: 0.3;
  pointer-events: none;
}

.skool-lens-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--yt-border);
}

.skool-lens-ring::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px solid var(--yt-border);
}

/* Lens grip texture on the ring */
.lens-grip {
  position: absolute;
  top: 50%;
  right: -200px;
  transform: translateY(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.06;
  background: repeating-conic-gradient(
    var(--yt-text) 0deg 1deg,
    transparent 1deg 5deg
  );
}

.skool-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.skool-header {
  margin-bottom: 8px;
}

.skool-label {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--yt-red);
  margin-bottom: 12px;
}

.skool-header h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: 2px;
  line-height: 1.0;
  margin-bottom: 16px;
}

.skool-desc {
  font-size: 16px;
  color: var(--yt-text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

/* YouTube-style subscriber count boxes */
.skool-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.skool-stat-box {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s;
}

.skool-stat-box:hover { border-color: var(--yt-red); }

.ssb-value {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 1px;
}

.ssb-label {
  font-size: 12px;
  color: var(--yt-text-muted);
  margin-top: 2px;
}

/* YouTube-style channel listing */
.skool-channels {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-row {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  gap: 14px;
  align-items: center;
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 14px 18px;
  transition: all 0.2s;
}

.sc-row:hover {
  background: var(--yt-hover);
  border-color: rgba(255, 0, 0, 0.2);
}

.sc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.sc-name {
  font-weight: 600;
  font-size: 15px;
}

.sc-subs {
  font-size: 12px;
  color: var(--yt-text-muted);
  margin-top: 2px;
}

.sc-revenue {
  font-size: 16px;
  font-weight: 700;
  color: var(--yt-green);
}

.sc-sub-btn {
  padding: 8px 16px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  background: var(--yt-pill-active);
  color: var(--yt-bg);
}

/* ── APERTURE DIVIDER ── */
.aperture-divider {
  padding: 60px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  position: relative;
}

.aperture-text {
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 28px);
  letter-spacing: 2px;
  color: var(--yt-text);
  opacity: 0.25;
  white-space: nowrap;
}

.aperture-divider-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  opacity: 0.15;
  animation: aperturePulse 4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes aperturePulse {
  0%, 100% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.1); opacity: 0.25; }
}

/* ── HOW IT WORKS ── */
.how-section {
  padding: 80px 24px;
}

.how-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.how-section .section-header { margin-bottom: 60px; }

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.how-step {
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.how-step:hover {
  border-color: var(--yt-red);
  box-shadow: 0 0 32px rgba(255, 0, 0, 0.08);
}

.how-step-num {
  font-family: var(--font-display);
  font-size: 72px;
  color: var(--yt-card);
  line-height: 1;
  margin-bottom: 16px;
}

.how-step:hover .how-step-num { color: var(--yt-red); opacity: 0.3; }

.how-step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.how-step p {
  font-size: 14px;
  color: var(--yt-text-muted);
  line-height: 1.7;
}

/* Mini lens ring decoration */
.how-step-lens {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 8px solid var(--yt-card);
  opacity: 0.2;
}

/* ── CTA ── */
.cta-section {
  padding: 100px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-aperture-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.cta-aperture-bg svg {
  width: 500px;
  height: 500px;
  opacity: 0.05;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 80px);
  letter-spacing: 3px;
  line-height: 0.95;
  margin-bottom: 20px;
  position: relative;
}

.cta-section h2 .red { color: var(--yt-red); }

.cta-section p {
  font-size: 17px;
  color: var(--yt-text-muted);
  margin-bottom: 36px;
  position: relative;
}

.cta-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  position: relative;
}

/* ── FOOTER (YouTube-style) ── */
footer.site-footer {
  background: var(--yt-surface);
  border-top: 1px solid var(--yt-border);
  padding: 48px 24px 24px;
}

.foot-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.foot-brand p {
  font-size: 13px;
  color: var(--yt-text-muted);
  line-height: 1.6;
  margin-top: 12px;
}

.foot-col h4 {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.foot-col a {
  display: block;
  color: var(--yt-text-muted);
  text-decoration: none;
  font-size: 13px;
  padding: 3px 0;
  transition: color 0.2s;
}

.foot-col a:hover { color: var(--yt-text); }

.foot-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--yt-border);
  font-size: 12px;
  color: var(--yt-text-muted);
  display: flex;
  justify-content: space-between;
}

/* ── LEGAL PAGES ── */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.legal-page h1 {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.legal-updated {
  color: var(--yt-text-muted);
  font-size: 14px;
  margin-bottom: 40px;
}
.legal-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  margin-top: 36px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--yt-border);
}
.legal-body h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}
.legal-body p {
  color: var(--yt-text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.legal-body ul {
  color: var(--yt-text-muted);
  line-height: 1.7;
  margin: 0 0 16px 24px;
}
.legal-body li { margin-bottom: 4px; }
.legal-body a {
  color: var(--yt-blue);
  text-decoration: none;
}
.legal-body a:hover { text-decoration: underline; }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}
.legal-table th,
.legal-table td {
  padding: 10px 12px;
  border: 1px solid var(--yt-border);
  text-align: left;
}
.legal-table th {
  background: var(--yt-card);
  font-weight: 600;
  color: var(--yt-text);
}
.legal-table td {
  color: var(--yt-text-muted);
}
.legal-table a {
  color: var(--yt-blue);
  text-decoration: none;
}

/* ── COOKIE CONSENT ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--yt-surface);
  border-top: 1px solid var(--yt-border);
  padding: 16px 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  color: var(--yt-text-muted);
}
.cookie-banner p { margin: 0; }
.cookie-banner a {
  color: var(--yt-blue);
  text-decoration: none;
}
.cookie-banner a:hover { text-decoration: underline; }
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cookie-btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
}
.cookie-btn-accept {
  background: var(--yt-red);
  color: #fff;
}
.cookie-btn-accept:hover { background: var(--yt-red-hover); }
.cookie-btn-reject {
  background: var(--yt-pill);
  color: var(--yt-text);
}
.cookie-btn-reject:hover { background: var(--yt-hover); }
@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.vis { opacity: 1; transform: translateY(0); }

/* ── FLASH MESSAGES ── */
.flash-notice,
.flash-alert {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 99;
  animation: flash-fade 2.5s ease-in-out forwards;
  pointer-events: auto;
  padding: 12px 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.flash-notice {
  background: rgba(43, 166, 64, 0.15);
  color: var(--yt-green);
}

.flash-alert {
  background: rgba(255, 0, 0, 0.12);
  color: var(--yt-red);
}

@keyframes flash-fade {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; }
}

/* ── AUTH FORMS (Devise) ── */
.auth-wrapper {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 60px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 16px;
  padding: 40px 36px;
}

.auth-card h2 {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 32px;
}

.auth-card h2 .red { color: var(--yt-red); }

.auth-field {
  margin-bottom: 20px;
}

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"],
.auth-field textarea,
.auth-field select {
  width: 100%;
  padding: 12px 16px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  color: var(--yt-text);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.auth-field textarea {
  min-height: 120px;
}

.auth-field select {
  appearance: none;
  cursor: pointer;
}

.auth-field input:focus,
.auth-field textarea:focus,
.auth-field select:focus {
  border-color: var(--yt-red);
}

.auth-field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-field-inline input[type="checkbox"] {
  accent-color: var(--yt-red);
  width: 16px;
  height: 16px;
}

.auth-field-inline label {
  font-size: 13px;
  color: var(--yt-text-muted);
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.auth-field em {
  font-size: 12px;
  color: var(--yt-text-muted);
  font-style: normal;
}

.auth-submit {
  width: 100%;
  padding: 12px 24px;
  background: var(--yt-red);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.auth-submit:hover {
  background: var(--yt-red-hover);
  box-shadow: 0 0 24px var(--yt-red-glow);
}

.auth-links {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--yt-border);
  text-align: center;
}

.auth-links a {
  display: inline-block;
  color: var(--yt-text-muted);
  font-size: 13px;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s;
}

.auth-links a:hover { color: var(--yt-blue); }

.auth-links p { margin-bottom: 4px; }

.auth-errors {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
}

.auth-errors h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--yt-red);
  margin-bottom: 8px;
}

.auth-errors ul { list-style: none; padding: 0; margin: 0; }
.auth-errors li { font-size: 13px; color: var(--yt-text-muted); padding: 2px 0; }

.auth-danger {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--yt-border);
}

.auth-danger h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--yt-text-muted);
  margin-bottom: 8px;
}

.auth-danger-btn {
  padding: 8px 16px;
  background: transparent;
  color: var(--yt-red);
  border: 1px solid var(--yt-red);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-danger-btn:hover { background: rgba(255, 0, 0, 0.1); }

.auth-social {
  margin-bottom: 0;
}

.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  background: white;
  color: #1f1f1f;
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-google-btn:hover {
  background: #f8f8f8;
  border-color: #999;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--yt-text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--yt-border);
}


.auth-connected {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--yt-border);
}

.auth-connected h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--yt-text-muted);
  margin-bottom: 12px;
}

.auth-connected-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--yt-text-muted);
}

/* ── SETTINGS PAGE ── */
.settings-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.settings-title {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 2px;
  margin-bottom: 32px;
}

.settings-title .red { color: var(--yt-red); }

.settings-section {
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.settings-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--yt-text);
}

.settings-avatar-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.settings-avatar-preview {
  flex-shrink: 0;
}

.settings-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--yt-border);
}

.settings-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--yt-card);
  border: 2px solid var(--yt-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yt-text-muted);
}

.settings-avatar-upload {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-avatar-input {
  display: none;
}

.settings-avatar-btn {
  display: inline-block;
  padding: 6px 14px;
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  color: var(--yt-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.settings-avatar-btn:hover {
  background: var(--yt-hover);
  border-color: var(--yt-text-muted);
}

.settings-avatar-hint {
  font-size: 12px;
  color: var(--yt-text-muted);
}

.settings-submit {
  max-width: 200px;
  margin-bottom: 32px;
}

.settings-hint {
  font-size: 13px;
  color: var(--yt-text-muted);
  margin-bottom: 16px;
}

.settings-danger-zone {
  border-color: rgba(255, 0, 0, 0.2);
}

.settings-danger-title {
  color: var(--yt-red) !important;
}

.settings-danger-text {
  font-size: 13px;
  color: var(--yt-text-muted);
  margin-bottom: 16px;
}

.auth-forgot-link {
  display: block;
  text-align: right;
  font-size: 13px;
  color: var(--yt-text-muted);
  text-decoration: none;
  margin-top: -12px;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.auth-forgot-link:hover {
  color: var(--yt-blue);
}

.app-sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 8px;
}

.app-sidebar-user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.app-sidebar-user-avatar-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--yt-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-sidebar-user-avatar-placeholder svg {
  width: 14px;
  height: 14px;
  color: var(--yt-text-muted);
}

.app-sidebar-plan-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.app-sidebar-plan-badge--starter { background: #2a2a2a; color: #aaa; }
.app-sidebar-plan-badge--pro { background: rgba(255, 0, 0, 0.15); color: var(--yt-red); }
.app-sidebar-plan-badge--business { background: rgba(255, 215, 0, 0.15); color: #ffd700; }

/* ── DASHBOARD ── */
.dashboard {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.dashboard-header {
  margin-bottom: 40px;
}

.dashboard-title {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 1px;
  line-height: 1;
  margin: 0 0 8px;
}

.dashboard-subtitle {
  color: var(--yt-text-muted);
  font-size: 15px;
  margin: 0;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.dashboard-stat-card {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-stat-number {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 1px;
  line-height: 1;
}

.dashboard-stat-label {
  color: var(--yt-text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dashboard-section { margin-bottom: 32px; }

/* Channel list */
.dashboard-channel-list { display: flex; flex-direction: column; gap: 1px; background: var(--yt-border); border-radius: 12px; overflow: hidden; }
.dashboard-channel-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--yt-card); text-decoration: none; color: var(--yt-text); transition: background 0.15s; }
.dashboard-channel-row:hover { background: var(--yt-hover); }
.dashboard-channel-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.dashboard-channel-avatar-placeholder { width: 40px; height: 40px; border-radius: 50%; background: var(--yt-pill); flex-shrink: 0; }
.dashboard-channel-info { flex: 1; min-width: 0; }
.dashboard-channel-name { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-channel-handle { display: block; font-size: 12px; color: var(--yt-text-muted); }
.dashboard-channel-metrics { display: flex; gap: 16px; font-size: 12px; color: var(--yt-text-muted); flex-shrink: 0; }

/* Video list */
.dashboard-video-list { display: flex; flex-direction: column; gap: 1px; background: var(--yt-border); border-radius: 12px; overflow: hidden; }
.dashboard-video-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--yt-card); }
.dashboard-video-thumb { width: 120px; height: 68px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.dashboard-video-info { flex: 1; min-width: 0; }
.dashboard-video-title { display: block; font-size: 13px; font-weight: 500; color: var(--yt-text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-video-title:hover { text-decoration: underline; }
.dashboard-video-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--yt-text-muted); margin-top: 4px; flex-wrap: wrap; }
.dashboard-video-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.dashboard-video-actions a { display: inline-flex; color: var(--yt-text-muted); transition: color 0.15s; }
.dashboard-video-actions a:hover { color: var(--yt-text); }
.dashboard-video-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.dashboard-video-views { font-size: 13px; font-weight: 600; }
.dashboard-outlier-ratio { font-size: 12px; color: var(--yt-green); font-weight: 600; }

/* Badges */
.dashboard-badge { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 6px; border-radius: 4px; }
.dashboard-badge--own { background: rgba(43, 166, 64, 0.15); color: var(--yt-green); }
.dashboard-badge--competitor { background: rgba(255, 165, 0, 0.15); color: #ffa500; }

/* Alerts */
.dashboard-alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--yt-card); border: 1px solid var(--yt-border); border-radius: 8px; font-size: 13px; }
.dashboard-alert--pending { border-left: 3px solid var(--yt-green); }
.dashboard-alert--failed { border-left: 3px solid var(--yt-red); }
.dashboard-alert-spinner { width: 16px; height: 16px; border: 2px solid var(--yt-border); border-top-color: var(--yt-green); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.dashboard-empty { text-align: center; padding: 40px 24px; background: var(--yt-card); border: 1px solid var(--yt-border); border-radius: 12px; color: var(--yt-text-muted); font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* Onboarding tooltip */
.onboarding-tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  opacity: 0;
  translate: 0 6px;
  transition: opacity 0.3s ease, translate 0.3s ease;
  pointer-events: none;
  width: max-content;
  max-width: 340px;
}
.onboarding-tooltip--visible {
  opacity: 1;
  translate: 0 0;
  pointer-events: auto;
}
.onboarding-tooltip-arrow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--yt-surface);
  border-right: 1px solid var(--yt-red);
  border-bottom: 1px solid var(--yt-red);
}
.onboarding-tooltip-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-red);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 0 20px var(--yt-red-glow), 0 8px 24px rgba(0,0,0,0.4);
}
.onboarding-tooltip-icon {
  color: var(--yt-red);
  flex-shrink: 0;
  margin-top: 1px;
}
.onboarding-tooltip-title {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--yt-text);
  letter-spacing: 0.3px;
}
.onboarding-tooltip-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--yt-text-muted);
}
.onboarding-tooltip-dismiss {
  background: none;
  border: none;
  color: var(--yt-text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.onboarding-tooltip-dismiss:hover { color: var(--yt-text); }

.dashboard-section-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 1px;
  margin: 40px 0 16px;
}

/* ── MY CHANNELS (Dashboard) ── */
.my-channels-section {
  margin-bottom: 40px;
}

.my-channels-title {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
  margin: 0 0 16px;
}

.add-channel-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.add-channel-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  color: var(--yt-text);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.add-channel-input::placeholder { color: var(--yt-text-muted); }
.add-channel-input:focus { border-color: var(--yt-red); }

.add-channel-btn {
  padding: 12px 20px;
  flex-shrink: 0;
}

.my-channels-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.my-channel-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 14px 18px;
  transition: all 0.2s;
}

.my-channel-row:hover {
  background: var(--yt-hover);
  border-color: rgba(255, 0, 0, 0.2);
}

.my-channel-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.my-channel-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--yt-border);
  flex-shrink: 0;
}

.my-channel-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.my-channel-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-channel-handle {
  font-size: 13px;
  color: var(--yt-text-muted);
}

.my-channel-subs {
  font-size: 13px;
  color: var(--yt-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.my-channel-remove {
  padding: 6px 14px;
  background: transparent;
  color: var(--yt-text-muted);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.my-channel-remove:hover {
  color: var(--yt-red);
  border-color: var(--yt-red);
  background: rgba(255, 0, 0, 0.08);
}

.my-channels-empty {
  background: var(--yt-surface);
  border: 1px dashed var(--yt-border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

.my-channels-empty p {
  color: var(--yt-text-muted);
  font-size: 14px;
  margin: 0;
}

/* ── CHANNEL ANALYSIS ── */
.my-channel-card {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  transition: all 0.2s;
}

.my-channel-card:hover {
  border-color: rgba(255, 0, 0, 0.2);
}

.my-channel-card .my-channel-row {
  background: transparent;
  border: none;
  border-radius: 0;
}

.my-channel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.my-channel-btn-outline {
  padding: 6px 14px;
  background: transparent;
  color: var(--yt-text-muted);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}

.my-channel-btn-outline:hover {
  color: var(--yt-blue);
  border-color: var(--yt-blue);
  background: rgba(62, 166, 255, 0.08);
}

.analysis-status {
  padding: 12px 18px;
  border-top: 1px solid var(--yt-border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--yt-text-muted);
}

.analysis-status--failed {
  color: var(--yt-red);
}

.analysis-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--yt-border);
  border-top-color: var(--yt-blue);
  border-radius: 50%;
  animation: analysis-spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes analysis-spin {
  to { transform: rotate(360deg); }
}

.analysis-results {
  padding: 16px 18px;
  border-top: 1px solid var(--yt-border);
}

.analysis-summary {
  font-size: 14px;
  line-height: 1.5;
  color: var(--yt-text);
  margin: 0 0 16px;
}

.analysis-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.analysis-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.analysis-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-text-muted);
}

.analysis-value {
  font-size: 14px;
  color: var(--yt-text);
}

.analysis-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--yt-text);
  margin: 0;
}

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

.analysis-pill {
  display: inline-block;
  background: var(--yt-pill);
  color: var(--yt-text);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 10px;
}

.analysis-list {
  margin: 0;
  padding: 0;
  list-style-position: inside;
  font-size: 14px;
  line-height: 1.6;
  color: var(--yt-text);
}

.analysis-list--mono {
  font-family: monospace;
  font-size: 13px;
}

/* ── NAV LINKS (authenticated) ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 32px;
}

.nav-link {
  color: var(--yt-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--yt-text);
  background: var(--yt-hover);
}

.nav-link--active {
  color: var(--yt-text);
  background: var(--yt-card);
}

/* ── MY CHANNELS PAGE ── */
.my-channels-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.my-channels-page-header {
  margin-bottom: 24px;
}

.my-channels-page-title {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 1px;
  line-height: 1;
  margin: 0;
}

.my-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── ANALYSIS MODAL ── */
.analysis-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.analysis-modal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 420px;
  width: 90%;
}

.analysis-modal-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 24px;
  animation: analysis-pulse 2s ease-in-out infinite;
}

@keyframes analysis-pulse {
  0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 0 transparent); }
  50% { transform: scale(1.1); opacity: 0.85; filter: drop-shadow(0 0 12px var(--yt-red-glow)); }
}

.analysis-modal-heading {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  color: var(--yt-text);
  margin: 0 0 8px;
}

.analysis-modal-channel {
  font-size: 15px;
  color: var(--yt-red);
  font-weight: 600;
  margin: 0 0 4px;
}

.analysis-modal-subtitle {
  font-size: 14px;
  color: var(--yt-text-muted);
  margin: 0 0 24px;
}

.analysis-modal-dots {
  display: flex;
  gap: 6px;
}

.analysis-modal-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yt-text-muted);
  animation: analysis-dot-pulse 1.4s ease-in-out infinite;
}

.analysis-modal-dots span:nth-child(2) { animation-delay: 0.2s; }
.analysis-modal-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes analysis-dot-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.analysis-modal-error {
  font-size: 14px;
  color: var(--yt-red);
  margin: 16px 0 0;
  padding: 12px 16px;
  background: rgba(255, 0, 0, 0.08);
  border: 1px solid rgba(255, 0, 0, 0.2);
  border-radius: 8px;
}

.analysis-modal-manual {
  margin: 16px 0 0;
  font-size: 14px;
}

.analysis-modal-manual a {
  color: var(--yt-blue);
  text-decoration: none;
}

.analysis-modal-manual a:hover {
  text-decoration: underline;
}

.analysis-modal-progress {
  width: 100%;
  margin: 16px 0 8px;
}

.analysis-modal-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.analysis-modal-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--yt-red);
  border-radius: 2px;
  transition: width 0.6s ease;
}

.analysis-modal-elapsed {
  color: var(--yt-text-muted);
  font-size: 13px;
  margin: 8px 0 0;
}

/* ── CHANNEL OVERVIEW CARD ── */
.channel-overview-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--yt-text);
  transition: all 0.2s;
}

.channel-overview-card:hover {
  background: var(--yt-hover);
  border-color: rgba(255, 0, 0, 0.2);
  transform: translateY(-2px);
}

.channel-overview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.channel-overview-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.channel-overview-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--yt-border);
  flex-shrink: 0;
}

.channel-overview-avatar-placeholder--pulse {
  animation: card-pulse 1.5s ease-in-out infinite;
}

.channel-overview-card--loading {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 20px;
  opacity: 0.7;
}

@keyframes card-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.channel-overview-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.channel-overview-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-overview-handle {
  font-size: 13px;
  color: var(--yt-text-muted);
}

.channel-overview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.channel-overview-subs {
  font-size: 12px;
  color: var(--yt-text-muted);
}

.channel-overview-analyzed {
  font-size: 11px;
  color: var(--yt-text-muted);
}

/* ── CHANNELS SEARCH PAGE ── */
.channels-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.channels-page-header { margin-bottom: 24px; }

.channels-page-title {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 1px;
  line-height: 1;
  margin: 0;
}

.channels-search-bar { margin-bottom: 20px; }

.channels-search-row {
  display: flex;
  gap: 10px;
}

.channels-search-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  color: var(--yt-text);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.channels-search-input::placeholder { color: var(--yt-text-muted); }
.channels-search-input:focus { border-color: var(--yt-red); }

.channels-filters-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 12px;
}

.channels-filter-group { display: flex; flex-direction: column; gap: 4px; }

.channels-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.channels-filter-input {
  width: 120px;
  padding: 8px 12px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  color: var(--yt-text);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
}

.channels-filter-input:focus { border-color: var(--yt-red); }

.channels-filter-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--yt-text-muted);
  cursor: pointer;
  padding-bottom: 2px;
}

.channels-filter-check input { accent-color: var(--yt-red); }

.channels-clear-link {
  font-size: 12px;
  color: var(--yt-text-muted);
  text-decoration: none;
  padding-bottom: 2px;
}

.channels-clear-link:hover { color: var(--yt-text); }

.channels-sort-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 16px;
}

.channels-sort-label {
  font-size: 12px;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.channels-sort-pill {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  color: var(--yt-text);
  background: var(--yt-pill);
  transition: all 0.2s;
}

.channels-sort-pill:hover { background: var(--yt-hover); }

.channels-sort-pill--active {
  background: var(--yt-red);
  color: white;
}

.channels-sort-pill--active:hover { background: var(--yt-red-hover); }

.channels-table-wrap {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  overflow: hidden;
}

.channels-table {
  width: 100%;
  border-collapse: collapse;
}

.channels-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--yt-border);
}

.channels-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--yt-border);
  font-size: 14px;
}

.channels-table tr:hover td { background: var(--yt-hover); }

.channels-th-right, .channels-td-right { text-align: right; }

/* ── Info Tip (hover tooltip) ── */
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--yt-border);
  color: var(--yt-text-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  margin-left: 4px;
  vertical-align: middle;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.info-tip:hover {
  background: var(--yt-blue);
  color: #fff;
}
.info-tip::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 240px;
  padding: 8px 12px;
  background: var(--yt-card);
  color: var(--yt-text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  border-radius: 8px;
  border: 1px solid var(--yt-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 9999;
}
.info-tip::before {
  content: '';
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--yt-border);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 9999;
}
.info-tip:hover::after,
.info-tip:hover::before {
  opacity: 1;
}

.channels-channel-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.channels-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.channels-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--yt-border);
  flex-shrink: 0;
}

.channels-channel-name { font-weight: 600; }

.channels-channel-handle {
  font-size: 11px;
  color: var(--yt-text-muted);
  font-weight: 400;
}

.channels-badge-green {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(43, 166, 64, 0.15);
  color: var(--yt-green);
}

.channels-mrr { color: var(--yt-green); }
.channels-muted { color: var(--yt-text-muted); }

.channels-added-badge {
  font-size: 12px;
  color: var(--yt-green);
  font-weight: 600;
}

.channels-add-btn {
  padding: 6px 12px;
  font-size: 12px;
}

.channels-empty {
  background: var(--yt-surface);
  border: 1px dashed var(--yt-border);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
}

.channels-empty p {
  color: var(--yt-text-muted);
  font-size: 14px;
  margin: 0;
}

.channels-view-link {
  display: inline-flex;
  align-items: center;
  color: var(--yt-text-muted);
  transition: color 0.2s;
}

.channels-view-link:hover { color: var(--yt-text); }

/* ── Leaderboard Sub-Tabs ── */
.leaderboard-subtabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--yt-border);
  margin-bottom: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.leaderboard-subtab {
  position: relative;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--yt-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s;
}

.leaderboard-subtab:hover { color: var(--yt-text); }

.leaderboard-subtab--active { color: var(--yt-text); }

.leaderboard-subtab--active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--yt-red);
}

/* ── Leaderboard Full-Width Table ── */
.leaderboard-full { margin-top: 16px; }

.leaderboard-empty {
  color: var(--yt-text-muted);
  font-size: 14px;
  padding: 24px 0;
}

.leaderboard-table-full {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table-full th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-text-muted);
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--yt-border);
}

.leaderboard-table-full th.leaderboard-th-rank { width: 36px; text-align: center; }
.leaderboard-table-full th.leaderboard-th-subs,
.leaderboard-table-full th.leaderboard-th-videos,
.leaderboard-table-full th.leaderboard-th-avg-views,
.leaderboard-table-full th.leaderboard-th-metric { text-align: right; }

.leaderboard-row { transition: background 0.15s; }
.leaderboard-row:hover { background: var(--yt-surface-hover, rgba(255,255,255,0.04)); }

.leaderboard-table-full td {
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: 1px solid var(--yt-border-subtle, rgba(255,255,255,0.06));
}

.leaderboard-td-rank {
  width: 36px;
  font-size: 14px;
  font-weight: 700;
  color: var(--yt-text-muted);
  text-align: center;
}

.leaderboard-td-channel { width: 100%; }

.leaderboard-channel-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--yt-text);
  transition: color 0.2s;
}

.leaderboard-channel-link:hover { color: var(--yt-red); }

.leaderboard-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.leaderboard-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-td-subs,
.leaderboard-td-videos,
.leaderboard-td-avg-views {
  font-size: 13px;
  color: var(--yt-text-muted);
  text-align: right;
  white-space: nowrap;
}

.leaderboard-td-metric {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--yt-text);
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .leaderboard-subtabs { gap: 0; }
  .leaderboard-subtab { padding: 8px 10px; font-size: 12px; }
  .leaderboard-td-videos,
  .leaderboard-th-videos,
  .leaderboard-td-avg-views,
  .leaderboard-th-avg-views { display: none; }
}

/* ── Leaderboard Pagination ── */
.leaderboard-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
  padding: 8px 0;
}

.lb-page-btn,
.lb-page-num {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  color: var(--yt-text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lb-page-btn:hover:not(:disabled),
.lb-page-num:hover { background: var(--yt-hover); color: var(--yt-text); }

.lb-page-btn:disabled { opacity: 0.35; cursor: default; }

.lb-page-num { min-width: 34px; text-align: center; padding: 6px 8px; }

.lb-page-num.active {
  background: var(--yt-red);
  border-color: var(--yt-red);
  color: #fff;
  font-weight: 600;
}

.lb-page-numbers { display: flex; gap: 4px; }

@media (max-width: 640px) {
  .lb-page-prev, .lb-page-next { padding: 6px 8px; font-size: 12px; }
  .lb-page-num { min-width: 28px; padding: 6px 4px; font-size: 12px; }
}

/* ── Dashboard Leaderboards Grid ── */
.leaderboards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.leaderboard-card {
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 20px;
}

.leaderboard-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 0 0 12px;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table tr {
  border-bottom: 1px solid var(--yt-border);
  transition: background 0.15s;
}

.leaderboard-table tr:last-child { border-bottom: none; }

.leaderboard-table tr:hover { background: var(--yt-surface-hover, rgba(255,255,255,0.04)); }

.leaderboard-table td { padding: 8px 0; }

.leaderboard-rank {
  width: 28px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--yt-text-muted);
  text-align: center;
  vertical-align: middle;
}

.leaderboard-channel { vertical-align: middle; }

.leaderboard-metric {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--yt-text);
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .leaderboards-grid { grid-template-columns: 1fr; }
}

/* ── Channel Show Stats Grid ── */
.channel-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.channel-stat-card {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}

.channel-stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.5px;
  color: var(--yt-text);
}

.channel-stat-label {
  font-size: 11px;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.channels-pagination {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.channels-pagination-info {
  font-size: 13px;
  color: var(--yt-text-muted);
}

@media (max-width: 768px) {
  .channels-table-wrap { overflow-x: auto; }
  .channels-filters-row { gap: 8px; }
  .channels-sort-bar { flex-wrap: wrap; }
}

/* ── NICHES BROWSE PAGE ── */
.niches-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.niches-page-header { margin-bottom: 24px; }

.niches-page-title {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 1px;
  line-height: 1;
  margin: 0;
}

.niches-search-bar { margin-bottom: 20px; }

.niches-search-row {
  display: flex;
  gap: 10px;
}

.niches-search-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  color: var(--yt-text);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.niches-search-input::placeholder { color: var(--yt-text-muted); }
.niches-search-input:focus { border-color: var(--yt-red); }

.niches-filters-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 12px;
}

.niches-filter-group { display: flex; flex-direction: column; gap: 4px; }

.niches-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.niches-filter-input {
  width: 120px;
  padding: 8px 12px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  color: var(--yt-text);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
}

.niches-filter-input:focus { border-color: var(--yt-red); }

.niches-filter-select {
  padding: 8px 12px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  color: var(--yt-text);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
}

.niches-filter-select:focus { border-color: var(--yt-red); }

.niches-filter-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--yt-text-muted);
  cursor: pointer;
  padding-bottom: 2px;
}

.niches-filter-check input { accent-color: var(--yt-red); }

.niches-clear-link {
  font-size: 12px;
  color: var(--yt-text-muted);
  text-decoration: none;
  padding-bottom: 2px;
}

.niches-clear-link:hover { color: var(--yt-text); }

.niches-sort-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 16px;
}

.niches-sort-label {
  font-size: 12px;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.niches-sort-pill {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  color: var(--yt-text);
  background: var(--yt-pill);
  transition: all 0.2s;
}

.niches-sort-pill:hover { background: var(--yt-hover); }

.niches-sort-pill--active {
  background: var(--yt-red);
  color: white;
}

.niches-sort-pill--active:hover { background: var(--yt-red-hover); }

/* ── Niche name + badge ── */
.niches-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.niches-name { font-weight: 600; }

.niches-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
  vertical-align: middle;
}

.niches-badge--rising {
  background: rgba(62, 166, 255, 0.15);
  color: var(--yt-blue);
}

.niches-badge--established {
  background: rgba(43, 166, 64, 0.15);
  color: var(--yt-green);
}

.niches-badge--declining {
  background: rgba(255, 0, 0, 0.12);
  color: var(--yt-red);
}

.niches-badge--hidden {
  background: var(--yt-pill);
  color: var(--yt-text-muted);
}

.niches-badge--tiny {
  background: rgba(255, 165, 0, 0.15);
  color: #f5a623;
}

.niches-badge--unestablished {
  background: rgba(150, 100, 255, 0.15);
  color: #9664ff;
}

/* ── Niche Show Page ── */
.niche-show {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.niche-show-header { margin-bottom: 24px; }

.niche-show-back {
  font-size: 13px;
  color: var(--yt-text-muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 8px;
}

.niche-show-back:hover { color: var(--yt-text); }

.niche-show-name {
  font-family: var(--font-display);
  font-size: 42px;
  letter-spacing: 1px;
  line-height: 1;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.niche-show-description {
  color: var(--yt-text-muted);
  font-size: 14px;
  margin-top: 8px;
  line-height: 1.5;
}

.niche-show-channels-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .niches-filters-row { gap: 8px; }
  .niches-sort-bar { flex-wrap: wrap; }
  .niche-show-name { font-size: 28px; }
}

/* ── ANALYSIS BADGE ── */
.analysis-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 10px;
  flex-shrink: 0;
}

.analysis-badge--completed {
  background: rgba(43, 166, 64, 0.15);
  color: var(--yt-green);
}

.analysis-badge--analyzing {
  background: rgba(62, 166, 255, 0.15);
  color: var(--yt-blue);
}

.analysis-badge--pending {
  background: var(--yt-pill);
  color: var(--yt-text-muted);
}

.analysis-badge--failed {
  background: rgba(255, 0, 0, 0.12);
  color: var(--yt-red);
}

/* ── CHANNEL SHOW PAGE ── */
/* ── CHANNEL SWITCHER ── */
.channel-switcher {
  display: flex;
  gap: 4px;
  padding: 8px 24px;
  overflow-x: auto;
  border-bottom: 1px solid var(--yt-border);
  background: var(--yt-surface);
  margin-bottom: 24px;
  /* Break out of .channel-show container to span full viewport */
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  scrollbar-width: none;
}

.channel-switcher::-webkit-scrollbar {
  display: none;
}

.channel-switcher-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  color: var(--yt-text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s;
  flex-shrink: 0;
}

.channel-switcher-item:hover {
  background: var(--yt-hover);
  color: var(--yt-text);
}

.channel-switcher-item--active {
  background: var(--yt-card);
  border-color: var(--yt-border);
  color: var(--yt-text);
  font-weight: 600;
}

.channel-switcher-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.channel-switcher-avatar-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--yt-border);
  flex-shrink: 0;
}

.channel-switcher-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-show {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.channel-show-banner {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.channel-show-banner-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 6.2;
  object-fit: cover;
}

.channel-show-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.channel-show-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.channel-show-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.channel-show-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--yt-border);
  flex-shrink: 0;
}

.channel-show-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.channel-show-name {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1px;
  line-height: 1;
  margin: 0;
}

.channel-show-handle {
  font-size: 14px;
  color: var(--yt-text-muted);
}

.channel-show-subs {
  font-size: 13px;
  color: var(--yt-text-muted);
}

.channel-show-analyzed {
  font-size: 12px;
  color: var(--yt-text-muted);
}

.channel-show-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* ── ANALYSIS DETAIL (Show Page) ── */
.analysis-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.analysis-section {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 20px;
}

.analysis-section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--yt-text);
  margin: 0 0 10px;
}

/* ── TAG INPUT (Editable Keywords) ── */
.tag-input-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--yt-pill);
  color: var(--yt-text);
  font-size: 12px;
  padding: 4px 6px 4px 10px;
  border-radius: 10px;
}

.tag-pill-name {
  line-height: 1;
}

.tag-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--yt-text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 4px;
  transition: all 0.2s;
}

.tag-pill-remove:hover {
  color: var(--yt-red);
  background: rgba(255, 0, 0, 0.12);
}

/* Override button_to form styling inside pills */
.tag-pill form {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.tag-pill form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--yt-text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 4px;
  transition: all 0.2s;
}

.tag-pill form button:hover {
  color: var(--yt-red);
  background: rgba(255, 0, 0, 0.12);
}

.tag-input-field {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tag-input-text {
  flex: 1;
  padding: 8px 12px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  color: var(--yt-text);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.tag-input-text::placeholder { color: var(--yt-text-muted); }
.tag-input-text:focus { border-color: var(--yt-blue); }

.tag-input-add {
  padding: 8px 14px;
  background: var(--yt-pill);
  color: var(--yt-text);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.tag-input-add:hover {
  background: var(--yt-hover);
  border-color: var(--yt-blue);
  color: var(--yt-blue);
}

/* ── COMPETITORS ── */
.competitors-section {
  margin-top: 32px;
}

.competitors-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.competitors-header .analysis-section-title {
  margin: 0;
}

.competitors-discovering {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 0, 0, 0.05);
  border: 1px solid rgba(255, 0, 0, 0.15);
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--yt-text-muted);
}

.competitors-cta {
  background: var(--yt-card);
  border: 1px dashed var(--yt-border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

.competitors-cta-hint {
  color: var(--yt-text-muted);
  font-size: 13px;
  margin: 10px 0 0;
}

.competitors-add-form {
  margin-bottom: 16px;
}
.competitors-add-bar {
  display: flex;
  gap: 8px;
}
.competitors-add-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  color: var(--yt-text);
  font-size: 13px;
  font-family: var(--font-body);
}
.competitors-add-input::placeholder {
  color: var(--yt-text-muted);
}
.competitors-add-input:focus {
  outline: none;
  border-color: var(--yt-blue);
}
.competitors-add-btn {
  padding: 8px 16px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  color: var(--yt-text);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.competitors-add-btn:hover {
  background: var(--yt-hover);
  border-color: var(--yt-blue);
}

.competitors-deep-search {
  margin-top: 24px;
  padding: 20px;
  text-align: center;
  border-top: 1px solid var(--yt-border);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  color: var(--yt-text);
  border: 1px solid var(--yt-border);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--yt-hover);
  border-color: var(--yt-text-muted);
}

.competitors-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.competitor-card {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 14px 18px;
  transition: all 0.2s;
}

.competitor-card:hover {
  background: var(--yt-hover);
}

.competitor-card--tracked {
  border-color: rgba(43, 166, 64, 0.4);
}

.competitor-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.competitor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.competitor-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--yt-border);
  flex-shrink: 0;
}

.competitor-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.competitor-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.competitor-handle {
  font-size: 12px;
  color: var(--yt-text-muted);
}

.competitor-subs {
  font-size: 12px;
  color: var(--yt-text-muted);
}

.competitor-overlap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
  min-width: 48px;
}

.competitor-overlap-count {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  color: var(--yt-blue);
}

.competitor-overlap-label {
  font-size: 10px;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.competitor-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}

.competitor-niche-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 20px;
  font-size: 11px;
  color: #4ade80;
  white-space: nowrap;
}

.competitor-keyword-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(62, 166, 255, 0.1);
  border: 1px solid rgba(62, 166, 255, 0.25);
  border-radius: 20px;
  font-size: 11px;
  color: var(--yt-blue);
  white-space: nowrap;
}

.competitors-table-niche-count {
  color: #4ade80;
  font-weight: 600;
}

.competitor-keyword-count {
  font-size: 12px;
  color: var(--yt-text-muted);
  white-space: nowrap;
}

.competitor-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.competitor-btn {
  padding: 6px 16px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.competitor-btn--track {
  background: var(--yt-pill-active);
  color: var(--yt-bg);
}

.competitor-btn--track:hover {
  background: var(--yt-green);
  color: white;
}

.competitor-btn--untrack {
  background: transparent;
  color: var(--yt-text-muted);
  border: 1px solid var(--yt-border);
}

.competitor-btn--untrack:hover {
  color: var(--yt-red);
  border-color: var(--yt-red);
  background: rgba(255, 0, 0, 0.08);
}

.competitor-btn--yt {
  background: transparent;
  color: var(--yt-red);
  border: 1px solid var(--yt-border);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
}

.competitor-btn--yt:hover {
  background: rgba(255, 0, 0, 0.12);
  border-color: var(--yt-red);
}

.competitor-btn--disabled {
  background: var(--yt-pill);
  color: var(--yt-text-muted);
  opacity: 0.5;
  cursor: not-allowed;
}

.competitors-group {
  margin-bottom: 32px;
}

.competitors-group:last-child {
  margin-bottom: 0;
}

.competitors-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--yt-border);
}

.competitors-section-title {
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--yt-text);
  margin: 0;
  line-height: 1;
}

.competitors-section-count {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--yt-text-muted);
}

.competitors-section-subtitle {
  font-size: 13px;
  color: var(--yt-text-muted);
  margin: -4px 0 12px;
}

.competitors-empty-hint {
  font-size: 13px;
  color: var(--yt-text-muted);
  padding: 16px;
  text-align: center;
  background: var(--yt-surface);
  border: 1px dashed var(--yt-border);
  border-radius: 10px;
}

.competitors-section-header .competitors-tracking-limit {
  margin-bottom: 0;
  border: none;
  background: none;
  padding: 0;
}

.competitor-btn--remove {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--yt-text-muted);
  border: 1px solid var(--yt-border);
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
}

.competitor-btn--remove:hover {
  color: var(--yt-red);
  border-color: var(--yt-red);
  background: rgba(255, 0, 0, 0.08);
}

.competitors-tracking-limit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  margin-bottom: 12px;
}

.competitors-tracking-count {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--yt-text);
}

.competitors-tracking-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-text-muted);
  margin-right: 8px;
}

.competitors-tracking-hint {
  font-size: 13px;
  color: var(--yt-text-muted);
}

.competitors-tracking-full {
  font-size: 13px;
  color: var(--yt-red);
}

.btn-yt-sm {
  padding: 6px 14px;
  font-size: 12px;
}

/* ── COMPETITORS TABLE ── */
.competitors-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.competitors-table {
  width: 100%;
  border-collapse: collapse;
}

.competitors-table tbody tr {
  border-bottom: 1px solid rgba(48, 48, 48, 0.5);
  transition: background 0.15s;
}

.competitors-table tbody tr:hover {
  background: var(--yt-hover);
}

.competitors-table td {
  padding: 12px 16px;
  font-family: var(--font-display);
  font-size: 18px;
  vertical-align: middle;
}

.competitors-table-channel {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
}

.competitors-table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.competitors-table-channel-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.competitors-table-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.competitors-table-handle {
  font-size: 12px;
  color: var(--yt-text-muted);
}

.competitors-table-muted {
  color: var(--yt-text-muted);
}

.competitors-table-keyword-count {
  color: var(--yt-blue);
  font-weight: 400;
}

.competitors-table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

/* ── CHANNEL TABS ── */
.channel-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--yt-border);
  margin-bottom: 0;
}

.channel-tab {
  position: relative;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.channel-tab:hover {
  color: var(--yt-text);
}

.channel-tab--active {
  color: var(--yt-text);
}

.channel-tab--active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--yt-red);
}

.channel-tab-content {
  padding-top: 24px;
}

.channel-tab-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

/* ── VIDEOS TOOLBAR ── */
.videos-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.videos-filters {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.videos-filter-btn {
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  background: var(--yt-pill);
  color: var(--yt-text);
  transition: all 0.2s;
}

.videos-filter-btn:hover {
  background: var(--yt-hover);
}

.videos-filter-btn--active {
  background: var(--yt-pill-active);
  color: var(--yt-bg);
}

.videos-search-form {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
}

.videos-search-input {
  width: 100%;
  padding: 7px 12px;
  background: var(--yt-bg);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  color: var(--yt-text);
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.videos-search-input:focus {
  border-color: var(--yt-blue);
}

.videos-sort {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.videos-sort-label {
  font-size: 12px;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.videos-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--yt-border);
}

.videos-pagination-info {
  font-size: 13px;
  color: var(--yt-text-muted);
}

nav.pagy {
  display: flex;
  gap: 4px;
}

nav.pagy a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  transition: all 0.2s;
  background: var(--yt-pill);
  color: var(--yt-text);
}

nav.pagy a:hover:not([aria-disabled]) {
  background: var(--yt-hover);
}

nav.pagy a.current {
  background: var(--yt-red);
  color: white;
  pointer-events: none;
}

nav.pagy a.gap {
  background: transparent;
  pointer-events: none;
  color: var(--yt-text-muted);
}

nav.pagy a[aria-disabled="true"]:not(.current):not(.gap) {
  background: var(--yt-pill);
  color: var(--yt-text-muted);
  opacity: 0.5;
  pointer-events: none;
}

.outlier-stat-value--positive {
  color: var(--yt-green);
}

.outlier-stat-value--negative {
  color: var(--yt-red);
}

/* ── SCORE PAGE ── */
.score-layout {
  max-width: 720px;
}

.score-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px;
  background: var(--yt-border);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  overflow: hidden;
}

.score-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: var(--yt-card);
}

.score-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-text-muted);
}

.score-stat-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--yt-text);
}

.score-section {
  margin-top: 24px;
}

.score-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-text-muted);
  margin: 0 0 10px;
}

.score-insights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.score-insight {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.score-insight--high {
  background: rgba(43, 166, 64, 0.12);
  border: 1px solid rgba(43, 166, 64, 0.3);
  color: var(--yt-green);
}

.score-insight--good {
  background: rgba(62, 166, 255, 0.1);
  border: 1px solid rgba(62, 166, 255, 0.25);
  color: var(--yt-blue);
}

.score-insight--low {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--yt-border);
  color: var(--yt-text-muted);
}

.score-demand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 16px;
}

.score-demand-ratio {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  color: var(--yt-blue);
}

.score-demand-detail {
  font-size: 14px;
  color: var(--yt-text-muted);
}

.score-niches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.score-niche-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--yt-border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--yt-text);
}

/* ── NICHES TAB ── */
.niches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.niche-card {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 20px;
}

.niche-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.niche-card-view-link {
  color: var(--yt-text-secondary);
  opacity: 0.5;
  transition: opacity 0.15s;
}
.niche-card-view-link:hover {
  opacity: 1;
  color: var(--yt-red);
}
.niche-card-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.3px;
  margin: 0;
  color: var(--yt-text);
}

.niche-card-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--yt-text-muted);
  margin-bottom: 6px;
}

.niche-card-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.niche-card-keyword {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--yt-border);
  border-radius: 14px;
  font-size: 12px;
  color: var(--yt-text-muted);
}

.niche-card-keyword--match {
  background: rgba(62, 166, 255, 0.12);
  border-color: rgba(62, 166, 255, 0.3);
  color: var(--yt-blue);
}

.niche-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--yt-text-muted);
}

.niche-card-market {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.niche-card-market--rising {
  background: rgba(62, 166, 255, 0.15);
  color: var(--yt-blue);
}

.niche-card-market--established {
  background: rgba(43, 166, 64, 0.15);
  color: var(--yt-green);
}

.niche-card-market--declining {
  background: rgba(255, 0, 0, 0.12);
  color: var(--yt-red);
}

.niche-card-market--hidden {
  background: rgba(255, 165, 0, 0.15);
  color: #ffa500;
}

.niche-card-market--tiny,
.niche-card-market--unestablished {
  background: var(--yt-pill, rgba(255,255,255,0.06));
  color: var(--yt-text-muted);
}

/* ── OUTLIERS ── */
.outliers-methodology {
  font-size: 13px;
  color: var(--yt-text-muted);
  background: var(--yt-surface-alt, rgba(255,255,255,0.03));
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  line-height: 1.5;
}
.outliers-methodology strong {
  color: var(--yt-text);
}

.outliers-sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.outliers-sort-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.outliers-sort-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--yt-text-muted);
  background: var(--yt-surface-alt, rgba(255,255,255,0.03));
  border: 1px solid var(--yt-border);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.15s;
}

.outliers-sort-btn:hover {
  color: var(--yt-text);
  border-color: var(--yt-text-muted);
}

.outliers-sort-btn--active {
  color: #fff;
  background: var(--yt-red);
  border-color: var(--yt-red);
}

.outliers-sort-btn--active:hover {
  color: #fff;
  border-color: var(--yt-red);
}

.outliers-filter-select {
  padding: 6px 30px 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--yt-text);
  background-color: var(--yt-surface-alt, rgba(255,255,255,0.03));
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23aaa' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  border: 1px solid var(--yt-border);
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-family: inherit;
}

.outliers-filter-select:hover {
  color: var(--yt-text);
  border-color: var(--yt-text-muted);
}

.outliers-filter-select:focus {
  outline: none;
  border-color: var(--yt-red);
}

.outliers-count {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--yt-text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.outliers-group {
  margin-bottom: 32px;
}

.outliers-group-desc {
  font-size: 13px;
  color: var(--yt-text-muted);
  margin: 4px 0 16px;
}

.outliers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.outlier-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 12px 16px;
  transition: all 0.2s;
}

.outlier-row:hover {
  background: var(--yt-hover);
}

.outlier-row--positive {
  border-left: 3px solid var(--yt-green);
}

.outlier-row--negative {
  border-left: 3px solid var(--yt-red);
}

.outlier-thumb {
  width: 120px;
  height: 68px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.outlier-thumb-placeholder {
  width: 120px;
  height: 68px;
  border-radius: 6px;
  background: var(--yt-border);
  flex-shrink: 0;
}

.outlier-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.outlier-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.outlier-meta {
  font-size: 12px;
  color: var(--yt-text-muted);
}

.outlier-stats {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

.outlier-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 52px;
}

.outlier-stat-value {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
}

.outlier-stat--positive {
  color: var(--yt-green);
}

.outlier-stat--negative {
  color: var(--yt-red);
}

.outlier-stat-label {
  font-size: 10px;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── OUTLIER COMPARISON ── */
.outlier-comparison {
  margin-top: 0;
}

.outlier-comparison-stats {
  margin: 20px 0 32px;
  overflow-x: auto;
}

.outlier-comparison-stats table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-th {
  text-align: left;
  padding: 10px 16px;
  color: var(--yt-text-muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--yt-border);
  white-space: nowrap;
}

.comparison-th--right { text-align: right; }

.comparison-th--sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.comparison-th--sortable:hover {
  color: var(--yt-text);
}

.comparison-th--sortable::after {
  content: " \25B8";
  font-size: 10px;
  opacity: 0.3;
}

.comparison-th--sortable.sorted-asc {
  color: var(--yt-blue);
}
.comparison-th--sortable.sorted-asc::after {
  content: " \25B2";
  opacity: 1;
}

.comparison-th--sortable.sorted-desc {
  color: var(--yt-blue);
}
.comparison-th--sortable.sorted-desc::after {
  content: " \25BC";
  opacity: 1;
}

.outlier-comparison-stats td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(48, 48, 48, 0.5);
  font-family: var(--font-display);
  font-size: 18px;
}

.comparison-td-channel {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  font-weight: 600;
}

.comparison-td--right { text-align: right; }

.outlier-comparison-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.outlier-comparison-pct {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--yt-text-muted);
}

.outlier-comparison-section {
  margin: 28px 0;
}

/* ── COMPARISON SUB-TABS ── */
.comparison-subtabs-wrap {
  margin-top: 32px;
}

.comparison-subtabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--yt-border);
  margin-bottom: 0;
}

.comparison-subtab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-text-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s;
}

.comparison-subtab:hover {
  color: var(--yt-text);
}

.comparison-subtab.active {
  color: var(--yt-text);
}

.comparison-subtab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--yt-red);
}

.comparison-subtab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--yt-text-muted);
  background: var(--yt-border);
  border-radius: 9px;
  letter-spacing: 0;
}

.comparison-subtab.active .comparison-subtab-count {
  color: #fff;
  background: var(--yt-red);
}

.comparison-subpanel {
  display: none;
  padding-top: 24px;
}

.comparison-subpanel.active {
  display: block;
}

.outlier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.outlier-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.outlier-tag--common {
  background: rgba(46, 166, 64, 0.15);
  color: var(--yt-green);
  border: 1px solid rgba(46, 166, 64, 0.3);
}

.outlier-tag--unique {
  background: rgba(62, 166, 255, 0.12);
  color: var(--yt-blue);
  border: 1px solid rgba(62, 166, 255, 0.25);
}

.outlier-unique-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 12px;
}

.outlier-unique-column {
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  padding: 14px 16px;
}

.outlier-unique-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--yt-text);
}

.outlier-channel-label {
  color: var(--yt-blue);
  font-weight: 500;
}

/* ── OPPORTUNITIES ── */
.opportunity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.opportunity-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-left: 3px solid #f59e0b;
  border-radius: 12px;
  padding: 12px 16px;
  transition: background 0.2s;
}

.opportunity-row:hover {
  background: var(--yt-hover);
}

.opportunity-thumb {
  width: 120px;
  height: 68px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.opportunity-thumb-placeholder {
  width: 120px;
  height: 68px;
  border-radius: 6px;
  background: var(--yt-border);
  flex-shrink: 0;
}

.opportunity-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.opportunity-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.opportunity-title a {
  color: var(--yt-text);
  text-decoration: none;
}

.opportunity-title a:hover {
  color: var(--yt-blue);
}

.opportunity-meta {
  font-size: 12px;
  color: var(--yt-text-muted);
}

.opportunity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.outlier-tag--opportunity {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.opportunity-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
}

/* ── HEAD-TO-HEAD ── */
.h2h-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.h2h-row {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 16px;
  position: relative;
}

.h2h-match-reason {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.h2h-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.h2h-video {
  min-width: 0;
}

.h2h-video-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-text-muted);
  margin-bottom: 8px;
}

.h2h-video-content {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.h2h-thumb {
  width: 100px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.h2h-video-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.h2h-video-title {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.h2h-video-title a {
  color: var(--yt-text);
  text-decoration: none;
}

.h2h-video-title a:hover {
  color: var(--yt-blue);
}

.h2h-video-stats {
  font-size: 12px;
  color: var(--yt-text-muted);
}

.h2h-vs {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--yt-text-muted);
  text-align: center;
  flex-shrink: 0;
}

.h2h-delta {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-display);
  font-size: 18px;
  padding: 2px 8px;
  border-radius: 6px;
}

.h2h-delta--winning {
  color: var(--yt-green);
  background: rgba(43, 166, 64, 0.12);
}

.h2h-delta--losing {
  color: var(--yt-red);
  background: rgba(255, 0, 0, 0.1);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .video-grid { grid-template-columns: 1fr; }
  .skool-inner { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .nav-search { display: none; }
  .nav-links { display: none; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .dashboard-channel-metrics { display: none; }
  .dashboard-video-thumb { width: 80px; height: 45px; }
  .dashboard-video-actions { gap: 6px; }
  .dashboard-video-actions svg { width: 16px; height: 16px; }
  .my-channels-grid { grid-template-columns: 1fr; }
  .channel-show-header { flex-direction: column; align-items: flex-start; }
  .channel-tab { padding: 12px 16px; font-size: 13px; }
  .outlier-row { flex-wrap: wrap; }
  .outlier-stats { width: 100%; justify-content: flex-start; padding-left: 134px; }
  .outlier-comparison-stats td { font-size: 15px; padding: 8px 10px; }
  .comparison-th { padding: 8px 10px; font-size: 11px; }
  .comparison-td-channel { font-size: 13px !important; }
  .opportunity-row { flex-wrap: wrap; }
  .opportunity-badge { order: -1; }
  .h2h-pair { grid-template-columns: 1fr; }
  .h2h-vs { padding: 4px 0; }
  .h2h-delta { position: static; margin-top: 10px; display: inline-block; }
}

/* ── NICHE WIZARD ── */

.wizard-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px;
}

.wizard-container { }

.wizard-header {
  text-align: center;
  margin-bottom: 24px;
}

.wizard-title {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 1px;
  margin: 0;
}

.wizard-subtitle {
  color: var(--yt-text-muted);
  font-size: 14px;
  margin: 4px 0 0;
}

/* Progress bar */
.wizard-progress {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
}

.wizard-progress-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
  margin-left: -6px;
}

.wizard-progress-step:first-child {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
  margin-left: 0;
  border-radius: 6px 0 0 6px;
}

.wizard-progress-step:last-child {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 12px 50%);
  border-radius: 0 6px 6px 0;
}

.wizard-progress-step--done {
  background: var(--yt-green);
  color: #fff;
}

.wizard-progress-step--current {
  background: var(--yt-red);
  color: #fff;
}

.wizard-progress-step--pending {
  background: var(--yt-card);
  color: var(--yt-text-muted);
}

.wizard-progress-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.wizard-progress-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Wizard card */
.wizard-card {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 28px;
}

.wizard-card-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px;
}

.wizard-card-desc {
  color: var(--yt-text-muted);
  font-size: 14px;
  margin: 0 0 20px;
}

/* Fields */
.wizard-field {
  margin-bottom: 18px;
}

.wizard-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--yt-text);
}

.wizard-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  color: var(--yt-text);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.wizard-input:focus {
  border-color: var(--yt-blue);
}

.wizard-hint {
  font-size: 12px;
  color: var(--yt-text-muted);
  margin: 4px 0 0;
}

.wizard-info-banner {
  background: rgba(62, 166, 255, 0.08);
  border: 1px solid rgba(62, 166, 255, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--yt-blue);
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-tip {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--yt-red);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--yt-text-muted);
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.wizard-tip-icon {
  flex-shrink: 0;
  color: var(--yt-red);
  font-size: 15px;
  line-height: 1.4;
}
.wizard-tip strong { color: var(--yt-text); font-weight: 600; }

.wizard-info-icon {
  font-size: 16px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Navigation buttons */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

.btn-wizard {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-wizard--next {
  background: var(--yt-red);
  color: #fff;
  margin-left: auto;
}

.btn-wizard--next:hover { background: var(--yt-red-hover); }

.btn-wizard--back {
  background: var(--yt-card);
  color: var(--yt-text);
  border: 1px solid var(--yt-border);
}

.btn-wizard--back:hover { background: var(--yt-hover); }

.btn-wizard--add {
  background: var(--yt-blue);
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
}

.btn-wizard--add:hover { opacity: 0.85; }
.btn-wizard--added { background: var(--yt-text-muted); cursor: default; opacity: 0.6; }
.btn-wizard--added:hover { opacity: 0.6; }

.btn-wizard--skip {
  background: var(--yt-card);
  color: var(--yt-text-muted);
  border: 1px solid var(--yt-border);
  font-size: 13px;
}

.btn-wizard--skip:hover { color: var(--yt-text); border-color: var(--yt-text-muted); }

.btn-wizard--secondary {
  background: var(--yt-card);
  color: var(--yt-text);
  border: 1px solid var(--yt-border);
}

.btn-wizard--secondary:hover { background: var(--yt-hover); }

/* Channel search */
.wizard-search-bar {
  position: relative;
}

.wizard-search-spinner {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.wizard-spinner-dot {
  width: 16px;
  height: 16px;
  border: 2px solid var(--yt-border);
  border-top-color: var(--yt-blue);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.wizard-search-results {
  margin-top: 8px;
}

.wizard-suggested-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--yt-border);
}

.wizard-suggested-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}

.wizard-suggested-results {
  min-height: 40px;
}

.wizard-search-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  margin-bottom: 6px;
  transition: background 0.15s;
}

.wizard-search-result:hover { background: var(--yt-hover); }

.wizard-search-empty,
.wizard-search-error {
  font-size: 13px;
  color: var(--yt-text-muted);
  padding: 10px 0;
}

.wizard-search-error { color: var(--yt-red); }

/* Channel cards */
.wizard-channel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.wizard-channel-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wizard-channel-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wizard-channel-handle {
  font-size: 12px;
  color: var(--yt-text-muted);
}

.wizard-channel-subs {
  font-size: 11px;
  color: var(--yt-text-muted);
}

.wizard-overlap-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.wizard-overlap-badge--good {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.wizard-overlap-badge--warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.wizard-overlap-badge--neutral {
  background: rgba(148, 163, 184, 0.15);
  color: var(--yt-text-muted);
}

/* Selected channels */
.wizard-selected-section {
  margin-top: 20px;
}

.wizard-selected-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
}

.wizard-selected-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wizard-channel-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
}

.wizard-yt-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yt-text-muted);
  flex-shrink: 0;
  transition: color 0.15s;
}
.wizard-yt-link:hover {
  color: #ff0000;
}

.wizard-channel-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

/* Sentiment buttons */
.wizard-sentiment-btn {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid var(--yt-border);
  background: transparent;
  color: var(--yt-text-muted);
  transition: all 0.2s;
}

.wizard-sentiment-btn--aspire.active {
  background: var(--yt-green);
  color: #fff;
  border-color: var(--yt-green);
}

.wizard-sentiment-btn--avoid.active {
  background: var(--yt-red);
  color: #fff;
  border-color: var(--yt-red);
}

.wizard-sentiment-btn:hover { border-color: var(--yt-text-muted); }

.wizard-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--yt-text-muted);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wizard-remove-btn:hover { background: rgba(255,0,0,0.1); color: var(--yt-red); }

/* Competitor counter */
.wizard-competitor-counter {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--yt-text-muted);
}

.wizard-competitor-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}

.wizard-competitor-check {
  width: 18px;
  height: 18px;
  accent-color: var(--yt-red);
  flex-shrink: 0;
}

.wizard-sentiment-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wizard-sentiment-badge--aspire {
  background: rgba(43, 166, 64, 0.12);
  color: #2ba640;
}

.wizard-sentiment-badge--avoid {
  background: rgba(255, 68, 68, 0.12);
  color: #f44;
}

.wizard-channel-desc {
  font-size: 12px;
  color: var(--yt-text-muted);
  margin: 2px 0 0;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Video sections */
.wizard-video-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.wizard-video-section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-video-section-title--like::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yt-green);
}

.wizard-video-section-title--dislike::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yt-red);
}

.wizard-video-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.wizard-video-input-row .wizard-input { flex: 1; }

.wizard-video-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wizard-video-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
}

.wizard-video-thumb {
  width: 80px;
  height: 45px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.wizard-video-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wizard-video-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wizard-video-channel {
  font-size: 11px;
  color: var(--yt-text-muted);
}

.wizard-video-views {
  font-size: 11px;
  color: var(--yt-text-muted);
}

/* Sentiment badges */
.wizard-sentiment-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.wizard-sentiment-badge--like {
  background: rgba(43, 166, 64, 0.15);
  color: var(--yt-green);
}

.wizard-sentiment-badge--dislike {
  background: rgba(255, 0, 0, 0.15);
  color: var(--yt-red);
}

.wizard-optional-badge {
  font-size: 12px;
  font-weight: 400;
  color: var(--yt-text-muted);
  background: var(--yt-surface);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

/* Review grid */
.wizard-review-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.wizard-review-item {
  padding: 14px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
}

.wizard-review-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--yt-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 6px;
}

.wizard-review-value {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wizard-review-value .wizard-channel-avatar {
  width: 28px;
  height: 28px;
}

.wizard-review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.wizard-tag {
  background: var(--yt-pill);
  color: var(--yt-text);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.wizard-tag--small {
  font-size: 11px;
  padding: 2px 8px;
}

.wizard-muted { color: var(--yt-text-muted); }

/* Benefits list */
.wizard-review-benefits {
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.wizard-benefit-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.7;
}

/* Launch button */
.wizard-launch-form {
  text-align: center;
}

.btn-yt--launch {
  background: var(--yt-red);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 40px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.btn-yt--launch:hover {
  background: var(--yt-red-hover);
  box-shadow: 0 0 20px var(--yt-red-glow);
}

/* Processing/Status states */
.wizard-status {
  text-align: center;
  padding: 48px 24px;
}

.wizard-status-icon {
  margin-bottom: 20px;
}

.wizard-spinner-large {
  width: 48px;
  height: 48px;
  border: 3px solid var(--yt-border);
  border-top-color: var(--yt-red);
  border-radius: 50%;
  display: inline-block;
  animation: spin 1s linear infinite;
}

.wizard-status-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
}

.wizard-status-desc {
  color: var(--yt-text-muted);
  font-size: 14px;
  max-width: 480px;
  margin: 0 auto 24px;
}

.wizard-status-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 300px;
  margin: 0 auto;
  text-align: left;
}

.wizard-status-step {
  font-size: 13px;
  color: var(--yt-text-muted);
  padding: 6px 12px;
  background: var(--yt-surface);
  border-radius: 6px;
}

.wizard-status-check {
  font-size: 48px;
  color: var(--yt-green);
}

.wizard-status-error {
  font-size: 48px;
  color: var(--yt-red);
}

/* Results */
.wizard-results {
  text-align: left;
  margin: 24px 0;
}

.wizard-result-section {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.wizard-result-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.wizard-result-hint {
  font-size: 12px !important;
  color: var(--yt-text-muted) !important;
  opacity: 0.7;
  margin: 0 0 12px !important;
  line-height: 1.5 !important;
}

.wizard-result-section p {
  font-size: 14px;
  color: var(--yt-text-muted);
  line-height: 1.6;
  margin: 0;
}

.wizard-result-section ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--yt-text-muted);
  line-height: 1.7;
}

.wizard-taxonomy-topic {
  margin-bottom: 12px;
}

.wizard-taxonomy-subtopic {
  margin-left: 16px;
  font-size: 13px;
  color: var(--yt-text-muted);
  line-height: 1.8;
}

.wizard-taxonomy-micro {
  margin-left: 16px;
  margin-top: 4px;
}

/* Actions */
.wizard-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* Responsive */
@media (max-width: 600px) {
  .wizard-page { padding: 16px 10px; }
  .wizard-card { padding: 18px; }
  .wizard-title { font-size: 24px; }
  .wizard-progress-label { display: none; }
  .wizard-progress-step { justify-content: center; padding: 10px 8px; }
  .wizard-video-input-row { flex-direction: column; }
}

/* Niche badge on channel cards */
.channel-overview-niche {
  padding: 8px 12px 0;
}

.channel-overview-niche-pills {
  padding: 8px 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.channel-overview-niche-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: var(--yt-pill);
  color: var(--yt-text);
}

.btn-niche-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-niche-badge--completed {
  background: rgba(43, 166, 64, 0.15);
  color: var(--yt-green);
}

.btn-niche-badge--completed:hover { background: rgba(43, 166, 64, 0.25); }

.btn-niche-badge--processing {
  background: rgba(62, 166, 255, 0.15);
  color: var(--yt-blue);
}

.btn-niche-badge--draft {
  background: rgba(255, 165, 0, 0.15);
  color: #ffa500;
}

.btn-niche-badge--draft:hover { background: rgba(255, 165, 0, 0.25); }

.btn-niche-badge--new {
  background: rgba(255, 82, 82, 0.15);
  color: var(--yt-red);
  border-radius: 6px;
}

.btn-niche-badge--new:hover { background: rgba(255, 82, 82, 0.25); }

/* ── MY NICHE: Topic Coverage & Content Intelligence ── */

.niche-topic-card {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.niche-topic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.niche-topic-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.5px;
  margin: 0;
  color: var(--yt-text);
}

.niche-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--yt-pill);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--yt-text-muted);
}

.niche-stat-chip strong {
  color: var(--yt-text);
}

.niche-coverage-bar {
  height: 6px;
  background: var(--yt-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.niche-coverage-fill {
  height: 100%;
  background: var(--yt-green);
  border-radius: 3px;
  transition: width 0.3s ease;
  min-width: 0;
}

.niche-subtopic-row {
  padding: 8px 0 8px 16px;
  border-left: 2px solid var(--yt-border);
  margin-left: 4px;
  margin-bottom: 4px;
}

.niche-micro-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.niche-micro-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  background: var(--yt-pill);
  color: var(--yt-text-muted);
  cursor: default;
  transition: background 0.15s;
}

.niche-micro-pill--covered {
  background: rgba(43, 166, 64, 0.2);
  color: var(--yt-green);
}

.niche-gap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.niche-gap-table th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--yt-border);
  color: var(--yt-text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.niche-gap-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--yt-border);
  color: var(--yt-text);
}

.niche-gap-table tbody tr:hover {
  background: var(--yt-hover);
}

.is-hidden {
  display: none;
}

.niche-gap-expand-link {
  color: var(--yt-blue);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.niche-gap-expand-link:hover {
  opacity: 0.8;
}

.niche-gap-details-row td {
  padding: 0 12px 12px !important;
  border-bottom: 1px solid var(--yt-border);
}

.niche-gap-details-row:hover {
  background: none !important;
}

.niche-gap-details {
  background: var(--yt-hover);
  border-radius: 6px;
  padding: 12px 16px;
}

.niche-gap-video {
  padding: 4px 0;
  font-size: 13px;
}

.niche-gap-video a {
  color: var(--yt-blue);
  text-decoration: none;
}

.niche-gap-video a:hover {
  text-decoration: underline;
}

.niche-ideas-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.niche-idea-item {
  padding: 12px 16px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
}

.niche-perf-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 0 6px 16px;
  border-left: 2px solid var(--yt-border);
  margin-left: 4px;
  margin-bottom: 4px;
}

.niche-perf-name {
  font-size: 14px;
  color: var(--yt-text);
  min-width: 140px;
}

.niche-perf-stat {
  font-size: 13px;
  color: var(--yt-text-muted);
}

.niche-positioning-table { table-layout: fixed; }
.niche-positioning-table th:first-child,
.niche-positioning-table td:first-child { width: 30%; }
.niche-positioning-table th:nth-child(2),
.niche-positioning-table td:nth-child(2) { width: 8%; text-align: center; }
.niche-positioning-table th:nth-child(3),
.niche-positioning-table td:nth-child(3) { width: 14%; }

.niche-positioning-group td {
  font-weight: 600;
  font-size: 15px;
  color: var(--yt-text) !important;
  background: var(--yt-surface);
  border-bottom: 1px solid var(--yt-border);
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

/* ── Viral Badge ── */
.viral-badge {
  display: inline-block;
  background: rgba(255, 0, 0, 0.12);
  color: var(--yt-red);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  vertical-align: middle;
}
.viral-badge--sm {
  font-size: 9px;
  padding: 1px 5px;
}

/* ── Channel Tier Badge ── */
.channel-tier-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  vertical-align: middle;
}
.channel-tier-badge--sm {
  font-size: 9px;
  padding: 1px 5px;
}
.channel-status-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
}
.channel-status-badge--own {
  background: var(--yt-green, #2ba640);
  color: #fff;
}
.channel-status-badge--tracked {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.channel-tier-badge--dormant {
  background: rgba(128, 128, 128, 0.12);
  color: var(--yt-text-muted);
}
.channel-tier-badge--rising {
  background: rgba(62, 166, 255, 0.12);
  color: var(--yt-blue);
}
.channel-tier-badge--established {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.channel-tier-badge--viral {
  background: rgba(255, 0, 0, 0.12);
  color: var(--yt-red);
}
.channel-tier-badge--mega_viral {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.channel-tier-badge--mega_channel {
  background: rgba(147, 51, 234, 0.12);
  color: #9333ea;
}

/* ── Creator Size Tier Badge ── */
.creator-tier-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
  letter-spacing: 0.3px;
}
.creator-tier-badge--nano {
  background: rgba(128, 128, 128, 0.12);
  color: var(--yt-text-muted);
}
.creator-tier-badge--micro {
  background: rgba(128, 128, 128, 0.15);
  color: #9ca3af;
}
.creator-tier-badge--mid {
  background: rgba(62, 166, 255, 0.12);
  color: var(--yt-blue);
}
.creator-tier-badge--macro {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.creator-tier-badge--influencer {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
}
.creator-tier-badge--big-influencer {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.creator-tier-badge--millionaire {
  background: rgba(255, 0, 0, 0.12);
  color: var(--yt-red);
}
.creator-tier-badge--elite {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(255, 0, 0, 0.15));
  color: #f59e0b;
}

/* ── Channel Activity Badge ── */
.channel-activity-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  vertical-align: middle;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.channel-activity-badge--active {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.channel-activity-badge--inactive {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.channel-activity-badge--dormant {
  background: rgba(128, 128, 128, 0.12);
  color: var(--yt-text-muted);
}

/* ══════════════════════════════════════════════
   PRICING PAGE
   ══════════════════════════════════════════════ */

.pricing-section {
  padding-top: 80px;
}

.pricing-hero {
  text-align: center;
  padding: 60px 24px 48px;
}

.pricing-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: 3px;
  line-height: 1;
  margin-bottom: 16px;
}

.pricing-hero p {
  font-size: 18px;
  color: var(--yt-text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ── Pricing Toggle ── */
.pricing-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 40px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 24px;
  padding: 4px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.pricing-toggle-btn {
  padding: 8px 24px;
  border: none;
  border-radius: 20px;
  background: transparent;
  color: var(--yt-text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pricing-toggle-btn.active {
  background: var(--yt-card);
  color: var(--yt-text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.pricing-toggle-btn:hover:not(.active) {
  color: var(--yt-text);
}

.pricing-save-badge {
  background: var(--yt-green);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.pricing-billed {
  display: block;
  font-size: 13px;
  color: var(--yt-text-muted);
  margin-top: 4px;
}

/* ── Pricing Grid ── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
  align-items: start;
}

.pricing-card {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 16px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pricing-card--featured {
  border-color: var(--yt-red);
  border-width: 2px;
  transform: scale(1.04);
  box-shadow: 0 0 40px var(--yt-red-glow);
}

.pricing-card--featured:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow: 0 0 40px var(--yt-red-glow), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--yt-red);
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.pricing-card-header h3 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.pricing-tagline {
  font-size: 14px;
  color: var(--yt-text-muted);
  margin-bottom: 20px;
}

.pricing-price {
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pricing-amount {
  font-family: var(--font-display);
  font-size: 56px;
  letter-spacing: 1px;
  line-height: 1;
}

.pricing-period {
  font-size: 16px;
  color: var(--yt-text-muted);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-features li {
  font-size: 14px;
  color: var(--yt-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features .check {
  color: var(--yt-green);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.pricing-cta {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* ── Compare Table ── */
.compare-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.compare-section h2 {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 32px;
}

.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid var(--yt-border);
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  font-weight: 500;
}

.compare-table thead th {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 1px;
  padding-bottom: 16px;
  color: var(--yt-text);
}

.compare-table .compare-featured {
  background: rgba(255, 0, 0, 0.04);
}

.compare-table .check {
  color: var(--yt-green);
  font-weight: 700;
}

.compare-table .dash {
  color: var(--yt-text-muted);
  opacity: 0.4;
}

/* ── FAQ ── */
.faq-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.faq-section h2 {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 32px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] {
  border-color: var(--yt-text-muted);
}

.faq-item summary {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.2s;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: var(--yt-text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item summary:hover { color: var(--yt-red); }

.faq-item p {
  padding: 0 20px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--yt-text-muted);
  margin: 0;
}

/* ── Pricing Bottom CTA ── */
.pricing-bottom-cta {
  text-align: center;
  padding: 60px 24px 80px;
}

.pricing-bottom-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: 3px;
  line-height: 1;
  margin-bottom: 16px;
}

.pricing-bottom-cta p {
  font-size: 17px;
  color: var(--yt-text-muted);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Usage Page ── */
.usage-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.usage-tier-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--yt-pill);
  color: var(--yt-text);
}

.usage-tier-badge--starter { background: #2a2a2a; color: #aaa; }
.usage-tier-badge--pro { background: rgba(255, 0, 0, 0.15); color: var(--yt-red); }
.usage-tier-badge--business { background: rgba(255, 215, 0, 0.15); color: #ffd700; }

.usage-reset-text {
  font-size: 13px;
  color: var(--yt-text-muted);
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.usage-card {
  margin-bottom: 0;
}

.usage-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.usage-card-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--yt-text);
}

.usage-card-count {
  font-size: 13px;
  color: var(--yt-text-muted);
  font-variant-numeric: tabular-nums;
}

.usage-bar {
  height: 8px;
  background: var(--yt-border);
  border-radius: 4px;
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  background: var(--yt-red);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.usage-bar-fill--danger {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.usage-upgrade {
  text-align: center;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .usage-grid { grid-template-columns: 1fr; }
  .usage-header { flex-direction: column; align-items: flex-start; }
}

/* ── Pricing Responsive ── */
@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    gap: 32px;
  }
  .pricing-card--featured {
    transform: none;
    order: -1;
  }
  .pricing-card--featured:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 640px) {
  .pricing-hero { padding: 40px 16px 32px; }
  .pricing-grid { padding: 0 16px 60px; }
  .pricing-card { padding: 28px 20px; }
  .pricing-amount { font-size: 44px; }
  .compare-section { padding: 0 16px 60px; }
  .compare-section h2 { font-size: 28px; }
  .faq-section { padding: 0 16px 60px; }
  .faq-section h2 { font-size: 28px; }
  .pricing-bottom-cta { padding: 40px 16px 60px; }
}

/* ══════════════════════════════════════════════
   LANDING PAGE RESPONSIVE (Mobile-first fixes)
   ══════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* ── Nav ── */
  .nav-inner { padding: 0 16px; }
  .nav-links { gap: 4px; }
  .nav-link { font-size: 12px; padding: 6px 8px; }
  .nav-cta { padding: 6px 12px; font-size: 13px; }
  .logo-wordmark { font-size: 18px; }

  /* ── Hero ── */
  .hero { padding: 80px 20px 24px; }
  .hero-split { flex-direction: column; gap: 24px; text-align: center; }
  .hero-text-col { max-width: 100%; }
  .hero h1 { font-size: clamp(32px, 8vw, 48px); letter-spacing: 1px; }
  .hero-sub { max-width: 100%; margin-left: auto; margin-right: auto; font-size: 14px; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .hero-stats-inline { font-size: 11px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
  .hsi-dot { margin: 0 4px; }
  .hero-logo-col { order: -1; }
  .hero-logo-img { width: 140px; height: 140px; }
  .hero-logo-col::before { width: 200px; height: 200px; }
  .hero-logo-col::after { width: 160px; height: 160px; }
  .lens-flare-h { width: 240px; }
  .lens-flare-v { height: 160px; }
  .lens-flare-anamorphic { width: 260px; }

  /* ── Stats Bar ── */
  .stats-bar { flex-wrap: wrap; gap: 16px; padding: 16px 0; }
  .stat-value { font-size: 24px; }
  .stat-item { flex: 0 0 auto; }
  .stat-divider { display: none; }

  /* ── Built For / ICP ── */
  .built-for-section { padding: 48px 16px; }
  .built-for-grid { grid-template-columns: 1fr; gap: 16px; }
  .built-for-card { padding: 24px 20px 20px; }
  .built-for-card h3 { font-size: 22px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 32px; }
  .section-header h2 { font-size: 28px; }

  /* ── Features ── */
  .features-section { padding: 24px 16px 48px; }
  .features-tabs-row { gap: 6px; }
  .ftab { padding: 6px 10px; font-size: 11px; }
  .ftab-icon { font-size: 12px; }
  .fp-info h3 { font-size: 20px; }
  .fp-info p { font-size: 14px; }
  .fp-play-btn { width: 48px; height: 48px; font-size: 18px; }

  /* ── Skool ── */
  .skool-section { padding: 48px 16px; }
  .skool-inner { grid-template-columns: 1fr; gap: 32px; }
  .skool-header h2 { font-size: clamp(28px, 7vw, 40px); }
  .skool-desc { font-size: 14px; }
  .skool-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .skool-stat-box { padding: 14px; }
  .ssb-value { font-size: 22px; }
  .ssb-label { font-size: 11px; }
  .sc-row { grid-template-columns: 40px 1fr auto; gap: 10px; padding: 10px 12px; }
  .sc-sub-btn { display: none; }
  .sc-avatar { width: 40px; height: 40px; }
  .sc-name { font-size: 13px; }
  .sc-subs { font-size: 11px; }
  .sc-revenue { font-size: 14px; }
  .skool-lens-ring { display: none; }
  .lens-grip { display: none; }

  /* ── How It Works ── */
  .how-section { padding: 48px 16px; }
  .how-section .section-header { margin-bottom: 32px; }
  .how-steps { grid-template-columns: 1fr; gap: 16px; }
  .how-step { padding: 24px; }
  .how-step-num { font-size: 48px; margin-bottom: 8px; }

  /* ── CTA ── */
  .cta-section { padding: 60px 16px; }
  .cta-section h2 { font-size: clamp(32px, 8vw, 48px); }
  .cta-btns { flex-direction: column; align-items: center; }

  /* ── Aperture Divider ── */
  .aperture-divider { padding: 32px 16px; gap: 12px; }
  .aperture-divider-img { width: 48px; height: 48px; }
  .aperture-text { font-size: 14px; letter-spacing: 1px; }

  /* ── Footer ── */
  .foot-inner { grid-template-columns: 1fr; gap: 24px; }
  .foot-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .hero-logo-img { width: 100px; height: 100px; }
  .hero-logo-col::before { width: 140px; height: 140px; }
  .hero-logo-col::after { width: 110px; height: 110px; }
  .btn-yt, .btn-yt-outline { padding: 10px 18px; font-size: 14px; }
  .nav-links { display: none; }
  .skool-stats-grid { grid-template-columns: 1fr; }
  .skool-header h2 { font-size: 28px; }
  .sc-row { grid-template-columns: 32px 1fr auto; gap: 8px; padding: 8px 10px; }
  .sc-avatar { width: 32px !important; height: 32px !important; }
  .ftab { padding: 5px 8px; font-size: 10px; }
  .aperture-text { font-size: 11px; letter-spacing: 0.5px; }
  .aperture-divider { gap: 8px; }
  .aperture-divider-img { width: 36px; height: 36px; }
}

/* ═══════════════════════════════════════════════════
   PLAN CHANGE CONFIRMATION
   ═══════════════════════════════════════════════════ */

.plan-change-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.plan-change-title {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 8px;
}

.plan-change-subtitle {
  text-align: center;
  color: var(--yt-text-muted);
  font-size: 16px;
  margin-bottom: 40px;
}

.plan-change-comparison {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.plan-change-card {
  flex: 1;
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
}

.plan-change-card--new {
  border-color: var(--yt-red);
  box-shadow: 0 0 24px var(--yt-red-glow);
}

.plan-change-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--yt-text-muted);
  margin-bottom: 8px;
}

.plan-change-card-label--new {
  color: var(--yt-red);
}

.plan-change-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.plan-change-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 20px;
}

.plan-change-amount {
  font-family: var(--font-display);
  font-size: 40px;
  letter-spacing: 1px;
  line-height: 1;
}

.plan-change-period {
  font-size: 15px;
  color: var(--yt-text-muted);
}

.plan-change-price-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -12px;
  margin-bottom: 20px;
}

.plan-change-billed {
  font-size: 13px;
  color: var(--yt-text-muted);
}

.plan-change-savings {
  font-size: 11px;
  font-weight: 700;
  color: var(--yt-green);
  background: rgba(46, 160, 67, 0.12);
  padding: 2px 8px;
  border-radius: 10px;
}

.plan-change-limits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-change-limits li {
  font-size: 13px;
  color: var(--yt-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-change-limit-value {
  font-weight: 700;
  color: var(--yt-text);
  min-width: 24px;
}

.plan-change-limit--up { color: var(--yt-green); }
.plan-change-limit--down { color: var(--yt-red); }

.plan-change-limit-diff {
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 8px;
}

.plan-change-limit-diff--up {
  color: var(--yt-green);
  background: rgba(46, 160, 67, 0.12);
}

.plan-change-limit-diff--down {
  color: var(--yt-red);
  background: rgba(255, 0, 0, 0.1);
}

.plan-change-arrow {
  flex-shrink: 0;
  color: var(--yt-text-muted);
  display: flex;
  align-items: center;
}

/* Summary */
.plan-change-summary {
  background: var(--yt-card);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.plan-change-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.plan-change-summary-row + .plan-change-summary-row {
  border-top: 1px solid var(--yt-border);
}

.plan-change-summary-value {
  font-weight: 700;
}

.plan-change-summary-value--credit {
  color: var(--yt-green);
}

.plan-change-summary-note {
  font-size: 13px;
  color: var(--yt-text-muted);
  margin: 8px 0;
}

/* Actions */
.plan-change-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.plan-change-confirm-btn,
.plan-change-cancel-btn {
  padding: 14px 32px;
  font-size: 16px;
}

/* Mobile */
@media (max-width: 640px) {
  .plan-change-comparison {
    flex-direction: column;
    gap: 16px;
  }
  .plan-change-arrow {
    transform: rotate(90deg);
  }
  .plan-change-card {
    width: 100%;
  }
  .plan-change-actions {
    flex-direction: column;
  }
  .plan-change-confirm-btn,
  .plan-change-cancel-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* ── Support Ticket Thread ── */
.ticket-thread { display: flex; flex-direction: column; gap: 12px; }
.ticket-reply { background: var(--yt-surface); border: 1px solid var(--yt-border); border-radius: 8px; padding: 16px 20px; }
.ticket-reply--user { border-left: 3px solid var(--yt-border); }
.ticket-reply--admin { border-left: 3px solid var(--yt-red); }
.ticket-reply-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; color: var(--yt-text-muted); }
.ticket-reply-meta strong { color: var(--yt-text); }
.ticket-reply--admin .ticket-reply-meta strong { color: var(--yt-red); }
.ticket-reply-body { font-size: 14px; line-height: 1.6; color: var(--yt-text); }
.ticket-reply-body p { margin: 0 0 8px; }
.ticket-reply-body p:last-child { margin-bottom: 0; }

/* ── Ticket Status Badges ── */
.ticket-status-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.ticket-status-badge--open { background: rgba(255, 0, 0, 0.12); color: var(--yt-red); }
.ticket-status-badge--in_progress { background: rgba(200, 160, 0, 0.15); color: #c8a000; }
.ticket-status-badge--resolved { background: rgba(43, 166, 64, 0.15); color: var(--yt-green); }
.ticket-status-badge--closed { background: var(--yt-pill); color: var(--yt-text-muted); }
.ticket-status-badge--category { background: var(--yt-pill); color: var(--yt-text-muted); text-transform: capitalize; }

/* ── Scheduled Change Banner ── */
.scheduled-change-banner {
  margin-top: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--yt-blue);
  background: rgba(62, 166, 255, 0.08);
  border: 1px solid rgba(62, 166, 255, 0.25);
  border-radius: 6px;
  line-height: 1.5;
}

/* Coming Soon Modal */
.coming-soon-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  animation: coming-soon-fade-in 0.2s ease-out;
}
@keyframes coming-soon-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.coming-soon-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 16px;
  padding: 48px 40px 40px;
  max-width: 400px;
  width: 90%;
  animation: coming-soon-slide-up 0.25s ease-out;
}
@keyframes coming-soon-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.coming-soon-modal-content h3 {
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 700;
  color: var(--yt-text);
  margin: 16px 0 8px;
}
.coming-soon-modal-content p {
  font-size: 14px;
  color: var(--yt-text-secondary);
  line-height: 1.6;
  margin: 0;
}
.coming-soon-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.08);
  border: 1px solid rgba(255, 0, 0, 0.15);
}
.coming-soon-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--yt-text-muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.coming-soon-modal-close:hover {
  color: var(--yt-text);
  background: var(--yt-hover);
}

/* ── Niche Content Browser (4-pane) ── */
.niche-browser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.5fr;
  gap: 1px;
  background: var(--yt-border);
  border: 1px solid var(--yt-border);
  border-radius: 8px;
  overflow: hidden;
}
.niche-browser-pane {
  display: flex;
  flex-direction: column;
  background: var(--yt-card);
  min-height: 0;
}
.niche-browser-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--yt-text-muted);
  border-bottom: 1px solid var(--yt-border);
  background: var(--yt-surface);
  flex-shrink: 0;
}
.niche-browser-pane-count {
  background: var(--yt-border);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
}
.niche-browser-pane-body {
  overflow-y: auto;
  max-height: 600px;
  flex: 1;
}
/* ── Browser item (niche/topic/sub-topic button) ── */
.browser-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 14px;
  border: none;
  border-left: 3px solid transparent;
  background: none;
  color: var(--yt-text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
  font-family: var(--font-body);
}
.browser-item:hover {
  background: var(--yt-hover);
}
.browser-item--active {
  background: var(--yt-hover);
  border-left-color: var(--yt-red);
}
.browser-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
}
.browser-item-count {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--yt-text-muted);
  background: var(--yt-border);
  padding: 1px 7px;
  border-radius: 10px;
}
/* ── Video list in pane 4 ── */
.niche-browser-video {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--yt-text);
  transition: background 0.1s;
  border-bottom: 1px solid var(--yt-border);
}
.niche-browser-video:last-child {
  border-bottom: none;
}
.niche-browser-video:hover {
  background: var(--yt-hover);
}
.niche-browser-video-thumb {
  width: 100px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--yt-surface);
}
.niche-browser-video-thumb--placeholder {
  background: var(--yt-border);
}
.niche-browser-video-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.niche-browser-video-title {
  font-size: 13px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.niche-browser-video-meta {
  font-size: 11px;
  color: var(--yt-text-muted);
}
.niche-browser-video-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(255, 0, 0, 0.15);
  color: var(--yt-red);
}
.niche-browser-spinner {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}
.niche-browser-spinner .spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--yt-border);
  border-top-color: var(--yt-red);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
/* ── Competitor toolbar ── */
.niche-browser-toolbar { display: flex; align-items: center; padding: 8px 12px; background: var(--yt-card); border: 1px solid var(--yt-border); border-radius: 8px; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.niche-browser-toolbar-label { font-size: 12px; color: var(--yt-text-muted); font-weight: 500; }
.niche-browser-competitors { display: flex; align-items: center; gap: 12px; }
.niche-browser-toggle { display: flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; }
.niche-browser-toggle input { accent-color: var(--yt-red); }
/* Color legend */
.niche-browser-legend { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--yt-text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 2px; }
.legend-dot--unique { background: var(--yt-green, #2e7d32); }
.legend-dot--shared { background: #d4a017; }
.legend-dot--gap { background: var(--yt-red, #c00); }
/* Browser item color states */
.browser-item--unique { border-left: 3px solid var(--yt-green, #2e7d32); }
.browser-item--shared { border-left: 3px solid #d4a017; }
.browser-item--gap { border-left: 3px solid var(--yt-red, #c00); background: rgba(204, 0, 0, 0.04); }
/* Selection tag row — own row below pane header, hidden when empty */
.niche-browser-selection-row { display: none; padding: 5px 10px; background: var(--yt-card); border-bottom: 1px solid var(--yt-border); }
.niche-browser-selection-row:has(.niche-browser-tag) { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.niche-browser-tag { font-size: 11px; padding: 2px 10px; border-radius: 10px; background: var(--yt-border); color: var(--yt-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.niche-browser-tag--unique { background: rgba(46, 125, 50, 0.15); color: #2e7d32; }
.niche-browser-tag--shared { background: rgba(212, 160, 23, 0.15); color: #d4a017; }
.niche-browser-tag--gap { background: rgba(204, 0, 0, 0.12); color: #c00; }
/* Filter bar */
.niche-browser-filter-bar { display: flex; align-items: center; gap: 8px; }
.niche-browser-filter-group { display: flex; border: 1px solid var(--yt-border); border-radius: 6px; overflow: hidden; }
.niche-browser-filter-btn { padding: 4px 10px; font-size: 11px; border: none; background: none; color: var(--yt-text-muted); cursor: pointer; transition: background 0.1s, color 0.1s; font-family: var(--font-body); }
.niche-browser-filter-btn:not(:last-child) { border-right: 1px solid var(--yt-border); }
.niche-browser-filter-btn:hover { background: var(--yt-hover); color: var(--yt-text); }
.niche-browser-filter-btn--active { background: var(--yt-hover); color: var(--yt-text); font-weight: 600; }
/* CSV export button */
.niche-browser-csv-btn { display: flex; align-items: center; gap: 4px; padding: 4px 10px; font-size: 11px; border: 1px solid var(--yt-border); border-radius: 6px; background: none; color: var(--yt-text-muted); cursor: pointer; transition: background 0.1s, color 0.1s; font-family: var(--font-body); margin-left: auto; }
.niche-browser-csv-btn:hover { background: var(--yt-hover); color: var(--yt-text); }
/* Video channel badge */
.niche-browser-video-channel { font-size: 11px; color: var(--yt-text-muted); background: var(--yt-surface); padding: 1px 6px; border-radius: 4px; white-space: nowrap; margin-right: 4px; }
/* ── Responsive ── */
@media (max-width: 1024px) {
  .niche-browser-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .niche-browser-pane--videos {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .niche-browser-grid {
    grid-template-columns: 1fr;
  }
  .niche-browser-pane-body {
    max-height: 300px;
  }
}

/* ─────────────────────────────────────────────────────
   Outlier row action buttons
   ───────────────────────────────────────────────────── */
.outlier-row-actions {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.outlier-action-btn {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--yt-border);
  color: var(--yt-text-muted);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  transition: all 0.15s;
}

.outlier-action-btn--analyze {
  border-color: var(--yt-blue, #3ea6ff);
  color: var(--yt-blue, #3ea6ff);
}

.outlier-action-btn--analyze:hover {
  background: rgba(62, 166, 255, 0.12);
}

.outlier-action-btn--loading {
  color: var(--yt-text-muted);
  border-color: var(--yt-border);
  cursor: default;
  pointer-events: none;
  animation: outlier-pulse 1.4s ease-in-out infinite;
}

@keyframes outlier-pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

.outlier-action-btn--view {
  border-color: var(--yt-green, #2ba640);
  color: var(--yt-green, #2ba640);
}

.outlier-action-btn--view:hover {
  background: rgba(43, 166, 64, 0.12);
}

/* Shared confirm-modal submit button — switches between primary/danger */
.confirm-modal-submit {
  padding: 8px 16px;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: var(--yt-red);
}

.confirm-modal-submit[data-confirm-style="primary"] {
  background: var(--yt-green, #2ba640);
}

.confirm-modal-submit[data-confirm-style="danger"] {
  background: var(--yt-red);
}

/* ─────────────────────────────────────────────────────
   Transcript analysis display (video detail page)
   ───────────────────────────────────────────────────── */
.transcript-analysis {
  margin-top: 32px;
}

.transcript-analysis-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--yt-border);
}

.transcript-analysis-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.5px;
  margin: 0;
  color: var(--yt-text);
}

.transcript-analysis-header-meta {
  font-size: 12px;
  color: var(--yt-text-muted);
}

.ta-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .ta-grid--2col {
    grid-template-columns: 1fr 1fr;
  }
}

.ta-card {
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.ta-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--yt-text);
  margin: 0 0 12px;
}

.ta-card h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--yt-text-muted);
  margin: 14px 0 6px;
}

.ta-card p {
  color: var(--yt-text);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 10px;
}

.ta-card p:last-child {
  margin-bottom: 0;
}

.ta-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: rgba(62, 166, 255, 0.15);
  color: var(--yt-blue, #3ea6ff);
  margin: 4px 6px 4px 0;
}

.ta-excerpt {
  background: var(--yt-pill, rgba(255, 255, 255, 0.04));
  border-left: 3px solid var(--yt-blue, #3ea6ff);
  padding: 10px 14px;
  border-radius: 4px;
  font-style: italic;
  color: var(--yt-text);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 10px;
}

.ta-template {
  background: rgba(43, 166, 64, 0.1);
  border-left: 3px solid var(--yt-green, #2ba640);
  padding: 10px 14px;
  border-radius: 4px;
  font-family: var(--font-mono, "SF Mono", Menlo, Consolas, monospace);
  font-size: 13px;
  color: var(--yt-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.ta-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ta-timeline-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--yt-border);
}

.ta-timeline-item:last-child {
  border-bottom: none;
}

.ta-timeline-ts {
  font-family: var(--font-mono, "SF Mono", Menlo, Consolas, monospace);
  font-size: 12px;
  color: var(--yt-blue, #3ea6ff);
  padding-top: 2px;
}

.ta-timeline-beat {
  font-weight: 600;
  font-size: 13px;
  color: var(--yt-text);
  margin-bottom: 2px;
}

.ta-timeline-desc {
  font-size: 13px;
  color: var(--yt-text-muted);
  line-height: 1.5;
}

.ta-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ta-list li {
  padding: 8px 0 8px 20px;
  position: relative;
  color: var(--yt-text);
  font-size: 14px;
  line-height: 1.5;
  border-bottom: 1px dashed var(--yt-border);
}

.ta-list li:last-child {
  border-bottom: none;
}

.ta-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--yt-blue, #3ea6ff);
  font-size: 12px;
}

.ta-insight {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed var(--yt-border);
}

.ta-insight:last-child { border-bottom: none; }

.ta-insight-num {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--yt-blue, #3ea6ff);
  line-height: 1;
  flex-shrink: 0;
  min-width: 24px;
}

.ta-insight-text {
  font-size: 14px;
  color: var(--yt-text);
  line-height: 1.5;
}

.ta-kw-chip {
  display: inline-block;
  padding: 4px 10px;
  background: var(--yt-pill, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--yt-border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--yt-text);
  margin: 3px 5px 3px 0;
}

.ta-kw-chip--primary {
  background: rgba(62, 166, 255, 0.15);
  border-color: var(--yt-blue, #3ea6ff);
  color: var(--yt-blue, #3ea6ff);
}

.ta-caveats {
  font-size: 12px;
  color: var(--yt-text-muted);
  font-style: italic;
  margin-top: 20px;
  padding: 10px 14px;
  border-left: 2px solid var(--yt-border);
}

.transcript-analysis-pending,
.transcript-analysis-failed {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--yt-surface);
  border: 1px solid var(--yt-border);
  font-size: 14px;
  color: var(--yt-text-muted);
}

.transcript-analysis-failed {
  border-color: var(--yt-red);
  color: var(--yt-red);
}

/* ── Notification Bell ── */
.notification-bell { position: relative; }
.notification-bell-btn {
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; color: var(--yt-text-muted); cursor: pointer;
  padding: 6px 8px; border-radius: 6px; width: 100%;
  font-size: 13px; transition: background 0.15s;
}
.notification-bell-btn:hover { background: var(--yt-hover); color: var(--yt-text); }
.notification-bell-btn .app-sidebar-icon { width: 18px; height: 18px; flex-shrink: 0; }
.notification-badge {
  position: absolute; top: 2px; left: 22px;
  background: var(--yt-red, #f00); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 2px 5px; border-radius: 8px; min-width: 16px; text-align: center;
}
.notification-dropdown {
  position: fixed; width: 320px; max-height: 400px;
  background: var(--yt-card); border: 1px solid var(--yt-border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 1000; overflow: hidden;
}
.notification-dropdown-header {
  padding: 12px 16px; border-bottom: 1px solid var(--yt-border);
  display: flex; justify-content: space-between; align-items: center;
}
.notification-dropdown-title { font-size: 14px; font-weight: 600; color: var(--yt-text); }
.notification-dropdown-body { max-height: 340px; overflow-y: auto; }
.notification-item { border-bottom: 1px solid var(--yt-border); }
.notification-item:last-child { border-bottom: none; }
.notification-item--unread { background: rgba(62,166,255,0.06); }
.notification-link {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 16px;
  text-decoration: none; color: var(--yt-text); transition: background 0.15s;
}
.notification-link:hover { background: var(--yt-hover); }
.notification-title { font-size: 13px; font-weight: 500; }
.notification-body { font-size: 12px; color: var(--yt-text-muted); }
.notification-time { font-size: 11px; color: var(--yt-text-muted); opacity: 0.7; }
.notification-empty {
  padding: 24px 16px; text-align: center; font-size: 13px; color: var(--yt-text-muted);
}
