/* ══════════════════════════════════════════
   RAUMSCHIFF eCARD — STYLESHEET
   Space-Design · Neon · Holografisch
══════════════════════════════════════════ */

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

body {
  margin: 0;
  padding: 16px 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family, 'Courier New', monospace);
  overflow-x: hidden;
  background: #030108;
}

/* Sternenfeld-Canvas */
#stars-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
}

/* ── APP WRAPPER ── */
#app {
  width: 85%;
  max-width: 380px;
  background: var(--color-background, rgba(6, 4, 18, 0.93));
  border-radius: 16px;
  border: 1px solid rgba(168, 85, 247, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 12px;
  position: relative;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(168, 85, 247, 0.08),
    inset 0 1px 0 rgba(168, 85, 247, 0.1);
  overflow: hidden;
}

/* ── MISSION HEADER ── */
#mission-header {
  width: 100%;
  background: var(--color-panel, #0a0820);
  padding: 12px 14px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}
#header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.header-col {
  font-size: var(--font-size-display, 13px);
  color: var(--color-primary, #a855f7);
  letter-spacing: 2px;
  font-weight: bold;
  text-transform: uppercase;
}
.header-label {
  font-size: 9px;
  color: rgba(196, 181, 212, 0.4);
  letter-spacing: 1.5px;
}
#header-status {
  color: #34d399;
  animation: status-blink 2s ease-in-out infinite;
}
@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ── COCKPIT ── */
#cockpit {
  width: 100%;
  min-height: 380px;
  position: relative;
  padding: 20px 14px;
}

/* ── STEPS ── */
.step {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  animation: step-in 0.5s ease;
}
.step.active { display: flex; }
@keyframes step-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-hint {
  margin-top: 20px;
  font-size: 11px;
  color: rgba(196, 181, 212, 0.3);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
}

/* ── WEITER-BUTTON ── */
.next-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 28px;
  background: rgba(168, 85, 247, 0.08);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  border-radius: 10px;
  color: var(--color-primary, #a855f7);
  font-size: 13px;
  font-weight: bold;
  font-family: inherit;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
  animation: next-pulse 2s ease-in-out infinite;
  position: relative;
  z-index: 15;
}
.next-btn:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.2);
}
.next-btn:active { transform: scale(0.97); }
@keyframes next-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(168,85,247,0); }
  50%      { box-shadow: 0 0 18px rgba(168,85,247,0.15); }
}

/* ══════════════════════════════════════════
   SCHRITT 0 — CREW-AUSWEIS
══════════════════════════════════════════ */
.badge {
  cursor: pointer;
  perspective: 600px;
}
.badge-card {
  width: 200px;
  padding: 20px 16px;
  background: linear-gradient(135deg, #120e28, #0a0820, #1a1040);
  border: 1.5px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  text-align: center;
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(168, 85, 247, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  animation: badge-pulse 2.5s ease-in-out infinite;
}
.badge-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(168,85,247,0.06), transparent, rgba(6,182,212,0.04), transparent);
  animation: holo-rotate 6s linear infinite;
  pointer-events: none;
}
@keyframes holo-rotate { to { transform: rotate(360deg); } }
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 0 rgba(168,85,247,0); }
  50%      { box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 30px rgba(168,85,247,0.2); }
}
.badge-card:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 30px rgba(0,0,0,0.6), 0 0 30px rgba(168,85,247,0.25);
}

