﻿:root {
  color-scheme: dark;
  --bg-primary: #0f0f0f;
  --bg-card: #1f1f1f;
  --bg-card-hover: #282828;
  --bg-subtle: #272727;
  --bg-input: #121212;
  
  --border-color: rgba(255, 255, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-focus: #ff0000;
  
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --text-muted: #717171;

  --accent-red: #ff0000;
  --accent-red-hover: #cc0000;
  --accent-green: #2ba640;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-blue: #3ea6ff;

  --nav-bg: rgba(15, 15, 15, 0.92);
  --table-border: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --chip-bg: #272727;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg-primary: #f9f9f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f2f2f2;
  --bg-subtle: #f0f0f0;
  --bg-input: #ffffff;
  
  --border-color: #e5e5e5;
  --border-subtle: #eeeeee;
  --border-focus: #cc0000;
  
  --text-primary: #0f0f0f;
  --text-secondary: #606060;
  --text-muted: #909090;

  --accent-red: #cc0000;
  --accent-red-hover: #990000;
  --accent-green: #1a8738;
  --accent-amber: #d97706;
  --accent-purple: #7c3aed;
  --accent-blue: #065fd4;

  --nav-bg: rgba(255, 255, 255, 0.95);
  --table-border: #e5e5e5;
  --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --chip-bg: #f2f2f2;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 0, 51, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
}

/* ──────────────────────────────────────────
   TOP NAVIGATION
   ────────────────────────────────────────── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 20px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-red) 0%, #ff5252 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 0, 51, 0.35);
}

.logo-icon svg {
  width: 20px;
  height: 20px;
}

.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--accent-red);
}

.badge-beta {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--chip-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-red);
  transform: translateY(-1px);
}

.theme-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.currency-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px 6px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.currency-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-left: 6px;
}

.curr-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.curr-btn.active {
  background: var(--accent-red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 0, 51, 0.3);
}

.curr-select {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.curr-select:focus, .curr-select:hover {
  color: var(--text-primary);
  border-color: var(--accent-red);
  background: var(--bg-subtle);
}

/* Forex Live Rates Pill Button */
.fx-rate-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.fx-rate-pill:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-green);
  transform: translateY(-1px);
}

.fx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  display: inline-block;
  animation: pulse 2s infinite;
}

.fx-icon {
  font-size: 0.85rem;
}

/* ──────────────────────────────────────────
   MAIN LAYOUT & HERO
   ────────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.hero-section {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 36px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 0, 51, 0.1);
  color: #ff6680;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255, 0, 51, 0.2);
  margin-bottom: 18px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-red);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -1.2px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero-title span {
  background: linear-gradient(135deg, #ff3355 0%, #ff8844 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ──────────────────────────────────────────
   MAIN TOOL CARD & TABS
   ────────────────────────────────────────── */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  margin-bottom: 30px;
}

.mode-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-input);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mode-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1 1 auto;
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  background: var(--bg-card);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-counter-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(255, 0, 51, 0.15);
  color: #ff6680;
  border: 1px solid rgba(255, 0, 51, 0.3);
}

/* Panels */
.mode-panel,
.tab-panel {
  display: none;
}

.mode-panel.active,
.tab-panel.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.input-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.input-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.96rem;
  padding: 14px 16px 14px 48px;
  transition: all 0.2s;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(255, 0, 51, 0.15);
}

.btn-paste {
  position: absolute;
  right: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-paste:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff0033 0%, #e6002e 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 26px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 18px rgba(255, 0, 51, 0.35);
  white-space: nowrap;
}

.btn-primary svg {
  width: 18px;
  height: 18px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255, 0, 51, 0.45);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-add svg {
  width: 18px;
  height: 18px;
  color: var(--accent-red);
  transition: color 0.2s;
}

.btn-add:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 0, 51, 0.4);
  color: var(--accent-red);
}

.upload-dropzone {
  border: 2px dashed rgba(255, 0, 51, 0.35);
  border-radius: var(--radius-md);
  padding: 45px 20px;
  text-align: center;
  background: var(--bg-input);
  cursor: pointer;
  transition: all 0.25s;
}

.upload-dropzone:hover {
  border-color: var(--accent-red);
  background: rgba(255, 0, 51, 0.05);
}

.tier-chip {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.tier-chip:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: #8b5cf6;
}


