/* Altair — game styles. The flight itself is one canvas; these are the overlays on top of it. */

.fa-stage { background: var(--lapis-deep); }
#game {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* "Tap to fly" card under the hovering bird. Never catches taps: the stage behind it does. */
.al-hud {
  position: absolute;
  left: 0; right: 0;
  top: 55%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.18s linear, transform 0.3s var(--ease-out);
}
.al-hud.is-off { opacity: 0; transform: translateY(8px); }
.al-hud p { max-width: 100%; }
.al-tap { position: relative; width: 42px; height: 42px; margin-bottom: 2px; }
.al-tap::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px rgba(232, 182, 90, 0.75);
  animation: al-press 1.4s ease-in-out infinite;
}
.al-tap::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(232, 182, 90, 0.8);
  opacity: 0;
  animation: al-ring 1.4s ease-out infinite;
}
.al-hud.is-hold .al-tap::after { box-shadow: inset 0 0 0 2px rgba(242, 234, 216, 0.75); }
.al-hud.is-hold .al-hud__title {
  padding: 6px 18px 8px;
  border-radius: 999px;
  background: rgba(7, 13, 44, 0.66);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 1.35rem;
}
@keyframes al-press { 0%, 100% { transform: scale(1); } 16% { transform: scale(0.7); } 36% { transform: scale(1); } }
@keyframes al-ring { 0%, 14% { transform: scale(0.4); opacity: 0; } 24% { opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }

.al-hud__title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--parchment);
  text-shadow: 0 2px 16px rgba(7, 13, 44, 0.95), 0 0 3px rgba(7, 13, 44, 0.9);
}
.al-hud__sub {
  font-size: 0.88rem;
  font-weight: 550;
  color: var(--mist);
  text-shadow: 0 1px 8px rgba(7, 13, 44, 1), 0 0 2px rgba(7, 13, 44, 1);
}
.al-hud__ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: rgba(7, 13, 44, 0.66);
  box-shadow: inset 0 0 0 1px rgba(180, 186, 219, 0.28);
  color: #C9D5FF;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
}
.al-hud__ghost svg { flex: none; width: 22px; height: 17px; color: #9DB5F2; }
.al-hud__ghost.is-first svg { color: var(--gold); }
.al-hud__ghost.is-first { color: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--hairline); }
[dir="rtl"] .al-hud__ghost svg { transform: scaleX(-1); }
.al-hud [hidden] { display: none; }

/* Short in-flight messages (medal, passing the ghost). JS adds and removes .is-on. */
.al-banner {
  position: absolute;
  left: 0; right: 0;
  top: 18%;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s linear;
}
.al-banner span {
  max-width: 100%;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(7, 13, 44, 0.74);
  box-shadow: inset 0 0 0 1px rgba(232, 182, 90, 0.5);
  color: var(--gold-soft);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
}
.al-banner.is-on { opacity: 1; animation: al-banner 0.36s var(--ease-out); }
@keyframes al-banner { from { opacity: 0; transform: translateY(8px) scale(0.94); } to { opacity: 1; transform: none; } }

/* Panels */
.al-cover { width: 200px; height: 150px; }
.al-medal { width: 80px; height: 88px; animation: al-medal 0.55s var(--ease-out) 0.08s both; }
@keyframes al-medal { from { opacity: 0; transform: scale(0.45) rotate(-24deg); } to { opacity: 1; transform: none; } }
.fa-panel .al-medal-name { margin-bottom: 2px; }
.al-next {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--mist);
  font-size: 0.9rem;
  font-weight: 550;
}
.al-next__bar {
  width: 100%;
  max-width: 236px;
  height: 6px;
  border-radius: 3px;
  background: rgba(242, 234, 216, 0.1);
  overflow: hidden;
}
.al-next__bar > span {
  display: block;
  height: 100%;
  min-width: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #C38A37, var(--gold-soft));
}
[dir="rtl"] .al-next__bar > span { background: linear-gradient(270deg, #C38A37, var(--gold-soft)); }
.al-over .fa-panel__text { margin-bottom: 14px; }
.al-over .fa-panel__title { margin-bottom: 6px; }
.al-locked .fa-btn { pointer-events: none; }

@media (max-height: 620px) {
  .al-cover { width: 128px; height: 96px; }
  .al-medal { width: 62px; height: 68px; }
  .al-over .fa-panel { padding-top: 20px; }
  .al-over .fa-panel__art { margin-bottom: 6px; }
  .al-over .fa-stats { margin-bottom: 14px; }
  .al-over .fa-stats dd { font-size: 1.3rem; }
  .al-start .fa-panel { padding: 18px 18px 16px; }
  .al-start .fa-panel__art { margin-bottom: 6px; }
  .al-start .fa-panel__title { font-size: 1.65rem; margin-bottom: 4px; }
  .al-start .fa-panel__text { font-size: 0.9rem; margin-bottom: 12px; }
  .al-start .fa-howto { gap: 6px; margin-bottom: 14px; font-size: 0.9rem; line-height: 1.38; }
}
@media (max-height: 420px) {
  .al-hud { gap: 4px; }
  .al-tap { width: 32px; height: 32px; }
  .al-hud__title { font-size: 1.35rem; }
  .al-cover, .al-medal { display: none; }
}

@media (max-height: 420px) {
  .al-over .fa-panel { padding: 12px 18px 12px; }
  .al-over .fa-panel__title { font-size: 1.6rem; margin-bottom: 2px; }
  .al-over .fa-panel__text { margin-bottom: 6px; font-size: 0.88rem; }
  .al-next { gap: 4px; font-size: 0.8rem; margin-bottom: 0; }
  .al-over .fa-stats { margin-bottom: 8px; gap: 6px; }
  .al-over .fa-stats dd { font-size: 1.1rem; }
  .al-over .fa-stats > * { padding: 6px 4px; }
  .al-over .fa-btn { min-height: 44px; }
  .al-start .fa-howto li:nth-child(n+3) { display: none; }
}