.badge-header {
  font-size: 10px;
  color: var(--color-primary, #a855f7);
  letter-spacing: 3px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.badge-photo {
  font-size: 44px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.badge-name {
  font-size: 15px;
  color: var(--color-glow, #c084fc);
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.badge-rank {
  font-size: 11px;
  color: var(--color-gold, #fbbf24);
  letter-spacing: 2px;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.badge-id {
  font-size: 10px;
  color: rgba(196, 181, 212, 0.4);
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}
.badge-stripe {
  width: 80%;
  height: 3px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, var(--color-primary, #a855f7), var(--color-secondary, #06b6d4), transparent);
  border-radius: 2px;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════
   SCHRITT 1 — BIOSCAN
══════════════════════════════════════════ */
#scan-area {
  width: 200px;
  height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
#scan-eye {
  font-size: 56px;
  position: relative;
  z-index: 5;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.5));
}
#scan-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scan-ring {
  position: absolute;
  border: 1.5px solid rgba(168, 85, 247, 0.2);
  border-radius: 50%;
}
.ring-1 { width: 100px; height: 100px; }
.ring-2 { width: 140px; height: 140px; }
.ring-3 { width: 180px; height: 180px; }

.scan-ring.scanning {
  border-color: rgba(168, 85, 247, 0.4);
  animation: ring-pulse 1.5s ease-in-out infinite;
}
.ring-2.scanning { animation-delay: 0.3s; }
.ring-3.scanning { animation-delay: 0.6s; }
@keyframes ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; border-color: rgba(168,85,247,0.3); }
  50%      { transform: scale(1.08); opacity: 1; border-color: rgba(168,85,247,0.7); }
}

#scan-beam {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, transparent, #a855f7, transparent);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.8);
  opacity: 0;
  z-index: 4;
}
#scan-beam.scanning {
  opacity: 1;
  animation: beam-rotate 2s linear infinite;
}
@keyframes beam-rotate {
  from { transform: translateX(-50%) rotate(0deg); }
  to   { transform: translateX(-50%) rotate(360deg); }
}

#scan-area.scan-success .scan-ring {
  border-color: #34d399 !important;
  animation: none;
}
#scan-area.scan-success #scan-beam { opacity: 0; }

/* ══════════════════════════════════════════
   SCHRITT 2 — MISSIONSBRIEFING
══════════════════════════════════════════ */
.briefing-card {
  width: 100%;
  max-width: 310px;
  background: linear-gradient(135deg, #120e28, #0a0820);
  border: 1.5px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.brief-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}
.brief-label {
  font-size: 11px;
  color: var(--color-primary, #a855f7);
  letter-spacing: 2px;
  font-weight: bold;
}
.brief-classified {
  font-size: 8px;
  color: #f87171;
  letter-spacing: 2px;
  padding: 2px 6px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 3px;
}
.brief-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.15), transparent);
}

.brief-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px;
}
.brief-planet {
  text-align: center;
}
.brief-planet-icon {
  font-size: 32px;
  margin-bottom: 4px;
}
.brief-planet-name {
  font-size: 12px;
  color: var(--color-glow, #c084fc);
  font-weight: bold;
  letter-spacing: 1px;
}
.brief-arrow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.brief-arrow-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(168,85,247,0.1), rgba(168,85,247,0.3));
}
.brief-arrow-ship {
  font-size: 20px;
  animation: ship-fly 2.5s ease-in-out infinite;
}
@keyframes ship-fly {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(6px); }
}

