/* ============================================================
   16-BIT PIXEL AIRPORT ANIMATION — login page background
   ============================================================ */

.airport-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ── No scrollbar on desktop; allow vertical scroll on mobile ── */
html {
  overflow-x: hidden;
}

body.login-page {
  height: 100vh;
  overflow-x: hidden;
  overflow-y: hidden;
}

@media (max-width: 768px) {
  body.login-page {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
}

/* ── Keep login content above the scene ───────────────────── */
.login-page .flash-container {
  position: relative;
  z-index: 1050;
}

.login-page .wrapper {
  position: relative;
  z-index: 1;
}

/* ── SKY ──────────────────────────────────────────────────── */
.sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #05080f 0%,
    #0a1025 20%,
    #0f1a38 40%,
    #162550 60%,
    #1c3262 75%,
    #2a4a6e 88%,
    #3d5f7a 100%
  );
}

/* Horizon glow — warm amber at the bottom of the sky */
.sky::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(245, 158, 11, 0.04) 40%,
    rgba(245, 158, 11, 0.08) 70%,
    rgba(245, 130, 11, 0.12) 100%
  );
}

/* ── Moon ──────────────────────────────────────────────────── */
.moon {
  position: absolute;
  top: 8%;
  right: 15%;
  width: 32px;
  height: 32px;
  background: radial-gradient(circle at 40% 40%, #e8e0d0 0%, #d4c8a8 60%, #b8a878 100%);
  border-radius: 50%;
  box-shadow:
    0 0 20px rgba(232, 224, 208, 0.15),
    0 0 60px rgba(232, 224, 208, 0.08);
}

/* Moon craters (pixel style) */
.moon::before {
  content: '';
  position: absolute;
  top: 8px; left: 12px;
  width: 6px; height: 6px;
  background: rgba(0,0,0,0.08);
  border-radius: 50%;
  box-shadow:
    -6px 8px 0 3px rgba(0,0,0,0.06),
    4px 12px 0 2px rgba(0,0,0,0.07);
}

/* Moon glow halo */
.moon::after {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,224,208,0.06) 0%, transparent 70%);
}

/* ── Stars ─────────────────────────────────────────────────── */
.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at  5% 10%, #fff 50%, transparent 50%),
    radial-gradient(1px 1px at 12% 25%, rgba(255,255,255,0.7) 50%, transparent 50%),
    radial-gradient(1px 1px at 20%  5%, rgba(200,220,255,0.9) 50%, transparent 50%),
    radial-gradient(1px 1px at 28% 18%, rgba(255,255,255,0.5) 50%, transparent 50%),
    radial-gradient(1px 1px at 35%  8%, rgba(255,240,200,0.8) 50%, transparent 50%),
    radial-gradient(1px 1px at 42% 22%, rgba(255,255,255,0.6) 50%, transparent 50%),
    radial-gradient(2px 2px at 48%  3%, rgba(200,220,255,1)   50%, transparent 50%),
    radial-gradient(1px 1px at 55% 14%, rgba(255,255,255,0.7) 50%, transparent 50%),
    radial-gradient(1px 1px at 62% 20%, rgba(255,255,255,0.5) 50%, transparent 50%),
    radial-gradient(1px 1px at 68%  6%, rgba(255,240,200,0.9) 50%, transparent 50%),
    radial-gradient(1px 1px at 75% 16%, rgba(255,255,255,0.6) 50%, transparent 50%),
    radial-gradient(2px 2px at 82%  4%, rgba(255,255,255,0.9) 50%, transparent 50%),
    radial-gradient(1px 1px at 88% 12%, rgba(200,220,255,0.7) 50%, transparent 50%),
    radial-gradient(1px 1px at 93% 22%, rgba(255,255,255,0.5) 50%, transparent 50%),
    radial-gradient(1px 1px at  8% 35%, rgba(255,255,255,0.4) 50%, transparent 50%),
    radial-gradient(1px 1px at 52% 30%, rgba(255,255,255,0.3) 50%, transparent 50%),
    radial-gradient(1px 1px at 96%  9%, rgba(255,240,200,0.8) 50%, transparent 50%);
  animation: starsTwinkle 3s ease-in-out infinite alternate;
}

@keyframes starsTwinkle {
  0%   { opacity: 0.7; }
  100% { opacity: 1; }
}

/* ── Shooting star ────────────────────────────────────────── */
.shooting-star {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 0;
  opacity: 0;
  box-shadow: 0 0 4px #fff, -10px 0 6px rgba(255,255,255,0.4), -20px 0 4px rgba(255,255,255,0.2);
  animation: shootingStar 8s ease-in infinite 4s;
}

