/* ==========================================
   AI TOURGUIDE - MODERN DESIGN SYSTEM
   ========================================== */

/* Auth Page Styles */
.auth-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Brand-Canvas-Scrim: near-black + Periwinkle-Glow oben rechts (Discover-DNA) */
  background:
    radial-gradient(120% 70% at 85% -8%, rgba(107, 127, 232, 0.15), transparent 55%),
    rgba(8, 9, 15, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-container {
  width: 100%;
  max-width: 340px;
  margin: auto;
  min-height: min-content;
}

.auth-card {
  background: #0c0d14;
  border: 1px solid var(--dsc-bd, rgba(165, 178, 255, 0.16));
  border-radius: 18px;
  padding: 28px 24px 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  position: relative;
}

.auth-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.auth-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.auth-close-btn:active {
  transform: scale(0.92);
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 20px 0;
  letter-spacing: -0.3px;
  text-align: center;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: rgba(130, 141, 242, 0.08);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.2px;
}

.auth-tab:hover {
  color: rgba(255, 255, 255, 0.6);
}

.auth-tab.active {
  background: rgba(107, 127, 232, 0.22);
  border: 1px solid var(--dsc-bd, rgba(165, 178, 255, 0.16));
  color: #ffffff;
}

.auth-form {
  margin-bottom: 0;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dsc-bd, rgba(165, 178, 255, 0.16));
  border-radius: 14px;
  color: #ffffff;
  font-size: 15px;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
  margin-bottom: 12px;
}

.auth-input:focus {
  background: rgba(130, 141, 242, 0.11);
  border-color: var(--brand-mid, #6B7FE8);
  box-shadow: 0 0 0 3px rgba(107, 127, 232, 0.18);
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.auth-submit {
  margin-top: 8px;
  padding: 14px;
  background: var(--brand-cta, linear-gradient(135deg, #6B7FE8 0%, #4F46E5 100%));
  border: none;
  border-radius: 14px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45);
}

.auth-submit:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.auth-submit:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-forgot-password {
  text-align: center;
  margin: 12px 0 4px 0;
}

.auth-forgot-password a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-forgot-password a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.auth-error-message {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 16px 0;
  color: #ff6b6b;
  font-size: 13px;
  text-align: center;
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#authPageContainer {
  display: none;
}

:root {
  /* Safe Area Support */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  
  /* Core Colors - OLED Optimized */
  --color-pure-black: #000000;
  --color-deep-black: #0A0A0A;
  --color-rich-black: #121212;
  --color-dark-gray: #1C1C1E;
  --color-medium-gray: #2C2C2E;
  --color-light-gray: #3A3A3C;
  --color-subtle-gray: #48484A;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #EBEBF5;
  --color-text-tertiary: #C7C7CC;
  --color-text-quaternary: #8E8E93;

  /* Accent Colors - Vibrant & Modern */
  --color-accent-primary: #6B7FE8; /* Brand Periwinkle (Discover-DNA Migration, war #0066FF) */
  --color-accent-primary-rgb: 107, 127, 232; /* Brand Periwinkle for rgba (war 0,102,255) */
  --color-accent-secondary: #30D158; /* Success Green */
  --color-accent-tertiary: #FF453A; /* Alert Red */
  --color-accent-quaternary: #FFD60A; /* Warning Yellow */
  --color-accent-voice: #BF5AF2; /* Voice Purple */

  /* Gradient Accents */
  --gradient-voice: linear-gradient(135deg, #BF5AF2 0%, #5E5CE6 100%);
  /* [Dead-CSS entfernt 2026-06-21] --gradient-navigation (0 Nutzungen) und
     --gradient-premium (0 Nutzungen) — durch --brand-cta / --brand-gold obsolet. */

  /* === BRAND DESIGN TOKENS (Discover-DNA) — GLOBAL, von hier in alle Dateien vererbt ===
     Quelle war src/styles/discover-tab.css :root (scope-gated). Hier gehoben, damit jede
     CSS-Datei (auch die vor discover-tab.css ladenden) die echten Tokens statt Fallbacks erbt. */
  --brand-mid: #6B7FE8;
  --brand-light: #B8D4FF;
  --brand-solid: #8B97F2;
  --brand-active: #9AA6FF;          /* Aktiv-Periwinkle (Select/Focus/Hover-Tinte) */
  --brand-indigo: #4F46E5;          /* CTA-Gradient-Endpunkt / Indigo-Glow */
  --brand-cta: linear-gradient(135deg, #6B7FE8 0%, #4F46E5 100%);
  --brand-soft: linear-gradient(135deg, #B8D4FF 0%, #6B7FE8 100%);
  --brand-gold: #FFD60A;            /* NUR Credits / Premium / "Beliebt"-Badge */
  --brand-glow: rgba(79, 70, 229, 0.45);   /* Indigo-Glow-Shadow für CTAs */
  --dsc-surf: rgba(130, 141, 242, 0.09);   /* subtile Periwinkle-Fläche */
  --dsc-bd: rgba(165, 178, 255, 0.16);     /* Brand-Hairline-Border */
  --dsc-mut: rgba(226, 229, 255, 0.6);     /* muted Text */
  --dsc-mut2: rgba(226, 229, 255, 0.42);   /* muted Text 2 / Micro-Labels */
  --dsc-hairline: rgba(255, 255, 255, 0.06); /* neutrale Hairline (Listen-Zeilen) */
  --dsc-canvas: #0a0b12;            /* Brand-Canvas near-black */

  /* Glass Morphism */
  --glass-background: rgba(28, 28, 30, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-blur: blur(20px);

  /* Spacing System */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-xxxl: 64px;

  /* Typography */
  --font-system: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Helvetica Neue', sans-serif;
  --font-size-xxs: 11px;
  --font-size-xs: 13px;
  --font-size-sm: 15px;
  --font-size-md: 17px;
  --font-size-lg: 20px;
  --font-size-xl: 24px;
  --font-size-xxl: 34px;
  --font-size-hero: 48px;

  /* Font Weights */
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-xxl: 28px;
  --radius-full: 9999px;

  /* Animations */
  --animation-fast: 150ms;
  --animation-normal: 300ms;
  --animation-slow: 500ms;
  --easing-default: cubic-bezier(0.4, 0, 0.2, 1);
  --easing-spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Z-Index Layers */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;
  --z-top: 900;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.16);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.5);
}

/* ==========================================
   BASE STYLES
   ========================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-system);
  font-size: var(--font-size-md);
  font-weight: var(--font-regular);
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-pure-black);
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%; /* Fallback für Browser ohne dvh / vor Adapter-Init */
  height: 100dvh; /* Fallback: bis --app-vh durch keyboardAdapter.js gesetzt ist */
  height: var(--app-vh, 100dvh); /* iOS-Tastatur: schrumpft mit visualViewport statt hochzuschieben */
  touch-action: manipulation;
}

/* ==========================================
   LAYOUT COMPONENTS
   ========================================== */

.app {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ==========================================
   DESKTOP: MOBILE PHONE FRAME
   Shows app in a centered phone-like container
   ========================================== */
@media (min-width: 600px) {
  html, body {
    background: linear-gradient(135deg, #B8D4FF 0%, #6B7FE8 100%) !important;
  }

  body {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .app {
    max-width: 430px;
    max-height: 932px;
    height: 100%;
    border-radius: 44px;
    overflow: hidden;
    box-shadow:
      0 0 0 11px #1c1c1e,
      0 0 0 13px #3a3a3c,
      0 30px 60px -15px rgba(0, 0, 0, 0.6),
      0 0 80px rgba(99, 102, 241, 0.15);
    /* Make .app a containing block for fixed elements */
    transform: translateZ(0);
  }

  /* Tab bar rounded corners at bottom */
  .custom-tab-bar {
    border-radius: 0 0 32px 32px;
  }

  /* Ensure modals stay within frame */
  .alert-overlay {
    border-radius: 44px;
  }

  /* Tour detail view within frame */
  .tour-detail-view,
  #classic-tours-view {
    border-radius: 44px;
  }
}

/* Full Screen Map Container */
.map-view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-base);
}

#map {
  width: 100%;
  height: 100%;
}

.mapboxgl-ctrl-top-left { display: none !important; }
.mapboxgl-ctrl-top-right {
  top: calc(10px + var(--safe-area-top)) !important;
  right: 10px !important;
}
.mapboxgl-ctrl-group { margin-top: var(--safe-area-top) !important; }
.mapboxgl-ctrl.mapboxgl-ctrl-group { position: relative !important; top: var(--safe-area-top) !important; }

.safe-area-top { padding-top: var(--safe-area-top); }
.safe-area-bottom { padding-bottom: var(--safe-area-bottom); }

/* ==========================================
   NO TOUR BUTTONS
   ========================================== */

.no-tour-buttons {
    position: fixed;
    bottom: calc(70px + var(--safe-area-bottom) + var(--space-lg));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-md);
    z-index: 100;
    padding: 0 var(--space-lg);
    max-width: 400px;
    width: 100%;
}

.no-tour-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    background: var(--glass-background);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-medium);
    transition: all var(--animation-normal) var(--easing-default);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.no-tour-btn svg {
    width: 24px;
    height: 24px;
    opacity: 0.8;
}

.no-tour-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: rgba(45, 45, 47, 0.9);
}

