@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --bg-base: #090a0f;
  --bg-card: rgba(18, 21, 30, 0.85);
  --bg-card-hover: rgba(26, 30, 44, 0.92);
  --bg-elevated: rgba(26, 30, 43, 0.88);
  --border: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --yt-red: #ff1a40;
  --yt-red-soft: rgba(255, 26, 64, 0.12);
  --yt-red-border: rgba(255, 26, 64, 0.35);
  --accent-gold: #fbbf24;
  --accent-gold-soft: rgba(251, 191, 36, 0.14);
  --accent-blue: #38bdf8;
  --accent-blue-soft: rgba(56, 189, 248, 0.14);
  --accent-green: #34d399;
  --accent-green-soft: rgba(52, 211, 153, 0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --font-sans: 'Prompt', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

input, select, textarea, button, .btn {
  font-family: inherit;
}

code, pre {
  font-family: var(--font-mono, monospace);
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1400px;
  height: 700px;
  background: radial-gradient(circle at 50% -80px, rgba(255, 26, 64, 0.09) 0%, rgba(251, 191, 36, 0.04) 35%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Container */
.yt-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  position: relative;
  z-index: 1;
}

/* Navigation Header */
.yt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.yt-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.yt-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ff1a40 0%, #b30024 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 26, 64, 0.4);
}

.yt-brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.yt-brand-text .channel-badge {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-weight: 600;
  font-family: var(--font-sans);
}

.yt-brand-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.yt-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-sans) !important;
}

.yt-header-controls *,
.btn-control,
.select-control,
.select-control option {
  font-family: var(--font-sans) !important;
}

.btn-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-sans) !important;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
}

.btn-control:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-highlight);
  color: #fff;
  transform: translateY(-1px);
}

.btn-control.primary {
  background: linear-gradient(135deg, #ff1a40 0%, #cc0029 100%);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 26, 64, 0.35);
}

.btn-control.primary:hover {
  background: linear-gradient(135deg, #ff335c 0%, #e6002e 100%);
  box-shadow: 0 6px 20px rgba(255, 26, 64, 0.5);
}

.select-control {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  outline: none;
  cursor: pointer;
  transition: border-color 0.18s ease;
}

.select-control:focus {
  border-color: var(--border-highlight);
}

/* Race Tracker Banner */
.race-tracker-card {
  background: linear-gradient(135deg, rgba(22, 25, 36, 0.95) 0%, rgba(16, 18, 26, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.race-tracker-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff1a40 0%, #fbbf24 50%, #38bdf8 100%);
}

.race-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.race-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.race-title-group h2 {
  font-size: 1.18rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.race-tag {
  background: rgba(255, 26, 64, 0.15);
  color: #ff6b81;
  border: 1px solid rgba(255, 26, 64, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

.race-vs-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.race-combatant {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.race-combatant.my-channel {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(18, 21, 30, 0.95) 100%);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.08);
}

.race-combatant.my-channel:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 8px 30px rgba(251, 191, 36, 0.2);
}

.race-combatant.rival-channel {
  border-color: rgba(255, 26, 64, 0.35);
  background: linear-gradient(135deg, rgba(255, 26, 64, 0.1) 0%, rgba(18, 21, 30, 0.95) 100%);
  box-shadow: 0 4px 20px rgba(255, 26, 64, 0.08);
}

.race-combatant.rival-channel:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 26, 64, 0.6);
  box-shadow: 0 8px 30px rgba(255, 26, 64, 0.2);
}

.combatant-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--border-highlight);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.my-channel .combatant-avatar {
  border-color: var(--accent-gold);
}

.rival-channel .combatant-avatar {
  border-color: var(--yt-red);
}

.combatant-info {
  flex: 1;
  min-width: 0;
}

.combatant-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.combatant-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  display: block;
}

.combatant-name:hover {
  text-decoration: underline;
}

.combatant-subs {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  margin: 2px 0 4px;
}

.my-channel .combatant-subs {
  color: var(--accent-gold);
}

.rival-channel .combatant-subs {
  color: #ff6b81;
}

.combatant-chart-link {
  font-size: 0.75rem;
  color: var(--accent-gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.combatant-chart-link:hover {
  text-decoration: underline;
}

.combatant-chart-link.rival {
  color: #ff6b81;
}

.race-vs-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
}

.vs-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f2433 0%, #121520 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.05em;
}

.gap-chip {
  margin-top: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 26, 64, 0.15);
  color: #ff6b81;
  border: 1px solid rgba(255, 26, 64, 0.4);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(255, 26, 64, 0.2);
}

