/* ==========================================================================
   AI Router Free Credits Hub — Main Stylesheet
   Theme: Dark Technology / High Contrast Developer Aesthetic
   ========================================================================== */

:root {
  --bg-main: #08090B;
  --bg-surface: #101216;
  --bg-elevated: #15171C;
  --bg-hover: #1C1F26;
  --bg-input: #0D0E12;

  --border-subtle: #1F222A;
  --border-main: #252830;
  --border-hover: #383C4A;
  --border-focus: #6E7BFF;

  --text-primary: #F5F5F5;
  --text-secondary: #9A9DA5;
  --text-muted: #666A73;
  --text-white: #FFFFFF;

  --accent-primary: #6E7BFF;
  --accent-hover: #8691FF;
  --accent-subtle: rgba(110, 123, 255, 0.12);
  --accent-border: rgba(110, 123, 255, 0.3);

  --badge-green-bg: rgba(16, 185, 129, 0.12);
  --badge-green-text: #34D399;
  --badge-green-border: rgba(16, 185, 129, 0.25);

  --badge-blue-bg: rgba(59, 130, 246, 0.12);
  --badge-blue-text: #60A5FA;
  --badge-blue-border: rgba(59, 130, 246, 0.25);

  --badge-amber-bg: rgba(245, 158, 11, 0.12);
  --badge-amber-text: #FBBF24;
  --badge-amber-border: rgba(245, 158, 11, 0.25);

  --badge-rose-bg: rgba(244, 63, 94, 0.12);
  --badge-rose-text: #FB7185;
  --badge-rose-border: rgba(244, 63, 94, 0.25);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);

  --container-max: 1240px;
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #13151D 0%, var(--bg-main) 70%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   Layout Containers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-content {
  flex: 1 0 auto;
  padding-bottom: 4rem;
}

/* --------------------------------------------------------------------------
   Typography System
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, #B0B5C0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 72px;
  display: flex;
  align-items: center;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo:hover {
  transform: translateY(-1px);
}

.brand-mark-svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.25));
}

.brand-logo:hover .brand-mark-svg,
.brand-mark-svg:hover {
  transform: scale(1.06) rotate(-2deg);
  filter: drop-shadow(0 6px 20px rgba(129, 140, 248, 0.45));
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #6E7BFF 0%, #4A56E2 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(110, 123, 255, 0.4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-white);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Menu Toggle */
.mobile-nav-toggle {
  display: none;
  padding: 0.5rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-main);
  z-index: 99;
  padding: 2rem 1.5rem;
  flex-direction: column;
  gap: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.mobile-drawer.open {
  display: flex;
}

.mobile-drawer .nav-link {
  font-size: 1.2rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

/* --------------------------------------------------------------------------
   Buttons System
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: var(--accent-primary);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(110, 123, 255, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px rgba(110, 123, 255, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-main);
}

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

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-main);
}

.btn-outline:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--accent-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-white);
  background: var(--bg-hover);
}

/* --------------------------------------------------------------------------
   Badges System
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-credit {
  background: rgba(110, 123, 255, 0.15);
  color: #8E99FF;
  border: 1px solid rgba(110, 123, 255, 0.3);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
}

.badge-green {
  background: var(--badge-green-bg);
  color: var(--badge-green-text);
  border: 1px solid var(--badge-green-border);
}

.badge-blue {
  background: var(--badge-blue-bg);
  color: var(--badge-blue-text);
  border: 1px solid var(--badge-blue-border);
}

.badge-amber {
  background: var(--badge-amber-bg);
  color: var(--badge-amber-text);
  border: 1px solid var(--badge-amber-border);
}

.badge-rose {
  background: var(--badge-rose-bg);
  color: var(--badge-rose-text);
  border: 1px solid var(--badge-rose-border);
}

.badge-subtle {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-main);
  text-transform: none;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.25rem; }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 660px;
  line-height: 1.6;
}

/* Total Credits Big Counter */
.credit-stat-banner {
  margin-top: 1rem;
  padding: 1.5rem 2.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.credit-stat-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-primary) 50%, transparent 100%);
}

