/* ========================================
   DESIGN SYSTEM – Licht im Einsatz
   ======================================== */

:root {
  --bg-primary: #0a0a0c;
  --bg-secondary: #141418;
  --bg-card: #1a1a22;
  --bg-card-hover: #22222e;
  --text-primary: #f0f0f5;
  --text-secondary: #9a9ab0;
  --text-muted: #6a6a80;
  --accent: #DB3000;
  --accent-hover: #ff5530;
  --accent-glow: rgba(232, 69, 32, 0.35);
  --blue: #0071EB;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --warmgelb: #f59e0b;
  --border: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   PAGE CONTAINER
   ======================================== */
.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0 20px;
  padding-bottom: calc(20px + var(--safe-bottom));
}

/* ========================================
   WELCOME PAGE
   ======================================== */
.welcome-content {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-top: 60px;
  position: relative;
  z-index: 2;
}

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.app-icon {
  width: 96px;
  height: 96px;
  background: linear-gradient(145deg, #ff6a3d, #e84520);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px var(--accent-glow), 0 0 60px rgba(232, 69, 32, 0.15);
  margin-bottom: 28px;
  animation: iconFloat 4s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

.app-icon svg {
  width: 48px;
  height: 48px;
}

.glow-ring {
  position: absolute;
  top: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 69, 32, 0.15) 0%, transparent 70%);
  animation: glowPulse 3s ease-in-out infinite;
  z-index: 1;
}

@keyframes iconFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.hero-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.6;
}

.welcome-spacer {
  flex: 1;
}

.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px var(--accent-glow);
  margin-bottom: 10px;
}

.cta-button:hover,
.cta-button:active {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px var(--accent-glow);
}

/* ========================================
   NAVIGATION BAR (back button)
   ======================================== */
.nav-bar {
  display: flex;
  align-items: center;
  padding: 16px 0;
  gap: 12px;
}

.back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.back-btn:hover {
  background: #4b90f7;
  transform: translateY(-1px);
}

.back-btn svg {
  width: 24px;
  height: 24px;
}

/* ========================================
   TIMELINE PAGE
   ======================================== */
.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 40px;
  position: relative;
}

/* Timeline line */
.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

.timeline-line {
  width: 4px;
  flex-shrink: 0;
  border-radius: 4px;
  position: relative;
}

.timeline-line.line-warmgelb {
  background: var(--warmgelb);
}

.timeline-line.line-blue {
  background: var(--blue);
}

.timeline-line.line-green {
  background: var(--green);
}

.timeline-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.timeline-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

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

.card-year {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.year-warmgelb {
  color: var(--warmgelb);
}

.year-blue {
  color: var(--blue);
}

.year-green {
  color: var(--green);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-description {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.card-specs {
  display: flex;
  gap: 16px;
}

.spec-item {
  flex: 1;
}

.spec-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.spec-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  transition: all 0.2s;
}

.ar-badge:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.ar-badge svg {
  width: 14px;
  height: 14px;
}

/* ========================================
   DETAIL PAGE
   ======================================== */
.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.detail-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--accent);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.detail-name {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.detail-year {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.detail-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.specs-grid {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.specs-grid .spec-label {
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.specs-grid .spec-value {
  font-size: 0.95rem;
}

.pros-cons-section {
  margin-bottom: 24px;
}

.pros-cons-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.pros-cons-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.pros-cons-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.dot-blue {
  color: var(--blue);
}

.dot-red {
  color: var(--red);
}

.pc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.pc-dot.pro {
  background: var(--blue);
}

.pc-dot.con {
  background: var(--red);
}

.bottom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: auto;
  margin-bottom: 10px;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--bg-card);
}

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

.btn-white:hover {
  background: #eee;
}

/* ========================================
   AR VIEW PAGE
   ======================================== */
.ar-page {
  padding: 0;
  padding-top: 0;
}

.ar-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  z-index: 10;
  position: relative;
}

.ar-title {
  font-size: 1.4rem;
  font-weight: 800;
}

.ar-viewer-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 0 16px 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.ar-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  z-index: 2;
}

.ar-viewer-titles {
  display: flex;
  flex-direction: column;
}

.ar-viewer-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

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

.ar-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--blue);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  border: none;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.ar-info-chip:hover {
  background: #4b90f7;
  transform: translateY(-1px);
}