/* Progress bar with Shimmer Animation */
.race-progress-wrapper {
  margin-top: 12px;
}

.race-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.race-progress-bar-bg {
  height: 14px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.race-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24 0%, #ff1a40 100%);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 16px rgba(255, 26, 64, 0.6);
  position: relative;
  overflow: hidden;
}

.race-progress-bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 60px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmerSweep 2.2s infinite ease-in-out;
}

@keyframes shimmerSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(500%); }
}

/* Stat Cards Grid */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.6);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2px;
}

.chart-tab-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2px;
  flex-shrink: 0;
}

.combatant-label svg,
.combatant-chart-link svg,
.explorer-search-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2px;
  display: inline-block;
  vertical-align: middle;
}

.stat-icon.gold {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(251, 191, 36, 0.06));
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.stat-icon.red {
  background: linear-gradient(135deg, rgba(255, 26, 64, 0.22), rgba(255, 26, 64, 0.06));
  border: 1px solid rgba(255, 26, 64, 0.35);
  box-shadow: 0 4px 14px rgba(255, 26, 64, 0.2);
  color: #ff1a40;
}

.stat-icon.blue {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.stat-icon.green {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.22), rgba(52, 211, 153, 0.06));
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 4px 14px rgba(52, 211, 153, 0.2);
  color: #34d399;
}

.stat-body {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.stat-subtext {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Chart Section */
.chart-section-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.chart-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.chart-title-group h2 {
  font-size: 1.18rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.chart-title-group p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Tabs */
.chart-tabs-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.chart-tab-btn {
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-highlight);
  color: #fff;
}

.chart-tab-btn.active {
  background: linear-gradient(135deg, #ff1a40 0%, #b30024 100%);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 26, 64, 0.35);
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 420px;
  margin-top: 10px;
}

/* Two Column Layout for Discord Feed & Videos */
.content-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* Discord Feed Card */
.discord-feed-card, .recent-videos-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.feed-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.discord-channel-badge {
  font-size: 0.75rem;
  color: #5865f2;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
}

.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 9px;
  border-radius: 999px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.feed-header-title h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.discord-feed-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.discord-feed-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Discord Embed Card & Rich Notifications */
.discord-embed-card {
  flex-shrink: 0;
  background: #2b2d31;
  border-radius: 6px 10px 10px 6px;
  border-left: 4px solid #5865f2;
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.discord-embed-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.discord-msg-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.discord-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.discord-msg-meta {
  flex: 1;
  min-width: 0;
}

.discord-msg-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.discord-author-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: color 0.15s ease;
}

.discord-author-name:hover {
  color: #ff4d6d;
  text-decoration: underline;
}

.discord-bot-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #5865f2;
  color: #fff;
  border-radius: 3px;
  line-height: 1.2;
}

.discord-author-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 999px;
  line-height: 1.3;
}

.discord-author-tag.self {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.discord-author-tag.target {
  background: rgba(255, 0, 51, 0.2);
  color: #ff6b81;
  border: 1px solid rgba(255, 0, 51, 0.4);
}

.discord-author-tag.competitor {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.35);
}

.discord-embed-title-bar {
  margin-bottom: 8px;
}

.discord-embed-title-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Field blocks */
.discord-field-block {
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 9px 12px;
}

.discord-field-header {
  font-size: 0.74rem;
  font-weight: 700;
  color: #b5bac1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Stats Grid in Discord Embed */
.discord-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.discord-stat-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 5px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-tile-label {
  font-size: 0.72rem;
  color: #949ba4;
  font-weight: 500;
}

.stat-tile-val-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.stat-tile-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: #f2f3f5;
  font-family: var(--font-mono, monospace);
}

/* Delta Badges */
.delta-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  line-height: 1.3;
}

