/* ══════════════════════════════════════════
   FLUGTICKET eCARD — STYLESHEET
   Terminal-Design · Responsive 9:16
══════════════════════════════════════════ */

* {
  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: #050a14;
}

/* Hintergrundbild */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image: url("bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(5, 10, 20, 0.55);
  z-index: -1;
}

/* ── APP WRAPPER ── */
#app {
  width: 85%;
  max-width: 380px;
  background: var(--color-background, rgba(8, 12, 24, 0.92));
  border-radius: 16px;
  border: 1px solid rgba(0, 212, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 12px;
  position: relative;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(0, 212, 255, 0.05);
  overflow: hidden;
}

/* ── DEPARTURE BOARD HEADER ── */
#board-header {
  width: 100%;
  background: var(--color-board, #0a1628);
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.12);
}
#board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.board-col {
  font-size: var(--font-size-display, 14px);
  color: var(--color-accent, #00d4ff);
  letter-spacing: 2px;
  font-weight: bold;
  text-transform: uppercase;
}
.board-label {
  font-size: 10px;
  color: rgba(176, 196, 216, 0.4);
  letter-spacing: 1.5px;
}
#board-status {
  color: #34d399;
  animation: status-blink 2s ease-in-out infinite;
}
@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ── TERMINAL (Hauptbereich) ── */
#terminal {
  width: 100%;
  min-height: 380px;
  position: relative;
  padding: 20px 16px;
}

/* ── 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(176, 196, 216, 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(0, 212, 255, 0.08);
  border: 1.5px solid rgba(0, 212, 255, 0.3);
  border-radius: 10px;
  color: var(--color-accent, #00d4ff);
  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(0, 212, 255, 0.14);
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.2);
}
.next-btn:active {
  transform: scale(0.97);
}
@keyframes next-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(0,212,255,0); }
  50%      { box-shadow: 0 0 18px rgba(0,212,255,0.15); }
}

/* ══════════════════════════════════════════
   SCHRITT 0 — REISEPASS
══════════════════════════════════════════ */
.passport {
  width: 180px;
  height: 240px;
  perspective: 600px;
  cursor: pointer;
}
.passport-cover {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a2744, #0e1a30, #1a2744);
  border: 2px solid rgba(0, 212, 255, 0.25);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(0, 212, 255, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.passport-cover::before {
  content: '';
  position: absolute;
  top: 8px; left: 8px; right: 8px; bottom: 8px;
  border: 1px solid rgba(0, 212, 255, 0.08);
  border-radius: 4px;
  pointer-events: none;
}
.passport-cover:hover {
  transform: scale(1.04);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(0, 212, 255, 0.15);
}
.passport-emblem {
  font-size: 42px;
  color: var(--color-accent, #00d4ff);
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}
.passport-title {
  font-size: 14px;
  color: var(--color-accent, #00d4ff);
  letter-spacing: 4px;
  font-weight: bold;
}
.passport-subtitle {
  font-size: 10px;
  color: rgba(0, 212, 255, 0.35);
  letter-spacing: 3px;
}

/* Pulsieren */
@keyframes passport-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 rgba(0,212,255,0); }
  50%      { box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 25px rgba(0,212,255,0.2); }
}
.passport-cover {
  animation: passport-pulse 2.5s ease-in-out infinite;
}

/* ══════════════════════════════════════════
   SCHRITT 1 — SCAN
══════════════════════════════════════════ */
#scan-area {
  width: 240px;
  height: 180px;
  background: #080e1c;
  border: 2px solid rgba(0, 212, 255, 0.2);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

#scan-passport {
  position: absolute;
  inset: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-page {
  width: 100%;
  height: 100%;
  background: rgba(15, 22, 40, 0.8);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 4px;
  display: flex;
  gap: 12px;
  padding: 12px;
  align-items: center;
}
.scan-photo {
  width: 50px;
  height: 60px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--color-accent, #00d4ff);
  flex-shrink: 0;
}
.scan-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.scan-line-text {
  font-size: 12px;
  color: var(--color-accent, #00d4ff);
  letter-spacing: 1px;
}
.scan-line-text.small {
  font-size: 9px;
  color: rgba(0, 212, 255, 0.4);
  letter-spacing: 2px;
}
.scan-mrz {
  font-size: 8px;
  color: rgba(0, 212, 255, 0.3);
  letter-spacing: 1px;
  word-break: break-all;
  line-height: 1.4;
  margin-top: 4px;
}

/* Scan-Strahl */
#scan-beam {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.8), 0 0 30px rgba(0, 212, 255, 0.3);
  top: 0;
  opacity: 0;
  z-index: 5;
}
#scan-beam.scanning {
  opacity: 1;
  animation: scan-move 1.8s ease-in-out infinite;
}
@keyframes scan-move {
  0%   { top: 0; }
  50%  { top: calc(100% - 3px); }
  100% { top: 0; }
}

/* Scan-Erfolg */
#scan-area.scan-success {
  border-color: #34d399;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.6), 0 0 20px rgba(52, 211, 153, 0.3);
}