.quick-examples {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-examples span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.example-chip {
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.example-chip:hover {
  color: var(--accent-red);
  border-color: var(--accent-red);
  background: rgba(255, 0, 51, 0.08);
}

/* Mode B Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.date-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.92rem;
  padding: 12px 16px;
  transition: all 0.2s;
}

.date-input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.presets-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.preset-chip {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.preset-chip.active {
  background: var(--accent-red);
  color: #ffffff;
  border-color: var(--accent-red);
}

.action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* Mode C Queue List */
.url-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px;
}

.queue-counter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.count-badge {
  background: var(--accent-red);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 20px;
}

.count-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.btn-clear {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-clear:hover {
  text-decoration: underline;
}

.url-queue-list {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-queue-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.empty-queue-hint svg {
  width: 20px;
  height: 20px;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.2s ease-out;
}

.queue-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.queue-item-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 20px;
}

.queue-item-url {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.queue-item-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.queue-item-remove:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ──────────────────────────────────────────
   PROCESSING STATUS CARD
   ────────────────────────────────────────── */
.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.3s ease-out;
}

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.status-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinner-dot {
  width: 14px;
  height: 14px;
  border: 3px solid rgba(255, 0, 51, 0.2);
  border-top-color: var(--accent-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.percentage-badge {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-red);
  background: rgba(255, 0, 51, 0.1);
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 0, 51, 0.25);
  min-width: 54px;
  text-align: center;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: var(--bg-input);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff0000 0%, #ff5252 50%, #2ba640 100%);
  border-radius: 20px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(255, 0, 51, 0.4);
}

.ticker-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.ticker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.metric-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.metric-icon {
  font-size: 1.4rem;
}

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.metric-chip.success .metric-value { color: #10b981; }
.metric-chip.failed .metric-value { color: #ef4444; }
.metric-chip.nochat .metric-value { color: #f59e0b; }

/* ──────────────────────────────────────────
   RESULTS SECTION & KPI CARDS
   ────────────────────────────────────────── */
.results-section {
  animation: fadeIn 0.4s ease-out;
}

.kpi-banner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.kpi-card.highlight {
  background: linear-gradient(135deg, rgba(255, 0, 51, 0.12) 0%, var(--bg-card) 100%);
  border-color: rgba(255, 0, 51, 0.4);
}

.kpi-badge {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-red);
  margin-bottom: 6px;
}

.kpi-amount {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 8px;
}

.kpi-sub {
  font-size: 0.84rem;
  color: var(--accent-green);
  font-weight: 600;
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.kpi-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.pill-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
}

.pill-red { background: rgba(255, 0, 51, 0.15); color: #ff5252; }
.pill-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.pill-purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.pill-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

.kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.kpi-note {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Toolbar & Views */
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.results-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-subtle);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
}

.res-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.res-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(128, 128, 128, 0.12);
}

.res-tab-btn.active {
  background: var(--accent-red) !important;
  color: #ffffff !important;
  font-weight: 700;
  border-color: var(--accent-red) !important;
  box-shadow: 0 2px 10px rgba(204, 0, 0, 0.35);
}

.tab-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(128, 128, 128, 0.18);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.res-tab-btn.active .tab-pill {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

.export-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-green);
  color: #fff;
  border: none;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.btn-export:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-export.excel {
  background: linear-gradient(135deg, #107c41 0%, #0c5c30 100%);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(16, 124, 65, 0.3);
}

.btn-export.excel:hover {
  background: linear-gradient(135deg, #15944f 0%, #107c41 100%);
}

.btn-export.notepad {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.3);
}

.btn-export.notepad:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.btn-export.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  box-shadow: none;
}

.btn-export.secondary:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.btn-export svg {
  width: 15px;
  height: 15px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.search-wrapper input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.9rem;
  padding: 10px 14px 10px 42px;
}

.search-wrapper input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.sort-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.sort-select-wrapper select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.86rem;
}

/* Tables */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.data-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.stream-cell {
  display: flex;
  flex-direction: column;
}

.stream-title-text {
  font-weight: 600;
  color: var(--text-primary);
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stream-vid-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.amount-badge {
  font-weight: 700;
  color: var(--accent-green);
}

.amount-badge.gross {
  color: var(--text-primary);
  font-size: 0.98rem;
}

.rank-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
}

.rank-badge.top-1 { color: #f59e0b; }
.rank-badge.top-2 { color: #94a3b8; }
.rank-badge.top-3 { color: #b45309; }

/* Timestamp Pill Badge */
.timestamp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--accent-blue);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.timestamp-badge:hover {
  background: var(--accent-blue);
  color: #ffffff !important;
  border-color: var(--accent-blue);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(62, 166, 255, 0.35);
}

.timestamp-badge svg {
  width: 12px;
  height: 12px;
}

/* Real YouTube Super Chat Color Tiers */
.sc-tier-badge {
  display: inline-block;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: -0.2px;
}
.sc-tier-blue { background: rgba(30, 136, 229, 0.18); color: #1e88e5; border: 1px solid rgba(30, 136, 229, 0.35); }
.sc-tier-cyan { background: rgba(0, 176, 255, 0.18); color: #00b0ff; border: 1px solid rgba(0, 176, 255, 0.35); }
.sc-tier-green { background: rgba(0, 191, 165, 0.18); color: #00bfa5; border: 1px solid rgba(0, 191, 165, 0.35); }
.sc-tier-yellow { background: rgba(255, 179, 0, 0.18); color: #ffb300; border: 1px solid rgba(255, 179, 0, 0.35); }
.sc-tier-orange { background: rgba(251, 140, 0, 0.18); color: #fb8c00; border: 1px solid rgba(251, 140, 0, 0.35); }
.sc-tier-magenta { background: rgba(233, 30, 99, 0.18); color: #e91e63; border: 1px solid rgba(233, 30, 99, 0.35); }
.sc-tier-red { background: rgba(229, 57, 53, 0.22); color: #ff3333; border: 1px solid rgba(229, 57, 53, 0.45); font-weight: 800; }

/* ──────────────────────────────────────────
   INFO / SEO SECTION
   ────────────────────────────────────────── */
.info-section {
  margin-top: 60px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.info-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.info-box h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.info-box p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ──────────────────────────────────────────
   FOOTER
   ────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  padding: 24px 20px;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 10px;
}

/* ──────────────────────────────────────────
   RESPONSIVENESS (MOBILE FRIENDLY)
   ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .kpi-banner {
    grid-template-columns: repeat(2, 1fr);
  }
  .kpi-card.highlight {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 10px 14px;
  }
  .nav-container {
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }
  .nav-tab-link {
    flex: 1;
    justify-content: center;
    padding: 7px 10px;
    font-size: 0.8rem;
  }
  .hero-section {
    padding: 24px 10px 20px;
  }
  .hero-title {
    font-size: 1.85rem;
    line-height: 1.25;
  }
  .hero-sub {
    font-size: 0.9rem;
  }
  .tool-card {
    padding: 16px;
  }
  .mode-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 6px;
    scrollbar-width: none;
  }
  .mode-tabs::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    min-width: max-content;
    flex-shrink: 0;
    padding: 9px 12px;
    font-size: 0.8rem;
    gap: 6px;
  }
  .tab-btn svg {
    width: 16px;
    height: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  .kpi-banner {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .kpi-card.highlight {
    grid-column: 1 / -1;
  }
  .input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .input-wrapper {
    width: 100%;
  }
  .limit-select-wrapper {
    width: 100%;
  }
  .limit-select {
    width: 100%;
  }
  .btn-primary, .btn-add {
    width: 100%;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .results-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .results-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  .res-tab-btn {
    flex-shrink: 0;
  }
  .export-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 6px;
  }
  .export-group button {
    flex: 1;
    justify-content: center;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .search-wrapper, .sort-select-wrapper {
    width: 100%;
  }
  .sort-select-wrapper select {
    flex: 1;
  }
  .presets-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .preset-chip {
    font-size: 0.76rem;
    padding: 5px 10px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.55rem;
  }
  .kpi-banner {
    grid-template-columns: 1fr;
  }
  .kpi-card.highlight {
    grid-column: auto;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* ──────────────────────────────────────────
   MULTI-CURRENCY BREAKDOWN & FOREX STYLES
   ────────────────────────────────────────── */
.currency-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  box-shadow: var(--card-shadow);
}

.csb-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.csb-icon {
  font-size: 1.1rem;
}

.csb-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.csb-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.csb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
}

.csb-chip strong {
  color: var(--accent-green);
}

.csb-right {
  display: flex;
  align-items: center;
}

.csb-base-tag {
  background: linear-gradient(135deg, rgba(255, 0, 51, 0.15) 0%, rgba(255, 0, 51, 0.05) 100%);
  border: 1px solid rgba(255, 0, 51, 0.3);
  color: var(--accent-red);
  font-family: var(--font-main);
  font-size: 0.86rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 8px;
}

.currency-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.currency-panel-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.currency-panel-sub {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.btn-refresh-rates {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-refresh-rates:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-red);
  transform: translateY(-1px);
}

.btn-refresh-rates svg {
  width: 15px;
  height: 15px;
}

.currency-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.currency-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.currency-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.currency-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.currency-flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.currency-code-text {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.currency-share-pill {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  padding: 2px 8px;
  border-radius: 12px;
}

.currency-card-amount {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.currency-card-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.currency-card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.currency-card-converted {
  font-weight: 800;
  color: var(--accent-green);
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 660px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlide 0.25s ease-out;
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-badge-live {
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.fx-rates-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.fx-rates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .fx-rates-grid {
    grid-template-columns: 1fr;
  }
}

.fx-rate-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fx-item-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
}

.fx-item-input-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fx-item-prefix {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.fx-rate-input {
  width: 86px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  text-align: right;
  font-weight: 700;
}

.fx-rate-input:focus {
  outline: none;
  border-color: var(--accent-red);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-modal-primary {
  background: var(--accent-red);
  color: #fff;
  border: none;
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-primary:hover {
  background: var(--accent-red-hover);
}

.btn-modal-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-modal-secondary:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}



/* ── LIGHT MODE HIGH-CONTRAST ACCESSIBILITY FIXES ── */
[data-theme="light"] .results-tabs {
  background: #ebebeb;
  border: 1px solid #d4d4d4;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .res-tab-btn {
  color: #333333 !important;
  background: transparent;
}

[data-theme="light"] .res-tab-btn:hover {
  color: #000000 !important;
  background: #dedede;
}

[data-theme="light"] .res-tab-btn.active {
  background: #cc0000 !important;
  color: #ffffff !important;
  border-color: #b30000 !important;
  box-shadow: 0 2px 8px rgba(204, 0, 0, 0.32);
}

[data-theme="light"] .tab-pill {
  background: #d4d4d4 !important;
  color: #1a1a1a !important;
  font-weight: 800;
}

[data-theme="light"] .res-tab-btn.active .tab-pill {
  background: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
}

/* Light Mode Input Mode Tabs (Option A, B, C) */
[data-theme="light"] .mode-tabs {
  background: #ebebeb;
  border: 1px solid #d4d4d4;
}

[data-theme="light"] .tab-btn {
  color: #444444 !important;
}

[data-theme="light"] .tab-btn:hover {
  color: #000000 !important;
  background: #dfdfdf;
}

[data-theme="light"] .tab-btn.active {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #c8c8c8 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

/* Light Mode Currency Switcher Buttons */
[data-theme="light"] .currency-switch {
  background: #ebebeb;
  border: 1px solid #d4d4d4;
}

[data-theme="light"] .curr-btn {
  color: #444444 !important;
}

[data-theme="light"] .curr-btn:hover {
  color: #000000 !important;
}

[data-theme="light"] .curr-btn.active {
  background: #cc0000 !important;
  color: #ffffff !important;
}

[data-theme="light"] .curr-select {
  background: #ffffff;
  color: #111111;
  border: 1px solid #d0d0d0;
}

[data-theme="light"] .theme-toggle-btn {
  background: #ebebeb;
  border-color: #d0d0d0;
  color: #111111;
}

[data-theme="light"] .theme-toggle-btn:hover {
  background: #dfdfdf;
}

/* Light Mode Currency Summary Bar & Chips in Overview */
[data-theme="light"] .currency-summary-bar {
  background: #f5f5f5;
  border-color: #e0e0e0;
}

[data-theme="light"] .csb-chip {
  background: #ffffff;
  border-color: #d8d8d8;
  color: #111111;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .csb-amt {
  color: #cc0000;
}

/* Light Mode View 5 Currency Cards */
[data-theme="light"] .currency-card {
  background: #ffffff;
  border-color: #e0e0e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .cc-orig-val {
  color: #111111;
}

[data-theme="light"] .cc-base-val {
  color: #cc0000;
}

[data-theme="light"] .cc-rate-tag {
  background: #f0f0f0;
  color: #333333;
}


/* Batch Limit Pill */
.batch-limit-pill {
  font-size: 0.74rem;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
}

[data-theme="light"] .batch-limit-pill {
  color: #b45309;
  background: #fef3c7;
  border-color: #fde68a;
}

/* ──────────────────────────────────────────
   COMPREHENSIVE LIGHT MODE CONTRAST & VISIBILITY FIXES
   ────────────────────────────────────────── */

/* Multi-URL Add Stream Button */
[data-theme="light"] .btn-add {
  background: #ffffff;
  border: 1.5px solid #cc0000;
  color: #cc0000 !important;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(204, 0, 0, 0.08);
}

[data-theme="light"] .btn-add svg {
  color: #cc0000 !important;
}

[data-theme="light"] .btn-add:hover {
  background: #cc0000;
  color: #ffffff !important;
  border-color: #cc0000;
}

[data-theme="light"] .btn-add:hover svg {
  color: #ffffff !important;
}

/* Option C Queue List & Items */
[data-theme="light"] .url-queue-list {
  background: #f9fafb;
  border-color: #e5e7eb;
}

[data-theme="light"] .queue-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .queue-item-num {
  color: #374151;
  font-weight: 800;
}

[data-theme="light"] .queue-item-url {
  color: #111827;
  font-weight: 600;
}

[data-theme="light"] .queue-item-remove {
  color: #6b7280;
}

[data-theme="light"] .queue-item-remove:hover {
  color: #dc2626;
  background: #fee2e2;
}

[data-theme="light"] .count-text {
  color: #1f2937;
  font-weight: 700;
}

[data-theme="light"] .btn-clear {
  color: #dc2626;
  font-weight: 700;
}

[data-theme="light"] .empty-queue-hint {
  color: #4b5563;
}

/* Discovered Tiers Bar & Chips */
[data-theme="light"] .tiers-bar {
  background: #ffffff !important;
  border: 1.5px solid #c4b5fd !important;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.08);
}

[data-theme="light"] .tiers-bar-label {
  color: #111827 !important;
  font-weight: 800;
}

[data-theme="light"] .tier-chip {
  background: #ede9fe;
  color: #5b21b6 !important;
  border: 1.5px solid #a78bfa;
  font-weight: 700;
}

[data-theme="light"] .tier-chip span {
  color: #4c1d95 !important;
  font-weight: 700;
}

[data-theme="light"] .tier-chip strong {
  color: #047857 !important;
  font-weight: 800;
}

[data-theme="light"] .tier-chip:hover {
  background: #ddd6fe;
  border-color: #7c3aed;
}

/* Processing Status Card & Metrics */
[data-theme="light"] .status-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .status-title {
  color: #111827;
  font-weight: 800;
}

[data-theme="light"] .ticker-box {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

[data-theme="light"] .ticker-text {
  color: #1f2937;
  font-weight: 600;
}

[data-theme="light"] .percentage-badge {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 800;
}

[data-theme="light"] .metric-chip {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .metric-label {
  color: #4b5563;
  font-weight: 700;
}

[data-theme="light"] .metric-chip.total .metric-value {
  color: #111827;
}

/* KPI Cards & Badges */
[data-theme="light"] .kpi-card {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .kpi-card.highlight {
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
  border-color: #fecaca;
}

[data-theme="light"] .kpi-title {
  color: #1f2937;
  font-weight: 800;
}

[data-theme="light"] .kpi-amount,
[data-theme="light"] .kpi-value {
  color: #111827;
}

[data-theme="light"] .kpi-note {
  color: #4b5563;
  font-weight: 600;
}

[data-theme="light"] .pill-red {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 800;
}

[data-theme="light"] .pill-amber {
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
}

[data-theme="light"] .pill-purple {
  background: #ede9fe;
  color: #5b21b6;
  font-weight: 800;
}

[data-theme="light"] .pill-blue {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
}

/* Inputs, Labels & Action Buttons */
[data-theme="light"] .input-label {
  color: #1f2937;
  font-weight: 700;
}

[data-theme="light"] .input-wrapper input {
  background: #ffffff;
  border-color: #d1d5db;
  color: #111827;
  font-weight: 500;
}

[data-theme="light"] .input-wrapper input:focus {
  border-color: #cc0000;
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.12);
}

[data-theme="light"] .input-wrapper input::placeholder {
  color: #6b7280;
}

[data-theme="light"] .btn-paste {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  color: #1f2937;
  font-weight: 700;
}

[data-theme="light"] .btn-paste:hover {
  background: #e5e7eb;
  color: #111827;
  border-color: #9ca3af;
}

[data-theme="light"] .preset-chip {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #374151;
  font-weight: 600;
}

[data-theme="light"] .preset-chip:hover {
  background: #f3f4f6;
  color: #111827;
  border-color: #9ca3af;
}

[data-theme="light"] .preset-chip.active {
  background: #cc0000 !important;
  color: #ffffff !important;
  border-color: #cc0000 !important;
  font-weight: 700;
}

[data-theme="light"] .preset-label {
  color: #374151;
  font-weight: 700;
}

[data-theme="light"] .date-input {
  background: #ffffff;
  border: 1.5px solid #d1d5db;
  color: #111827;
  font-weight: 600;
}

/* Table & Action Links */
[data-theme="light"] .table-card {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .data-table th {
  background: #f9fafb;
  color: #1f2937;
  font-weight: 800;
  border-bottom: 1.5px solid #d1d5db;
}

[data-theme="light"] .data-table td {
  border-bottom: 1px solid #e5e7eb;
  color: #111827;
}

[data-theme="light"] .data-table tbody tr:hover {
  background: #f9fafb;
}

[data-theme="light"] .stream-title-text {
  color: #111827;
  font-weight: 700;
}

[data-theme="light"] .stream-vid-badge {
  color: #4b5563;
  font-weight: 600;
}

[data-theme="light"] .example-chip {
  background: #ffffff;
  border: 1.5px solid #cc0000;
  color: #cc0000 !important;
  font-weight: 700;
  text-decoration: none;
}

[data-theme="light"] .example-chip:hover {
  background: #cc0000;
  color: #ffffff !important;
}

[data-theme="light"] .btn-export.secondary {
  background: #ffffff;
  border: 1.5px solid #374151;
  color: #111827 !important;
  font-weight: 700;
}

[data-theme="light"] .btn-export.secondary:hover {
  background: #f3f4f6;
}

[data-theme="light"] .search-wrapper input {
  background: #ffffff;
  border: 1.5px solid #d1d5db;
  color: #111827;
  font-weight: 500;
}

[data-theme="light"] .search-wrapper input::placeholder {
  color: #6b7280;
}

[data-theme="light"] .search-wrapper svg {
  color: #6b7280;
}

[data-theme="light"] .sort-select-wrapper {
  color: #374151;
  font-weight: 600;
}

[data-theme="light"] .sort-select-wrapper select {
  background: #ffffff;
  border: 1.5px solid #d1d5db;
  color: #111827;
  font-weight: 600;
}

/* Super Chat Color Tier Badges */
[data-theme="light"] .sc-tier-blue { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; font-weight: 800; }
[data-theme="light"] .sc-tier-cyan { background: #e0f7fa; color: #00838f; border: 1px solid #b2ebf2; font-weight: 800; }
[data-theme="light"] .sc-tier-green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; font-weight: 800; }
[data-theme="light"] .sc-tier-yellow { background: #fef9c3; color: #854d0e; border: 1px solid #fef08a; font-weight: 800; }
[data-theme="light"] .sc-tier-orange { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; font-weight: 800; }
[data-theme="light"] .sc-tier-magenta { background: #fce7f3; color: #9d174d; border: 1px solid #fbcfe8; font-weight: 800; }
[data-theme="light"] .sc-tier-red { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; font-weight: 800; }

/* Timestamp Badges */
[data-theme="light"] .timestamp-badge {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-weight: 700;
}

[data-theme="light"] .timestamp-badge:hover {
  background: #1d4ed8;
  color: #ffffff !important;
  border-color: #1d4ed8;
}

/* ──────────────────────────────────────────
   MAIN PAGE SWITCHER (Earnings vs Chats)
   ────────────────────────────────────────── */
.page-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 6px;
  border-radius: 9999px;
  margin-left: 18px;
}

.nav-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 9999px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab-link.active {
  background: var(--bg-input);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  font-weight: 700;
}

.nav-new-pill {
  font-size: 0.65rem;
  font-weight: 800;
  background: #10b981;
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

[data-theme="light"] .page-nav {
  background: #f1f3f5;
  border: 1.5px solid #d1d5db;
}

[data-theme="light"] .nav-tab-link {
  color: #4b5563;
}

[data-theme="light"] .nav-tab-link:hover {
  background: #e5e7eb;
  color: #111827;
}

[data-theme="light"] .nav-tab-link.active {
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #d1d5db !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  font-weight: 700;
}

/* ──────────────────────────────────────────
   CHAT FEED HIGHLIGHTING & ROW STYLING
   ────────────────────────────────────────── */
.row-superchat {
  background: rgba(255, 179, 0, 0.08) !important;
  border-left: 3px solid #ffb300;
}

.row-membership {
  background: rgba(139, 92, 246, 0.09) !important;
  border-left: 3px solid #8b5cf6;
}

.row-jewels {
  background: rgba(245, 158, 11, 0.08) !important;
  border-left: 3px solid #f59e0b;
}

[data-theme="light"] .row-superchat {
  background: #fefce8 !important;
  border-left: 3.5px solid #d97706;
}

[data-theme="light"] .row-membership {
  background: #faf5ff !important;
  border-left: 3.5px solid #7c3aed;
}

[data-theme="light"] .row-jewels {
  background: #fffbeb !important;
  border-left: 3.5px solid #b45309;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-chat {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.badge-superchat {
  background: rgba(255, 179, 0, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(255, 179, 0, 0.4);
}

.badge-membership {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
}

.badge-jewels {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

[data-theme="light"] .badge-chat {
  background: #f3f4f6;
  color: #4b5563;
}

[data-theme="light"] .badge-superchat {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
  font-weight: 800;
}

[data-theme="light"] .badge-membership {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #c4b5fd;
  font-weight: 800;
}

[data-theme="light"] .badge-jewels {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
  font-weight: 800;
}

.author-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.author-name {
  font-weight: 700;
  color: var(--text-primary);
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .author-name {
  color: #111827;
}

.author-badge-icon {
  font-size: 0.85rem;
}

.chat-msg-cell {
  max-width: 500px;
  word-break: break-word;
  line-height: 1.5;
}

.msg-text {
  color: var(--text-primary);
  font-size: 0.9rem;
}

[data-theme="light"] .msg-text {
  color: #111827;
}

.cell-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.82rem;
}

[data-theme="light"] .cell-num {
  color: #6b7280;
}

/* ──────────────────────────────────────────
   TOP CHATTERS LEADERBOARD
   ────────────────────────────────────────── */
.leaderboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 24px;
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.leaderboard-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.leaderboard-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.leaderboard-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.leaderboard-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.84rem;
  transition: all 0.2s;
}

.leaderboard-chip.top {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
}

.lb-medal {
  font-size: 0.95rem;
}

.lb-author {
  font-weight: 700;
  color: var(--text-primary);
}

.lb-count {
  font-size: 0.78rem;
  color: var(--accent-red);
  font-weight: 800;
}

[data-theme="light"] .leaderboard-card {
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .leaderboard-title {
  color: #111827;
}

[data-theme="light"] .leaderboard-sub {
  color: #6b7280;
}

[data-theme="light"] .leaderboard-chip {
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
}

[data-theme="light"] .leaderboard-chip.top {
  background: #fefce8;
  border-color: #fde68a;
}

[data-theme="light"] .lb-author {
  color: #111827;
}

[data-theme="light"] .lb-count {
  color: #b91c1c;
}

/* ──────────────────────────────────────────
   VIDEO COMMENTS STYLING
   ────────────────────────────────────────── */
.limit-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.limit-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

[data-theme="light"] .limit-select {
  background: #ffffff;
  border: 1.5px solid #d1d5db;
  color: #111827;
}

.commenter-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.comment-avatar-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.commenter-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.88rem;
}

[data-theme="light"] .commenter-name {
  color: #111827;
}

.like-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: #ef4444;
}

.reply-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.comment-text-cell {
  max-width: 520px;
  word-break: break-word;
  line-height: 1.5;
  color: var(--text-primary);
  font-size: 0.88rem;
}

[data-theme="light"] .comment-text-cell {
  color: #1f2937;
}

.comm-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.comm-badge.pinned {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.comm-badge.hearted {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

[data-theme="light"] .comm-badge.pinned {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

[data-theme="light"] .comm-badge.hearted {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

/* ──────────────────────────────────────────
   PANEL BANNER HINTS (Live Chat vs Comments)
   ────────────────────────────────────────── */
.panel-banner-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.panel-banner-hint strong {
  color: var(--text-primary);
}

.hint-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

[data-theme="light"] .panel-banner-hint {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

[data-theme="light"] .panel-banner-hint strong {
  color: #0f172a;
}

/* ──────────────────────────────────────────
   VIEWER TAB PILL & DIRECT CHAT VIEWER
   ────────────────────────────────────────── */
.tab-btn.view-tab-btn {
  border: 1px dashed rgba(255, 255, 255, 0.22);
}

.tab-counter-badge.view-pill {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

[data-theme="light"] .tab-btn.view-tab-btn {
  border-color: #cbd5e1;
}

[data-theme="light"] .tab-counter-badge.view-pill {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.viewer-loader-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.loader-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.btn-loader-file, .btn-loader-session, .btn-loader-demo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-loader-file {
  background: var(--accent-red);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(255, 0, 51, 0.25);
}

.btn-loader-file:hover {
  background: var(--accent-red-hover);
  transform: translateY(-1px);
}

.btn-loader-session {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-loader-session:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.btn-loader-demo {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.btn-loader-demo:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.viewer-drop-target {
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.viewer-drop-target:hover, .viewer-drop-target.dragover {
  border-color: var(--accent-red);
  background: rgba(255, 0, 51, 0.05);
  color: var(--text-primary);
}

.viewer-drop-target svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Viewer Workspace Display */
.viewer-workspace {
  margin-top: 20px;
}

.viewer-stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.vsh-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vsh-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 0, 51, 0.15);
  color: #ff4d6d;
  border: 1px solid rgba(255, 0, 51, 0.3);
}

.vsh-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.vsh-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vsh-counter {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.btn-clear-viewer {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-clear-viewer:hover {
  color: #ef4444;
  border-color: #ef4444;
}

.viewer-quick-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.v-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.v-quick-pill:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.v-quick-pill.active {
  background: var(--accent-red);
  color: #ffffff;
  border-color: var(--accent-red);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 0, 51, 0.3);
}

.viewer-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

.v-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v-filter-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.v-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.viewer-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.v-search-wrapper {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.v-search-wrapper svg {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--text-muted);
}

.v-search-wrapper input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px 10px 40px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.88rem;
}

.v-time-range-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.v-time-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.v-time-input {
  width: 76px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 4px 6px;
  border-radius: 4px;
  text-align: center;
}

.btn-reset-filters {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset-filters:hover {
  color: #ef4444;
  border-color: #ef4444;
}

.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.view-style-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.v-style-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.v-style-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Authentic Live Chat Feed Mode */
.live-chat-feed-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  max-height: 650px;
  overflow-y: auto;
}

.chat-feed-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}

.feed-msg-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.feed-time {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  padding-top: 2px;
  white-space: nowrap;
}

.feed-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.feed-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.feed-author {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.feed-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.45;
  word-break: break-word;
}

.feed-sc-card {
  background: #1565c0;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 4px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feed-sc-header {
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0d47a1;
  font-weight: 800;
  font-size: 0.92rem;
}

.feed-sc-header.sc-amber { background: #b45309; }
.feed-sc-header.sc-red { background: #b91c1c; }
.feed-sc-header.sc-green { background: #047857; }

.feed-sc-body {
  padding: 10px 14px;
  font-size: 0.9rem;
}

.feed-mem-card {
  background: rgba(139, 92, 246, 0.12);
  border-left: 4px solid #8b5cf6;
  border-radius: 6px;
  padding: 8px 14px;
  margin-top: 4px;
}

.feed-jewel-card {
  background: rgba(245, 158, 11, 0.12);
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  padding: 8px 14px;
  margin-top: 4px;
}

/* Light Mode Overrides for Viewer */
[data-theme="light"] .viewer-loader-card {
  background: #ffffff;
  border-color: #e5e7eb;
}

[data-theme="light"] .viewer-drop-target {
  border-color: #cbd5e1;
  color: #64748b;
}

[data-theme="light"] .viewer-drop-target:hover {
  background: #fef2f2;
  border-color: #cc0000;
  color: #cc0000;
}

[data-theme="light"] .viewer-stream-header {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .vsh-title {
  color: #0f172a;
}

[data-theme="light"] .v-quick-pill {
  background: #ffffff;
  border-color: #d1d5db;
  color: #4b5563;
}

[data-theme="light"] .v-quick-pill:hover {
  border-color: #9ca3af;
  color: #111827;
}

[data-theme="light"] .v-quick-pill.active {
  background: #cc0000;
  color: #ffffff;
  border-color: #cc0000;
}

[data-theme="light"] .viewer-filter-grid {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .v-select {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .v-search-wrapper input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .v-time-range-group {
  background: #ffffff;
  border-color: #cbd5e1;
}

[data-theme="light"] .v-time-input {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .v-style-btn.active {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}

[data-theme="light"] .live-chat-feed-box {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .feed-msg-row:hover {
  background: #f8fafc;
}

[data-theme="light"] .feed-author {
  color: #0f172a;
}

[data-theme="light"] .feed-text {
  color: #1e293b;
}

/* ──────────────────────────────────────────
   VIEW RESULTS BUTTON & INSPECTION MODAL WINDOW
   ────────────────────────────────────────── */
.btn-view-results {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  white-space: nowrap;
}

.btn-view-results:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
  color: #ffffff !important;
}

.btn-view-results svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.5;
}

.view-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.view-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

.view-modal-window {
  position: relative;
  width: 95vw;
  max-width: 1380px;
  height: 90vh;
  max-height: 900px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.97) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.vm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  gap: 16px;
}

.vm-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.vm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 0, 51, 0.12);
  color: #ff4d6a;
  border: 1px solid rgba(255, 0, 51, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.vm-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.vm-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-input);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.vm-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-vm-util {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-vm-util:hover {
  color: var(--text-primary);
  border-color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
}

.btn-vm-util svg {
  width: 15px;
  height: 15px;
}

.btn-vm-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-vm-close:hover {
  background: rgba(255, 0, 51, 0.15);
  color: #ff4d6a;
  border-color: #ff4d6a;
}

.vm-quick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.vm-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vm-pill {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vm-pill:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.vm-pill.active {
  background: #cc0000;
  color: #ffffff;
  border-color: #cc0000;
  box-shadow: 0 2px 8px rgba(204, 0, 0, 0.4);
}

.vm-view-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.vm-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vm-toggle-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.vm-toggle-btn svg {
  width: 14px;
  height: 14px;
}

.vm-controls-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.vm-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vm-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}

.vm-select {
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.vm-select:focus {
  border-color: #3b82f6;
}

.vm-search-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 220px;
}

.vm-search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.vm-search-input-wrap svg {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.vm-search-input-wrap input {
  width: 100%;
  padding: 6px 10px 6px 32px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: var(--font-main);
  outline: none;
}

.vm-search-input-wrap input:focus {
  border-color: #3b82f6;
}

.btn-vm-reset {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-vm-reset:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.vm-body {
  flex: 1;
  overflow-y: auto;
  position: relative;
  background: var(--bg-card);
}

.vm-table-container {
  min-width: 100%;
}

.vm-table {
  width: 100%;
  border-collapse: collapse;
}

.vm-table th {
  position: sticky;
  top: 0;
  background: var(--bg-input);
  z-index: 5;
  box-shadow: 0 1px 0 var(--border-color);
}

.stream-id-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.78rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.15s ease;
}

.stream-id-badge:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.vm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  gap: 16px;
  flex-wrap: wrap;
}

.vm-footer-left {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.vm-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-vm-close-bar {
  padding: 8px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-vm-close-bar:hover {
  background: rgba(255, 0, 51, 0.12);
  color: #ff4d6a;
  border-color: #ff4d6a;
}

/* Light mode for modal window */
[data-theme="light"] .view-modal-overlay {
  background: rgba(15, 23, 42, 0.65);
}

[data-theme="light"] .view-modal-window {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .vm-header {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .vm-title {
  color: #0f172a;
}

[data-theme="light"] .vm-quick-bar {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

[data-theme="light"] .vm-pill {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme="light"] .vm-pill.active {
  background: #cc0000;
  color: #ffffff;
  border-color: #cc0000;
}

[data-theme="light"] .vm-controls-bar {
  background: #ffffff;
  border-color: #e2e8f0;
}

[data-theme="light"] .vm-select,
[data-theme="light"] .vm-search-input-wrap input,
[data-theme="light"] .btn-vm-reset {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .vm-body {
  background: #ffffff;
}

[data-theme="light"] .vm-table th {
  background: #f8fafc;
  box-shadow: 0 1px 0 #e2e8f0;
}

[data-theme="light"] .vm-footer {
  background: #f8fafc;
  border-color: #e2e8f0;
}

@media (max-width: 900px) {
  .view-modal-window {
    width: 98vw;
    height: 94vh;
  }
  .vm-controls-bar {
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .view-modal-backdrop {
    padding: 0;
  }
  .view-modal-window {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
  .vm-header {
    padding: 12px 16px;
  }
  .vm-controls-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px;
  }
  .vm-control-group {
    justify-content: space-between;
  }
  .vm-footer {
    padding: 10px 16px;
  }
}

/* ======================================================== */
/* ADSENSE CALCULATOR & REVENUE PAGE STYLES (PAGE 3)        */
/* ======================================================== */

.mode-info-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(229, 9, 20, 0.08);
  border: 1px solid rgba(229, 9, 20, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
}

.mode-info-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.mode-info-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary, #cbd5e1);
}

.mode-info-text strong {
  color: var(--text-primary, #ffffff);
  margin-right: 4px;
}

/* Fetched Video & Channel Cards */
.fetched-card {
  display: flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 24px;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

.fetched-card-thumb {
  position: relative;
  width: 140px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.fetched-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fetched-card-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.fetched-card-details {
  flex: 1;
  min-width: 0;
}

.fetched-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fetched-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.dot-sep {
  color: rgba(255, 255, 255, 0.3);
}

.fetched-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.niche-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
}

.format-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(229, 9, 20, 0.12);
  color: #ff4d4f;
  border: 1px solid rgba(229, 9, 20, 0.3);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
}

.auto-tag {
  background: #10b981;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Channel Profile Card */
.channel-profile-card {
  align-items: center;
  gap: 20px;
}

.channel-avatar-wrapper {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(229, 9, 20, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.channel-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.channel-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary, #ffffff);
  margin: 0;
}

.channel-handle-tag {
  font-size: 13px;
  color: var(--text-secondary, #94a3b8);
  font-family: 'JetBrains Mono', monospace;
}

.channel-stats-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.c-stat {
  display: flex;
  flex-direction: column;
}

.c-stat-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary, #ffffff);
}

.c-stat-lbl {
  font-size: 11.5px;
  color: var(--text-secondary, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Calculator Grid */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.calc-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calc-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
}

.calc-label-icon {
  font-size: 16px;
}

.calc-sub-hint {
  font-size: 12px;
  color: #10b981;
  font-weight: 700;
}

.views-input-box {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 4px 10px;
  gap: 6px;
  transition: border-color 0.2s;
}

.views-input-box:focus-within {
  border-color: #e50914;
}

.num-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  width: 110px;
  text-align: right;
  outline: none;
}

.views-unit {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}

/* Sliders */
.slider-wrapper {
  margin: 12px 0 16px;
}

.range-slider {
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 0.2s;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e50914;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: grab;
  transition: transform 0.15s, box-shadow 0.15s;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 2px 6px rgba(229, 9, 20, 0.4);
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e50914;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: grab;
}

/* Preset Pills */
.quick-preset-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary, #cbd5e1);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}

.preset-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.preset-pill.active {
  background: rgba(229, 9, 20, 0.15);
  border-color: #e50914;
  color: #ff4d4f;
  font-weight: 800;
}

/* Format Chips (Clean, Compact, Horizontal) */
.format-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.format-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary, #cbd5e1);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.format-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.format-chip.active {
  background: rgba(229, 9, 20, 0.12);
  border-color: #e50914;
  color: #ff4d4f;
  font-weight: 700;
}

.format-chip .f-icon {
  font-size: 13px;
}

.format-chip .f-name {
  font-size: 12px;
}

.format-chip .f-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.format-chip .f-pill.highlight {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.format-chip.active .f-pill.highlight {
  background: rgba(229, 9, 20, 0.25);
  color: #ff7875;
}

/* Format Selector Grid (Legacy fallback) */
.format-selector-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.format-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 10px 6px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.format-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
}

.format-btn.active {
  background: rgba(229, 9, 20, 0.12);
  border-color: #e50914;
  box-shadow: 0 0 14px rgba(229, 9, 20, 0.25);
}

.fmt-icon {
  font-size: 18px;
  margin-bottom: 4px;
}

.fmt-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  margin-bottom: 4px;
  line-height: 1.2;
}

.fmt-badge {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.fmt-badge.highlight {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.format-btn.active .fmt-badge.highlight {
  background: rgba(229, 9, 20, 0.25);
  color: #ff7875;
}

/* Secondary Controls Row */
.calc-controls-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.control-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-label {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
}

.select-wrapper {
  position: relative;
}

.styled-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.styled-select:focus {
  border-color: #e50914;
  background-color: rgba(255, 255, 255, 0.07);
}

.styled-select option {
  background: #18181b;
  color: #ffffff;
  padding: 8px;
}

/* Dual Ratio Bar for Channel Mode */
.ratio-progress-bar {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.ratio-bar-shorts {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.15s ease;
  overflow: hidden;
  white-space: nowrap;
}

.ratio-bar-long {
  background: linear-gradient(135deg, #e50914, #ff4d4f);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.15s ease;
  overflow: hidden;
  white-space: nowrap;
}

.ratio-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  margin-top: -6px;
}

/* Results & KPI Grid */
.results-section {
  margin-top: 36px;
  padding-top: 24px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.results-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.results-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary, #ffffff);
  margin: 0;
}

.heading-icon {
  font-size: 22px;
}

.results-subtitle {
  font-size: 13px;
  color: var(--text-secondary, #94a3b8);
}

.results-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary, #ffffff);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
}

.kpi-card.hero-net-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 78, 59, 0.04));
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.12);
}

.kpi-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.kpi-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary, #94a3b8);
  letter-spacing: 0.5px;
}

.kpi-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary, #cbd5e1);
}

.kpi-badge.net-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.kpi-main-val {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary, #ffffff);
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.text-success {
  color: #10b981 !important;
}

.text-gold {
  color: #f59e0b !important;
}

.text-muted {
  color: #94a3b8 !important;
}

.kpi-sub-text {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.4;
}

/* Channel Projections Card */
.channel-projections-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid rgba(229, 9, 20, 0.25);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
}

.proj-header {
  margin-bottom: 16px;
}

.proj-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary, #ffffff);
  margin: 0 0 4px;
}

.proj-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary, #94a3b8);
}

.proj-subtitle span {
  color: #ff4d4f;
  font-weight: 700;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.proj-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.proj-box.lifetime-box {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), transparent);
}

.proj-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.proj-val {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.proj-sub {
  font-size: 11.5px;
  color: #64748b;
}

/* Compact Comparative Scenarios Bar (Lightweight & sleek) */
.scenarios-compact-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.scenarios-compact-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.scenarios-compact-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary, #ffffff);
}

.scenarios-compact-sub {
  font-size: 11.5px;
  color: var(--text-secondary, #94a3b8);
}

.scenarios-compact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sc-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.sc-item.base.active {
  background: rgba(16, 185, 129, 0.05);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
}

.sc-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.sc-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
}

.sc-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.sc-tag.best-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.sc-val {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 4px;
}

.sc-sub {
  font-size: 11.5px;
  color: var(--text-secondary, #94a3b8);
}

.sc-sub strong {
  color: var(--text-primary, #ffffff);
}

/* Real-World Scenarios */
.scenarios-section {
  margin-bottom: 24px;
}

.scenarios-heading {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary, #ffffff);
  margin-bottom: 14px;
}

.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.scenario-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
}

.scenario-card.base {
  background: rgba(16, 185, 129, 0.04);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
}

.scenario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.scenario-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
}

.scenario-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.scenario-tag.best-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.scenario-amount {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 8px;
}

.scenario-desc {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

.scenario-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary, #cbd5e1);
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.scenario-stats strong {
  color: var(--text-primary, #ffffff);
}

/* Financial Mechanics Insights */
.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.insight-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
}

.insight-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  margin: 0 0 14px;
}

.monetization-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.m-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary, #cbd5e1);
  margin-bottom: 4px;
}

.m-progress-bar {
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.m-fill.green {
  height: 100%;
  background: #10b981;
}

.m-fill.red {
  height: 100%;
  background: #ef4444;
}

.insight-note {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  line-height: 1.5;
  margin: 0;
}

.leverage-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leverage-metric {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.leverage-val {
  font-size: 28px;
  font-weight: 900;
}

.leverage-lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
}

/* ======================================================== */
/* LIGHT MODE STYLES FOR REVENUE PAGE                       */
/* ======================================================== */

body.light-mode .mode-info-banner,
[data-theme="light"] .mode-info-banner {
  background: #fee2e2;
  border-color: #fca5a5;
}

body.light-mode .mode-info-text,
[data-theme="light"] .mode-info-text {
  color: #4b5563;
}

body.light-mode .mode-info-text strong,
[data-theme="light"] .mode-info-text strong {
  color: #111827;
}

body.light-mode .fetched-card,
[data-theme="light"] .fetched-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-mode .fetched-card-title,
[data-theme="light"] .fetched-card-title,
body.light-mode .channel-title,
[data-theme="light"] .channel-title {
  color: #0f172a;
}

body.light-mode .calc-card,
[data-theme="light"] .calc-card,
body.light-mode .kpi-card,
[data-theme="light"] .kpi-card,
body.light-mode .scenario-card,
[data-theme="light"] .scenario-card,
body.light-mode .insight-card,
[data-theme="light"] .insight-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-mode .kpi-card.hero-net-card,
[data-theme="light"] .kpi-card.hero-net-card {
  background: #ecfdf5;
  border-color: #10b981;
}

body.light-mode .calc-label,
[data-theme="light"] .calc-label,
body.light-mode .control-label,
[data-theme="light"] .control-label,
body.light-mode .results-heading,
[data-theme="light"] .results-heading,
body.light-mode .scenarios-heading,
[data-theme="light"] .scenarios-heading,
body.light-mode .insight-title,
[data-theme="light"] .insight-title,
body.light-mode .leverage-lbl,
[data-theme="light"] .leverage-lbl {
  color: #0f172a;
}

body.light-mode .views-input-box,
[data-theme="light"] .views-input-box {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

body.light-mode .num-input,
[data-theme="light"] .num-input {
  color: #0f172a;
}

body.light-mode .preset-pill,
[data-theme="light"] .preset-pill {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

body.light-mode .preset-pill.active,
[data-theme="light"] .preset-pill.active {
  background: #fee2e2;
  border-color: #e50914;
  color: #dc2626;
}

body.light-mode .format-btn,
[data-theme="light"] .format-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-mode .fmt-name,
[data-theme="light"] .fmt-name {
  color: #0f172a;
}

body.light-mode .format-btn.active,
[data-theme="light"] .format-btn.active {
  background: #fee2e2;
  border-color: #e50914;
}

/* Light mode for Format Chips */
body.light-mode .format-chip,
[data-theme="light"] .format-chip {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

body.light-mode .format-chip:hover,
[data-theme="light"] .format-chip:hover {
  background: #f1f5f9;
  color: #0f172a;
}

body.light-mode .format-chip.active,
[data-theme="light"] .format-chip.active {
  background: #fee2e2;
  border-color: #e50914;
  color: #dc2626;
}

body.light-mode .format-chip .f-pill,
[data-theme="light"] .format-chip .f-pill {
  background: #e2e8f0;
  color: #475569;
}

body.light-mode .format-chip.active .f-pill.highlight,
[data-theme="light"] .format-chip.active .f-pill.highlight {
  background: #fecaca;
  color: #b91c1c;
}

/* Light mode for Scenarios Compact Card */
body.light-mode .scenarios-compact-card,
[data-theme="light"] .scenarios-compact-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-mode .scenarios-compact-title,
[data-theme="light"] .scenarios-compact-title {
  color: #0f172a;
}

body.light-mode .sc-item,
[data-theme="light"] .sc-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-mode .sc-item.base.active,
[data-theme="light"] .sc-item.base.active {
  background: #ecfdf5;
  border-color: #10b981;
}

body.light-mode .sc-label,
[data-theme="light"] .sc-label {
  color: #0f172a;
}

body.light-mode .sc-sub strong,
[data-theme="light"] .sc-sub strong {
  color: #0f172a;
}

/* Light mode for Range Slider */
body.light-mode .range-slider,
[data-theme="light"] .range-slider {
  background: #e2e8f0;
}

body.light-mode .range-slider::-webkit-slider-thumb,
[data-theme="light"] .range-slider::-webkit-slider-thumb {
  background: #e50914;
  border-color: #ffffff;
  box-shadow: 0 1px 4px rgba(229, 9, 20, 0.4);
}

body.light-mode .styled-select,
[data-theme="light"] .styled-select {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-mode .styled-select option,
[data-theme="light"] .styled-select option {
  background: #ffffff;
  color: #0f172a;
}

body.light-mode .channel-projections-card,
[data-theme="light"] .channel-projections-card {
  background: #ffffff;
  border-color: #fca5a5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.light-mode .proj-title,
[data-theme="light"] .proj-title {
  color: #0f172a;
}

body.light-mode .proj-box,
[data-theme="light"] .proj-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-mode .proj-val,
[data-theme="light"] .proj-val {
  color: #0f172a;
}

body.light-mode .kpi-main-val,
[data-theme="light"] .kpi-main-val {
  color: #0f172a;
}

body.light-mode .scenario-name,
[data-theme="light"] .scenario-name {
  color: #0f172a;
}

body.light-mode .scenario-card.base,
[data-theme="light"] .scenario-card.base {
  background: #ecfdf5;
  border-color: #10b981;
}

body.light-mode .scenario-stats strong,
[data-theme="light"] .scenario-stats strong {
  color: #0f172a;
}

body.light-mode .action-btn,
[data-theme="light"] .action-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-mode .action-btn:hover,
[data-theme="light"] .action-btn:hover {
  background: #f1f5f9;
}

/* ======================================================== */
/* RESPONSIVENESS (MOBILE & TABLET)                         */
/* ======================================================== */

@media (max-width: 1024px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .calc-controls-row {
    grid-template-columns: 1fr 1fr;
  }
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .proj-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .calc-controls-row {
    grid-template-columns: 1fr;
  }
  .format-selector-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .scenarios-grid,
  .scenarios-compact-grid {
    grid-template-columns: 1fr;
  }
  .insights-grid {
    grid-template-columns: 1fr;
  }
  .results-header {
    flex-direction: column;
    align-items: stretch;
  }
  .results-actions {
    justify-content: stretch;
  }
  .results-actions .action-btn {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .format-selector-grid {
    grid-template-columns: 1fr 1fr;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .proj-grid {
    grid-template-columns: 1fr;
  }
  .fetched-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .fetched-card-thumb {
    width: 100%;
    height: 140px;
  }
}




/* ======================================================== */
/* SOCIALBLADE-GRADE CHANNEL INTELLIGENCE STYLES            */
/* ======================================================== */

.search-tool-card {
  position: relative;
  overflow: visible;
  z-index: 100;
}

.search-header-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.search-hint-pill {
  font-size: 11.5px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.channel-search-bar-wrapper {
  position: relative;
  width: 100%;
  z-index: 1000;
}

.search-input-row {
  margin-bottom: 0;
}

.search-input-wrapper {
  position: relative;
}

.btn-clear-search {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.btn-clear-search:hover {
  color: #ffffff;
}

/* Auto-Suggest Dropdown Menu (Screenshot 1) */
.search-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #18181b;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.95), 0 4px 16px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  overflow: hidden;
}

.trending-pills-row {
  position: relative;
  z-index: 1;
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.dropdown-hint {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

.dropdown-list {
  max-height: 380px;
  overflow-y: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.dropdown-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.dropdown-item-info {
  flex: 1;
  min-width: 0;
}

.dropdown-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.dropdown-item-arrow {
  color: #64748b;
  font-size: 16px;
  transition: transform 0.15s, color 0.15s;
}

.dropdown-item:hover .dropdown-item-arrow {
  color: #e50914;
  transform: translateX(3px);
}

.dropdown-footer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-footer-item:hover {
  background: rgba(229, 9, 20, 0.12);
  color: #ffffff;
}

.dropdown-footer-item kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: #cbd5e1;
}

/* Trending Pills Row */
.trending-pills-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.trending-label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}

/* Channel Profile Banner Card (Screenshot 2) */
.channel-profile-banner-card {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.06), rgba(24, 24, 27, 0.8));
  border: 1px solid rgba(229, 9, 20, 0.2);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-header-main {
  display: flex;
  align-items: center;
  gap: 22px;
}

.channel-avatar-box {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(229, 9, 20, 0.6);
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: #000;
}

.ch-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info-box {
  flex: 1;
  min-width: 0;
}

.profile-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.profile-channel-name {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.3px;
}

.profile-handle-pill {
  font-size: 12.5px;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 3px 10px;
  border-radius: 9999px;
  font-weight: 600;
}

.badge-verified {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e50914;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
}

.profile-meta-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.p-meta-item {
  display: flex;
  flex-direction: column;
}

.p-meta-lbl {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.p-meta-val {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
}

.profile-actions-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-yt-visit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e50914;
  color: #ffffff;
  font-weight: 700;
  font-size: 12.5px;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-yt-visit:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

/* SocialBlade Grade & Global Ranks Bar (Screenshot 2) */
.ranks-card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.rank-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.rank-card.grade-card {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(24, 24, 27, 0.4));
}

.rank-card-lbl {
  font-size: 10.5px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.grade-badge-val {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  color: #f59e0b;
}

.grade-badge-val.grade-a { color: #10b981; }
.grade-badge-val.grade-b { color: #3b82f6; }
.grade-badge-val.grade-c { color: #f59e0b; }

.rank-main-num {
  font-size: 19px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
}

.rank-card-sub {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 2px;
}

/* 30-Day Growth & Estimated Earnings (Screenshot 2) */
.creator-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat-growth-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
}

.stat-growth-card.earnings-card {
  border-color: rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(24, 24, 27, 0.4));
}

.stat-growth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.stat-growth-title {
  font-size: 10.5px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.stat-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}

.stat-badge.green {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.stat-badge.blue {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.stat-badge.amber {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.stat-growth-val {
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 4px;
}

.stat-growth-sub {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
}

/* Daily Channel Metrics Section (Screenshot 3) */
.daily-metrics-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 24px;
}

.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-main-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-sub-title {
  font-size: 12px;
  color: #94a3b8;
}

.table-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(229, 9, 20, 0.15);
  color: #ff4d4f;
  padding: 2px 8px;
  border-radius: 9999px;
}

.table-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.styled-select-compact {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  outline: none;
  cursor: pointer;
}

.styled-select-compact option {
  background: #18181b;
  color: #ffffff;
}

.table-responsive-box {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.social-metrics-table th {
  background: rgba(0, 0, 0, 0.4);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.social-metrics-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
}

.social-metrics-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.td-date {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.td-subs {
  white-space: nowrap;
}

.sub-gain {
  color: #64748b;
  font-weight: 600;
  margin-right: 6px;
}

.sub-gain.positive {
  color: #10b981;
  font-weight: 800;
}

.sub-total {
  color: #cbd5e1;
}

.views-gain {
  color: #10b981;
  font-weight: 800;
}

.td-cum-views {
  font-family: 'JetBrains Mono', monospace;
  color: #94a3b8;
}

.td-videos {
  color: #cbd5e1;
}

.td-earnings {
  font-weight: 800;
  color: #f59e0b;
  white-space: nowrap;
}

/* Growth Chart Section (Screenshot 4) */
.growth-chart-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 22px;
}

.chart-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.chart-switch-tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.chart-tab-btn.active {
  background: #e50914;
  color: #ffffff;
}

.chart-canvas-container {
  width: 100%;
  height: 240px;
  position: relative;
}

.growth-svg-chart {
  width: 100%;
  height: 100%;
  display: block;
}

/* ======================================================== */
/* LIGHT MODE STYLES FOR CHANNEL INTELLIGENCE               */
/* ======================================================== */

body.light-mode .search-dropdown-menu,
[data-theme="light"] .search-dropdown-menu {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15);
}

body.light-mode .dropdown-header,
[data-theme="light"] .dropdown-header {
  border-color: #e2e8f0;
  color: #64748b;
}

body.light-mode .dropdown-item,
[data-theme="light"] .dropdown-item {
  border-color: #f1f5f9;
}

body.light-mode .dropdown-item:hover,
[data-theme="light"] .dropdown-item:hover {
  background: #f8fafc;
}

body.light-mode .dropdown-item-title,
[data-theme="light"] .dropdown-item-title {
  color: #0f172a;
}

body.light-mode .dropdown-footer-item,
[data-theme="light"] .dropdown-footer-item {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

body.light-mode .dropdown-footer-item kbd,
[data-theme="light"] .dropdown-footer-item kbd {
  background: #e2e8f0;
  color: #334155;
}

body.light-mode .channel-profile-banner-card,
[data-theme="light"] .channel-profile-banner-card {
  background: #ffffff;
  border-color: #fca5a5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.light-mode .profile-channel-name,
[data-theme="light"] .profile-channel-name,
body.light-mode .p-meta-val,
[data-theme="light"] .p-meta-val {
  color: #0f172a;
}

body.light-mode .profile-handle-pill,
[data-theme="light"] .profile-handle-pill {
  background: #f1f5f9;
  color: #475569;
}

body.light-mode .rank-card,
[data-theme="light"] .rank-card,
body.light-mode .stat-growth-card,
[data-theme="light"] .stat-growth-card,
body.light-mode .daily-metrics-section,
[data-theme="light"] .daily-metrics-section,
body.light-mode .growth-chart-section,
[data-theme="light"] .growth-chart-section {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

body.light-mode .rank-card.grade-card,
[data-theme="light"] .rank-card.grade-card {
  background: #fffbeb;
  border-color: #fcd34d;
}

body.light-mode .rank-main-num,
[data-theme="light"] .rank-main-num,
body.light-mode .stat-growth-val,
[data-theme="light"] .stat-growth-val,
body.light-mode .section-main-title,
[data-theme="light"] .section-main-title,
body.light-mode .td-date,
[data-theme="light"] .td-date {
  color: #0f172a;
}

body.light-mode .social-metrics-table th,
[data-theme="light"] .social-metrics-table th {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}

body.light-mode .social-metrics-table td,
[data-theme="light"] .social-metrics-table td {
  border-color: #f1f5f9;
  color: #334155;
}

body.light-mode .social-metrics-table tr:hover,
[data-theme="light"] .social-metrics-table tr:hover {
  background: #f8fafc;
}

body.light-mode .chart-switch-tabs,
[data-theme="light"] .chart-switch-tabs {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body.light-mode .styled-select-compact,
[data-theme="light"] .styled-select-compact {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-mode .styled-select-compact option,
[data-theme="light"] .styled-select-compact option {
  background: #ffffff;
  color: #0f172a;
}

/* Responsiveness */
@media (max-width: 1024px) {
  .ranks-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .creator-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .profile-meta-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .profile-header-main {
    flex-direction: column;
    text-align: center;
  }
  .profile-title-row {
    justify-content: center;
  }
  .profile-actions-bar {
    justify-content: center;
  }
  .profile-meta-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ranks-card-grid {
    grid-template-columns: 1fr 1fr;
  }
  .creator-stats-grid {
    grid-template-columns: 1fr;
  }
  .section-title-bar,
  .chart-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .table-actions-group {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .ranks-card-grid {
    grid-template-columns: 1fr;
  }
  .profile-meta-grid {
    grid-template-columns: 1fr;
  }
}


/* ──────────────────────────────────────────
   SEO FAQ & ENHANCED FOOTER STYLES
   ────────────────────────────────────────── */
.faq-section {
  padding: 40px 0 20px;
}
.faq-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}
.faq-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ff3366;
  background: rgba(255, 0, 51, 0.08);
  border: 1px solid rgba(255, 0, 51, 0.2);
  border-radius: 999px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.faq-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}
.faq-sub {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 24px;
  text-align: center;
}
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-accordion details {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  transition: all 0.2s ease;
}
.faq-accordion details[open] {
  border-color: rgba(255, 0, 51, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.faq-accordion summary {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-accordion summary::-webkit-details-marker {
  display: none;
}
.faq-accordion summary .faq-icon {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}
.faq-accordion details[open] summary .faq-icon {
  transform: rotate(45deg);
  color: #ff0033;
}
.faq-accordion p {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Enhanced Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 44px 20px 24px;
  margin-top: 60px;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-brand-col {
  max-width: 380px;
}
.footer-desc {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}
.footer-links-group {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.footer-link-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s ease;
}
.footer-link:hover {
  color: #ff0033;
  text-decoration: underline;
}
.footer-link-static {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer-bottom-bar {
  max-width: 1200px;
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 28px;
  }
  .footer-links-group {
    gap: 28px;
  }
}

/* ─────────────────────────────────────────────────────────
   COMPREHENSIVE MOBILE OPTIMIZATION & CLEAN TOUCH RESPONSIVENESS
   ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Navigation Bar */
  .top-nav {
    padding: 8px 12px !important;
  }
  .nav-container {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: space-between !important;
  }
  .logo {
    gap: 7px !important;
  }
  .logo-icon {
    width: 30px !important;
    height: 30px !important;
  }
  .logo-icon svg {
    width: 17px !important;
    height: 17px !important;
  }
  .logo-text {
    font-size: 1.15rem !important;
  }
  .badge-beta {
    font-size: 0.62rem !important;
    padding: 1px 5px !important;
  }
  .nav-actions {
    gap: 6px !important;
  }
  .theme-toggle-btn {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
    min-height: 36px !important;
  }
  .theme-text {
    display: none !important; /* Hide text, keep emoji icon for clean mobile row */
  }
  .currency-switch {
    padding: 3px 5px !important;
    gap: 2px !important;
  }
  .currency-label {
    display: none !important; /* Save ~55px on mobile header */
  }
  .curr-btn {
    padding: 5px 7px !important;
    font-size: 0.74rem !important;
    min-height: 32px !important;
  }
  .curr-select {
    font-size: 0.74rem !important;
    padding: 4px 6px !important;
  }

  /* Navigation Switcher Tabs (Row 2 on Mobile) */
  .page-nav {
    order: 3 !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 2px !important;
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap !important;
    padding: 4px !important;
    gap: 5px !important;
    scrollbar-width: none !important;
    border-radius: 12px !important;
    justify-content: flex-start !important;
  }
  .page-nav::-webkit-scrollbar {
    display: none !important;
  }
  .nav-tab-link {
    flex-shrink: 0 !important;
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    min-height: 36px !important;
  }
  .nav-new-pill {
    font-size: 0.58rem !important;
    padding: 1px 4px !important;
  }

  /* Hero Section */
  .hero-section {
    padding: 18px 10px 14px !important;
    text-align: center !important;
  }
  .hero-badge {
    font-size: 0.72rem !important;
    padding: 3px 10px !important;
    margin-bottom: 10px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .hero-title {
    font-size: clamp(1.4rem, 5.2vw, 1.8rem) !important;
    line-height: 1.25 !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    margin-bottom: 8px !important;
  }
  .hero-sub {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    max-width: 98% !important;
    margin: 6px auto 0 !important;
  }

  /* Tool Card Container */
  .tool-card {
    padding: 12px 10px !important;
    border-radius: 14px !important;
    margin: 0 8px 24px !important;
  }
  .mode-tabs {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 5px !important;
    padding: 4px !important;
    scrollbar-width: none !important;
  }
  .mode-tabs::-webkit-scrollbar {
    display: none !important;
  }
  .tab-btn {
    flex-shrink: 0 !important;
    padding: 7px 11px !important;
    font-size: 0.78rem !important;
    white-space: nowrap !important;
    min-height: 38px !important;
  }

  /* Input Rows & Action Buttons (Vertical Stack on Mobile) */
  .input-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .input-wrapper {
    width: 100% !important;
  }
  .input-wrapper input {
    font-size: 0.88rem !important;
    padding: 12px 12px 12px 38px !important;
    min-height: 44px !important;
  }
  .btn-primary,
  .action-btn,
  .search-btn,
  #btnSearchChannel,
  #startSingleBtn,
  #startChannelBtn,
  #startMultiBtn {
    width: 100% !important;
    justify-content: center !important;
    font-size: 0.92rem !important;
    padding: 12px 18px !important;
    min-height: 46px !important;
  }

  /* Trending Pills */
  .trending-pills-row {
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 10px !important;
  }
  .trend-pill {
    font-size: 0.75rem !important;
    padding: 5px 10px !important;
    min-height: 32px !important;
  }

  /* KPI Grid */
  .kpi-banner {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .kpi-card.highlight {
    grid-column: 1 / -1 !important;
    padding: 14px !important;
  }
  .kpi-card {
    padding: 10px 12px !important;
  }
  .kpi-amount {
    font-size: 1.4rem !important;
  }
  .kpi-value {
    font-size: 1.15rem !important;
  }

  /* Results Toolbar & Export Buttons */
  .results-toolbar {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
  }
  .results-tabs {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    display: flex !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .results-tabs::-webkit-scrollbar {
    display: none !important;
  }
  .res-tab-btn {
    flex-shrink: 0 !important;
    padding: 7px 12px !important;
    font-size: 0.78rem !important;
  }
  .export-group {
    display: flex !important;
    width: 100% !important;
    gap: 6px !important;
  }
  .btn-export {
    flex: 1 !important;
    justify-content: center !important;
    font-size: 0.75rem !important;
    padding: 8px 6px !important;
    min-height: 38px !important;
  }

  /* Profile Card & Stats (Page 3) */
  .profile-header-main {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 12px !important;
  }
  .profile-avatar {
    width: 70px !important;
    height: 70px !important;
  }
  .profile-title-row {
    justify-content: center !important;
  }
  .profile-actions-bar {
    justify-content: center !important;
    width: 100% !important;
  }
  .profile-actions-bar button,
  .profile-actions-bar a {
    flex: 1 !important;
    justify-content: center !important;
  }
  .ranks-card-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .stat-growth-card {
    padding: 12px !important;
  }
  .stat-growth-val {
    font-size: 1.3rem !important;
  }

  /* Tables: Fluid Touch Scroll */
  .table-responsive,
  .table-responsive-box {
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    border-radius: 8px !important;
  }
  .data-table th,
  .data-table td,
  .social-metrics-table th,
  .social-metrics-table td {
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
    white-space: nowrap !important;
  }

  /* FAQ Accordion Mobile */
  .faq-section {
    padding: 24px 8px 16px !important;
  }
  .faq-title {
    font-size: 1.3rem !important;
  }
  .faq-sub {
    font-size: 0.82rem !important;
    margin-bottom: 16px !important;
  }
  .faq-accordion details {
    padding: 12px 14px !important;
    border-radius: 10px !important;
  }
  .faq-accordion summary {
    font-size: 0.88rem !important;
    gap: 10px !important;
  }
  .faq-accordion p {
    font-size: 0.82rem !important;
    line-height: 1.55 !important;
  }

  /* Footer Mobile */
  .footer {
    padding: 30px 14px 20px !important;
    margin-top: 36px !important;
  }
  .footer-container {
    gap: 22px !important;
  }
  .footer-links-group {
    gap: 22px !important;
  }
  .footer-brand-col {
    max-width: 100% !important;
  }
}
/* Metrix T Branded Logo Icon */
.logo-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
  background: #080c18 !important;
  border: 1px solid rgba(255, 0, 51, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3px !important;
  box-shadow: 0 4px 14px rgba(255, 0, 51, 0.25) !important;
  transition: all 0.2s ease !important;
}
.logo-icon:hover {
  border-color: #ff0033 !important;
  box-shadow: 0 4px 20px rgba(255, 0, 51, 0.45) !important;
  transform: scale(1.05) !important;
}
body.light-mode .logo-icon,
[data-theme="light"] .logo-icon {
  background: #0b1120 !important;
  border-color: rgba(255, 0, 51, 0.5) !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2) !important;
}

/* ══════════════════════════════════════════════════════════
   PREMIUM REFINED NAV ACTIONS (THEME TOGGLE & CURRENCY SWITCH)
   ══════════════════════════════════════════════════════════ */
.nav-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* 1. Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  height: 36px !important;
  padding: 0 13px !important;
  border-radius: 9999px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: #f1f5f9 !important;
  font-family: var(--font-main) !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  user-select: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 0, 51, 0.5) !important;
  transform: translateY(-1px) !important;
}

.theme-icon {
  font-size: 0.95rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
}

.theme-text {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px !important;
  white-space: nowrap !important;
}

/* 2. Currency Switcher Segmented Control */
.currency-switch {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  height: 36px !important;
  padding: 3px 5px !important;
  border-radius: 9999px !important;
  background: #111827 !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.currency-label {
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  padding: 0 4px 0 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  user-select: none !important;
}

.curr-btn {
  background: transparent !important;
  border: none !important;
  color: #e2e8f0 !important;
  font-family: var(--font-main) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.curr-btn:hover:not(.active) {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12) !important;
}

.curr-btn.active {
  background: #ff0033 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 8px rgba(255, 0, 51, 0.4) !important;
}

.curr-select {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #f1f5f9 !important;
  font-family: var(--font-main) !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  height: 28px !important;
  padding: 0 8px !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  outline: none !important;
  white-space: nowrap !important;
  transition: all 0.18s ease !important;
}

.curr-select:hover,
.curr-select:focus {
  background: #334155 !important;
  border-color: #ff0033 !important;
  color: #ffffff !important;
}

.curr-select option {
  background-color: #0f172a !important;
  color: #ffffff !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  padding: 8px 12px !important;
}

/* ─────────────────────────────────────────────────────────
   LIGHT MODE PERFECTION FOR NAV ACTIONS
   ───────────────────────────────────────────────────────── */
[data-theme="light"] .theme-toggle-btn,
body.light-mode .theme-toggle-btn {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .theme-toggle-btn:hover,
body.light-mode .theme-toggle-btn:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

[data-theme="light"] .currency-switch,
body.light-mode .currency-switch {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .currency-label,
body.light-mode .currency-label {
  color: #64748b !important;
}

[data-theme="light"] .curr-btn,
body.light-mode .curr-btn {
  color: #334155 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .curr-btn:hover:not(.active),
body.light-mode .curr-btn:hover:not(.active) {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

[data-theme="light"] .curr-btn.active,
body.light-mode .curr-btn.active {
  background: #ff0033 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(255, 0, 51, 0.25) !important;
}

[data-theme="light"] .curr-select,
body.light-mode .curr-select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .curr-select:hover,
body.light-mode .curr-select:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

[data-theme="light"] .curr-select option,
body.light-mode .curr-select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Mobile Nav Actions Refinements */
@media (max-width: 640px) {
  .theme-toggle-btn {
    height: 32px !important;
    padding: 0 8px !important;
  }
  .currency-switch {
    height: 32px !important;
    padding: 2px 4px !important;
    gap: 2px !important;
  }
  .currency-label {
    display: none !important;
  }
  .curr-btn {
    height: 26px !important;
    padding: 0 7px !important;
    font-size: 0.72rem !important;
  }
  .curr-select {
    height: 26px !important;
    padding: 0 5px !important;
    font-size: 0.72rem !important;
  }
}


/* ─────────────────────────────────────────────────────────
   STREAMLINED HEADER SPACING & OVERFLOW PREVENTION
   ───────────────────────────────────────────────────────── */
.nav-container {
  max-width: 1260px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 4px !important;
}

.nav-actions {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

/* Hide redundant "View In:" label to give 60px breathing room */
.currency-label {
  display: none !important;
}

.currency-switch {
  gap: 2px !important;
  padding: 3px 4px !important;
  height: 34px !important;
}

.curr-btn {
  height: 26px !important;
  padding: 0 8px !important;
  font-size: 0.75rem !important;
}

.curr-select {
  height: 26px !important;
  padding: 0 6px !important;
  font-size: 0.74rem !important;
}

.theme-toggle-btn {
  height: 34px !important;
  padding: 0 11px !important;
  font-size: 0.78rem !important;
}

.page-nav {
  gap: 3px !important;
  padding: 3px 5px !important;
}

.nav-tab-link {
  padding: 6px 13px !important;
  font-size: 0.82rem !important;
  gap: 6px !important;
}