.delta-badge.gain {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.delta-badge.loss {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.delta-badge.neutral {
  background: rgba(148, 155, 164, 0.15);
  color: #949ba4;
}

/* Video Feed items in Discord Notification */
.discord-videos-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discord-video-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 6px 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.discord-video-card:hover {
  background: rgba(255, 0, 51, 0.08);
  border-color: rgba(255, 0, 51, 0.35);
  transform: translateX(2px);
}

.discord-video-thumb {
  position: relative;
  width: 90px;
  height: 52px;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.discord-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discord-video-thumb .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.8rem;
  opacity: 0.8;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.discord-video-card:hover .play-overlay {
  opacity: 1;
  transform: scale(1.15);
  color: #ff0033;
}

.discord-video-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.discord-video-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e0e2e5;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discord-video-card:hover .discord-video-title {
  color: #fff;
}

.discord-video-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.discord-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: #949ba4;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

/* General field styling */
.discord-general-field {
  font-size: 0.84rem;
  color: #dbdee1;
  line-height: 1.5;
}

.discord-inline-link {
  color: #5865f2;
  font-weight: 600;
  text-decoration: none;
}

.discord-inline-link:hover {
  text-decoration: underline;
  color: #7983f5;
}

/* Embed footer */
.discord-embed-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #949ba4;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 6px;
}

.discord-footer-bot {
  font-weight: 500;
  color: #b5bac1;
}

.discord-footer-time {
  color: #949ba4;
}

/* Video Cards List */
.videos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.videos-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.video-item-card {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.video-item-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

.video-thumbnail-wrap {
  width: 120px;
  height: 68px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  position: relative;
  flex-shrink: 0;
}

.video-thumbnail-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.video-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-item-stats {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.video-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1;
  transition: color 0.15s ease;
}

.video-stat-badge svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.video-stat-badge.views svg {
  color: #38bdf8; /* sky cyan */
}

.video-stat-badge.likes svg {
  color: #fb7185; /* rose red */
}

.video-stat-badge.comments svg {
  color: #a78bfa; /* purple violet */
}

.video-item-card:hover .video-stat-badge.views {
  color: #e0f2fe;
}
.video-item-card:hover .video-stat-badge.likes {
  color: #ffe4e6;
}
.video-item-card:hover .video-stat-badge.comments {
  color: #ede9fe;
}

/* Channel Explorer Table Section */
.explorer-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease;
  will-change: transform, box-shadow;
}

.explorer-section-card:hover {
  border-color: rgba(255, 0, 51, 0.28);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.explorer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 14px;
  flex-wrap: wrap;
}

.explorer-search-box {
  position: relative;
  width: 280px;
}

.explorer-search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease,
              background-color 0.2s ease;
  will-change: transform;
}

.explorer-search-box input:focus {
  border-color: var(--yt-red);
  background: rgba(26, 26, 36, 0.95);
  transform: translateY(-1px) scale(1.015);
  box-shadow: 0 4px 14px rgba(255, 0, 51, 0.2);
}

.explorer-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
  pointer-events: none;
}

.explorer-search-box:focus-within .explorer-search-icon {
  color: var(--yt-red);
  transform: translateY(-50%) scale(1.2) rotate(-8deg);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.yt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-size: 0.88rem;
}

.yt-table th {
  background: var(--bg-elevated);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.yt-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
  position: relative;
  white-space: nowrap;
}

.yt-table th.sortable:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

.yt-table th.sortable:active {
  transform: translateY(1px) scale(0.99);
}

.yt-table th.sortable:focus-visible {
  outline: 2px solid var(--yt-red);
  outline-offset: -2px;
}

.th-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.yt-table th.sortable:hover .th-content {
  transform: translateY(-1px);
}

.th-content.right {
  justify-content: flex-end;
}

.th-content.center {
  justify-content: center;
}

.sort-icon {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  opacity: 0.35;
  transition: opacity 0.2s ease, color 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.yt-table th.sortable:hover .sort-icon {
  opacity: 0.85;
  transform: scale(1.25);
}

.yt-table th.sortable.sort-asc,
.yt-table th.sortable.sort-desc {
  color: #fff;
  background: rgba(255, 0, 51, 0.08);
  border-bottom: 2px solid var(--yt-red);
}

.yt-table th.sortable.sort-asc .sort-icon {
  opacity: 1;
  color: var(--yt-red);
  font-weight: 700;
  transform: scale(1.28) translateY(-1px);
}

.yt-table th.sortable.sort-desc .sort-icon {
  opacity: 1;
  color: var(--yt-red);
  font-weight: 700;
  transform: scale(1.28) translateY(1px);
}

.sort-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
  margin-left: 8px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.25s ease;
  user-select: none;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

.sort-status-pill:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.65);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.sort-status-pill:active {
  transform: translateY(1px) scale(0.92);
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.2);
  transition: transform 0.08s ease;
}