/* ══════════════════════════════════════════
   SCHRITT 2 — BOARDING PASS
══════════════════════════════════════════ */
.boarding-pass {
  width: 100%;
  max-width: 320px;
  background: linear-gradient(135deg, #0e1a30, #0a1628);
  border: 1.5px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  position: relative;
}
/* Perforierung links */
.boarding-pass::before {
  content: '';
  position: absolute;
  right: 70px;
  top: 0; bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 6px,
    rgba(0, 212, 255, 0.12) 6px,
    rgba(0, 212, 255, 0.12) 12px
  );
}

.bp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}
.bp-airline {
  font-size: 12px;
  color: var(--color-accent, #00d4ff);
  letter-spacing: 2px;
  font-weight: bold;
}
.bp-class {
  font-size: 10px;
  color: var(--color-gold, #c9a84c);
  letter-spacing: 1px;
  padding: 3px 8px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 4px;
}

.bp-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.15), transparent);
}

.bp-body {
  padding: 16px;
}

.bp-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.bp-city {
  text-align: center;
}
.bp-code {
  font-size: 28px;
  font-weight: bold;
  color: var(--color-accent, #00d4ff);
  letter-spacing: 3px;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}
.bp-label {
  font-size: 10px;
  color: rgba(176, 196, 216, 0.4);
  letter-spacing: 1px;
  margin-top: 4px;
}
.bp-arrow {
  font-size: 24px;
  color: var(--color-gold, #c9a84c);
  text-shadow: 0 0 10px rgba(201, 168, 76, 0.4);
  animation: fly-right 2.5s ease-in-out infinite;
}
@keyframes fly-right {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(8px); }
}

.bp-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bp-field-label {
  font-size: 9px;
  color: rgba(176, 196, 216, 0.35);
  letter-spacing: 1.5px;
  margin-bottom: 3px;
}
.bp-field-value {
  font-size: var(--font-size-text, 14px);
  color: var(--color-text, #b0c4d8);
  font-weight: bold;
  letter-spacing: 0.5px;
}

.bp-barcode {
  padding: 10px 16px 14px;
  display: flex;
  gap: 2px;
  justify-content: center;
  border-top: 1px solid rgba(0, 212, 255, 0.08);
}

/* ══════════════════════════════════════════
   SCHRITT 3 — GATE
══════════════════════════════════════════ */
.gate-display {
  text-align: center;
  padding: 20px;
}
.gate-icon {
  font-size: 48px;
  margin-bottom: 8px;
}
.gate-number {
  font-size: 56px;
  font-weight: bold;
  color: var(--color-accent, #00d4ff);
  letter-spacing: 4px;
  text-shadow: 0 0 24px rgba(0, 212, 255, 0.5);
  margin-bottom: 4px;
}
.gate-label {
  font-size: 12px;
  color: rgba(176, 196, 216, 0.4);
  letter-spacing: 4px;
  margin-bottom: 24px;
}
.gate-divider {
  width: 60px;
  height: 1px;
  background: rgba(0, 212, 255, 0.2);
  margin: 0 auto 20px;
}
.gate-address {
  font-size: var(--font-size-highlight, 16px);
  color: var(--color-gold-light, #e8d5a0);
  font-weight: bold;
  margin-bottom: 6px;
  text-shadow: 0 0 8px rgba(232, 213, 160, 0.3);
}
.gate-district {
  font-size: var(--font-size-text, 14px);
  color: var(--color-text, #b0c4d8);
  margin-bottom: 20px;
}
.gate-dress {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 8px;
  background: rgba(0, 212, 255, 0.04);
}
.gate-dress-label {
  font-size: 9px;
  color: rgba(176, 196, 216, 0.4);
  letter-spacing: 1.5px;
}
.gate-dress-value {
  font-size: var(--font-size-text, 14px);
  color: var(--color-accent, #00d4ff);
  font-weight: bold;
}

/* ══════════════════════════════════════════
   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: plane-land 1.5s ease-out;
}
@keyframes plane-land {
  0%   { transform: translateX(80px) translateY(-40px) rotate(-10deg); opacity: 0; }
  60%  { transform: translateX(-4px) translateY(2px) rotate(2deg); opacity: 1; }
  100% { transform: translateX(0) translateY(0) rotate(0); opacity: 1; }
}
.landing-title {
  font-size: var(--font-size-title, 18px);
  color: var(--color-accent, #00d4ff);
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}
.landing-msg {
  font-size: var(--font-size-highlight, 16px);
  color: var(--color-gold-light, #e8d5a0);
  line-height: 1.8;
  max-width: 280px;
  margin: 0 auto;
  text-shadow: 0 0 8px rgba(232, 213, 160, 0.2);
}

/* ══════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════ */
#nav-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  width: 100%;
  justify-content: center;
  border-top: 1px solid rgba(0, 212, 255, 0.08);
  margin-top: 8px;
  flex-wrap: wrap;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 8px 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 48px;
  font-family: inherit;
}
.nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.nav-btn:not(:disabled):hover {
  background: rgba(0, 212, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.12);
}
.nav-btn.active {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.25);
}
.nav-icon {
  font-size: 20px;
}
.nav-label {
  font-size: 9px;
  color: rgba(176, 196, 216, 0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.nav-btn.active .nav-label {
  color: var(--color-accent, #00d4ff);
}

.nav-divider {
  width: 1px;
  height: 28px;
  background: rgba(0, 212, 255, 0.12);
  margin: 0 4px;
}

.nav-upgrade {
  border-color: rgba(201, 168, 76, 0.2) !important;
}
.nav-upgrade .nav-label {
  color: rgba(201, 168, 76, 0.4);
}
.nav-upgrade:hover {
  background: rgba(201, 168, 76, 0.06) !important;
  border-color: rgba(201, 168, 76, 0.3) !important;
}

/* ══════════════════════════════════════════
   UPGRADE-OVERLAY
══════════════════════════════════════════ */
#upgrade-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 20, 0.95);
  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, #c9a84c);
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-shadow: 0 0 12px rgba(201, 168, 76, 0.4);
}
.upgrade-text {
  font-size: var(--font-size-text, 14px);
  color: var(--color-text, #b0c4d8);
  line-height: 1.8;
  margin-bottom: 20px;
}
.upgrade-code {
  font-size: 20px;
  color: var(--color-gold-light, #e8d5a0);
  letter-spacing: 4px;
  padding: 10px 24px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 8px;
  background: rgba(201, 168, 76, 0.06);
  margin-bottom: 20px;
}
.upgrade-close {
  font-size: 11px;
  color: rgba(176, 196, 216, 0.35);
  letter-spacing: 2px;
  cursor: pointer;
  padding: 8px 16px;
  border: 1px solid rgba(176, 196, 216, 0.1);
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  transition: all 0.2s;
}
.upgrade-close:hover {
  border-color: rgba(176, 196, 216, 0.25);
  color: rgba(176, 196, 216, 0.6);
}

/* ══════════════════════════════════════════
   SCHRITT 5 — RSVP FORMULAR
══════════════════════════════════════════ */
.rsvp-card {
  width: 100%;
  max-width: 320px;
  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-accent, #00d4ff);
  font-weight: bold;
  letter-spacing: 3px;
  margin-bottom: 4px;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}
.rsvp-subtitle {
  font-size: 12px;
  color: rgba(176, 196, 216, 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(0, 212, 255, 0.04);
  border: 1.5px solid rgba(0, 212, 255, 0.15);
  border-radius: 8px;
  color: var(--color-text, #b0c4d8);
  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(0, 212, 255, 0.4);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.1);
}
.rsvp-input::placeholder,
.rsvp-textarea::placeholder {
  color: rgba(176, 196, 216, 0.25);
}
.rsvp-textarea {
  resize: none;
  line-height: 1.6;
}

/* Zusage-Toggle */
.rsvp-toggle {
  display: flex;
  gap: 8px;
}
.rsvp-option {
  flex: 1;
  padding: 10px 12px;
  background: rgba(0, 212, 255, 0.04);
  border: 1.5px solid rgba(0, 212, 255, 0.15);
  border-radius: 8px;
  color: rgba(176, 196, 216, 0.5);
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s;
}
.rsvp-option:hover {
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--color-text, #b0c4d8);
}
.rsvp-option.active {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--color-accent, #00d4ff);
  color: var(--color-accent, #00d4ff);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}

/* Absenden-Button */
.rsvp-submit {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  background: rgba(0, 212, 255, 0.1);
  border: 1.5px solid rgba(0, 212, 255, 0.35);
  border-radius: 10px;
  color: var(--color-accent, #00d4ff);
  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(0, 212, 255, 0.16);
  border-color: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.2);
}
.rsvp-submit:active {
  transform: scale(0.98);
}
.rsvp-submit:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Bestätigung */
.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(176, 196, 216, 0.5);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 400px) {
  #app              { border-radius: 12px; }
  #terminal         { padding: 14px 10px; min-height: 340px; }
  .step             { min-height: 300px; }
  .passport         { width: 150px; height: 200px; }
  .passport-emblem  { font-size: 34px; }
  .passport-title   { font-size: 12px; }
  .boarding-pass    { max-width: 280px; }
  .bp-code          { font-size: 22px; }
  .gate-number      { font-size: 44px; }
  .landing-emoji    { font-size: 44px; }
  #nav-bar          { gap: 2px; padding: 8px 6px; }
  .nav-btn          { min-width: 40px; padding: 6px 4px 4px; }
  .nav-icon         { font-size: 17px; }
  .nav-label        { font-size: 8px; }
}

@media (max-width: 360px) {
  .bp-code          { font-size: 20px; }
  .bp-field-value   { font-size: 12px; }
  .gate-number      { font-size: 38px; }
}
