/* ===== RESET & BASIS ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --sidebar-width: 260px;
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-sidebar: #1a1d29;
  --color-sidebar-hover: #262a3a;
  --color-text: #1a1d29;
  --color-text-muted: #6b7280;
  --color-accent: #3b82f6;
  --color-accent-light: #dbeafe;
  --color-accent-dark: #2563eb;
  --color-border: #e5e7eb;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-error-light: #fee2e2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08);
  --transition: 0.25s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== DARK MODE ===== */
body[data-theme="dark"] {
  --color-bg: #0f1117;
  --color-surface: #1a1d29;
  --color-text: #e5e7eb;
  --color-text-muted: #9ca3af;
  --color-border: #2d3142;
  --color-accent-light: #1e3a5f;
  --color-sidebar: #0f1117;
  --color-sidebar-hover: #1a1d29;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-sidebar);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 0;
  z-index: 1000;
  transition: transform var(--transition);
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 28px;
  font-size: 1.35rem;
  font-weight: 700;
}

.logo__icon { font-size: 1.6rem; }
.logo__accent { color: var(--color-accent); }

.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #9ca3af;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-item:hover {
  background: var(--color-sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: var(--color-accent);
  color: #fff;
}

.nav-item__icon { font-size: 1.15rem; }

/* Sidebar Controls */
.sidebar__controls {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar__btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: #9ca3af;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.sidebar__btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.sidebar__btn-icon { font-size: 1.1rem; }

.lang-switch {
  display: flex;
  gap: 6px;
}

.lang-btn {
  flex: 1;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: #9ca3af;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.lang-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.sidebar__footer {
  padding: 16px 24px;
  font-size: 0.8rem;
  color: #6b7280;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar__footer-sub { color: #4b5563; margin-top: 2px; }

/* ===== HAUPTBEREICH ===== */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== TOPBAR (Mobile) ===== */
.topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--color-surface);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar__toggle {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--color-text);
}

.topbar__title {
  font-weight: 700;
  font-size: 1.1rem;
  flex: 1;
}

.topbar__dark {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
}

/* ===== SECTIONS ===== */
.section {
  padding: 64px 48px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.section--alt { background: var(--color-surface); }
.section--hero { padding-top: 80px; }

.section__header {
  margin-bottom: 40px;
}

.section__title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section__subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ===== HERO ===== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero__title {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero__highlight {
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  max-width: 420px;
}

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

.hero__card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-surface);
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.hero__card:hover { transform: translateY(-3px); }

.hero__card--accent {
  background: var(--color-accent);
  color: #fff;
}

.hero__card--accent .hero__card-text p { color: rgba(255,255,255,0.85); }

.hero__card-icon { font-size: 2rem; }
.hero__card-text strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.hero__card-text p { font-size: 0.88rem; color: var(--color-text-muted); }

/* ===== VERTRAUENSELEMENTE ===== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  text-align: center;
}

.stat {
  padding: 12px;
}

.stat__number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

body[data-theme="dark"] .testimonial {
  background: rgba(255,255,255,0.03);
}

.testimonial__stars {
  color: var(--color-warning);
  font-size: 1.1rem;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.testimonial__text {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: 16px;
  font-style: italic;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.testimonial__author strong { display: block; font-size: 0.9rem; }
.testimonial__author span { font-size: 0.8rem; color: var(--color-text-muted); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,130,246,0.35);
}

.btn--large {
  padding: 15px 36px;
  font-size: 1.05rem;
}

.btn--small {
  padding: 9px 18px;
  font-size: 0.88rem;
}

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

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

/* ===== FORM ===== */
.pref-form {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.form-group.has-error .chip-group {
  padding: 4px;
  margin: -4px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--color-error);
}

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

.form-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: -4px;
}

.form-error {
  font-size: 0.82rem;
  color: var(--color-error);
  display: none;
}

.form-group.has-error .form-error {
  display: block;
}

.form-validation-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--color-error-light);
  border-radius: var(--radius-sm);
  color: var(--color-error);
  font-size: 0.9rem;
  font-weight: 500;
}

body[data-theme="dark"] .form-validation-msg {
  background: rgba(239,68,68,0.15);
}

/* Chips */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 10px 18px;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 100px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition);
}

.chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.chip.selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* Slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--color-border);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  border: 3px solid var(--color-surface);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  border: 3px solid var(--color-surface);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.budget-value {
  color: var(--color-accent);
  font-weight: 700;
}

/* Textarea */
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color var(--transition);
  background: var(--color-surface);
  color: var(--color-text);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* ===== FORTSCHRITTSANZEIGE ===== */
.progress-bar {
  margin-bottom: 28px;
}

.progress-bar__track {
  width: 100%;
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.progress-bar__label {
  display: block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* ===== ERGEBNIS ===== */
.result-area {
  margin-top: 32px;
}

.result-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--color-accent);
}

.result-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.result-card__icon { font-size: 2rem; }
.result-card__title { font-size: 1.3rem; font-weight: 700; }

.result-card__body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
}

.result-card__body h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 20px 0 8px;
  color: var(--color-accent-dark);
}

body[data-theme="dark"] .result-card__body h4 {
  color: var(--color-accent);
}

.result-card__body .recommendation {
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 12px 0;
}

.result-card__body .recommendation strong {
  font-size: 1.05rem;
}

/* Match Score Badge */
.match-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
}

.match-score--high {
  background: rgba(16,185,129,0.15);
  color: var(--color-success);
}

.match-score--medium {
  background: rgba(245,158,11,0.15);
  color: var(--color-warning);
}

/* Vergleichstabelle */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.compare-table th {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.compare-table td {
  color: var(--color-text);
}

.compare-table tr:hover td {
  background: var(--color-bg);
}

body[data-theme="dark"] .compare-table tr:hover td {
  background: rgba(255,255,255,0.03);
}

.compare-table .model-name {
  font-weight: 600;
  color: var(--color-accent-dark);
}

body[data-theme="dark"] .compare-table .model-name {
  color: var(--color-accent);
}

/* Ergebnis-Aktionen */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.copy-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 16px;
  background: rgba(16,185,129,0.1);
  border-radius: var(--radius-sm);
  color: var(--color-success);
  font-size: 0.88rem;
  font-weight: 500;
}

/* Loading */
.loading-dots {
  display: inline-flex;
  gap: 6px;
}

.loading-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* ===== STEPS ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  text-align: center;
  padding: 28px 20px;
}

.step__number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step__title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.step__text { color: var(--color-text-muted); font-size: 0.92rem; }

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

.faq-item summary {
  padding: 16px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--color-accent);
  transition: transform var(--transition);
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  padding: 0 0 16px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ===== ÜBER UNS ===== */
.about-text {
  max-width: 640px;
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.about-text p { margin-bottom: 16px; }

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 32px 48px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

/* ===== OVERLAY ===== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
}

.overlay.active { display: block; }

/* ===== FADE-IN ANIMATIONEN ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero__title { font-size: 2rem; }
  .steps { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .testimonials { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { display: flex; }
  .section { padding: 40px 20px; }
  .pref-form { padding: 24px; }
  .hero__title { font-size: 1.7rem; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
}