/* ============================================================
   FLIGHT STATUS — Meta Display HUD
   600 × 600 viewport, content right-aligned via large left pad.
   Modern departure-board aesthetic: deep navy + amber + cyan.
   ============================================================ */

:root {
  --bg-0:        #050810;
  --bg-1:        #0a1020;
  --bg-2:        #121a30;
  --bg-3:        #1b2444;
  --line:        #283156;
  --line-2:      #3a4470;

  --text:        #f4f7ff;
  --text-2:      #b6c1e6;
  --text-3:      #6e7aa3;
  --text-4:      #4a5275;

  --amber:       #ffb84d;
  --amber-hi:    #ffd17a;
  --amber-dim:   #c8841a;
  --amber-glow:  rgba(255, 184, 77, 0.55);

  --cyan:        #4dd8ff;
  --cyan-hi:     #8be8ff;
  --cyan-glow:   rgba(77, 216, 255, 0.55);

  --green:       #5cf28a;
  --green-glow:  rgba(92, 242, 138, 0.45);

  --red:         #ff5e7e;
  --red-glow:    rgba(255, 94, 126, 0.45);

  --pad-l:       168px;
  --pad-r:       30px;
  --pad-t:       22px;
  --pad-b:       22px;
}

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

html, body {
  width: 600px;
  height: 600px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 100% 0%, rgba(77,216,255,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(255,184,77,0.05) 0%, transparent 55%),
    var(--bg-0);
  color: var(--text);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: inherit;
  padding: 0;
}

.mono {
  font-family: "JetBrains Mono", "SF Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

.hidden { display: none !important; }

/* faint horizontal scan to evoke a CRT/airport board */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent 0px, transparent 3px,
    rgba(255,255,255,0.018) 4px, rgba(255,255,255,0.018) 5px);
  pointer-events: none;
  z-index: 50;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: var(--pad-t) var(--pad-r) var(--pad-b) var(--pad-l);
  gap: 14px;
}

/* focus ring */
.focusable {
  outline: none;
  border: 3px solid transparent;
  transition:
    transform .12s ease,
    border-color .12s ease,
    box-shadow .12s ease,
    background .12s ease;
}
.focusable:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 26px var(--cyan-glow);
}

/* ============================================================
   TOP BAR (home)
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-mark {
  font-size: 26px;
  color: var(--amber);
  text-shadow: 0 0 14px var(--amber-glow);
  transform: rotate(-15deg);
}
.brand-text {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--text-2);
}
.topbar-clock {
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 2px;
}

/* ============================================================
   HERO (home)
   ============================================================ */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.hero-title {
  font-size: 54px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -2px;
  color: var(--text);
}
.hero-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-3);
}

.last-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  flex-shrink: 0;
}
.last-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text-3);
  margin-bottom: 4px;
}
.last-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.last-code {
  font-size: 20px;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 1px;
}
.last-route {
  font-size: 13px;
  color: var(--text-2);
  letter-spacing: 1px;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 4px;
  padding: 20px;
  min-height: 66px;
  background: linear-gradient(180deg, var(--amber), var(--amber-dim));
  color: #1a0d00;
  box-shadow: 0 8px 22px rgba(255, 184, 77, 0.22);
  border: 3px solid transparent;
  flex-shrink: 0;
}
.cta:focus {
  background: linear-gradient(180deg, var(--amber-hi), var(--amber));
  box-shadow: 0 0 30px var(--amber-glow);
  border-color: var(--amber-hi);
}
.cta-icon { font-size: 18px; line-height: 1; }

/* ============================================================
   HINT BAR (bottom of every screen)
   ============================================================ */
.hint-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.hint-bar-tri { gap: 10px; }
.hint-keys {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.key {
  display: inline-block;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 6px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  font-family: "JetBrains Mono", monospace;
}

/* ============================================================
   STEP HEADER
   ============================================================ */
.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.step-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--text-2);
}
.step-pips {
  display: flex;
  gap: 6px;
}
.pip {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: inline-block;
}
.pip.on {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 8px var(--amber-glow);
}

/* ============================================================
   STEP 1 — AIRLINE CAROUSEL
   ============================================================ */