@keyframes sortPillPop {
  0% {
    transform: scale(0.88) translateY(1px);
  }
  35% {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.6), 0 0 16px rgba(245, 158, 11, 0.4);
    border-color: rgba(245, 158, 11, 0.95);
    background: rgba(245, 158, 11, 0.25);
  }
  65% {
    transform: scale(0.97) translateY(0);
  }
  82% {
    transform: scale(1.03) translateY(-1px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

.sort-status-pill.pill-transform-pulse {
  animation: sortPillPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Shimmer wave when pill updates */
.sort-status-pill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.sort-status-pill.pill-transform-pulse::after {
  animation: pillShimmerSweep 0.45s ease forwards;
}

@keyframes pillShimmerSweep {
  0% { left: -100%; }
  100% { left: 160%; }
}

.sort-status-pill .pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.24);
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 2px;
  animation: pillBadgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pillBadgePop {
  0% {
    transform: scale(0.75) translateY(2px);
    opacity: 0.4;
  }
  60% {
    transform: scale(1.1) translateY(-1px);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.sort-status-pill .pill-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.sort-status-pill .pill-arrow.icon-spin {
  animation: pillArrowSpin 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pillArrowSpin {
  0% {
    transform: scale(0.5) rotate(-180deg);
    opacity: 0.3;
  }
  60% {
    transform: scale(1.3) rotate(15deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.sort-status-pill .pill-arrow.asc {
  color: #10b981;
}

.sort-status-pill .pill-arrow.desc {
  color: #ef4444;
}

.yt-table th.sortable {
  transition: background-color 0.2s ease, transform 0.15s ease;
  user-select: none;
}

.yt-table th.sortable:active {
  transform: scale(0.96);
}

.yt-table th.sortable .sort-icon {
  display: inline-block;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease, opacity 0.2s ease;
  transform-origin: center center;
  will-change: transform;
}

@keyframes iconFlipBounce {
  0% { transform: scale(0.8) rotate(0deg); }
  50% { transform: scale(1.35) rotate(180deg); }
  100% { transform: scale(1.25) rotate(0deg); }
}

.yt-table th.sortable .sort-icon.icon-flip {
  animation: iconFlipBounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.yt-table tbody tr.row-glide-transform td {
  position: relative;
  z-index: 5;
  background-color: rgba(245, 158, 11, 0.09) !important;
  box-shadow: inset 0 1px 0 rgba(245, 158, 11, 0.25), inset 0 -1px 0 rgba(245, 158, 11, 0.25);
  will-change: transform;
}

@keyframes tableRowEntrance {
  0% {
    opacity: 0.12;
    transform: translateY(8px) scale(0.995);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.table-sort-pulse tr {
  animation: tableRowEntrance 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.table-sort-pulse tr:nth-child(1) { animation-delay: 0.01s; }
.table-sort-pulse tr:nth-child(2) { animation-delay: 0.025s; }
.table-sort-pulse tr:nth-child(3) { animation-delay: 0.04s; }
.table-sort-pulse tr:nth-child(4) { animation-delay: 0.055s; }
.table-sort-pulse tr:nth-child(5) { animation-delay: 0.07s; }
.table-sort-pulse tr:nth-child(6) { animation-delay: 0.085s; }
.table-sort-pulse tr:nth-child(7) { animation-delay: 0.10s; }
.table-sort-pulse tr:nth-child(8) { animation-delay: 0.115s; }
.table-sort-pulse tr:nth-child(9) { animation-delay: 0.13s; }
.table-sort-pulse tr:nth-child(10) { animation-delay: 0.145s; }
.table-sort-pulse tr:nth-child(n+11) { animation-delay: 0.16s; }

.yt-table tbody tr {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.18s ease;
  position: relative;
}

.yt-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  vertical-align: middle;
  transition: background-color 0.18s ease;
}

.yt-table td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.yt-table td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.yt-table tbody tr:hover td {
  background: var(--bg-card-hover);
}

.yt-table tbody tr:hover {
  transform: translateX(6px) scale(1.002);
  z-index: 5;
  box-shadow: -4px 0 0 var(--yt-red), 0 6px 18px rgba(0, 0, 0, 0.35);
}

.yt-table tbody tr.is-my-channel td {
  background: rgba(245, 158, 11, 0.08);
  font-weight: 600;
}

.yt-table tbody tr.is-my-channel:hover td {
  background: rgba(245, 158, 11, 0.14);
}

.yt-table tbody tr.is-my-channel:hover {
  transform: translateX(6px) scale(1.003);
  box-shadow: -4px 0 0 var(--accent-gold), 0 6px 18px rgba(245, 158, 11, 0.25);
}

.yt-table tbody tr.is-rival td {
  background: rgba(255, 0, 51, 0.06);
}

.yt-table tbody tr.is-rival:hover td {
  background: rgba(255, 0, 51, 0.12);
}

.yt-table tbody tr.is-rival:hover {
  transform: translateX(6px) scale(1.002);
  box-shadow: -4px 0 0 #ff334b, 0 6px 18px rgba(255, 51, 75, 0.25);
}

.yt-table tbody tr:active {
  transform: translateX(3px) scale(0.998);
  transition-duration: 0.08s;
}

.table-channel-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-channel-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease;
  will-change: transform;
}

.yt-table tbody tr:hover .table-channel-avatar {
  transform: scale(1.16) rotate(3deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.table-channel-avatar:hover {
  transform: scale(1.3) rotate(-5deg) !important;
  box-shadow: 0 6px 16px rgba(255, 0, 51, 0.4) !important;
}

.table-channel-name {
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.18s ease;
}

.table-channel-name:hover {
  text-decoration: none;
  color: #ff4d6d;
  transform: translateX(4px);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-elevated);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.22s ease;
  will-change: transform;
}

.yt-table tbody tr:hover .rank-badge {
  transform: scale(1.12);
}

.yt-table tbody tr:hover .rank-badge.top-1 {
  transform: scale(1.22) rotate(-5deg);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.yt-table tbody tr:hover .rank-badge.top-2 {
  transform: scale(1.18) rotate(-4deg);
  box-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.yt-table tbody tr:hover .rank-badge.top-3 {
  transform: scale(1.15) rotate(-3deg);
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.5);
}

.yt-table tbody tr:hover .rank-badge.my-rank {
  transform: scale(1.2) rotate(4deg);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.rank-badge.top-1 {
  background: #ffd700;
  color: #000;
}

.rank-badge.top-2 {
  background: #c0c0c0;
  color: #000;
}

.rank-badge.top-3 {
  background: #cd7f32;
  color: #fff;
}

.rank-badge.my-rank {
  background: var(--accent-gold);
  color: #000;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease;
}

.yt-table tbody tr:hover .status-tag {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.status-tag.ahead {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-tag.behind {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-tag.target {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-tag.self {
  background: rgba(255, 0, 51, 0.2);
  color: #ff4d6d;
  border: 1px solid rgba(255, 0, 51, 0.4);
}

/* Empty State */
.empty-feed-notice {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-feed-notice svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

/* Footer note */
.yt-footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 30px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .race-vs-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .race-vs-badge {
    margin: 4px auto;
  }
  .content-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .yt-container {
    padding: 12px 12px 40px;
  }
  .yt-header {
    flex-direction: column;
    align-items: stretch;
  }
  .yt-header-controls {
    justify-content: space-between;
  }
  .chart-canvas-wrapper {
    height: 300px;
  }
  .stat-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stat-card {
    padding: 12px;
  }
  .stat-icon {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }
  .stat-value {
    font-size: 1.15rem;
  }
}

/* ========================================================
   🔗 INTERACTIVE DASHBOARD LINKS & SHORTCUTS
   ======================================================== */
.clickable-stat-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.clickable-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 0, 51, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.combatant-chart-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-gold);
  background: var(--accent-gold-soft);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
  padding: 3px 10px;
  margin-top: 6px;
  text-decoration: none;
  width: fit-content;
  transition: all 0.2s ease;
}
.combatant-chart-link:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}
.combatant-chart-link.rival {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
}
.combatant-chart-link.rival:hover {
  background: rgba(248, 113, 113, 0.22);
  border-color: #f87171;
}

.table-channel-yt-ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              color 0.15s ease,
              background-color 0.15s ease,
              box-shadow 0.2s ease;
  will-change: transform;
}
.table-channel-yt-ext:hover {
  color: #ffffff;
  background: rgba(255, 0, 51, 0.22);
  transform: translate(3px, -2px) scale(1.25);
  box-shadow: 0 2px 8px rgba(255, 0, 51, 0.35);
}

.table-stat-link {
  color: inherit;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  display: inline-block;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.15s ease;
  will-change: transform;
}
.table-stat-link:hover {
  color: var(--accent-gold);
  text-decoration: none;
  transform: scale(1.08) translateY(-1px);
}
.table-stat-link.views-link:hover {
  color: #38bdf8;
  transform: scale(1.08) translateY(-1px);
}

.stat-tile-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
  margin-bottom: 3px;
}

.discord-chart-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.discord-chart-shortcut:hover {
  background: rgba(59, 130, 246, 0.28);
  border-color: #60a5fa;
  color: #93c5fd;
}

.discord-author-ext {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 4px;
}
.discord-author-ext:hover {
  color: #ffffff;
}

/* ========================================================
   🎬 DEDICATED CHANNEL DETAIL PAGE STYLES
   ======================================================== */
.yt-detail-nav {
  padding: 12px 18px;
}

.yt-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  transition: all 0.18s ease;
}
.yt-back-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-highlight);
  transform: translateX(-2px);
}
.yt-back-btn .back-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.nav-divider {
  color: var(--border-highlight);
  font-weight: 300;
}
.nav-current-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.range-control-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.range-icon-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Channel Hero Card */
.channel-hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.channel-hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}
.channel-hero-card.is-my-channel::before {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}
.channel-hero-card.is-rival::before {
  background: linear-gradient(90deg, #ff1a40, #f97316);
}

.channel-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.channel-avatar-box {
  flex-shrink: 0;
}
.channel-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.channel-hero-card.is-my-channel .channel-avatar-img {
  border-color: var(--accent-gold);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}
.channel-hero-card.is-rival .channel-avatar-img {
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.channel-hero-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel-hero-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.channel-title-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.channel-status-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.channel-status-badge.self {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.channel-status-badge.target {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.channel-status-badge.competitor {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.channel-rank-chip {
  font-size: 0.78rem;
  font-weight: 700;
  color: #e5e7eb;
  background: var(--bg-elevated);
  border: 1px solid var(--border-highlight);
  padding: 3px 10px;
  border-radius: 999px;
}

.channel-hero-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-chip {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.hero-chip code {
  color: #e5e7eb;
  font-family: var(--font-mono, monospace);
}
.hero-chip.yt-link-chip {
  color: #f87171;
  background: rgba(255, 0, 51, 0.08);
  border-color: rgba(255, 0, 51, 0.25);
  font-weight: 600;
  transition: all 0.15s ease;
}
.hero-chip.yt-link-chip:hover {
  background: rgba(255, 0, 51, 0.18);
  color: #ffffff;
}

.channel-desc-preview {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--border-highlight);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 4px;
}

.channel-hero-footnote {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.channel-hero-footnote strong {
  color: var(--text-primary);
}

/* Detail KPI Cards */
.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.kpi-card.highlight-views::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #ff1a40;
  box-shadow: 0 0 10px rgba(255, 26, 64, 0.6);
}
.kpi-card.highlight-subs::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

.kpi-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.kpi-sub-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.kpi-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
}
.kpi-pill.plus {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.kpi-pill.minus {
  color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Detail Chart */
.detail-chart-card {
  margin-bottom: 24px;
}

/* History Log Table */
.history-log-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.history-table-container {
  max-height: 480px;
  overflow-y: auto;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
}
.history-table-container::-webkit-scrollbar {
  width: 6px;
}
.history-table-container::-webkit-scrollbar-thumb {
  background: var(--border-highlight);
  border-radius: 3px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.history-table th {
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  z-index: 2;
}
.history-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}
.history-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.ts-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.delta-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
}
.delta-pill.plus {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.delta-pill.minus {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.delta-pill.zero {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .channel-hero-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .channel-hero-title-row {
    justify-content: center;
  }
  .channel-hero-chips {
    justify-content: center;
  }
  .channel-hero-footnote {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .explorer-section-card,
  .explorer-search-box input,
  .explorer-search-icon,
  .yt-table tbody tr,
  .yt-table th.sortable,
  .sort-status-pill,
  .table-channel-avatar,
  .table-channel-name,
  .table-channel-yt-ext,
  .rank-badge,
  .status-tag,
  .table-stat-link {
    transition: none !important;
    transform: none !important;
  }
  .table-sort-pulse tr {
    animation: none !important;
  }
}