.no-tour-btn-primary {
    background: rgba(107, 127, 232, 0.2);
    border-color: rgba(107, 127, 232, 0.3);
}

.no-tour-btn-primary:hover {
    background: rgba(107, 127, 232, 0.3);
    border-color: rgba(107, 127, 232, 0.4);
}

.no-tour-btn-primary svg {
    color: var(--color-accent-primary);
}

/* ==========================================
   NAVIGATION COMPONENTS
   ========================================== */

.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(56px + var(--safe-area-bottom));
  padding-bottom: var(--safe-area-bottom);
  background: var(--glass-background);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  z-index: var(--z-fixed);
  display: flex; justify-content: space-around; align-items: center;
}

.tab-item {
  flex: 1; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: none; border: none; color: var(--color-text-tertiary);
  cursor: pointer; transition: all var(--animation-fast) var(--easing-default);
  position: relative; -webkit-tap-highlight-color: transparent;
}
.tab-item:active { transform: scale(0.95); }
.tab-item.active { color: var(--color-accent-primary); }
.tab-icon { font-size: 24px; margin-bottom: 2px; transition: transform var(--animation-normal) var(--easing-spring); filter: grayscale(0.2); }
.tab-item.active .tab-icon { filter: grayscale(0); transform: scale(1.1); }
.tab-label { font-size: var(--font-size-xxs); font-weight: var(--font-medium); }

.voice-fab {
  position: fixed; bottom: calc(78px + var(--safe-area-bottom)); left: 50%;
  transform: translateX(-50%); width: 64px; height: 64px;
  border-radius: var(--radius-full); background: var(--gradient-voice);
  border: none; color: var(--color-text-primary); font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-xl), var(--shadow-glow); cursor: pointer;
  transition: all var(--animation-normal) var(--easing-spring);
  z-index: var(--z-fixed); -webkit-tap-highlight-color: transparent;
}
.voice-fab:active { transform: translateX(-50%) scale(0.9); }
.voice-fab.listening { box-shadow: var(--shadow-xl), 0 0 0 8px rgba(191, 90, 242, 0.35); }

/* ==========================================
   BOTTOM SHEET COMPONENT
   ========================================== */
.bottom-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--color-rich-black);
  border-radius: var(--radius-xxl) var(--radius-xxl) 0 0;
  box-shadow: var(--shadow-xl); z-index: var(--z-modal);
  transform: translateY(100%); transition: transform var(--animation-slow) var(--easing-default);
  max-height: calc(100vh - 100px); display: flex; flex-direction: column;
}
.bottom-sheet.active { transform: translateY(0); }
.bottom-sheet.active::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5); z-index: -1;
  animation: uiFadeIn var(--animation-normal) var(--easing-default);
}
.sheet-handle {
  width: 36px; height: 4px; background: var(--color-subtle-gray);
  border-radius: var(--radius-full); margin: var(--space-sm) auto;
  cursor: grab; transition: all var(--animation-fast) var(--easing-default);
}
.sheet-handle:active { background: var(--color-text-tertiary); width: 48px; }
.sheet-header { padding: var(--space-lg) var(--space-lg) var(--space-md); border-bottom: 1px solid var(--color-dark-gray); }
.sheet-title { font-size: var(--font-size-xl); font-weight: var(--font-bold); color: var(--color-text-primary); }
.sheet-content {
  flex: 1; overflow-y: auto; padding: var(--space-lg);
  padding-bottom: calc(var(--space-lg) + var(--safe-area-bottom));
  -webkit-overflow-scrolling: touch;
}

/* ==========================================
   CARD COMPONENTS (My Tours Redesign)
   ========================================== */

