/* =============================================
   THEME CHOOSER OVERLAY
   ============================================= */

.theme-chooser-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #0A0A0A;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  isolation: isolate;
}
.theme-chooser-overlay.visible {
  opacity: 1;
  visibility: visible;
}
.theme-chooser-overlay.closing {
  opacity: 0;
  visibility: hidden;
}

.theme-chooser-inner {
  text-align: center;
  padding: 2rem;
  max-width: 720px;
  width: 100%;
}

.theme-chooser-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: #FAF5EA;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.theme-chooser-title .logo-dot {
  color: rgba(212,160,60,0.6);
  font-size: 0.65em;
  vertical-align: middle;
  margin: 0 0.06em;
}

.theme-chooser-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.875rem, 1.5vw, 1.1rem);
  color: rgba(250,245,234,0.45);
  letter-spacing: 0.06em;
  margin-bottom: 3rem;
}

.theme-chooser-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* --- Theme Option Button --- */
.theme-option {
  background: none;
  border: 1.5px solid rgba(250,245,234,0.1);
  border-radius: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}
.theme-option:hover {
  border-color: rgba(212,160,60,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 20px rgba(212,160,60,0.08);
}
.theme-option:active {
  transform: translateY(-2px);
}

/* --- Mini Preview Cards --- */
.theme-preview {
  border-radius: 0.5rem;
  overflow: hidden;
  height: 180px;
  margin-bottom: 1rem;
  position: relative;
}

/* Klassisch preview */
.theme-preview--klassisch {
  background: #FAF8F5;
}
.theme-preview--klassisch .theme-preview-header {
  height: 12px;
  background: #FAF8F5;
  border-bottom: 1px solid #E0D5C7;
}
.theme-preview--klassisch .theme-preview-hero {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F5F1EC, #EAE5DD);
}
.theme-preview-orb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,138,114,0.3) 0%, rgba(91,138,114,0.08) 70%, transparent 100%);
  border: 1px solid rgba(91,138,114,0.15);
  animation: previewPulse 4s ease-in-out infinite;
}
.theme-preview--klassisch .theme-preview-content {
  padding: 12px 16px;
}
.theme-preview-line {
  height: 4px;
  border-radius: 2px;
  background: #E0D5C7;
  margin-bottom: 6px;
}
.theme-preview-line--short {
  width: 60%;
}

/* Universum preview */
.theme-preview--universum {
  background: #000;
}
.theme-preview--universum .theme-preview-header--dark {
  height: 12px;
  background: transparent;
}
.theme-preview-hero--dark {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.theme-preview-particles {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-preview-particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #D4A03C;
  opacity: 0;
  animation: particleFloat 3s ease-in-out infinite;
}
.theme-preview-particles span:nth-child(1)  { left: 42%; top: 35%; animation-delay: 0s; }
.theme-preview-particles span:nth-child(2)  { left: 55%; top: 40%; animation-delay: 0.2s; }
.theme-preview-particles span:nth-child(3)  { left: 48%; top: 55%; animation-delay: 0.4s; }
.theme-preview-particles span:nth-child(4)  { left: 38%; top: 48%; animation-delay: 0.6s; }
.theme-preview-particles span:nth-child(5)  { left: 60%; top: 30%; animation-delay: 0.8s; }
.theme-preview-particles span:nth-child(6)  { left: 35%; top: 60%; animation-delay: 1.0s; }
.theme-preview-particles span:nth-child(7)  { left: 52%; top: 28%; animation-delay: 1.2s; }
.theme-preview-particles span:nth-child(8)  { left: 45%; top: 62%; animation-delay: 1.4s; }
.theme-preview-particles span:nth-child(9)  { left: 58%; top: 50%; animation-delay: 1.6s; }
.theme-preview-particles span:nth-child(10) { left: 40%; top: 42%; animation-delay: 1.8s; }
.theme-preview-particles span:nth-child(11) { left: 50%; top: 45%; animation-delay: 0.3s; width: 4px; height: 4px; background: #FFB347; }
.theme-preview-particles span:nth-child(12) { left: 46%; top: 50%; animation-delay: 0.7s; width: 2px; height: 2px; }
.theme-preview-particles span:nth-child(13) { left: 54%; top: 38%; animation-delay: 1.1s; width: 4px; height: 4px; background: #E8853C; }
.theme-preview-particles span:nth-child(14) { left: 43%; top: 52%; animation-delay: 1.5s; width: 2px; height: 2px; }
.theme-preview-particles span:nth-child(15) { left: 50%; top: 44%; animation-delay: 0.1s; width: 5px; height: 5px; background: #FFD68A; }

.theme-preview-content--warm {
  padding: 12px 16px;
  background: linear-gradient(180deg, #1E1A16, #3D3228);
}
.theme-preview-content--warm .theme-preview-line {
  background: rgba(212,160,60,0.2);
}

@keyframes particleFloat {
  0%, 100% { opacity: 0; transform: scale(0.5) translateY(2px); }
  30% { opacity: 0.9; transform: scale(1.2) translateY(-1px); }
  70% { opacity: 0.6; transform: scale(1) translateY(1px); }
}
@keyframes previewPulse {
  0%, 100% { transform: scale(0.85); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* --- Labels --- */
.theme-option-label {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: #FAF5EA;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.theme-option-desc {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: rgba(250,245,234,0.35);
  letter-spacing: 0.03em;
}

.theme-chooser-hint {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: rgba(250,245,234,0.2);
  letter-spacing: 0.04em;
}

/* --- Mobile --- */
@media (max-width: 520px) {
  .theme-chooser-options {
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 280px;
  }
  .theme-preview {
    height: 140px;
  }
  .theme-chooser-subtitle {
    margin-bottom: 2rem;
  }
}
