:root {
  --bg-dark: #080c14;
  --bg-card: #0f172a;
  --bg-card-hover: #17223b;
  --bg-card-alt: #131d35;
  --bg-input: #070b12;
  --border-color: #1e293b;
  --border-glow: #334155;
  --border-accent: rgba(139, 92, 246, 0.4);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.25);
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.25);
  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.25);
  --accent-orange: #f97316;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, "Courier New", monospace;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.15);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.55;
  background-image: 
    radial-gradient(circle at 10% 12%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 90% 18%, rgba(6, 182, 212, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  overflow-x: hidden;
}

/* Mandatory CSS constraints */
input, select, textarea {
  min-width: 0;
  font-family: inherit;
}

.brand {
  min-width: 0;
}

.brand-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-switcher {
  flex-shrink: 0;
}

.app-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 70px 20px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
  flex-shrink: 0;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

.brand-pro-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.btn-api-pool {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-api-pool:hover {
  border-color: var(--accent-purple);
  color: var(--text-main);
  background: rgba(139, 92, 246, 0.1);
}

.api-dot {
  color: var(--accent-emerald);
  font-size: 10px;
}

.lang-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn.active {
  background: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
}

/* Key Metrics HUD */
.hud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.hud-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.hud-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
}

.hud-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
}

.hud-card.highlight::before { background: linear-gradient(90deg, #8b5cf6, #c084fc); }
.hud-card.cyan::before { background: linear-gradient(90deg, #06b6d4, #38bdf8); }
.hud-card.emerald::before { background: linear-gradient(90deg, #10b981, #34d399); }
.hud-card.amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.hud-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}

.badge-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.badge-tag.positive {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.hud-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}

.hud-value {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  color: #ffffff;
}

.hud-unit {
  font-size: 14px;
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-weight: 500;
}

.hud-sub {
  font-size: 12px;
  color: var(--text-dim);
}

/* General Calc Card */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

/* Hero Search Section */
.hero-search-section {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.75) 100%);
  border: 1px solid rgba(139, 92, 246, 0.25);
  position: relative;
}

.section-badge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
}

.badge-offline {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
}

.hero-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 8px;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 950px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.url-input-container {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 6px 8px;
  margin-bottom: 16px;
  transition: all 0.2s;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.url-input-container:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.input-prefix {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
  padding: 0 8px 0 12px;
  user-select: none;
}

.repo-input-field {
  flex: 1;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 8px 10px;
  outline: none;
}

.repo-input-field::placeholder {
  color: #475569;
}

.input-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #334155;
  border-color: var(--border-glow);
}

.btn-gemini-ai {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

.btn-gemini-ai:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  transform: translateY(-1px);
}

.btn-watchlist {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.btn-watchlist:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

.btn-tool {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
  padding: 6px 12px;
}

.btn-tool:hover {
  background: rgba(30, 41, 59, 0.9);
  color: var(--text-main);
  border-color: var(--border-glow);
}

.quick-samples-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.samples-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

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

.sample-pill {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.sample-pill:hover {
  border-color: var(--accent-cyan);
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.1);
}

/* Inspected Repo Card */
.inspected-repo-card {
  border: 1px solid var(--border-glow);
  background: linear-gradient(180deg, #0d1527 0%, #0a0f1d 100%);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.inspected-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.inspected-top-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.repo-owner-name {
  font-size: 20px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #ffffff;
}

.repo-ext-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.repo-ext-link:hover {
  text-decoration: underline;
}

.badge-category {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

.badge-license {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
}

.repo-one-liner {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 800px;
}

.inspected-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.m-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.m-box.highlight {
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.05);
}

.m-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  display: block;
  margin-bottom: 4px;
}

.m-val-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.m-val {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.m-unit {
  font-size: 12px;
  color: var(--text-dim);
}

.m-sub {
  font-size: 11px;
  color: var(--text-dim);
  display: block;
}

.text-fire { color: #f97316; }
.text-gold { color: #facc15; }
.text-emerald { color: #10b981; }
.text-cyan { color: #06b6d4; }

.stack-tags-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.stack-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

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

.tag-pill {
  font-size: 11px;
  font-family: var(--font-mono);
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Monetization Blueprint Section */
.blueprint-section {
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: linear-gradient(180deg, #0a1322 0%, #070d18 100%);
  animation: fadeIn 0.3s ease;
}

.blueprint-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.blueprint-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #34d399;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.blueprint-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.blueprint-meta-source {
  font-size: 12px;
  color: var(--text-dim);
}

.blueprint-header-actions {
  display: flex;
  gap: 8px;
}

/* Callout Box */
.bp-box {
  display: flex;
  gap: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.bp-box-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.bp-box-content {
  flex: 1;
}

.bp-box-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.bp-exec-pitch {
  font-size: 15px;
  line-height: 1.6;
  color: #e2e8f0;
  font-weight: 500;
}

.bp-desc-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Viral Grid */
.bp-viral-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.viral-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.viral-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.viral-icon {
  font-size: 18px;
}

.viral-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.viral-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* 3 SaaS Plays Container */
.bp-plays-container {
  margin-bottom: 24px;
}

.plays-header-row {
  margin-bottom: 16px;
}

.plays-main-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.plays-sub-tag {
  font-size: 13px;
  color: var(--text-dim);
}

.plays-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.play-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
  position: relative;
}

.play-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.play-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.play-number-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #38bdf8;
  letter-spacing: 0.05em;
}

.play-arr-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-emerald);
}

.play-product-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.4;
}

.play-concept-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.play-spec-block {
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid rgba(30, 41, 59, 0.7);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
}

.play-spec-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.play-spec-text {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}

.pricing-pills-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.price-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
}

/* ARR Calculator Box */
.arr-calc-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-top: 24px;
}

.arr-calc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.arr-calc-titles {
  display: flex;
  align-items: center;
  gap: 12px;
}

.arr-icon {
  font-size: 28px;
}

.arr-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.arr-sub {
  font-size: 12px;
  color: var(--text-dim);
}

.arr-results-pill {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: var(--radius-md);
}

.arr-stat-item {
  display: flex;
  flex-direction: column;
}

.arr-stat-lbl {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.arr-stat-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
}

.arr-sliders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.slider-group {
  display: flex;
  flex-direction: column;
}

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

.slider-header label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.slider-val-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
}

.custom-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #1e293b;
  outline: none;
  cursor: pointer;
  margin: 8px 0;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-purple);
  box-shadow: 0 0 10px var(--accent-purple);
  cursor: pointer;
  transition: transform 0.1s;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* Leaderboard Section */
.section-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-heading {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.section-subheading {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 750px;
}

.filter-search-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  width: 280px;
  outline: none;
  transition: all 0.2s;
}

.filter-search-input:focus {
  border-color: var(--accent-purple);
}

.controls-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.category-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-tab {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.cat-tab:hover {
  border-color: var(--border-glow);
  color: var(--text-main);
}

.cat-tab.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-purple);
  color: #c4b5fd;
}