.brief-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 14px 12px;
}
.brief-field-label {
  font-size: 8px;
  color: rgba(196, 181, 212, 0.4);
  letter-spacing: 1.5px;
  margin-bottom: 2px;
}
.brief-field-value {
  font-size: var(--font-size-text, 14px);
  color: var(--color-text, #c4b5d4);
  font-weight: bold;
  letter-spacing: 0.5px;
}
.brief-highlight {
  color: var(--color-glow, #c084fc);
  font-weight: bold;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.3);
}

.brief-location {
  padding: 10px 14px;
  border-top: 1px solid rgba(168, 85, 247, 0.08);
  text-align: center;
}
.brief-dress {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-top: 1px solid rgba(168, 85, 247, 0.08);
}

/* ══════════════════════════════════════════
   SCHRITT 3 — COUNTDOWN & LAUNCH
══════════════════════════════════════════ */
.launch-display {
  text-align: center;
  position: relative;
  z-index: 10;
}
.launch-countdown {
  font-size: 96px;
  font-weight: bold;
  color: var(--color-primary, #a855f7);
  text-shadow: 0 0 40px rgba(168, 85, 247, 0.6), 0 0 80px rgba(168, 85, 247, 0.3);
  font-family: 'Courier New', monospace;
  transition: transform 0.15s;
}
.launch-label {
  font-size: 12px;
  color: rgba(196, 181, 212, 0.4);
  letter-spacing: 4px;
  margin-top: 8px;
}

#warp-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

/* Shake */
@keyframes shake-launch {
  0%   { transform: translateX(0) translateY(0); }
  10%  { transform: translateX(-6px) translateY(-3px); }
  20%  { transform: translateX(6px) translateY(3px); }
  30%  { transform: translateX(-5px) translateY(-2px); }
  40%  { transform: translateX(5px) translateY(2px); }
  50%  { transform: translateX(-3px) translateY(-1px); }
  60%  { transform: translateX(3px) translateY(1px); }
  70%  { transform: translateX(-2px) translateY(-1px); }
  80%  { transform: translateX(2px) translateY(0); }
  90%  { transform: translateX(-1px) translateY(1px); }
  100% { transform: translateX(0) translateY(0); }
}
.shaking { animation: shake-launch 0.12s ease-in-out infinite; }

/* ══════════════════════════════════════════
   SCHRITT 4 — LANDUNG
══════════════════════════════════════════ */
#step-landing { position: relative; }
#konfetti-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  display: none;
}
.landing-content {
  text-align: center;
  z-index: 5;
  position: relative;
}
.landing-emoji {
  font-size: 56px;
  margin-bottom: 16px;
  animation: planet-appear 1.2s ease-out;
}
@keyframes planet-appear {
  0%   { transform: scale(0.2) rotate(-30deg); opacity: 0; }
  60%  { transform: scale(1.1) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.landing-title {
  font-size: var(--font-size-title, 18px);
  color: var(--color-primary, #a855f7);
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-shadow: 0 0 14px rgba(168, 85, 247, 0.4);
}
.landing-msg {
  font-size: var(--font-size-highlight, 16px);
  color: var(--color-glow, #c084fc);
  line-height: 1.8;
  max-width: 280px;
  margin: 0 auto;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.2);
}

/* ══════════════════════════════════════════
   SCHRITT 5 — RSVP (FUNKSPRUCH)
══════════════════════════════════════════ */
.rsvp-card {
  width: 100%;
  max-width: 310px;
  text-align: center;
  position: relative;
}
.rsvp-icon { font-size: 40px; margin-bottom: 8px; }
.rsvp-title {
  font-size: var(--font-size-title, 18px);
  color: var(--color-primary, #a855f7);
  font-weight: bold;
  letter-spacing: 3px;
  margin-bottom: 4px;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}
.rsvp-subtitle {
  font-size: 12px;
  color: rgba(196, 181, 212, 0.4);
  letter-spacing: 1.5px;
  margin-bottom: 22px;
}

.rsvp-field { margin-bottom: 16px; text-align: left; }
.rsvp-label {
  display: block;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}
.rsvp-input,
.rsvp-textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(168, 85, 247, 0.04);
  border: 1.5px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  color: var(--color-text, #c4b5d4);
  font-family: inherit;
  font-size: var(--font-size-text, 14px);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.rsvp-input:focus,
.rsvp-textarea:focus {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.12);
}
.rsvp-input::placeholder,
.rsvp-textarea::placeholder { color: rgba(196, 181, 212, 0.25); }
.rsvp-textarea { resize: none; line-height: 1.6; }

.rsvp-toggle { display: flex; gap: 8px; }
.rsvp-option {
  flex: 1;
  padding: 10px 12px;
  background: rgba(168, 85, 247, 0.04);
  border: 1.5px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  color: rgba(196, 181, 212, 0.5);
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}
.rsvp-option:hover {
  border-color: rgba(168, 85, 247, 0.4);
  color: var(--color-text, #c4b5d4);
}
.rsvp-option.active {
  background: rgba(168, 85, 247, 0.12);
  border-color: var(--color-primary, #a855f7);
  color: var(--color-primary, #a855f7);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.15);
}

.rsvp-submit {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  background: rgba(168, 85, 247, 0.1);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  border-radius: 10px;
  color: var(--color-primary, #a855f7);
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
}
.rsvp-submit:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.2);
}
.rsvp-submit:active { transform: scale(0.98); }

.rsvp-confirmation {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 0;
  animation: step-in 0.5s ease;
}
.rsvp-confirmation.visible { display: flex; }
.rsvp-confirm-icon { font-size: 44px; }
.rsvp-confirm-text {
  font-size: var(--font-size-title, 18px);
  color: #34d399;
  font-weight: bold;
  letter-spacing: 1px;
}
.rsvp-confirm-sub {
  font-size: var(--font-size-text, 14px);
  color: rgba(196, 181, 212, 0.5);
}

/* ══════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════ */
#nav-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  width: 100%;
  justify-content: center;
  border-top: 1px solid rgba(168, 85, 247, 0.1);
  margin-top: 8px;
  flex-wrap: wrap;
}
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 6px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 42px;
  font-family: inherit;
}
.nav-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.nav-btn:not(:disabled):hover {
  background: rgba(168, 85, 247, 0.06);
  border-color: rgba(168, 85, 247, 0.15);
}
.nav-btn.active {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.25);
}
.nav-icon { font-size: 18px; }
.nav-label {
  font-size: 8px;
  color: rgba(196, 181, 212, 0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.nav-btn.active .nav-label { color: var(--color-primary, #a855f7); }

.nav-divider {
  width: 1px;
  height: 28px;
  background: rgba(168, 85, 247, 0.12);
  margin: 0 2px;
}
.nav-upgrade { border-color: rgba(251, 191, 36, 0.2) !important; }
.nav-upgrade .nav-label { color: rgba(251, 191, 36, 0.4); }
.nav-upgrade:hover {
  background: rgba(251, 191, 36, 0.06) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
}

/* ══════════════════════════════════════════
   UPGRADE-OVERLAY
══════════════════════════════════════════ */
#upgrade-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 15, 0.96);
  z-index: 50;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  border-radius: 16px;
  animation: step-in 0.4s ease;
}
#upgrade-overlay.active { display: flex; }
.upgrade-emoji { font-size: 48px; margin-bottom: 16px; }
.upgrade-title {
  font-size: var(--font-size-title, 18px);
  color: var(--color-gold, #fbbf24);
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-shadow: 0 0 14px rgba(251, 191, 36, 0.4);
}
.upgrade-text {
  font-size: var(--font-size-text, 14px);
  color: var(--color-text, #c4b5d4);
  line-height: 1.8;
  margin-bottom: 20px;
}
.upgrade-code {
  font-size: 20px;
  color: var(--color-gold, #fbbf24);
  letter-spacing: 4px;
  padding: 10px 24px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.06);
  margin-bottom: 20px;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
}
.upgrade-close {
  font-size: 11px;
  color: rgba(196, 181, 212, 0.35);
  letter-spacing: 2px;
  cursor: pointer;
  padding: 8px 16px;
  border: 1px solid rgba(196, 181, 212, 0.1);
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  transition: all 0.2s;
}
.upgrade-close:hover {
  border-color: rgba(196, 181, 212, 0.25);
  color: rgba(196, 181, 212, 0.6);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 400px) {
  #app              { border-radius: 12px; }
  #cockpit          { padding: 14px 10px; min-height: 340px; }
  .step             { min-height: 300px; }
  .badge-card       { width: 170px; padding: 16px 12px; }
  .briefing-card    { max-width: 280px; }
  .landing-emoji    { font-size: 44px; }
  .launch-countdown { font-size: 72px; }
  #nav-bar          { gap: 1px; padding: 8px 4px; }
  .nav-btn          { min-width: 36px; padding: 5px 3px 3px; }
  .nav-icon         { font-size: 16px; }
  .nav-label        { font-size: 7px; }
}

@media (max-width: 360px) {
  .brief-planet-icon { font-size: 26px; }
  .brief-field-value { font-size: 12px; }
  .launch-countdown  { font-size: 60px; }
}