.ar-info-chip svg {
  width: 16px;
  height: 16px;
}

model-viewer {
  width: 100%;
  height: 55vh;
  min-height: 400px;
  --poster-color: transparent;
  background: transparent;
}

model-viewer::part(default-progress-bar) {
  display: none;
}

.ar-info-banner {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 50px;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

.ar-brightness-bar {
  position: absolute;
  top: 40px;
  left: 12px;
  right: 12px;
  height: 4px;
  border-radius: 4px;
  background: var(--bg-card);
  overflow: hidden;
}

.brightness-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--fill), var(--blue) var(--fill), var(--blue) 100%);
}

.ar-info-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  background: transparent;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.ar-hint {
  text-align: center;
  padding: 16px;
  background: rgba(30, 30, 40, 0.9);
  border-radius: var(--radius);
  margin: 12px;
  backdrop-filter: blur(10px);
}

.ar-hint-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.ar-hint-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ar-toggle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 12px auto;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all 0.3s;
}

.ar-toggle-btn:hover {
  transform: scale(1.1);
}

.ar-toggle-btn svg {
  width: 28px;
  height: 28px;
}

.ar-bottom-section {
  padding: 0 20px 20px;
}

.ar-bottom-section .bottom-btn {
  margin-top: 0;
}

/* Native AR button styling */
.ar-native-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.ar-native-btn:hover {
  background: #4b90f7;
  transform: translateY(-1px);
}

.ar-slot-btn {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #000;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 100;
  transition: all 0.2s;
}

.ar-slot-btn:hover {
  background: #fff;
  transform: translateX(-50%) scale(1.05);
}

/* ========================================
   COMPARISON PAGE
   ======================================== */
.tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.tab-btn.active {
  background: var(--blue);
  color: #fff;
}

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

.tab-btn:not(.active):hover {
  background: var(--bg-card-hover);
}

.comparison-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.comparison-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  animation: fadeSlideUp 0.4s ease forwards;
  opacity: 0;
}

.comparison-card:nth-child(1) {
  animation-delay: 0.05s;
}

.comparison-card:nth-child(2) {
  animation-delay: 0.1s;
}

.comparison-card:nth-child(3) {
  animation-delay: 0.15s;
}

.comparison-card:nth-child(4) {
  animation-delay: 0.2s;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.comp-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.comp-percent {
  font-size: 1rem;
  font-weight: 700;
}

.comp-percent.positive {
  color: var(--green);
}

.comp-percent.negative {
  color: var(--red);
}

.comp-values {
  display: flex;
  gap: 24px;
}

.comp-value-item {
  flex: 1;
}

.comp-value-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.comp-value-data {
  font-size: 1rem;
  font-weight: 600;
}

/* Tab content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Performance tab */
.perf-chart-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.perf-bar-group {
  margin-bottom: 16px;
}

.perf-bar-group:last-child {
  margin-bottom: 0;
}

.perf-bar-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.perf-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 4px;
}

.perf-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.fill-warmgelb {
  background: var(--warmgelb);
}

.fill-blue {
  background: var(--blue);
}

.fill-green {
  background: var(--green);
}

/* History tab */
.history-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-item {
  display: flex;
  gap: 16px;
  animation: fadeSlideUp 0.4s ease forwards;
  opacity: 0;
}

.history-item:nth-child(1) {
  animation-delay: 0.05s;
}

.history-item:nth-child(2) {
  animation-delay: 0.1s;
}

.history-item:nth-child(3) {
  animation-delay: 0.15s;
}

.history-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.history-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.history-connector {
  width: 2px;
  flex: 1;
  background: var(--border);
}

.history-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  flex: 1;
}

.history-year {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.history-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.history-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========================================
   UTILITIES & ANIMATIONS
   ======================================== */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.slide-up {
  animation: fadeSlideUp 0.5s ease forwards;
}

/* Responsive */
@media (min-width: 480px) {
  .page {
    max-width: 430px;
    margin: 0 auto;
  }

  .ar-page {
    max-width: 430px;
    margin: 0 auto;
  }
}