/* ==========================================================================
   TOP CLICK - PREMIUM MINIMAL LIGHT MODE DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Core Color Palette */
  --bg-main: #fcfdfe;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-hover: #f1f5f9;
  --bg-border: #e2e8f0;
  --bg-border-subtle: #f1f5f9;
  
  /* Text & Typography */
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --text-inverse: #ffffff;
  
  /* Brand & Accents */
  --accent-gold: #f59e0b;
  --accent-gold-light: #fef3c7;
  --accent-green: #10b981;
  --accent-green-bg: #ecfdf5;
  --accent-blue: #2563eb;
  
  /* Tactile Button Shadows & Depth */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  
  /* 3D Button Press Shadows */
  --shadow-tactile: 0 3px 0 #cbd5e1, 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-tactile-active: 0 1px 0 #cbd5e1, 0 2px 3px rgba(0, 0, 0, 0.06);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base Reset & Smoothness */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Subtle background dotted matrix */
.bg-pattern {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(161, 161, 170, 0.2) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: -1;
}

/* ==========================================================================
   TOP NAVIGATION BAR
   ========================================================================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

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

.brand-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  user-select: none;
}

.cursor-mini-icon {
  font-size: 1.3rem;
  animation: miniBounce 2.5s infinite ease-in-out;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.pill-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.highlight-pill {
  background: #09090b;
  color: #ffffff;
  border-color: #09090b;
}

.highlight-pill:hover {
  background: #27272a;
  color: #ffffff;
}

.pulse-dot-sm {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 2px var(--accent-green-bg);
  animation: pulseDot 1.8s infinite;
}

/* ==========================================================================
   LAYOUT CONTAINER (3-COLUMN DESKTOP RAILS)
   ========================================================================== */
.layout-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 16px 64px 16px;
  flex: 1;
}

/* ==========================================================================
   SIDEBAR SPONSOR RAILS (LEFT & RIGHT)
   ========================================================================== */
.sidebar {
  width: 170px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 76px;
}

.sidebar-header {
  padding: 0 4px;
  margin-bottom: 2px;
}

.sidebar-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sponsor-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Sponsor Card */
.sponsor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-xs);
  min-height: 104px;
  position: relative;
  overflow: hidden;
}

.sponsor-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.sponsor-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-size: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--bg-border-subtle);
  overflow: hidden;
}

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

.sponsor-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sponsor-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Available / Empty Dotted Slot */
.sponsor-slot-available {
  border: 1.5px dashed #cbd5e1;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.sponsor-slot-available:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.slot-plus-icon {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2px;
  font-weight: 300;
}

.slot-available-text {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Right Sidebar Advertise CTA */
.sponsor-cta-card {
  margin-top: 4px;
  background: #ffffff;
  border: 1.5px dashed #a1a1aa;
  border-radius: var(--radius-lg);
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.sponsor-cta-card:hover {
  border-color: #09090b;
  background: #fafafa;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.sponsor-cta-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.cta-plus-icon {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.cta-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.cta-price {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==========================================================================
   CENTER MAIN CONTENT & HERO
   ========================================================================== */
.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 660px;
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
  width: 100%;
}

/* Center Mouse Pointer Hero Badge */
.cursor-hero-badge {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--bg-border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 22px;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-spring), box-shadow var(--transition-normal);
}

.cursor-hero-badge:hover {
  transform: translateY(-4px) rotate(-6deg) scale(1.06);
  box-shadow: var(--shadow-lg);
}

.cursor-hero-badge:active {
  transform: scale(0.92);
}

.cursor-glow {
  position: absolute;
  inset: -8px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  border-radius: 26px;
  z-index: 0;
}

.hero-cursor-svg {
  width: 34px;
  height: 34px;
  color: #09090b;
  position: relative;
  z-index: 1;
  transform: translate(-1px, 1px);
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #09090b;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 530px;
  margin: 0 auto 24px auto;
  font-weight: 450;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

/* Primary Button (+ Add your product) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #09090b;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  border: 1px solid #09090b;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(9, 9, 11, 0.15);
  text-decoration: none;
}

.btn-primary:hover {
  background: #27272a;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(9, 9, 11, 0.2);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(9, 9, 11, 0.2);
}

.btn-icon {
  font-weight: 700;
  font-size: 1.1rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: #ffffff;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--bg-border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Live Metrics Bar */
.live-metrics-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-xs);
}

.main-clicks-metric {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.odometer {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: #18181b;
}

.metric-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.metric-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.metric-sub-row strong {
  color: var(--text-primary);
  font-weight: 700;
}

.metric-dot {
  color: var(--text-muted);
}

.live-visitors {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pulsing-green-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  display: inline-block;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   CONTROLS SECTION (SEARCH & FILTER TABS)
   ========================================================================== */
.controls-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  font-size: 0.875rem;
  font-family: inherit;
  background: #ffffff;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.search-box input:focus {
  border-color: #09090b;
  box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.08);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.filter-tabs {
  display: flex;
  gap: 8px;
}

.tab-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--bg-border);
}

.tab-btn.active {
  background: #ffffff;
  color: var(--text-primary);
  border-color: var(--bg-border);
  box-shadow: var(--shadow-xs);
}