.carousel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 0;
}
.carousel-side {
  width: 54px;
  height: 160px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-4);
  opacity: 0.85;
  flex-shrink: 0;
}
.carousel-card {
  flex: 1;
  height: 240px;
  align-self: center;
  background: linear-gradient(180deg, rgba(255,184,77,0.10), rgba(255,184,77,0.02));
  border: 2px solid var(--amber);
  border-radius: 18px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 0 32px rgba(255,184,77,0.20);
  position: relative;
}
.airline-code {
  font-size: 92px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -3px;
  color: var(--amber);
  text-shadow: 0 0 28px var(--amber-glow);
}
.airline-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  text-transform: uppercase;
  text-align: center;
  line-height: 1.15;
}
.airline-count {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--text-3);
  font-family: "JetBrains Mono", monospace;
}

/* ============================================================
   STEP 2 — FLIGHT NUMBER
   ============================================================ */
.number-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.number-prefix {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--amber);
  text-shadow: 0 0 14px var(--amber-glow);
}
.digits {
  display: flex;
  gap: 8px;
}
.digit {
  width: 68px;
  height: 128px;
  background: var(--bg-1);
  border: 2px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  position: relative;
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.digit.active {
  border-color: var(--cyan);
  background: linear-gradient(180deg, rgba(77,216,255,0.12), rgba(77,216,255,0.02));
  box-shadow: 0 0 22px var(--cyan-glow);
}
.digit-arrow {
  font-size: 14px;
  height: 16px;
  line-height: 1;
  color: var(--text-4);
  opacity: 0;
}
.digit.active .digit-arrow {
  opacity: 1;
  color: var(--cyan);
}
.digit.active .digit-arrow.up   { animation: bob-up   1.2s infinite ease-in-out; }
.digit.active .digit-arrow.down { animation: bob-down 1.2s infinite ease-in-out; }
@keyframes bob-up {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(-3px); opacity: 0.45; }
}
@keyframes bob-down {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(3px); opacity: 0.45; }
}
.digit-val {
  font-size: 78px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  letter-spacing: -1px;
}
.digit.active .digit-val {
  color: var(--cyan-hi);
  text-shadow: 0 0 18px var(--cyan-glow);
}
.digit-val.tick {
  animation: tick .22s ease;
}
@keyframes tick {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-8px); opacity: 0.4; }
  60%  { transform: translateY(8px);  opacity: 0.4; }
  100% { transform: translateY(0); }
}

/* ============================================================
   STEP 3 — DATE
   ============================================================ */
.date-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
  justify-content: stretch;
  min-height: 0;
}
.date-tile {
  background: var(--bg-2);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 28px 12px;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.date-tile.active {
  border-color: var(--amber);
  background: linear-gradient(180deg, rgba(255,184,77,0.10), rgba(255,184,77,0.02));
  box-shadow: 0 0 22px rgba(255,184,77,0.22);
}
.date-day {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
}
.date-tile.active .date-day {
  color: var(--amber);
}
.date-sub {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 1px;
  font-weight: 600;
}

/* ============================================================
   STATUS — the persistent display
   ============================================================ */
#status { gap: 10px; }

.status-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.status-flight {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--amber);
  text-shadow: 0 0 14px var(--amber-glow);
}
.status-route {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-2);
}
.status-clock {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 1px;
}

.status-badge {
  align-self: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 4px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(92, 242, 138, 0.12);
  color: var(--green);
  border: 1.5px solid var(--green);
  box-shadow: 0 0 16px var(--green-glow);
  flex-shrink: 0;
}
.status-badge.delayed {
  background: rgba(255, 94, 126, 0.12);
  color: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 16px var(--red-glow);
}
.status-badge.boarding {
  background: rgba(255, 184, 77, 0.14);
  color: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 16px var(--amber-glow);
  animation: blink 1.4s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

.info-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  min-height: 0;
}
.info-tile {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  gap: 4px;
  min-width: 0;
}
.info-tile.info-accent {
  background: linear-gradient(180deg, rgba(255,184,77,0.12), rgba(255,184,77,0.02));
  border-color: var(--amber);
  box-shadow: 0 0 16px rgba(255,184,77,0.18);
}
.info-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text-3);
}
.info-tile.info-accent .info-label { color: var(--amber); }
.info-value {
  font-size: 58px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  letter-spacing: -2px;
}
.info-tile.info-accent .info-value {
  color: var(--amber-hi);
  text-shadow: 0 0 18px var(--amber-glow);
}

.status-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.time-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
}
.time-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-3);
  font-weight: 800;
}
.time-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}
.time-sep {
  color: var(--text-4);
  font-size: 14px;
  margin: 0 4px;
}