@keyframes shootingStar {
  0%   { opacity: 0; transform: translate(0, 0); }
  2%   { opacity: 1; }
  8%   { opacity: 1; transform: translate(200px, 80px); }
  10%  { opacity: 0; transform: translate(240px, 96px); }
  100% { opacity: 0; transform: translate(240px, 96px); }
}

/* ── Clouds ────────────────────────────────────────────────── */
.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  box-shadow:
    8px 0 0 rgba(255,255,255,0.05),
    16px 0 0 rgba(255,255,255,0.03),
    24px 0 0 rgba(255,255,255,0.02),
    -8px 0 0 rgba(255,255,255,0.03),
    0 -6px 0 rgba(255,255,255,0.02),
    8px -6px 0 rgba(255,255,255,0.04),
    16px -6px 0 rgba(255,255,255,0.02);
}

.cloud-1 {
  width: 60px; height: 10px;
  top: 22%; left: -100px;
  animation: cloudDrift 50s linear infinite;
}
.cloud-2 {
  width: 90px; height: 12px;
  top: 34%; left: -120px;
  animation: cloudDrift 70s linear infinite 15s;
  opacity: 0.6;
}
.cloud-3 {
  width: 45px; height: 8px;
  top: 15%; left: -70px;
  animation: cloudDrift 40s linear infinite 28s;
  opacity: 0.4;
}

@keyframes cloudDrift {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 250px)); }
}

/* ── Ground ────────────────────────────────────────────────── */
.runway {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28%;
  background: linear-gradient(180deg, #181c28 0%, #12151e 50%, #0e1118 100%);
  border-top: 2px solid #2a3448;
}

/* Grass strip at top of ground */
.runway::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg,
    #1a2a1a 0%, #1e2e1a 20%, #1a2a1a 40%,
    #1e2e1a 60%, #1a2a1a 80%, #1e2e1a 100%
  );
}

/* Center runway markings */
.runway::after {
  content: '';
  position: absolute;
  top: 45%;
  left: 8%;
  right: 8%;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.25) 0px, rgba(255,255,255,0.25) 28px,
    transparent 28px, transparent 56px
  );
}

/* ── Taxiway lines ────────────────────────────────────────── */
.taxiway-lines {
  position: absolute;
  bottom: 10%;
  left: 5%;
  right: 50%;
  height: 2px;
  background: rgba(245, 158, 11, 0.25);
}

.taxiway-lines::before {
  content: '';
  position: absolute;
  right: 0;
  top: -40px;
  width: 2px;
  height: 42px;
  background: rgba(245, 158, 11, 0.25);
}

/* ── Runway edge lights ───────────────────────────────────── */
.runway-lights {
  position: absolute;
  bottom: 28%;
  left: 6%;
  right: 6%;
  display: flex;
  justify-content: space-between;
  padding: 0 2%;
}

.runway-lights span {
  width: 3px;
  height: 3px;
  background: #22c55e;
  border-radius: 0;
  box-shadow: 0 0 4px #22c55e, 0 0 8px rgba(34,197,94,0.3);
  animation: lightBlink 2s ease-in-out infinite alternate;
}

.runway-lights span:nth-child(even) {
  animation-delay: 0.7s;
}

.runway-lights span:nth-child(3n) {
  animation-delay: 1.4s;
}

@keyframes lightBlink {
  0%   { opacity: 0.3; }
  100% { opacity: 1; }
}

/* ── Approach lights (PAPI-style, left side) ──────────────── */
.approach-lights {
  position: absolute;
  bottom: 28%;
  left: 3%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.approach-lights span {
  width: 4px;
  height: 4px;
  border-radius: 0;
}

.approach-lights span:nth-child(1),
.approach-lights span:nth-child(2) {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.approach-lights span:nth-child(3),
.approach-lights span:nth-child(4) {
  background: #fff;
  box-shadow: 0 0 6px rgba(255,255,255,0.6);
}

/* ── Terminal building ────────────────────────────────────── */
.terminal {
  position: absolute;
  bottom: 28%;
  right: 6%;
  width: 160px;
  height: 55px;
  background: #222838;
  border: 2px solid #333d52;
  border-bottom: none;
}

/* Terminal windows — two rows */
.terminal::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 8px;
  right: 8px;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    #5b9bd5 0px, #5b9bd5 10px,
    transparent 10px, transparent 16px
  );
  box-shadow: 0 16px 0 0 #5b9bd5;
  background-size: 16px 100%;
  opacity: 0.7;
}

/* Terminal door + sign */
.terminal::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 22px;
  background: linear-gradient(180deg, rgba(245,158,11,0.6) 0%, rgba(245,158,11,0.8) 100%);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