/* ==========================================================================
   LEADERBOARD SECTION & ROWS
   ========================================================================== */
.leaderboard-section {
  width: 100%;
}

.leaderboard-card {
  background: #ffffff;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
}

/* Individual Leaderboard Row */
.leaderboard-item {
  display: grid;
  grid-template-columns: 36px 42px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--bg-border-subtle);
  transition: background-color var(--transition-fast);
  position: relative;
}

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

.leaderboard-item:hover {
  background-color: #fafbfc;
}

@keyframes liveSyncPulse {
  0% { background-color: rgba(59, 130, 246, 0.12); }
  100% { background-color: transparent; }
}

.item-live-updated {
  animation: liveSyncPulse 1s ease-out;
}

/* Rank 1 Highlight Styling */
.leaderboard-item.rank-1 {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.3) 0%, rgba(255, 255, 255, 0.95) 45%);
}

.leaderboard-item.rank-1:hover {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.45) 0%, rgba(255, 255, 255, 0.98) 45%);
}

/* Rank Indicator */
.item-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.rank-crown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  filter: drop-shadow(0 2px 3px rgba(245, 158, 11, 0.3));
}

/* Product Icon */
.item-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--bg-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info */
.item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.item-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.item-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.2;
  transition: color var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-title:hover {
  color: var(--accent-blue);
}

.item-link-icon {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.item-title:hover .item-link-icon {
  opacity: 1;
  color: var(--accent-blue);
}

.item-tagline {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Item Stats (Clicks & Visits) */
.item-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 6px;
  min-width: 65px;
}

.item-clicks-count {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.item-visits-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* THE CLICK BUTTON (TACTILE SATISFYING BUTTON) */
.click-btn-wrap {
  position: relative;
}

.click-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 38px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  user-select: none;
  box-shadow: var(--shadow-tactile);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.click-btn:hover {
  background: #fcfcfc;
  border-color: #cbd5e1;
}

.click-btn:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-tactile-active);
  background: #f8fafc;
}

.click-btn-icon {
  font-size: 1.3rem;
  transform: translateY(-1px);
  transition: transform 0.08s ease;
}

.click-btn:active .click-btn-icon {
  transform: scale(0.88) translateY(1px);
}

/* Floating Click Particle (+1 bubble) */
.click-particle {
  position: fixed;
  pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 800;
  color: #d97706;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  animation: floatUpFade 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  z-index: 999;
}

@keyframes floatUpFade {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -24px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -44px) scale(1);
  }
}

/* Combo Streak Indicator */
.combo-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
  animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

@keyframes popIn {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state.hidden {
  display: none;
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.empty-state h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-btn {
  background: none;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.footer-btn:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer-sep {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  opacity: 1;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.modal-panel {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--bg-border);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(0);
  transition: transform var(--transition-spring);
}

.modal-lg {
  max-width: 640px;
}

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

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  border-radius: var(--radius-sm);
  padding: 4px;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.req {
  color: #ef4444;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  background: #ffffff;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus {
  border-color: #09090b;
  box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.06);
}

.icon-selector-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  margin-top: 2px;
}

.icon-choice {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: var(--bg-subtle);
  border: 1px solid var(--bg-border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-choice:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.icon-choice.active {
  background: #ffffff;
  border-color: #09090b;
  box-shadow: var(--shadow-sm);
}

.custom-icon-row {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.custom-icon-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--bg-border-subtle);
}

/* Advertise Modal Banner */
.ad-pricing-banner {
  background: linear-gradient(135deg, #09090b 0%, #18181b 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.ad-price-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
}

.ad-price-period {
  font-size: 0.85rem;
  opacity: 0.8;
}

.ad-stats-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ad-stat-pill {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* Analytics Modal UI */
.analytics-metric-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.ana-card {
  background: var(--bg-subtle);
  border: 1px solid var(--bg-border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ana-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ana-lbl {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.guide-box {
  background: #f8fafc;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.guide-box h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.guide-steps {
  font-size: 0.825rem;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-steps code {
  background: #e2e8f0;
  padding: 1px 4px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #09090b;
}

.posthog-config-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.posthog-config-row input {
  padding: 6px 10px;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}

.toast {
  background: #09090b;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes slideInUp {
  0% { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE BREAKPOINTS)
   ========================================================================== */
@media (max-width: 960px) {
  .sidebar {
    display: none;
  }

  .layout-container {
    max-width: 680px;
    padding: 24px 16px 48px 16px;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
  }

  .layout-container {
    padding: 16px 12px 48px 12px;
  }

  .leaderboard-item {
    grid-template-columns: 28px 36px 1fr auto auto;
    gap: 10px;
    padding: 12px 12px;
  }

  .item-clicks-count {
    font-size: 0.85rem;
  }

  .item-visits-count {
    display: none;
  }

  .click-btn {
    width: 48px;
    height: 36px;
  }

  .click-btn-icon {
    font-size: 1.15rem;
  }

  .live-metrics-bar {
    padding: 8px 16px;
  }

  .analytics-metric-cards {
    grid-template-columns: 1fr;
  }
}