.glass-card { /* General purpose glass card, used in Settings */
  background: var(--glass-background);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

/* ==========================================
   TRAVEL CHRONICLE DESIGN - Premium Compact Cards
   ========================================== */

.tour-card-container.travel-chronicle {
  margin-bottom: 10px;
  border-radius: 16px;
  animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

/* Staggered animation delays */
.tour-card-container.travel-chronicle:nth-child(1) { animation-delay: 0.05s; }
.tour-card-container.travel-chronicle:nth-child(2) { animation-delay: 0.1s; }
.tour-card-container.travel-chronicle:nth-child(3) { animation-delay: 0.15s; }
.tour-card-container.travel-chronicle:nth-child(4) { animation-delay: 0.2s; }
.tour-card-container.travel-chronicle:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tour-card.travel-chronicle-card {
  position: relative !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  height: 120px !important;
  overflow: hidden !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  padding: 0 !important;
  display: block !important;
  flex-direction: unset !important;
  gap: 0 !important;
}

/* Gradient overlay for hover effect */
.tour-card.travel-chronicle-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(79, 156, 249, 0.05) 0%, rgba(64, 217, 163, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.tour-card.travel-chronicle-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(79, 156, 249, 0.1);
}

.tour-card.travel-chronicle-card:hover::before {
  opacity: 1;
}

.tour-card.travel-chronicle-card:active {
  transform: translateY(0) scale(0.99);
}

.travel-chronicle-card .tour-card-inner {
  display: flex !important;
  flex-direction: row !important;
  height: 100% !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Invisible click-through button for tour detail view */

/* Ensure action buttons stay above the click-through button */
.travel-chronicle-card .tour-actions {
  position: relative !important;
  z-index: 20 !important;
  pointer-events: auto !important;
}

.travel-chronicle-card .tour-actions .action-btn {
  pointer-events: auto !important;
}

/* City Accent Section */
.travel-chronicle-card .city-accent {
  width: 100px !important;
  flex-shrink: 0 !important;
  position: relative !important;
  overflow: hidden !important;
  border-radius: 16px 0 0 16px !important;
}

.travel-chronicle-card .city-gradient {
  position: absolute !important;
  inset: 0 !important;
  opacity: 0.15 !important;
}

/* City-specific gradients */
.city-accent.lucerne .city-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.city-accent.venice .city-gradient {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.city-accent.zurich .city-gradient {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.city-accent.florence .city-gradient {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.city-accent.paris .city-gradient {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.city-accent.rome .city-gradient {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.city-accent.amsterdam .city-gradient {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.city-accent.barcelona .city-gradient {
  background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.city-accent.berlin .city-gradient {
  background: linear-gradient(135deg, #96fbc4 0%, #f9f586 100%);
}

.city-accent.london .city-gradient {
  background: linear-gradient(135deg, #cd9cf2 0%, #f6f3ff 100%);
}

.city-accent.madrid .city-gradient {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.city-accent.vienna .city-gradient {
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}

.city-accent.prague .city-gradient {
  background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
}

.city-accent.budapest .city-gradient {
  background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
}

.city-accent.default .city-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* City Image for Classic/Creator Tours */
.travel-chronicle-card .city-image {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Hide city-initial when there's an image */
.city-accent.has-image .city-initial {
  display: none !important;
}

/* Move city-label to top-left when there's an image */
.city-accent.has-image .city-label {
  top: 8px !important;
  bottom: auto !important;
  left: 8px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(4px) !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  font-size: 9px !important;
}

.travel-chronicle-card .city-initial {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 48px !important;
  font-weight: 700 !important;
  color: rgba(255, 255, 255, 0.15) !important;
  user-select: none !important;
}

.travel-chronicle-card .city-label {
  position: absolute !important;
  bottom: 10px !important;
  left: 10px !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.8) !important;
  max-width: calc(100% - 20px) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Tour Content Section - Travel Chronicle specific */
.travel-chronicle-card .tour-content {
  flex: 1 !important;
  padding: 12px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-width: 0 !important;
}

.travel-chronicle-card .tour-header {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 8px !important;
  margin-bottom: 0 !important;
}

.travel-chronicle-card .tour-title-section {
  min-width: 0 !important;
  flex: 1 !important;
}

.travel-chronicle-card .tour-name {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--color-text-primary) !important;
  margin-bottom: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  letter-spacing: -0.3px !important;
  line-height: 1.2 !important;
}

.travel-chronicle-card .tour-actions {
  display: flex !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
}

.travel-chronicle-card .action-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  border: none !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.6) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}

.travel-chronicle-card .action-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  transform: scale(1.05) !important;
}

.travel-chronicle-card .action-btn.delete {
  background: rgba(255, 59, 48, 0.1) !important;
  color: #ff3b30 !important;
}

.travel-chronicle-card .action-btn.delete:hover {
  background: rgba(255, 59, 48, 0.2) !important;
}

.travel-chronicle-card .tour-stats {
  display: flex !important;
  flex-direction: row !important;
  gap: 20px !important;
  align-items: center !important;
}

.travel-chronicle-card .stat {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.65) !important;
  font-weight: 500 !important;
}

.travel-chronicle-card .stat-icon {
  width: 14px !important;
  height: 14px !important;
  opacity: 0.5 !important;
}

.travel-chronicle-card .stat-value {
  color: var(--color-text-primary) !important;
  font-weight: 600 !important;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .city-accent {
    width: 80px;
  }

  .tour-name {
    font-size: 16px;
  }

  .tour-stats {
    gap: 12px;
  }
}

/* Legacy tour-card styles (kept for backward compatibility) */
.tour-card-container {
  position: relative;
  margin-bottom: var(--space-lg);
  perspective: 1000px;
  overflow: hidden; /* For swipe delete */
  touch-action: pan-y; /* Allow vertical scroll, handle horizontal for swipe */
  border-radius: var(--radius-xl); /* Match tour-card radius */
}

.tour-card {
  background: linear-gradient(145deg, var(--color-dark-gray) 0%, var(--color-rich-black) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-md); /* Adjusted padding */
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform var(--animation-normal) cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow var(--animation-normal) cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.tour-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.1);
}
.tour-card:active {
  transform: translateY(-2px) scale(0.99);
}

.tour-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.tour-card-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  line-height: 1.3;
  flex-grow: 1;
  margin-right: var(--space-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-card-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.tour-quick-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-tertiary);
  width: 32px; /* Compact */
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--animation-fast) var(--easing-default);
}
.tour-quick-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  transform: scale(1.1);
}
.tour-quick-action-btn svg {
  width: 16px; /* Smaller icons */
  height: 16px;
}

.tour-card-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  background: rgba(255, 255, 255, 0.05);
  padding: var(--space-xxs) var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: var(--font-medium);
  white-space: nowrap;
  margin-left: var(--space-sm);
}

.tour-card-stats-wrapper {
  /* margin-top: var(--space-sm); */ /* Gap from .tour-card flex is enough */
}

.tour-card-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: var(--space-sm);
}

.stat-item {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md); /* Consistent radius */
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s ease;
}
.stat-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* Styles for the new emoji and text structure within stat-item */
.stat-item .stat-emoji {
  font-size: var(--font-size-lg); /* Adjust size as needed for emojis */
  line-height: 1; /* Prevent extra spacing from line-height */
  /* margin-bottom: var(--space-xxs); /* Already handled by parent gap */
}

.stat-item .stat-value {
  font-size: var(--font-size-md);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
  line-height: 1.2;
}

.stat-item .stat-label {
  font-size: var(--font-size-xxs);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Remove old generic .stat-item span rules if they conflict or are redundant */
/* The specific .stat-value and .stat-label should take precedence. */

.tour-swipe-delete {
  position: absolute; top: 0; right: -120px; bottom: 0; width: 120px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: var(--radius-xl); /* Match card radius */
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--animation-normal) cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0; transform: translateX(20px); z-index: 5;
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.tour-card-container.swiping .tour-swipe-delete { opacity: 1; transform: translateX(0); }
.swipe-delete-content {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: white; font-size: var(--font-size-sm); font-weight: var(--font-bold);
  gap: var(--space-sm); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.swipe-delete-content svg { width: 24px; height: 24px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.tour-card-container.swiping .tour-card {
  transform: translateX(-120px);
  transition: transform var(--animation-normal) cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tour-card-container.deleting { animation: slideOutAndFade 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes slideOutAndFade {
  0% { transform: translateX(0) scale(1); opacity: 1; height: auto; margin-bottom: var(--space-lg); }
  50% { transform: translateX(-100%) scale(0.8); opacity: 0.5; }
  100% { transform: translateX(-100%) scale(0.6); opacity: 0; height: 0; margin-bottom: 0; padding: 0; }
}
.tour-card-container.adding { animation: slideInAndGrow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes slideInAndGrow {
  0% { transform: translateY(-20px) scale(0.8); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ==========================================
   TOUR CARD DOUBLE-TAP EDIT MODE
   ========================================== */
.tour-card-container.edit-mode {
  border: 2px solid var(--color-accent-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.3), inset 0 0 1px rgba(79, 70, 229, 0.5);
}

.tour-card-container.edit-mode .tour-card {
  background: linear-gradient(145deg,
    rgba(107, 127, 232, 0.1) 0%,
    rgba(45, 55, 72, 0.95) 100%
  );
}

.tour-card-container.edit-mode .tour-icon-btn {
  background: rgba(107, 127, 232, 0.2) !important;
  border: 1px solid rgba(107, 127, 232, 0.4) !important;
  color: var(--color-accent-primary) !important;
  width: 40px !important;
  height: 40px !important;
  transform: scale(1.1);
}

/* Edit mode animation: scale and pulse effect */
.tour-card.edit-mode-animation {
  animation: editModeScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes editModeScale {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.tour-edit-modal {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; pointer-events: none;
  transition: all var(--animation-normal) var(--easing-default);
}
.tour-edit-modal.active { opacity: 1; pointer-events: auto; }
.tour-edit-modal-content {
  background: linear-gradient(135deg, var(--color-dark-gray) 0%, rgba(45,55,72,0.95) 100%);
  border-radius: var(--radius-xl); padding: var(--space-xl);
  width: 90%; max-width: 400px; border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: scale(0.8) translateY(20px);
  transition: all var(--animation-normal) cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tour-edit-modal.active .tour-edit-modal-content { transform: scale(1) translateY(0); }
.tour-edit-modal h3 {
  margin: 0 0 var(--space-lg) 0; font-size: var(--font-size-xl); font-weight: var(--font-bold);
  color: var(--color-text-primary); text-align: center;
}
.tour-edit-modal input {
  width: 100%; padding: var(--space-md); border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg); background: rgba(255,255,255,0.05);
  color: var(--color-text-primary); font-size: var(--font-size-md);
  margin-bottom: var(--space-lg); transition: all var(--animation-fast) var(--easing-default);
}
.tour-edit-modal input:focus {
  outline: none; border-color: var(--color-accent-primary);
  background: rgba(255,255,255,0.1); box-shadow: 0 0 0 3px rgba(79, 70, 229,0.2);
}
.tour-edit-modal-actions { display: flex; gap: var(--space-md); justify-content: flex-end; }
.tour-edit-modal .btn { padding: var(--space-sm) var(--space-lg); font-size: var(--font-size-sm); min-width: 80px; }

/* ==========================================
   TOUR DESCRIPTION MODAL
   ========================================== */

.description-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 150px; text-align: center;
}
.description-loading .loading-spinner {
  width: 32px; height: 32px; border: 2px solid rgba(255,255,255,0.2);
  border-top: 2px solid var(--color-accent-primary); border-radius: 50%;
  animation: spin 1s linear infinite; margin-bottom: var(--space-sm);
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.description-loading p {
  color: var(--color-text-secondary); font-size: var(--font-size-sm);
  margin: 0;
}

.city-intro {
  font-size: var(--font-size-md); line-height: 1.6;
  color: var(--color-text-secondary); margin: 0 0 var(--space-lg) 0;
  padding: 0;
}

.waypoint-item {
  margin-bottom: var(--space-md); padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.waypoint-item:last-child { margin-bottom: 0; border-bottom: none; }
.waypoint-name {
  font-size: var(--font-size-md); font-weight: var(--font-semibold);
  color: var(--color-text-primary); margin: 0 0 var(--space-xs) 0;
  display: flex; align-items: center; gap: var(--space-xs);
}
.waypoint-name:before {
  content: "📍"; font-size: 14px; opacity: 0.7;
}
.waypoint-facts {
  font-size: var(--font-size-sm); line-height: 1.5;
  color: var(--color-text-secondary); margin: 0;
}

.description-error {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 200px; text-align: center;
}
.description-error p {
  color: var(--color-text-secondary); font-size: var(--font-size-md);
  margin: 0 0 var(--space-lg) 0;
}

/* ==========================================
   FORM COMPONENTS
   ========================================== */

.form-group { margin-bottom: var(--space-lg); }
.form-label {
  display: block; font-size: var(--font-size-sm); font-weight: var(--font-medium);
  color: var(--color-text-secondary); margin-bottom: var(--space-xs);
}
.form-input {
  width: 100%; padding: var(--space-md); background: var(--color-dark-gray);
  border: 1px solid var(--color-medium-gray); border-radius: var(--radius-md);
  color: var(--color-text-primary); font-size: var(--font-size-md);
  font-family: var(--font-system); transition: all var(--animation-fast) var(--easing-default);
}
.form-input:focus {
  outline: none; border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.form-input::placeholder { color: var(--color-text-quaternary); }

.voice-input-group { position: relative; display: flex; align-items: center; gap: var(--space-sm); }
.voice-input { flex: 1; padding-right: calc(var(--space-md) + 40px); }
.voice-input-btn {
  position: absolute; right: var(--space-sm); width: 40px; height: 40px;
  border-radius: var(--radius-full); background: var(--gradient-voice);
  border: none; color: var(--color-text-primary); font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--animation-fast) var(--easing-spring);
}
.voice-input-btn:active { transform: scale(0.9); }

/* ==========================================
   BUTTON COMPONENTS
   ========================================== */
.btn {
  padding: var(--space-md) var(--space-xl); border-radius: var(--radius-full);
  font-size: var(--font-size-md); font-weight: var(--font-semibold);
  font-family: var(--font-system); border: none; cursor: pointer;
  transition: all var(--animation-fast) var(--easing-default);
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-xs); -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
}
.btn::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.3s ease;
}
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--brand-mid);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.btn-primary:hover {
  background: var(--brand-indigo);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5);
}
.btn-secondary {
  background: rgba(42,42,46,0.8); color: var(--color-text-primary);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
}
.btn-secondary:hover { background: rgba(42,42,46,0.9); border-color: rgba(255,255,255,0.15); }
.btn-ghost {
  background: rgba(255,255,255,0.05); color: var(--color-text-primary);
  padding: var(--space-sm) var(--space-md);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); }
.btn-large { padding: var(--space-lg) var(--space-xxl); font-size: var(--font-size-lg); border-radius: var(--radius-xl); }
.btn-block { width: 100%; }
.btn span:first-child { font-size: 1.2em; transition: transform 0.3s ease; }
.btn:hover span:first-child { transform: scale(1.1); }

/* ==========================================
   NAVIGATION INFO PANEL & CONTROLS
   ========================================== */
.navigation-panel {
  position: fixed;
  bottom: calc(70px + var(--safe-area-bottom)); /* Directly above custom-tab-bar */
  left: 0; right: 0;
  background: rgba(15,15,17,0.95);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-top: 0.5px solid rgba(255,255,255,0.1);
  padding: 12px 20px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
  z-index: var(--z-sticky);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32,0.72,0,1);
  display: none !important; /* Hide by default until a tour is loaded */
}
.navigation-panel.show {
  display: flex !important;
  flex-direction: column;
}
.navigation-panel.active {
  transform: translateY(0);
}
.navigation-panel.minimized {
  transform: translateY(calc(100% - 40px));
  padding: 8px 20px;
}
.navigation-panel.show.minimized {
  display: flex !important; /* Keep visible when minimized */
  flex-direction: column;
}
/* Hide content when minimized */
.navigation-panel.minimized .nav-full-content {
  display: none;
}
.navigation-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.navigation-title { font-size: 20px; font-weight: 600; color: #FFFFFF; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 4px; }
.navigation-distance {
  font-size: 28px; font-weight: 700;
  background: var(--brand-cta);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.03em;
}
.navigation-info { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.4; margin-bottom: 0; }
.navigation-actions { display: flex; gap: 10px; margin-top: 16px; }
.navigation-actions .btn { flex: 1; padding: 12px 20px; font-size: 14px; font-weight: 600; }

/* [Dead-CSS entfernt 2026-06-21] Alte Pre-Start-Layout-Klassen (.nav-right-controls,
   .nav-top-section, .nav-info-left, .nav-buttons-right, .nav-close-btn/.nav-info-btn/.nav-back-btn)
   — 0 Referenzen, vom Map-Tab-Redesign obsolet. */

/* Horizontal container for icon buttons */
.nav-icon-buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

/* Tour starten button */
.nav-start-button {
  padding: 10px 20px;
  background: var(--brand-mid);
  border: none; border-radius: 12px; color: white;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
  white-space: nowrap;
}
.nav-start-button:hover {
  transform: translateY(-1px);
  background: var(--brand-indigo);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5);
}
.nav-start-button:active { transform: translateY(0); }

/* Credits display under start button */
.nav-credits-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.nav-credits-display .nav-credits-icon {
  font-size: 12px;
}

#navCreditsCount {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

/* Full content wrapper */
.nav-full-content {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* REMOVED - no longer needed */

.nav-tour-title {
  font-size: 20px; font-weight: 600; color: #FFFFFF;
  letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 8px;
}

.nav-tour-stats {
  display: flex; gap: 12px; font-size: 13px; color: rgba(255,255,255,0.6);
  flex-wrap: wrap;
}
.nav-stat-item {
  display: flex; align-items: center; gap: 4px;
}
.nav-stat-icon {
  width: 14px; height: 14px; color: rgba(107, 127, 232,0.8);
  flex-shrink: 0;
}

.nav-dropdown-container {
  margin-top: 8px;
  width: 100%;
}
.nav-dropdown-label {
  display: block; font-size: 14px; color: rgba(255,255,255,0.7);
  margin-bottom: 8px; font-weight: 500;
}
.nav-dropdown {
  width: 100%; padding: 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(28,28,30,0.8); color: white;
  font-size: 14px; font-weight: 500; appearance: none; cursor: pointer;
  transition: all 0.2s ease;
}
.nav-dropdown:focus {
  outline: none; border-color: rgba(107, 127, 232,0.5);
  box-shadow: 0 0 0 2px rgba(79, 70, 229,0.1);
}

/* Tour continuation container */
.nav-continuation-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-starting-point-text {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  padding: 12px;
  background: rgba(107, 127, 232,0.1);
  border: 1px solid rgba(107, 127, 232,0.2);
  border-radius: 12px;
}
.nav-reset-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s ease;
  align-self: flex-start;
}
.nav-reset-link:hover {
  color: rgba(255,255,255,0.8);
}
.nav-reset-link svg {
  opacity: 0.7;
}

/* Minimized view */
.nav-minimized-layout {
  display: flex; justify-content: center; align-items: center;
  cursor: pointer; padding: 8px 0;
  width: 100%;
  height: 24px;
}
.nav-minimized-info {
  display: none;
}
.nav-minimized-title {
  font-size: 16px; font-weight: 600; color: #FFFFFF;
}
.nav-minimized-stats {
  font-size: 14px; color: rgba(255,255,255,0.6);
}
.nav-minimized-icon {
  color: rgba(255,255,255,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}
.nav-minimized-icon svg {
  width: 20px; height: 20px;
  transition: transform 0.3s ease;
}
.navigation-panel.minimized .nav-minimized-icon svg {
  transform: rotate(180deg);
}

/* Controls are now individually positioned, not in a container */

.navigation-controls {
  position: fixed;
  bottom: calc(var(--safe-area-bottom) + 90px);
  left: 16px;
  right: 16px;
  z-index: 150;
}
.nav-buttons-container {
  background: rgba(18,18,20,0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 26px;
  padding: 18px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.065);
}
.nav-button-row {
  display: flex;
  gap: 10px;
  width: 100%;
  align-items: center;
}
.nav-button-row-voice { justify-content: space-between; align-items: center; }
.nav-button-stack { display: flex; flex-direction: column; gap: 8px; }

.nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border 0.18s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}
.nav-btn:active { transform: scale(0.95); }
.nav-btn-icon { flex: 0 0 auto; width: 48px; padding: 14px; }

.nav-btn-primary {
  background: var(--brand-mid);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4), inset 0 1px 0 rgba(255,255,255,0.18);
}
.nav-btn-primary:hover, .nav-btn-primary:active {
  background: var(--brand-indigo);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.5), inset 0 1px 0 rgba(255,255,255,0.22);
}
.nav-btn-secondary {
  background: rgba(36,37,41,0.92);
  color: rgba(255,255,255,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
}
.nav-btn-secondary:hover, .nav-btn-secondary:active {
  background: rgba(44,45,49,0.94);
  border-color: rgba(255,255,255,0.14);
}
.nav-btn-secondary-small {
  flex: 0 0 auto; padding: 14px 16px; background: rgba(44,44,46,0.95);
  color: rgba(255,255,255,0.7); font-size: 13px;
}
.nav-btn-danger {
  background: linear-gradient(135deg, #FF453A 0%, #D70015 100%);
  color: white;
  box-shadow: 0 12px 30px rgba(255,69,58,0.38), inset 0 1px 0 rgba(255,255,255,0.24);
  font-weight: 700;
}
.nav-btn-danger:hover, .nav-btn-danger:active {
  background: linear-gradient(135deg, #FF2D2A 0%, #E02020 100%);
  box-shadow: 0 14px 32px rgba(255,69,58,0.5), inset 0 1px 0 rgba(255,255,255,0.28);
}
.nav-btn-stack { flex: none; padding: 12px 18px; font-size: 13px; gap: 5px; border-radius: 14px; min-width: 100px; }
.nav-btn-dark {
  background: rgba(32,32,36,0.96);
  color: rgba(255,255,255,0.78);
  border: 1px solid rgba(255,255,255,0.08);
}
.nav-btn-dark:hover, .nav-btn-dark:active {
  background: rgba(40,40,44,0.97);
  color: rgba(255,255,255,0.9);
}
.nav-btn-mute {
  flex: 0 0 auto; padding: 14px 24px; background: rgba(50,50,52,0.95);
  color: white; font-size: 15px; font-weight: 600; border: 1px solid rgba(255,255,255,0.1);
}
.nav-btn-mute:hover, .nav-btn-mute:active { background: rgba(60,60,62,0.95); border-color: rgba(255,255,255,0.15); }
.nav-btn-mute.muted { background: rgba(255,69,58,0.85); border-color: rgba(255,69,58,0.3); }
.nav-btn-mute.muted:hover, .nav-btn-mute.muted:active { background: rgba(255,59,48,0.95); }
.nav-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-btn-stack svg { width: 16px; height: 16px; }

.voice-waveform-center {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  gap: 4px; height: 48px; padding: 0 20px;
}
.waveform-bar { width: 3px; height: 16px; background: rgba(255,255,255,0.2); border-radius: 2px; transition: all 0.15s ease-out; }
.waveform-bar.speaking { background: var(--color-accent-primary); box-shadow: 0 0 8px rgba(79, 70, 229,0.5); }
.waveform-bar.listening { background: #10b981; box-shadow: 0 0 8px rgba(16,185,129,0.5); }

/* Voice waveform container for AI Guide */
.voice-waveform-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 48px;
  padding: 0 20px;
}

/* Waveform animation */
@keyframes waveform {
  0%, 100% {
    height: 16px;
    opacity: 0.3;
  }
  50% {
    height: 32px;
    opacity: 1;
  }
}

#conversationView { display: none; } /* Controlled by JS */

/* Mobile navigation styles - broader breakpoint for most mobile devices */
@media (max-width: 480px) {
  /* Keep text labels visible on mobile for clarity */
  .nav-btn { padding: 10px 12px; font-size: 12px; }
  .nav-btn span { display: block; font-size: 10px; font-weight: 500; }
  .nav-btn-icon span { display: block; }
  
  /* Adjust button stack for mobile */
  .nav-btn-stack { 
    min-width: 70px; 
    padding: 8px 12px; 
    gap: 3px; 
  }
  
  /* Make waveform center smaller on mobile */
  .voice-waveform-center { 
    padding: 0 12px; 
    height: 40px; 
  }
  
  /* Adjust navigation container for mobile */
  .nav-buttons-container { 
    padding: 12px; 
    border-radius: 20px; 
  }
  
  /* Ensure buttons have proper touch targets */
  .nav-btn-stack { 
    min-height: 44px; 
    justify-content: center; 
  }
}

/* Very small mobile devices */
@media (max-width: 360px) {
  .nav-btn span { font-size: 9px; }
  .voice-waveform-center { padding: 0 8px; }
  .nav-buttons-container { padding: 10px; }
}

/* ==========================================
   TRAVEL CHRONICLE TAB HEADER (My Tours)
   ========================================== */

.tab-title.travel-chronicle-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
}

.tours-header.travel-chronicle-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 20px 12px;
  border-bottom: none;
}

.tours-count.travel-chronicle-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
}

/* ==========================================
   iOS-STYLE TAB SYSTEM
   ========================================== */

/* Tab Content Container */
.tab-content-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Individual Tab Content */
.tab-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: opacity var(--animation-normal) var(--easing-default),
              visibility var(--animation-normal) var(--easing-default),
              transform var(--animation-normal) var(--easing-default);
  background: var(--color-pure-black);
}

.tab-content.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  z-index: 1;
}

/* Energie: Tabs werden nur per visibility/opacity versteckt (nicht
   display:none), damit Map-Kontext und Tab-Transitions erhalten bleiben.
   infinite-CSS-Animationen (z.B. .nav-start-wave bei geladener Tour) liefen
   dadurch unsichtbar bei 60fps weiter und hielten den Compositor dauerhaft
   wach. Inaktive Tabs pausieren deshalb ALLE Animationen; Transitions (der
   Tab-Wechsel selbst) sind davon nicht betroffen. */
.tab-content:not(.active),
.tab-content:not(.active) *,
.tab-content:not(.active) *::before,
.tab-content:not(.active) *::after {
  animation-play-state: paused !important;
}

/* Tab View Container - for non-map tabs */
.tab-view-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-pure-black);
  padding-top: var(--safe-area-top);
  padding-bottom: calc(70px + var(--safe-area-bottom)); /* Tab bar height + safe area */
}

/* Tab Header */
.tab-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--color-pure-black);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
}

