:root {
  /* Core Palette */
  --primary-color: #fb9678;
  --primary-hover: #fa825d;
  --primary-light: rgba(251, 150, 120, 0.15);
  
  --secondary-color: #03c3ec;
  --bg-color: #0f172a;
  --bg-card: #1e293b;
  --bg-input: #334155;
  
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: rgba(226, 232, 240, 0.1);
  
  --accent-glow: rgba(251, 150, 120, 0.4);
  --shadow-glow: 0 0 20px rgba(251, 150, 120, 0.2);

  /* Radius Patterns */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.75rem;
  --radius-3xl: 2.5rem;

  --font: "Outfit", sans-serif;
  
  /* Shadows */
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-premium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-theme {
  --bg-color: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --border-color: #e2e8f0;
  --text-color: #0f172a;
  --text-muted: #64748b;
  --accent-glow: rgba(251, 150, 120, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

/* ── Background Elements ─────────────────────────────────── */
.bg-shape {
  position: fixed;
  z-index: -1;
  filter: blur(100px);
  opacity: 0.15;
  border-radius: 50%;
  pointer-events: none;
  animation: float-shapes 20s infinite alternate ease-in-out;
}
.bg-shape-1 {
  width: 60vmax;
  height: 60vmax;
  top: -20%;
  left: -10%;
  background: var(--primary-color);
}
.bg-shape-2 {
  width: 50vmax;
  height: 50vmax;
  bottom: -10%;
  right: -5%;
  background: var(--secondary-color);
}

@keyframes float-shapes {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 5%) scale(1.1); }
}

/* ── Container ───────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ──────────────────────────────────────────────── */
.main-header {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -0.5px;
}
.logo a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  color: var(--primary-color);
}
.logo span span {
  color: var(--primary-color);
}
.logo .badge-sub {
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--primary-color);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-xl);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Theme Toggle ────────────────────────────────────────── */
.theme-toggle-btn {
  background: var(--bg-dark); /* Fallback */
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-color);
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
}
.theme-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

/* ── Hero Section ────────────────────────────────────────── */
.hero-section {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
}
.hero-container {
  max-width: 850px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  background: var(--badge-bg);
  border: 1px solid rgba(251, 150, 120, 0.1);
  color: var(--primary-color);
  margin-bottom: 28px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
  color: var(--text-color);
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 48px;
  line-height: 1.6;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-2xl);
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary-color);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-color);
  transform: translateY(-2px);
}
.btn-large {
  padding: 18px 40px;
  font-size: 1.15rem;
}

/* ── Gloss Card ──────────────────────────────────────────── */
.gloss-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-3xl);
  padding: 48px;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}
.gloss-card:hover {
  box-shadow: var(--shadow-hover);
}

/* ── Wizard ──────────────────────────────────────────────── */
.wizard-wrapper {
  max-width: 650px;
  margin: 0 auto;
}

.progress-bar-container {
  height: 8px;
  background: var(--bg-color);
  border-radius: var(--radius-sm);
  margin-bottom: 40px;
}
.progress-bar {
  height: 100%;
  background: var(--primary-color);
  border-radius: var(--radius-sm);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-step h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.step-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.step-desc {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1.05rem;
}
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  color: var(--text-color);
  font-family: var(--font);
  font-size: 1rem;
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-color);
}

.tile-content {
  padding: 24px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  transition: var(--transition);
  background: var(--bg-input);
}
.tile-radio input:checked + .tile-content {
  border-color: var(--primary-color);
  background: var(--primary-light);
  color: var(--primary-hover);
}

.light-theme .tile-radio input:checked + .tile-content {
    background: rgba(251, 150, 120, 0.1);
}