/* ── Terminal roof ────────────────────────────────────────── */
.terminal-roof {
  position: absolute;
  bottom: calc(28% + 55px);
  right: calc(6% - 4px);
  width: 168px;
  height: 8px;
  background: linear-gradient(180deg, #3d4b63 0%, #333d52 100%);
  border: 1px solid #4a5568;
  border-bottom: none;
}

/* ── Control Tower ────────────────────────────────────────── */
.control-tower {
  position: absolute;
  bottom: 28%;
  right: calc(6% + 176px);
  width: 16px;
  height: 80px;
  background: linear-gradient(90deg, #2a3448 0%, #222838 50%, #1e2433 100%);
  border: 1px solid #333d52;
  border-bottom: none;
}

/* Tower cab — glass windows */
.control-tower::before {
  content: '';
  position: absolute;
  top: -18px;
  left: -12px;
  width: 40px;
  height: 18px;
  background: #1a2035;
  border: 1px solid #333d52;
  box-shadow: inset 2px 2px 0 0 #5b9bd5, inset -2px -2px 0 0 #5b9bd5, inset 2px -2px 0 0 #5b9bd5, inset -2px 2px 0 0 #5b9bd5;
}

/* Tower beacon */
.control-tower::after {
  content: '';
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 0;
  box-shadow: 0 0 6px #ef4444, 0 0 14px rgba(239,68,68,0.5);
  animation: beaconPulse 1.5s ease-in-out infinite;
}

@keyframes beaconPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #ef4444, 0 0 14px rgba(239,68,68,0.5); }
  50%      { opacity: 0.2; box-shadow: 0 0 3px #ef4444; }
}

/* ── Hangar (left side) ───────────────────────────────────── */
.hangar {
  position: absolute;
  bottom: 28%;
  left: 8%;
  width: 70px;
  height: 40px;
  background: #1e2433;
  border: 1px solid #2a3448;
  border-bottom: none;
  border-radius: 0 0 0 0;
}

/* Hangar curved roof */
.hangar::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -1px;
  width: 72px;
  height: 14px;
  background: #2a3448;
  border-radius: 50% 50% 0 0;
  border: 1px solid #333d52;
  border-bottom: none;
}

/* Hangar door */
.hangar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10px;
  width: 50px;
  height: 28px;
  background: rgba(30, 36, 51, 0.9);
  border: 1px solid #333d52;
  border-bottom: none;
  box-shadow: inset 0 0 8px rgba(245, 158, 11, 0.1);
}

/* ── Windsock ─────────────────────────────────────────────── */
.windsock {
  position: absolute;
  bottom: 28%;
  left: 28%;
  width: 2px;
  height: 28px;
  background: #6b7280;
}

.windsock::after {
  content: '';
  position: absolute;
  top: 0;
  left: 2px;
  width: 16px;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    #ef4444 0px, #ef4444 3px,
    #fff 3px, #fff 6px
  );
  animation: windsockWave 2.5s ease-in-out infinite;
  transform-origin: left center;
}

@keyframes windsockWave {
  0%, 100% { transform: scaleX(1) skewY(-3deg); }
  50%      { transform: scaleX(0.8) skewY(2deg); }
}

/* ── Planes ────────────────────────────────────────────────── */
.plane {
  position: absolute;
  width: 44px;
  height: 10px;
  background: linear-gradient(180deg, #e5e7eb 0%, #c8ccd4 100%);
  border-radius: 2px 6px 6px 2px;
}

/* Wings */
.plane::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 12px;
  width: 20px;
  height: 20px;
  background: linear-gradient(180deg, #d1d5db 0%, #a8adb8 100%);
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

/* Tail */
.plane::after {
  content: '';
  position: absolute;
  top: -7px;
  left: -1px;
  width: 8px;
  height: 8px;
  background: #b0b5c0;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

/* Plane 1: left→right, main plane */
.plane-1 {
  top: 25%;
  left: -70px;
  animation: flyAcross 20s linear infinite;
}

/* Nav lights */
.plane-1 {
  box-shadow: -1px 0 3px rgba(255,255,255,0.3);
}

/* Plane 2: right→left, distant */
.plane-2 {
  top: 14%;
  right: -60px;
  transform: scaleX(-1) scale(0.5);
  opacity: 0.4;
  animation: flyAcrossReverse 28s linear infinite 10s;
}

/* Plane taxiing */
.plane-taxi {
  bottom: 16%;
  left: -60px;
  transform: scale(0.7);
  opacity: 0.6;
  animation: taxiAcross 35s linear infinite 6s;
}

@keyframes flyAcross {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 140px)); }
}