.tab-title {
  font-size: 28px;
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  margin: 0;
  padding: 8px 0;
  text-align: left;
  letter-spacing: -0.3px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Credits Display in Header (iOS style) */
.credits-display-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.credits-display-header:empty {
  display: none;
}

.credits-display-header.premium {
  background: rgba(255, 214, 10, 0.12);
  border-color: rgba(255, 214, 10, 0.35);
}

.credits-display-header.low-credits {
  background: rgba(255, 77, 77, 0.12);
  border-color: rgba(255, 77, 77, 0.4);
}

.credits-display-header .infinity-icon {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-gold);
}

.credits-display-header .time-remaining {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 214, 10, 0.9);
}

.credits-display-header .credits-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent-quaternary);
}

.credits-display-header.low-credits .credits-amount {
  color: rgba(255, 179, 179, 1);
}

.credits-display-header .credits-label {
  font-size: 11px;
  color: #b0b0b0;
  font-weight: 500;
}

.tab-title.gradient-text {
  background: var(--gradient-voice);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tab Scroll Content */
.tab-scroll-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  -webkit-overflow-scrolling: touch;
}

/* My Tours Tab - 10px padding only */
#myToursTab .tab-scroll-content {
  padding: 0;
}

/* ==========================================
   iOS-STYLE CUSTOM TAB BAR
   ========================================== */