.main-footer {
    padding: 100px 0 60px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ── Tile Radio (cards) ──────────────────────────────────── */
.tiles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.tiles-grid-2 {
  grid-template-columns: 1fr 1fr;
}
.tiles-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.tile-radio input[type="radio"],
.tile-radio input[type="checkbox"] {
  display: none;
}
.tile-radio .tile-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-2xl);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  transition: var(--transition);
  background: var(--bg-input);
  color: var(--text-muted);
  min-height: 100px;
  user-select: none;
}
.tile-radio input:checked + .tile-content,
.tile-radio.selected .tile-content {
  border-color: var(--primary-color);
  background: rgba(14, 165, 233, 0.12);
  color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.tile-radio .tile-content:hover {
  border-color: var(--primary-color);
  color: var(--text-color);
}
.tile-icon {
  font-size: 1.6rem;
  line-height: 1;
}

/* ── Feature Checkboxes ──────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 480px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-check {
  cursor: pointer;
}
.feature-check input[type="checkbox"] {
  display: none;
}
.feature-check .feature-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  transition: var(--transition);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  user-select: none;
}
.feature-check .feature-content .feature-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.feature-check .feature-content .check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.feature-check input:checked + .feature-content {
  border-color: var(--primary-color);
  background: rgba(14, 165, 233, 0.1);
  color: var(--primary-light);
}
.feature-check input:checked + .feature-content .check-box {
  background: var(--primary-color);
  border-color: var(--primary-color);
}
.feature-check input:checked + .feature-content .check-box::after {
  content: "✓";
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.feature-check .feature-content:hover {
  border-color: var(--primary-color);
  color: var(--text-color);
}

/* ── Result Panel ────────────────────────────────────────── */
.result-section {
  padding: 20px 0 80px;
}
.result-wrapper {
  max-width: 640px;
  margin: 0 auto;
}

.result-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.result-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(14, 165, 233, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.result-price-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.result-price {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(
    135deg,
    var(--primary-light),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
  line-height: 1;
}
.result-price-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.result-range {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.result-range-item {
  text-align: center;
}
.result-range-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.result-range-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-color);
}
.result-range-val.min {
  color: #f97316;
}
.result-range-val.max {
  color: #10b981;
}

.result-car-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}
.result-tag {
  padding: 4px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.ai-insight-box {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 28px;
  text-align: left;
}
.ai-insight-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #8b5cf6;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.ai-insight-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Lead Form in Result ─────────────────────────────────── */
.lead-form-box {
  margin-top: 24px;
  background: rgba(14, 165, 233, 0.05);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  display: none;
}
.lead-form-box.show {
  display: block;
}
.lead-form-box h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}
.lead-form-box p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── Sections (Testimonials, FAQ, Footer) ────────────────── */
.section {
  padding: 80px 0;
}
.section-title {
  font-size: 2rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
  font-size: 1rem;
}

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

.testimonial-card {
  padding: 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
}
.testimonial-stars {
  color: #f59e0b;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.testimonial-text {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.testimonial-author {
  font-weight: 700;
  font-size: 0.85rem;
}
.testimonial-car {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-list {
  max-width: 640px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border-color);
}
.faq-question {
  all: unset;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 0;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.5;
  gap: 12px;
}
.faq-question .arrow {
  font-size: 0.7rem;
  transition: var(--transition);
  flex-shrink: 0;
  color: var(--primary-color);
}
.faq-item.open .faq-question .arrow {
  transform: rotate(180deg);
}
.faq-answer {
  display: none;
  padding-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer {
  display: block;
}

/* ── Footer ──────────────────────────────────────────────── */
.main-footer {
  padding: 48px 0 24px;
  border-top: 1px solid var(--border-color);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.footer-logo {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 10px;
}
.footer-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 280px;
}
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 8px;
}
.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition);
}
.footer-col a:hover {
  color: var(--primary-color);
}

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

/* ── Data Table (Admin reusable) ─────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr:hover td {
  background: rgba(14, 165, 233, 0.04);
}

/* ── Stats Grid ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* ── Utility ─────────────────────────────────────────────── */
.text-center {
  text-align: center;
}
.text-muted {
  color: var(--text-muted);
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mb-2 {
  margin-bottom: 16px;
}

/* ── Loaders & Animations ────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 24px auto;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Counter animation ───────────────────────────────────── */
.count-up {
  font-variant-numeric: tabular-nums;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--primary-color);
}
.breadcrumb span {
  margin: 0 6px;
  opacity: 0.4;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-section {
    padding: 50px 0 40px;
  }
  .wizard-card {
    padding: 28px 20px;
  }
  .result-card {
    padding: 28px 20px;
  }
  .trust-bar {
    gap: 20px;
    padding: 18px;
  }
  .tiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .result-actions {
    flex-direction: column;
  }
  .result-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .wizard-actions {
    flex-direction: column-reverse;
  }
  .wizard-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 420px) {
  .tiles-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* ── SweetAlert2 override ────────────────────────────────── */
.swal2-popup {
  font-family: var(--font) !important;
  border-radius: var(--radius-lg) !important;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: 32px;
  transition: var(--transition);
}

/* ── Utilities ───────────────────────────────────────────── */
.hidden { display: none !important; }