@keyframes flyAcrossReverse {
  from { transform: scaleX(-1) scale(0.5) translateX(0); }
  to   { transform: scaleX(-1) scale(0.5) translateX(calc(100vw + 120px)); }
}

@keyframes taxiAcross {
  from { transform: scale(0.7) translateX(0); }
  to   { transform: scale(0.7) translateX(calc(100vw + 120px)); }
}

/* ── Ground vehicles ──────────────────────────────────────── */
.ground-vehicle {
  position: absolute;
  width: 18px;
  height: 8px;
  border-radius: 1px;
  bottom: 10%;
}

.ground-vehicle::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 2px;
  width: 3px;
  height: 3px;
  background: #1a1e28;
  box-shadow: 10px 0 0 #1a1e28;
}

.vehicle-1 {
  background: #f59e0b;
  left: -30px;
  animation: vehicleDrive 22s linear infinite 3s;
}

.vehicle-1::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 3px;
  height: 3px;
  background: #fbbf24;
  box-shadow: 0 0 5px #f59e0b;
  animation: lightBlink 0.6s ease-in-out infinite alternate;
}

.vehicle-2 {
  background: #60a5fa;
  left: -30px;
  bottom: 6%;
  animation: vehicleDrive 26s linear infinite 14s;
}

.vehicle-3 {
  background: #34d399;
  width: 24px;
  height: 10px;
  left: -40px;
  bottom: 13%;
  animation: vehicleDrive 30s linear infinite 8s;
}

.vehicle-3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 3px;
  width: 3px;
  height: 3px;
  background: #1a1e28;
  box-shadow: 14px 0 0 #1a1e28;
}

@keyframes vehicleDrive {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 80px)); }
}

/* ── Overlay for readability ──────────────────────────────── */
.airport-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center 35%,
    rgba(5, 8, 15, 0.15) 0%,
    rgba(5, 8, 15, 0.45) 100%
  );
  pointer-events: none;
}

/* ============================================================
   LOGIN FORM — Premium glassmorphic card
   ============================================================ */

/* Override pages.css form styles for elevated look */
.login-page form {
  background: rgba(18, 22, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  padding: 2.5rem 2.25rem 2rem;
  border-radius: 24px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  max-width: 420px;
  margin: 0 auto;
  animation: fadeInUp 0.5s ease-out;
}

/* Heading */
.login-page .auth-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

/* Subtitle */
.login-page .auth-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  margin-bottom: 1.75rem;
}

/* Google button — elevated */
.login-page .google-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 13px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.login-page .google-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

/* Input wrapper with icon — uses .login-field (not .input-group to avoid Bootstrap conflict) */
.login-page .login-field {
  position: relative;
  margin-bottom: 1rem;
}

.login-page .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
  pointer-events: none;
  transition: color 0.2s;
  z-index: 1;
}

.login-page .login-field:focus-within .input-icon {
  color: var(--dsc-accent);
}

.login-page .login-field input {
  display: block;
  width: 100%;
  padding: 14px 14px 14px 42px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: all 0.2s;
  margin-bottom: 0;
}

.login-page .login-field input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.login-page .login-field input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--dsc-accent);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.12), 0 2px 8px rgba(0, 0, 0, 0.15);
  outline: none;
}

/* Password toggle */
.login-page .password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  transition: color 0.2s;
  z-index: 1;
}

.login-page .password-toggle-btn:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* Submit button — gradient */
.login-page .login-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--dsc-primary) 0%, #0088cc 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0, 174, 239, 0.2);
  margin-top: 0.5rem;
}

.login-page .login-btn:hover {
  background: linear-gradient(135deg, var(--dsc-primary-hover) 0%, #00aeef 100%);
  box-shadow: 0 6px 24px rgba(0, 174, 239, 0.3);
  transform: translateY(-2px);
}

.login-page .login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 174, 239, 0.2);
}

/* Forgot password */
.login-page .forgot-link {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}

.login-page .forgot-link:hover {
  color: var(--dsc-accent);
}

/* Divider */
.login-page .auth-divider {
  margin: 1.25rem 0;
}

.login-page .auth-divider span {
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Auth footer */
.login-page .auth-footer {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

.login-page .auth-footer a {
  color: var(--dsc-accent);
  font-weight: 600;
}

/* Recaptcha — ensure widget is visible and clickable */
.login-page .recaptcha-container {
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.login-page .recaptcha-container .g-recaptcha {
  transform: none !important;
}

/* ── Form label — hide original labels, use placeholders ── */
.login-page .login-field .form-label {
  display: none;
}