.custom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(70px + var(--safe-area-bottom));
  padding-bottom: var(--safe-area-bottom);
  background: var(--glass-background);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: var(--z-fixed);
}

.custom-tab-bar .tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xxs);
  padding: var(--space-xs);
  border: none;
  background: none;
  color: var(--color-text-quaternary);
  cursor: pointer;
  transition: all var(--animation-normal) var(--easing-spring);
  border-radius: var(--radius-sm);
  min-width: 50px;
  -webkit-tap-highlight-color: transparent;
}

.custom-tab-bar .tab-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.custom-tab-bar .tab-item.active {
  color: var(--color-accent-primary);
  transform: scale(1.05);
}

.custom-tab-bar .tab-item .tab-icon {
  width: 28px;
  height: 28px;
  transition: transform var(--animation-normal) var(--easing-spring);
}

.custom-tab-bar .tab-item.active .tab-icon {
  transform: scale(1.1);
}

.custom-tab-bar .tab-item .tab-label {
  font-size: var(--font-size-xxs);
  font-weight: var(--font-medium);
  white-space: nowrap;
}

.create-section-header {
  margin-bottom: 16px;
}

.create-section-header .section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

/* ==========================================
   FORM COMPONENTS (iOS Style)
   ========================================== */

.form-section {
  margin-bottom: var(--space-xl);
}