.credit-stat-number {
  font-size: 3.25rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 0 30px rgba(110, 123, 255, 0.3);
}

.credit-stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero Stats Row */
.hero-stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin-top: 1rem;
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-white);
}

.hero-stat-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Filter & Discovery Bar
   -------------------------------------------------------------------------- */
.discovery-section {
  padding: 2rem 0;
}

.discovery-header {
  margin-bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.filter-row-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1 1 300px;
  position: relative;
}

.search-input-wrapper svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

.sort-select-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-select {
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 0.65rem 2.2rem 0.65rem 1rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  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='%279A9DA5%27 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 0.75rem center;
}

.custom-select:focus {
  border-color: var(--accent-primary);
}

/* Category Pills Bar */
.category-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.cat-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-white);
}

.cat-pill.active {
  background: var(--accent-subtle);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
}

/* Extra Filters Drawer */
.filter-row-extra {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Router Grid & Cards
   -------------------------------------------------------------------------- */
.router-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

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

.router-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

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

.router-card.featured {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, rgba(110, 123, 255, 0.05) 0%, var(--bg-surface) 100%);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.router-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.router-logo {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--bg-elevated);
  border: 1px solid var(--border-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.router-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.router-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
}

.router-tagline {
  font-size: 0.825rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.card-credit-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.credit-amount-large {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
}

.card-models-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.models-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.provider-icons-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.provider-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.provider-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-white);
  background: var(--bg-elevated);
}

.provider-mark {
  vertical-align: middle;
  border-radius: 6px;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.provider-pill:hover .provider-mark {
  transform: scale(1.1);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Router Detail View Page
   -------------------------------------------------------------------------- */
.detail-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: relative;
}

.detail-header-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.detail-identity {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.detail-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  font-size: 1.75rem;
}

.detail-title-group h1 {
  font-size: 2.25rem;
  margin-bottom: 0.25rem;
}

.detail-cta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .detail-cta-block { align-items: flex-start; }
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

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

.detail-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.meta-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.meta-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}

.meta-label { color: var(--text-muted); }
.meta-value { font-weight: 600; color: var(--text-primary); }

/* Model Table / Cards in Detail */
.model-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}

.model-item-card {
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.model-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.model-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-white);
}

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

.capability-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.cap-tag {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Comparison Section / Page
   -------------------------------------------------------------------------- */
.compare-table-wrapper {
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.compare-table th, .compare-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
}

.compare-table th:first-child, .compare-table td:first-child {
  background: var(--bg-elevated);
  font-weight: 600;
  width: 220px;
}

/* --------------------------------------------------------------------------
   Footer & Credit Badge
   -------------------------------------------------------------------------- */
.site-footer {
  background: #050608;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  margin-top: auto;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
}

.footer-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-link {
  color: var(--text-secondary);
}

.footer-link:hover { color: var(--text-white); }

.social-icon-btns {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-btn:hover {
  color: var(--text-white);
  border-color: var(--accent-primary);
  background: var(--accent-subtle);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.affiliate-notice-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Persistent Bottom-Right Credit Badge */
.persistent-credit-badge {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 90;
  background: rgba(16, 18, 22, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.78rem;
  transition: all var(--transition-fast);
}

.persistent-credit-badge:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.credit-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.badge-close-btn {
  color: var(--text-muted);
  padding: 0.1rem;
  border-radius: 50%;
}

.badge-close-btn:hover { color: var(--text-white); }

/* --------------------------------------------------------------------------
   Modal & Toast System
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 7, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

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

.modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-overlay.open .modal-container {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--text-muted);
  padding: 0.35rem;
  border-radius: var(--radius-sm);
}

.modal-close:hover { color: var(--text-white); background: var(--bg-hover); }

/* Toast Notifications Container */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 380px;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  animation: slideIn 250ms ease-out forwards;
}

.toast-success { border-left: 4px solid #10B981; }
.toast-error   { border-left: 4px solid #EF4444; }
.toast-info    { border-left: 4px solid var(--accent-primary); }

@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Forms & Utility Classes
   -------------------------------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

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

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

.form-textarea {
  min-height: 110px;
  resize: vertical;
}

.form-help {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-main);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
