/* ==========================================================================
   EASTER EGG: PARAPENTE EN IQUIQUE - CAZA DE PATOS YECOS (MINIJUEGO HUD)
   ========================================================================== */

/* Puntero e indicador sutil en la sección de ruta */
.route-section,
.route-map {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.easter-egg-hint-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(7, 25, 26, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(215, 255, 85, 0.4);
  color: #fff;
  font-family: 'Space Grotesk', Manrope, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  opacity: 0.88;
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  z-index: 5;
}

.easter-egg-hint-badge .hint-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d7ff55;
  box-shadow: 0 0 8px #d7ff55;
  animation: eggDotPulse 1.8s infinite alternate;
}

@keyframes eggDotPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #d7ff55; }
}

.route-map:hover .easter-egg-hint-badge {
  opacity: 1;
  transform: translateY(-2px);
  border-color: rgba(215, 255, 85, 0.8);
}

/* MODAL OVERLAY BACKDROP */
.flight-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 18, 19, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.flight-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* MODAL CONTAINER */
.flight-modal-container {
  background: linear-gradient(165deg, #092123 0%, #061718 100%);
  border: 1px solid rgba(215, 255, 85, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(215, 255, 85, 0.12);
  border-radius: 16px;
  width: 100%;
  max-width: 820px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
  font-family: 'Space Grotesk', Manrope, -apple-system, BlinkMacSystemFont, sans-serif;
}

.flight-modal.active .flight-modal-container {
  transform: scale(1) translateY(0);
}

/* CABINA / HEADER DE AVIACIÓN */
.flight-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(7, 25, 26, 0.9);
  border-bottom: 1px solid rgba(80, 110, 100, 0.3);
  position: relative;
  z-index: 10;
}

.flight-hud-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-radar-icon {
  width: 24px;
  height: 24px;
  color: #d7ff55;
  animation: radarRotate 4s linear infinite;
}

@keyframes radarRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.flight-hud-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
}

.flight-hud-tag {
  font-size: 10px;
  font-weight: 800;
  background: rgba(215, 255, 85, 0.18);
  color: #d7ff55;
  border: 1px solid rgba(215, 255, 85, 0.45);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.flight-hud-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}

.hud-btn:hover {
  background: rgba(215, 255, 85, 0.2);
  border-color: #d7ff55;
  color: #d7ff55;
  transform: translateY(-1px);
}

.hud-btn-close:hover {
  background: rgba(255, 75, 75, 0.25);
  border-color: #ff5252;
  color: #ff7676;
}

/* TELEMETRÍA SUPERIOR */
.flight-telemetry-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(80, 110, 100, 0.25);
  border-bottom: 1px solid rgba(80, 110, 100, 0.3);
  font-size: 12px;
}

.telemetry-cell {
  background: rgba(9, 28, 29, 0.85);
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.telemetry-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.telemetry-val {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.telemetry-timer.danger {
  color: #ff4757;
  animation: timerWarning 0.6s infinite alternate;
}

@keyframes timerWarning {
  0% { transform: scale(1); text-shadow: 0 0 4px #ff4757; }
  100% { transform: scale(1.06); text-shadow: 0 0 12px #ff4757; }
}

.telemetry-score {
  color: #d7ff55;
}

.telemetry-combo {
  font-size: 11px;
  color: #ff6b35;
  font-weight: 700;
  margin-left: 4px;
}

/* ÁREA DE JUEGO (CANVAS VIEWPORT) */
.flight-game-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 480px;
  background: #061718;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.flight-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* PANTALLAS SUPERPUESTAS (OVERLAYS) */
.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 21, 22, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  z-index: 20;
  transition: opacity 0.3s ease;
}

.game-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}

/* START SCREEN */
.start-graphic {
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
  filter: drop-shadow(0 6px 16px rgba(215, 255, 85, 0.35));
  animation: gliderHover 2.4s ease-in-out infinite alternate;
}

@keyframes gliderHover {
  0% { transform: translateY(0) rotate(-2deg); }
  100% { transform: translateY(-8px) rotate(2deg); }
}

.game-overlay h2 {
  font-size: clamp(22px, 3.8vw, 30px);
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
  letter-spacing: -0.03em;
}

.game-overlay h2 em {
  font-style: normal;
  color: #d7ff55;
}

.game-overlay p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  max-width: 480px;
  line-height: 1.5;
  margin: 0 0 20px;
}

.flight-instructions-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(80, 110, 100, 0.35);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 22px;
  max-width: 440px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 14px;
}

.instruction-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #e5f4f1;
}

.key-badge {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 700;
  color: #d7ff55;
  box-shadow: 0 2px 0 rgba(0,0,0,0.5);
}

.btn-game-primary {
  background: #d7ff55;
  color: #07191a;
  border: none;
  font-family: inherit;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  padding: 13px 32px;
  border-radius: 40px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(215, 255, 85, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-game-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 30px rgba(215, 255, 85, 0.55);
  background: #e3ff7a;
}

.btn-game-primary:active {
  transform: translateY(0) scale(0.98);
}

/* GAME OVER SCREEN */
.game-over-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0, 200, 179, 0.2);
  color: #00c8b3;
  border: 1px solid rgba(0, 200, 179, 0.4);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.game-results-card {
  background: rgba(9, 28, 29, 0.85);
  border: 1px solid rgba(215, 255, 85, 0.3);
  border-radius: 12px;
  padding: 16px 24px;
  margin: 14px 0 20px;
  width: 100%;
  max-width: 420px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: left;
}

.res-stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
}

.res-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.res-stat-val.highlight {
  color: #d7ff55;
}

.res-rank-banner {
  grid-column: span 2;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.res-rank-icon {
  font-size: 26px;
}

.res-rank-title {
  font-size: 14px;
  font-weight: 800;
  color: #00c8b3;
}

.res-rank-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}

.game-actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-game-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s ease;
}

.btn-game-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: #fff;
  transform: translateY(-1px);
}

.btn-game-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-game-whatsapp:hover {
  background: #22bf5b;
  transform: translateY(-1px);
}

/* CONTROLES TÁCTILES EN PANTALLA (MOBILE TOUCH CONTROLS) */
.flight-touch-controls {
  display: none;
  background: rgba(7, 22, 23, 0.95);
  border-top: 1px solid rgba(80, 110, 100, 0.3);
  padding: 12px 20px;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.touch-steer-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(215, 255, 85, 0.35);
  color: #fff;
  padding: 16px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.1s ease, transform 0.1s ease, border-color 0.1s ease;
}

.touch-steer-btn:active,
.touch-steer-btn.is-pressed {
  background: rgba(215, 255, 85, 0.3);
  border-color: #d7ff55;
  color: #d7ff55;
  transform: scale(0.96);
}

/* ADAPTACIÓN RESPONSIVA */
@media (max-width: 768px) {
  .flight-telemetry-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .telemetry-cell {
    padding: 6px 12px;
  }
  
  .telemetry-val {
    font-size: 15px;
  }

  .flight-touch-controls {
    display: flex;
  }

  .flight-game-viewport {
    aspect-ratio: 4 / 3;
  }

  .game-overlay {
    padding: 16px;
  }

  .game-overlay h2 {
    font-size: 20px;
  }

  .flight-instructions-box {
    margin-bottom: 14px;
    padding: 8px 12px;
  }

  .btn-game-primary {
    padding: 11px 24px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .flight-modal {
    padding: 0;
  }

  .flight-modal-container {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: none;
  }

  .flight-game-viewport {
    flex: 1;
    max-height: none;
  }
}