.form-label {
  display: block;
  font-size: var(--font-size-md);
  font-weight: var(--font-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.form-input {
  width: 100%;
  font-size: var(--font-size-md);
  padding: var(--space-md);
  background: var(--glass-background);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  color: var(--color-text-primary);
  transition: all var(--animation-normal) var(--easing-default);
  font-family: var(--font-system);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-quaternary);
}

/* More Options Section (iOS style) */

/* ==========================================
   BUTTON COMPONENTS (iOS Style)
   ========================================== */

.generate-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-lg);
  font-weight: var(--font-semibold);
  background: var(--brand-cta);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  cursor: pointer;
  transition: all var(--animation-normal) var(--easing-default);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.4);
}

.generate-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

.generate-btn:disabled {
  opacity: 0.6;
  transform: none;
  cursor: not-allowed;
}

.btn-icon {
  font-size: 1.2em;
}

/* Credit Cost Display under Generate Button (iOS style) */
.credit-cost-display {
  text-align: center;
  margin-top: 8px;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

.credit-cost-display.premium {
  color: rgba(255, 214, 10, 0.8);
}

.credit-cost-display .infinity-small {
  font-size: var(--font-size-xs);
  margin-right: 2px;
}

/* OR Divider (iOS style) */
.or-divider {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin: var(--space-md) 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}

.divider-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  padding: 0 var(--space-xs);
}

/* Use Code Section (iOS style) */
.use-code-section {
  margin-bottom: var(--space-xl);
}

.code-input-container {
  margin-top: var(--space-sm);
}

.code-input-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.code-input {
  flex: 1;
  text-transform: uppercase;
}

.cancel-code-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  padding: var(--space-sm);
  cursor: pointer;
  transition: opacity var(--animation-fast) var(--easing-default);
}

.cancel-code-btn:hover {
  opacity: 0.7;
}

/* ==========================================
   INSPIRATION SECTION (Create Tab)
   ========================================== */

/* ==========================================
   TOURS LIST (My Tours Tab) - iOS Style
   ========================================== */

.tours-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 10px var(--space-lg) 10px;
}

/* New Tour Cards Design */
.tour-card-container {
  margin-bottom: var(--space-sm);
}

.tour-card {
  background: linear-gradient(145deg, var(--color-dark-gray) 0%, var(--color-rich-black) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: var(--space-sm) var(--space-md);
  transition: all var(--animation-normal) var(--easing-default);
  overflow: hidden;
  position: relative;
}

.tour-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Top row: City name left, buttons right */
.tour-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.tour-city-name {
  font-size: var(--font-size-lg);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  letter-spacing: 0.5px;
  padding-bottom: 4px;
  border-bottom: 1px solid #4CAF50;
  width: fit-content;
}

.tour-top-buttons {
  display: flex;
  gap: var(--space-xs);
}

.tour-icon-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--animation-fast) var(--easing-default);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tour-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-text-primary);
  transform: scale(1.05);
}

/* Main content row */
.tour-main-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

/* Left: stats info - 2 rows, each row has value and label together */
.tour-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tour-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.tour-stat .stat-value {
  font-size: var(--font-size-md);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  line-height: 1;
}

.tour-stat .stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Right: Tour anzeigen button - same height as stats */

/* Tours Header (iOS style) */
.tours-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--color-dark-gray);
}

.tours-count {
  font-size: var(--font-size-md);
  font-weight: var(--font-medium);
  color: var(--color-text-primary);
}

.tours-instruction {
  font-size: var(--font-size-sm);
  color: var(--color-text-quaternary);
}

.empty-state {
  text-align: center;
  padding: var(--space-xxxl) var(--space-lg);
  color: var(--color-text-tertiary);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-semibold);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.empty-state p {
  font-size: var(--font-size-md);
  color: var(--color-text-quaternary);
  margin-bottom: var(--space-xl);
}

/* ==========================================
   INSTANT AI TAB COMPONENTS
   ========================================== */

/* ==========================================
   SETTINGS TAB COMPONENTS
   ========================================== */

.settings-section {
  margin-bottom: var(--space-xl);
}

.settings-section-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