.sort-selector-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}

.sort-dropdown {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #ffffff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

/* Leaderboard Table */
.table-responsive {
  overflow-x: auto;
}

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

.leaderboard-table th {
  background: rgba(15, 23, 42, 0.9);
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
}

.leaderboard-table td {
  padding: 14px 14px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
  font-size: 13px;
  vertical-align: middle;
}

.leaderboard-table tr:hover td {
  background: rgba(139, 92, 246, 0.05);
}

.rank-pill {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.7);
  color: var(--text-dim);
}

.rank-pill.gold {
  background: rgba(234, 179, 8, 0.2);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: #facc15;
}

.rank-pill.silver {
  background: rgba(148, 163, 184, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
}

.rank-pill.bronze {
  background: rgba(217, 119, 6, 0.2);
  border: 1px solid rgba(217, 119, 6, 0.4);
  color: #fb923c;
}

.repo-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.repo-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.repo-name-link {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
  cursor: pointer;
}

.repo-name-link:hover {
  text-decoration: underline;
  color: #7dd3fc;
}

.table-desc {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 450px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-tags {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.velocity-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: #f97316;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
}

.stars-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #facc15;
}

.arr-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #34d399;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

.btn-inspect-sm {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-inspect-sm:hover {
  background: rgba(139, 92, 246, 0.3);
  color: #ffffff;
}

/* Watchlist Section */
.watchlist-section {
  background: rgba(15, 23, 42, 0.6);
}

.btn-clear-watch {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-clear-watch:hover {
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.4);
}

.watchlist-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.empty-watchlist {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--text-dim);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
}

.watch-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.watch-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
}

.watch-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
}

.watch-remove-btn:hover {
  color: #f43f5e;
}

/* Educational Strategy Guide */
.educational-section {
  border: 1px solid var(--border-color);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7) 0%, rgba(8, 12, 20, 0.9) 100%);
}

.edu-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #818cf8;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.edu-heading {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.edu-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 850px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.edu-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.edu-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
}

.edu-card-number {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-purple);
  margin-bottom: 8px;
}

.edu-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.edu-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

.edu-example-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

/* FAQ Accordion */
.faq-container {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.faq-section-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: rgba(15, 23, 42, 0.5);
  overflow: hidden;
}

.faq-question {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  cursor: pointer;
  user-select: none;
}

.faq-question:hover {
  background: rgba(30, 41, 59, 0.4);
}

.faq-icon-arrow {
  font-size: 10px;
  color: var(--text-dim);
  transition: transform 0.2s;
}

.faq-item.active .faq-icon-arrow {
  transform: rotate(180deg);
  color: var(--accent-purple);
}

.faq-answer {
  padding: 0 16px 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Portal Backlink Footer */
.portal-backlink-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px 0 10px 0;
  flex-wrap: wrap;
}

.portal-backlink {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.portal-backlink:hover {
  text-decoration: underline;
  color: #38bdf8;
}

.portal-sub {
  font-size: 12px;
  color: var(--text-dim);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  border: 1px solid var(--accent-emerald);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  padding: 20px;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: #0f172a;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-body {
  padding: 20px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.keys-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 16px 0;
}

.key-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.key-item.active {
  border-color: var(--accent-emerald);
  color: #34d399;
  background: rgba(16, 185, 129, 0.08);
}

.modal-input-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
}

.custom-key-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 8px;
  outline: none;
}

.custom-key-input:focus {
  border-color: var(--accent-purple);
}

.modal-note {
  font-size: 11px;
  color: var(--text-dim);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(8, 12, 20, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-container {
    padding: 16px 12px 60px 12px;
  }
  
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .url-input-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .input-actions-group {
    width: 100%;
    margin-top: 8px;
  }
  
  .input-actions-group .btn {
    flex: 1;
  }
  
  .filter-search-input {
    width: 100%;
  }
  
  .controls-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .category-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }
  
  .sort-selector-wrap {
    justify-content: space-between;
  }
  
  .blueprint-header-bar {
    flex-direction: column;
  }
  
  .blueprint-header-actions {
    width: 100%;
  }
  
  .blueprint-header-actions .btn {
    flex: 1;
  }
}
