/* ============================================
   Flight Simulator(tm) - app-specific styles
   Loaded in addition to style.css
   ============================================ */

.fs {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  user-select: none;
  -webkit-user-select: none;
}

.fs-screen[hidden] { display: none; }

/* --- Seat map --- */
.fs-panel {
  background: linear-gradient(180deg, #1c1c2c 0%, #12121c 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.fs-panel h2 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.fs-panel .fs-sub {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.fs-fuselage {
  background: #191926;
  border: 1px solid #262640;
  border-radius: 40px 40px 14px 14px;
  padding: 1rem 1.25rem 1.25rem;
  max-width: 340px;
  margin: 0 auto;
}

.fs-rows { display: flex; flex-direction: column; gap: 0.4rem; }

.fs-row { display: flex; align-items: center; gap: 0.35rem; justify-content: center; }

.fs-rownum {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  width: 1.4rem;
  text-align: right;
}

.fs-aislegap { width: 1.1rem; }

.fs-seat {
  appearance: none;
  width: 34px;
  height: 32px;
  border-radius: 7px 7px 4px 4px;
  border: 1px solid #2a3f5c;
  background: linear-gradient(180deg, #20344c 0%, #182739 100%);
  color: #7fb3e0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, transform 0.06s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.fs-seat:hover { background: linear-gradient(180deg, #2a4463 0%, #20344c 100%); transform: translateY(-1px); }

.fs-seat.taken {
  border-color: #33334a;
  background: #232330;
  color: #4a4a60;
  cursor: not-allowed;
}
.fs-seat.taken:hover { transform: none; }

.fs-legend {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.fs-legend .sw {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
  margin-right: 0.3rem;
  vertical-align: -1px;
}
.sw-free { background: #20344c; border: 1px solid #2a3f5c; }
.sw-taken { background: #232330; border: 1px solid #33334a; }

.fs-hint {
  text-align: center;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-yellow);
  min-height: 1em;
}

/* --- Boarding --- */
.fs-board-line {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  min-height: 2.6em;
  margin: 1.25rem 0 1rem;
}

.fs-board-bar {
  height: 8px;
  background: #10101a;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.fs-board-bar > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #00a8cc, #00d4ff);
  transition: width 0.9s linear;
}

/* --- Cabin scene --- */
.fs-cabin { position: relative; }

.fs-cabin.is-turb { animation: fsShake 0.35s linear infinite; }

@keyframes fsShake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(1px, -2px); }
  75% { transform: translate(2px, 1px); }
}

.fs-overhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #191926;
  border: 1px solid #262640;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.fs-belt {
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.fs-belt.on { color: var(--accent-yellow); text-shadow: 0 0 8px rgba(251, 191, 36, 0.5); }

.fs-flight-no { color: var(--text-muted); }

.fs-calllight {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #33334a;
  display: inline-block;
}
.fs-calllight.on {
  background: var(--accent-yellow);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.9);
}

/* Window */
.fs-window-frame {
  background: #191926;
  border: 1px solid #262640;
  border-radius: 12px;
  padding: 0.9rem;
  margin-bottom: 0.9rem;
  display: flex;
  justify-content: center;
}

.fs-window {
  position: relative;
  width: 150px;
  height: 100px;
  border-radius: 46px;
  border: 6px solid #2a2a40;
  overflow: hidden;
  background: linear-gradient(180deg, #2c5f8a 0%, #7fb3d9 70%, #a8cbe0 100%);
}

.fs-window.night { background: linear-gradient(180deg, #0a1830 0%, #1d3a5c 100%); }

.fs-cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  animation: fsDrift linear infinite;
}

@keyframes fsDrift {
  from { transform: translateX(170px); }
  to { transform: translateX(-120px); }
}

.fs-window.grounded .fs-cloud { animation-play-state: paused; opacity: 0.35; }

.fs-seatback {
  width: 150px;
  height: 100px;
  border-radius: 10px;
  background: #0d0d14;
  border: 1px solid #262640;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #3a3a52;
  padding: 0.5rem;
  line-height: 1.5;
}

/* Meters */
.fs-meters {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.fs-meter { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-secondary); }

.fs-meter .label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.fs-bar {
  height: 10px;
  background: #10101a;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.fs-bar > div {
  height: 100%;
  width: 0;
  transition: width 0.8s linear;
}

.fs-thirst-fill { background: linear-gradient(90deg, #4ade80, #fbbf24 55%, #ff6b6b); }
.fs-prog-fill { background: linear-gradient(90deg, #00a8cc, #00d4ff); }

.fs-plane {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-40%, -55%);
  font-size: 0.8rem;
  transition: left 0.8s linear;
  line-height: 1;
}

/* Actions */
.fs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.fs-btn {
  appearance: none;
  border: 1px solid #2a2a40;
  background: linear-gradient(180deg, #262638 0%, #1b1b28 100%);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.55rem 0.8rem;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.12s, transform 0.06s;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.fs-btn:hover { background: linear-gradient(180deg, #2f2f45 0%, #212130 100%); }
.fs-btn:active { transform: translateY(2px); box-shadow: none; }
.fs-btn[hidden] { display: none; }

.fs-btn.primary {
  color: #05202b;
  background: linear-gradient(180deg, #00d4ff 0%, #00a8cc 100%);
  border-color: #00d4ff;
}
.fs-btn.primary:hover { background: linear-gradient(180deg, #33ddff 0%, #00bce0 100%); }

.fs-btn.quiet { color: var(--text-secondary); font-weight: 400; }

/* Log */
.fs-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-yellow);
  min-height: 1.3em;
  margin-bottom: 0.5rem;
}

.fs-log {
  list-style: none;
  margin: 0;
  padding: 0.6rem 0.75rem;
  background: #0d0d14;
  border: 1px solid #1d1d30;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  line-height: 1.55;
  color: var(--text-secondary);
  min-height: 7.5em;
}

.fs-log li { opacity: 0.55; }
.fs-log li:last-child { opacity: 1; color: var(--text-primary); }
.fs-log li::before { content: "> "; color: var(--accent); }

/* Done screen */
.fs-stats {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.fs-stats li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px dashed #22223a;
}

.fs-stats b { color: var(--text-primary); font-weight: 700; }

@media (max-width: 480px) {
  .fs-seat { width: 30px; height: 29px; }
  .fs-fuselage { padding: 0.75rem 0.5rem 1rem; }
}