.settings-card {
  background: var(--glass-background);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.account-status {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.user-info {
  margin-bottom: var(--space-lg);
}

.user-email {
  font-size: var(--font-size-md);
  color: var(--color-text-primary);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-xs);
}

.user-status {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}

.credits-display {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.credits-amount {
  font-size: var(--font-size-xl);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.credits-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
}

/* Credits Pricing Info */
.credits-pricing-info {
  margin: var(--space-lg) 0;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pricing-row:last-child {
  border-bottom: none;
}

.pricing-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.pricing-value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
}

.pricing-value.pricing-free {
  color: var(--color-accent-success);
}

.pricing-row.pricing-optional {
  border-bottom: none;
  padding-top: var(--space-md);
  margin-top: var(--space-xs);
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.pricing-row.pricing-optional .pricing-label {
  font-style: italic;
  color: var(--color-text-tertiary);
}

.pricing-more-details {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-tertiary);
  text-decoration: none;
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  transition: color var(--animation-fast) var(--easing-default);
}

.pricing-more-details:hover {
  color: var(--color-text-secondary);
}

/* Pricing Info Modal */
.pricing-info-modal {
  background: rgba(30, 30, 30, 0.98);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  max-width: 400px;
  width: 90%;
  padding: var(--space-lg);
  position: relative;
  animation: modalSlideUp var(--animation-normal) var(--easing-default);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.pricing-info-modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: transparent;
  border: none;
  color: var(--color-text-tertiary);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: all var(--animation-fast) var(--easing-default);
}

.pricing-info-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
}

.pricing-info-modal-title {
  font-size: 20px;
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-lg) 0;
}

.pricing-info-section {
  margin-bottom: var(--space-lg);
}

.pricing-info-section h3 {
  font-size: var(--font-size-md);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-sm) 0;
}

.pricing-info-section h4 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-xs) 0;
}

.pricing-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-info-list li {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  padding: var(--space-xs) 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
}

.pricing-info-list li strong {
  color: var(--color-text-primary);
  font-weight: var(--font-semibold);
}

.pricing-info-note {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin: var(--space-sm) 0 0 0;
  font-style: italic;
}

.pricing-info-optional {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.pricing-info-optional h3 {
  color: var(--color-text-secondary);
}

.pricing-info-optional p {
  font-size: var(--font-size-sm);
  color: var(--color-text-tertiary);
  margin: 0;
  line-height: 1.5;
}

.pricing-info-policy {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.pricing-info-policy p {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin: 0;
  line-height: 1.5;
}

/* Premium Pass Info in Settings */
.settings-card.premium-active {
  background: linear-gradient(135deg, rgba(255, 214, 10, 0.08) 0%, rgba(255, 149, 0, 0.06) 100%);
  border-color: rgba(255, 214, 10, 0.3);
}

.premium-pass-info {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.premium-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--font-size-md);
  font-weight: var(--font-semibold);
  color: var(--brand-gold);
  margin-bottom: 6px;
}

.premium-badge .infinity-icon {
  font-size: 20px;
  font-weight: 700;
}

.premium-time {
  font-size: var(--font-size-sm);
  color: rgba(255, 214, 10, 0.8);
  font-weight: var(--font-medium);
}

.about-info {
  text-align: center;
}

.app-version {
  font-size: var(--font-size-md);
  color: var(--color-text-primary);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-xs);
}

.app-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

.terms-link {
  color: var(--color-accent-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: opacity var(--animation-normal) var(--easing-default);
}

.terms-link:hover {
  opacity: 0.8;
}

.feedback-contact {
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feedback-contact a {
  color: var(--color-accent-primary);
  text-decoration: none;
}

.feedback-contact a:hover {
  opacity: 0.8;
}

.btn-icon {
  width: 16px; /* iOS lines 639, 674 */
  height: 16px;
}

@keyframes uiFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================
   INSUFFICIENT CREDITS ALERT (iOS Style)
   ========================================== */

.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: uiFadeIn 0.2s ease-out;
}

.alert-modal {
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  max-width: 350px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.3s ease-out;
}

.alert-title {
  font-size: 18px;
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.alert-message {
  font-size: 14px;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: 1.5;
  margin-bottom: var(--space-lg);
}

.alert-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.alert-btn {
  width: 100%;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-md);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--animation-fast) var(--easing-default);
  border: none;
}

.alert-btn-primary {
  background: var(--brand-mid);
  color: white;
}

.alert-btn-primary:hover {
  background: var(--brand-indigo);
}

.alert-btn-cancel {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--glass-border);
}

.alert-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================
   CREDITS STORE MODAL (iOS Style)
   ========================================== */

.credits-store-modal {
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

.credits-store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--glass-border);
}

.credits-store-title {
  font-size: 20px;
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  margin: 0;
}

.credits-store-close {
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-md);
  transition: all var(--animation-fast) var(--easing-default);
  display: flex;
  align-items: center;
  justify-content: center;
}

.credits-store-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
}

.credits-store-packages {
  padding: var(--space-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  -webkit-overflow-scrolling: touch;
}

.credits-store-email-section {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}

.credits-store-email-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-sm) 0;
}

.credits-store-email-input-wrapper {
  position: relative;
}

.credits-store-email-input {
  width: 100%;
  padding: 12px var(--space-md);
  font-size: 16px;
  font-family: inherit;
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--animation-fast) var(--easing-default);
}

.credits-store-email-input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.credits-store-email-input::placeholder {
  color: var(--color-text-tertiary);
}

.credit-package-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--animation-fast) var(--easing-default);
  position: relative;
}

.credit-package-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.credit-package-card.popular {
  background: rgba(107, 127, 232, 0.1);
  border-color: var(--color-accent-primary);
}

.credit-package-card.popular::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -10px;
  right: var(--space-md);
  background: var(--color-accent-primary);
  color: white;
  font-size: 10px;
  font-weight: var(--font-bold);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

/* Launch Offer styling */
.credit-package-card.launch-offer {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.15), rgba(255, 59, 48, 0.1));
  border-color: #ff9500;
  box-shadow: 0 0 20px rgba(255, 149, 0, 0.2);
}

.credit-package-card.launch-offer::before {
  content: '🚀 LAUNCH OFFER';
  position: absolute;
  top: -10px;
  right: var(--space-md);
  background: linear-gradient(135deg, #ff9500, #ff3b30);
  color: white;
  font-size: 10px;
  font-weight: var(--font-bold);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 149, 0, 0.5); }
  50% { box-shadow: 0 0 15px rgba(255, 149, 0, 0.8); }
}

.credit-package-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.credit-package-name {
  font-size: 18px;
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
}

.credit-package-credits {
  font-size: 24px;
  font-weight: var(--font-bold);
  color: var(--color-accent-primary);
}

.credit-package-description {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

.credit-package-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.credit-package-price-amount {
  font-size: 22px;
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
}

.credit-package-price-currency {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.credit-package-value {
  font-size: 12px;
  color: var(--color-success);
  margin-left: var(--space-sm);
}

/* ==========================================
   STRIPE CHECKOUT MODAL (Embedded)
   ========================================== */

/* Both checkouts live directly under body. Follow the visual viewport,
   including Safari's focus pan, instead of the keyboard-covered layout viewport. */
#tourCheckoutModal,
#stripeCheckoutModal {
  position: fixed;
  inset: auto 0 auto 0;
  top: var(--vv-top, 0px);
  height: var(--app-vh, 100vh);
  box-sizing: border-box;
  padding: max(10px, env(safe-area-inset-top, 0px))
           max(10px, env(safe-area-inset-right, 0px))
           max(10px, env(safe-area-inset-bottom, 0px))
           max(10px, env(safe-area-inset-left, 0px));
  overflow: hidden;
  border-radius: 0;
}

@supports (height: 100dvh) {
  #tourCheckoutModal,
  #stripeCheckoutModal {
    height: var(--app-vh, 100dvh);
  }
}

#tourCheckoutModal .hosted-rescue-btn,
#stripeCheckoutModal .hosted-rescue-btn {
  flex-shrink: 0;
}

.stripe-checkout-modal {
  background: #0c0d14;
  border: 1px solid var(--dsc-bd, rgba(165, 178, 255, 0.16));
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 95%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

.stripe-checkout-header {
  box-sizing: border-box;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.stripe-checkout-title {
  font-size: 18px;
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  margin: 0;
}

.stripe-checkout-close {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-md);
  transition: all var(--animation-fast) var(--easing-default);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stripe-checkout-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
}

.stripe-checkout-container {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  overscroll-behavior-y: contain;
}

/* Stripe Embedded Checkout override */
.stripe-checkout-container iframe {
  border: none !important;
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==========================================
   CHECKOUT EMAIL SECTION (Inside Stripe Modal)
   ========================================== */

/* ==========================================
   iOS-STYLE LOADING OVERLAY
   ========================================== */

/* ===== Warte-/Generier-Screen — Discover-DNA (vollflaechiger Canvas, keine Box) ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Brand-Canvas: near-black + Periwinkle-Glow oben rechts (wie Discover-Tab) */
  background:
    radial-gradient(120% 70% at 85% -8%, rgba(107, 127, 232, 0.18), transparent 55%),
    #0a0b12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: max(env(safe-area-inset-top), 24px) 32px max(env(safe-area-inset-bottom), 24px);
  animation: loadingOverlayFadeIn var(--animation-normal) var(--easing-default);
}

/* Kein Kaesten-Container mehr: Inhalt schwebt offen auf dem Canvas */
.loading-content {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

/* Ring-Spinner im neuen Look ausgeblendet — Hero ist die Stadt-Headline,
   Bewegung kommt von Progress-Shimmer + rotierenden Status-Zeilen */
.loading-overlay .loading-spinner {
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-xl);
}

.loading-headline #loadingHeadlineText {
  font-size: 15px;
  font-weight: var(--font-normal);
  color: var(--dsc-mut, rgba(226, 229, 255, 0.6));
  letter-spacing: 0.2px;
}

/* Hero: grosse Stadt in Verdana (Discover-Headline-DNA) */
.loading-headline #loadingHeadlineCity {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  text-shadow: 0 2px 24px rgba(79, 70, 229, 0.35);
}

.loading-text {
  font-size: var(--font-size-md);
  font-weight: var(--font-normal);
  color: var(--dsc-mut, rgba(226, 229, 255, 0.6));
  margin-bottom: var(--space-xl);
  line-height: 1.4;
}

.loading-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.loading-progress-bar {
  height: 100%;
  /* Brand-CTA-Gradient: Periwinkle -> Indigo (statt Voice-Lila) */
  background: var(--brand-cta, linear-gradient(135deg, #6B7FE8 0%, #4F46E5 100%));
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.5s ease-out;
  box-shadow: 0 0 14px rgba(107, 127, 232, 0.55);
}

@keyframes shimmer {
  0% {
    background-position: -100px 0;
  }
  100% {
    background-position: 100px 0;
  }
}

.loading-messages {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.loading-message {
  font-size: var(--font-size-sm);
  color: var(--dsc-mut2, rgba(226, 229, 255, 0.42));
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--animation-normal) var(--easing-default);
}

.loading-message.active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes loadingOverlayFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}

/* ==========================================
   GUIDE PERSONALITY PANEL
   ========================================== */

.personality-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.personality-panel-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.personality-panel-content {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #1a1a1a;
  border-radius: 20px 20px 0 0;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.personality-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.personality-panel-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.personality-panel-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.personality-panel-close:hover {
  color: #fff;
}

.personality-section {
  margin-bottom: 20px;
}

.personality-section-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.personality-options {
  display: flex;
  gap: 10px;
}

.personality-option {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 16px 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.personality-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.personality-option.selected {
  border-color: var(--brand-mid);
  background: rgba(107, 127, 232, 0.15);
}

.personality-icon {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.personality-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.personality-desc {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.length-options {
  display: flex;
  gap: 8px;
}

.length-option {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 12px 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.length-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.length-option.selected {
  border-color: var(--brand-mid);
  background: rgba(107, 127, 232, 0.15);
  color: #fff;
}

.personality-save-btn {
  width: 100%;
  background: var(--brand-mid);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s ease;
}

.personality-save-btn:hover {
  background: #0066d6;
}

.personality-save-btn:active {
  background: #0055b3;
}

/* Personality button in nav icon buttons */
.nav-personality-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-personality-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.3);
}

.nav-personality-btn svg {
  width: 18px;
  height: 18px;
}

/* [Dead-CSS entfernt 2026-06-21] Alte Pre-Start-Button-Varianten
   (.nav-preview-buttons-row, .nav-personality-btn-text, .nav-upgrade-btn-outline,
   #previewUpgradeBtn.purchased) — 0 Referenzen, durch #navCreditsChip ersetzt. */

/* ==========================================
   PURCHASED TOURS BUTTON & MODAL
   ========================================== */

.purchased-tours-button-container {
  position: sticky;
  bottom: 0;
  padding: 16px;
  margin-top: 8px;
  background: linear-gradient(to top, rgba(13, 13, 26, 1) 70%, rgba(13, 13, 26, 0) 100%);
  padding-top: 32px;
  z-index: 10;
}

.purchased-tours-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.05) 100%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  color: var(--brand-gold);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.purchased-tours-button:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.1) 100%);
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-1px);
}

.purchased-tours-button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.purchased-tours-button svg.chevron {
  margin-left: auto;
  opacity: 0.6;
}

/* Purchased Tours Modal */
.purchased-tours-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.purchased-tours-modal-overlay.active {
  opacity: 1;
}

.purchased-tours-modal {
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  background: linear-gradient(180deg, #1a1a2e 0%, #0d0d1a 100%);
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.purchased-tours-modal-overlay.active .purchased-tours-modal {
  transform: translateY(0);
}

.purchased-tours-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.purchased-tours-modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin: 0;
}

.purchased-tours-back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
}

.purchased-tours-back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.purchased-tours-back-btn svg {
  width: 20px;
  height: 20px;
}

.purchased-tours-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.purchased-tours-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.purchased-tours-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--brand-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

.purchased-tours-empty {
  text-align: center;
  padding: 60px 20px;
}

.purchased-tours-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.purchased-tours-empty h3 {
  color: white;
  font-size: 18px;
  margin: 0 0 8px 0;
}

.purchased-tours-empty p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

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

.purchased-tour-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.purchased-tour-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.purchased-tour-info {
  flex: 1;
  min-width: 0;
}

.purchased-tour-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.purchased-tour-badge.classic {
  background: rgba(107, 127, 232, 0.2);
  color: #60a5fa;
}

.purchased-tour-badge.generated {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

.purchased-tour-name {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchased-tour-city {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 4px 0;
}

.purchased-tour-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.purchased-tour-usage {
  font-size: 12px;
  color: rgba(255, 215, 0, 0.8);
  margin: 4px 0 0 0;
}

.purchased-tour-actions {
  flex-shrink: 0;
  margin-left: 12px;
}

.restore-btn {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--brand-gold) 0%, #FFA500 100%);
  border: none;
  border-radius: 10px;
  color: #1a1a2e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.restore-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.restore-btn:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.in-library-badge {
  display: inline-block;
  padding: 8px 12px;
  background: rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  color: #4ade80;
  font-size: 12px;
  font-weight: 500;
}

.purchased-tours-error {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   NAVIGATION INTRO MODAL
   Explains the navigation view for first-time users
   ============================================================ */

.navigation-intro-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

.navigation-intro-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.nav-intro-content {
    position: relative;
    width: calc(100% - 40px);
    max-width: 340px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.navigation-intro-modal.active .nav-intro-content {
    transform: scale(1);
    opacity: 1;
}

.nav-intro-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-out;
}

.nav-intro-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-intro-close svg {
    width: 16px;
    height: 16px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-intro-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0 0 16px;
    padding-right: 32px;
}

.nav-intro-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-intro-features li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
}

.nav-intro-features li strong {
    color: var(--brand-mid);
}

.nav-intro-cta {
    width: 100%;
    padding: 14px 20px;
    background: var(--brand-mid);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-out;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.nav-intro-cta:hover {
    background: var(--brand-indigo);
}

.nav-intro-cta:active {
    transform: scale(0.98);
}
