/* Space Academy — Nexus Academy theme. No external IP. */

.wa-body {
  background: linear-gradient(160deg, #1e1b4b 0%, #312e81 35%, #4c1d95 70%, #2e1065 100%);
  min-height: 100vh;
  color: #e9d5ff;
}

.wa-app {
  max-width: 900px;
}

.wa-header .landing-nav a[aria-current="page"] {
  font-weight: 600;
  color: #c4b5fd;
}

/* Screens */
.wa-screen {
  padding: 1rem 0 2rem;
  min-height: 60vh;
}
.wa-screen[hidden] {
  display: none !important;
}

/* Title screen */
.wa-title-screen {
  text-align: center;
  padding-top: 3rem;
}
.wa-title-hero {
  margin-bottom: 1rem;
}
.wa-hero-sprite {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 0 16px rgba(34, 211, 238, 0.5)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}
.wa-title-heading {
  font-family: var(--font-display, "Fredoka", sans-serif);
  font-size: clamp(2rem, 6vw, 3rem);
  color: #f5f3ff;
  margin: 0 0 0.5rem;
  text-shadow: 0 0 20px rgba(196, 181, 253, 0.4);
}
.wa-title-sub {
  font-size: 1.1rem;
  color: #c4b5fd;
  margin: 0 0 1.25rem;
}

/* Progress strip: Credits + badges (title, mode, list) */
.wa-screen-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 2rem;
  padding: 0.65rem 1rem;
  background: rgba(49, 46, 129, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(196, 181, 253, 0.25);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.wa-house-points-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fde047;
  text-shadow: 0 0 12px rgba(253, 224, 71, 0.4);
  padding: 0.35rem 0.75rem;
  background: rgba(253, 224, 71, 0.15);
  border-radius: 999px;
  border: 1px solid rgba(253, 224, 71, 0.35);
}
.wa-badges-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2rem;
}
.wa-badges-strip--empty .wa-badges-count {
  font-size: 0.9rem;
  color: rgba(196, 181, 253, 0.75);
  font-style: italic;
}
.wa-badge-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4) 0%, rgba(139, 92, 246, 0.35) 100%);
  border: 1px solid rgba(196, 181, 253, 0.5);
  color: #e9d5ff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.wa-btn-begin {
  font-size: 1.25rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.wa-btn-begin:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.6);
}

/* Buttons */
.wa-btn {
  font-family: var(--font-body, "Outfit", sans-serif);
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.wa-btn:active {
  transform: scale(0.98);
}
.wa-btn-primary {
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
  color: #fff;
}
.wa-btn-primary:hover {
  filter: brightness(1.1);
}
.wa-btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #e9d5ff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.wa-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Mission screen */
.wa-mission-title {
  font-size: 1.35rem;
  color: #f5f3ff;
  margin: 0 0 0.35rem;
}
.wa-mission-intro {
  font-size: 0.95rem;
  color: #c4b5fd;
  margin: 0 0 0.75rem;
}
.wa-mission-constraints {
  font-size: 0.85rem;
  color: #a78bfa;
  margin-bottom: 0.75rem;
}
.wa-grid-wrap {
  display: inline-block;
  padding: 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  margin-bottom: 1rem;
}
.wa-grid {
  display: grid;
  gap: 2px;
  background: #374151;
  padding: 2px;
  border-radius: 6px;
}
.wa-cell {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: #6b7280;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Obstacles: bulkhead / debris / hazard (theme: space station) */
.wa-cell.wa-cell-wall {
  background: #374151;
  box-shadow: inset 0 0 0 2px #1f2937;
}
.wa-cell.wa-cell-goal {
  background: rgba(34, 211, 238, 0.25);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
  animation: wa-goal-pulse 1.5s ease-in-out infinite;
}
.wa-cell.wa-goal-hint {
  animation: none;
  box-shadow: 0 0 0 4px #fde047, 0 0 28px rgba(34, 211, 238, 1), 0 0 40px rgba(253, 224, 71, 0.6);
  background: rgba(34, 211, 238, 0.6);
  transform: scale(1.08);
  z-index: 1;
  position: relative;
}
@keyframes wa-goal-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(34, 211, 238, 0.6); }
  50% { box-shadow: 0 0 20px rgba(34, 211, 238, 0.9); }
}
.wa-cell.wa-cell-start {
  background: rgba(167, 139, 250, 0.2);
  position: relative;
}
.wa-start-direction {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: #e9d5ff;
  line-height: 1;
  pointer-events: none;
}
.wa-token {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  position: absolute;
  transition: left 0.25s ease, top 0.25s ease;
  z-index: 2;
}
.wa-token.wa-token-moving {
  transition: none;
}
.wa-token.wa-token-bonk {
  animation: wa-bonk 0.3s ease;
}
/* Token cosmetic variants (Hall of Relics) */
.wa-token.wa-token-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-color: #93c5fd;
}
.wa-token.wa-token-green {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  border-color: #86efac;
}
.wa-token.wa-token-gold {
  background: linear-gradient(135deg, #eab308 0%, #a16207 100%);
  border-color: #fde047;
}
@keyframes wa-bonk {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(3px, 0); }
  75% { transform: translate(-3px, 0); }
}
.wa-goal-orb,
.wa-goal-beacon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.8);
}
.wa-goal-beacon .wa-beacon-svg {
  width: 24px;
  height: 24px;
}
.wa-token {
  display: flex;
  align-items: center;
  justify-content: center;
}
.wa-token .wa-rover-svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
.wa-trail-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.7);
  pointer-events: none;
  animation: wa-trail-fade 0.6s ease-out forwards;
}
/* Trail cosmetic variants (Hall of Relics) */
.wa-trail-dot.wa-trail-teal {
  background: rgba(34, 211, 238, 0.8);
}
.wa-trail-dot.wa-trail-purple {
  background: rgba(192, 132, 252, 0.8);
}
@keyframes wa-trail-fade {
  to { opacity: 0; transform: scale(0.5); }
}

/* Hall of Relics screen */
.wa-hall-screen {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto;
}
.wa-hall-heading {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
  color: var(--wa-fg, #f8fafc);
}
.wa-hall-points {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}
.wa-hall-relics {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.wa-hall-relic-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.6rem 0.75rem;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.wa-hall-relic-item.wa-hall-relic-unlocked {
  border-color: rgba(34, 197, 94, 0.3);
}
.wa-hall-relic-item.wa-hall-relic-equipped {
  border-color: rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.2);
}
.wa-hall-relic-name {
  font-weight: 600;
  min-width: 100px;
}
.wa-hall-relic-status {
  font-size: 0.9rem;
  opacity: 0.9;
}
.wa-hall-equip {
  margin-left: auto;
  flex-shrink: 0;
}
.wa-hall-badges-title {
  font-size: 0.95rem;
  margin: 0.5rem 0 0.25rem 0;
  opacity: 0.9;
}
.wa-hall-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.wa-hall-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 6px;
  background: rgba(51, 65, 85, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: rgba(248, 250, 252, 0.7);
}
.wa-hall-badge.wa-hall-badge-earned {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}
.wa-hall-error {
  padding: 0.75rem;
  color: #fca5a5;
  font-size: 0.9rem;
  margin: 0;
}
.wa-hall-how-to-earn {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 0.85rem;
  line-height: 1.45;
  color: rgba(248, 250, 252, 0.85);
}
.wa-hall-how-title {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.95;
}
.wa-hall-how-to-earn p {
  margin: 0 0 0.5rem 0;
}
.wa-hall-how-to-earn p:last-child {
  margin-bottom: 0;
}
.wa-hall-badge-hint {
  font-weight: 600;
  color: rgba(251, 191, 36, 0.95);
}
.wa-success-burst {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fde047;
  pointer-events: none;
  animation: wa-burst 0.5s ease-out forwards;
}
@keyframes wa-burst {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.wa-tooltip {
  font-size: 0.95rem;
  color: #c4b5fd;
  margin: 0 0 0.75rem;
  line-height: 1.45;
  font-weight: 500;
}
.wa-palette-label,
.wa-spell-strip-label {
  font-size: 0.95rem;
  color: #e9d5ff;
  margin: 0 0 0.4rem;
  font-weight: 600;
}
.wa-rune-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: flex-end;
}
.wa-rune-palette-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.wa-rune-label {
  font-size: 0.8rem;
  color: #a78bfa;
  text-align: center;
  max-width: 80px;
}
.wa-rune-btn {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(124, 58, 237, 0.4);
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, background 0.1s;
}
.wa-rune-btn:hover {
  background: rgba(124, 58, 237, 0.7);
  transform: scale(1.05);
}
.wa-spell-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-height: 52px;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  margin-bottom: 1rem;
  align-items: center;
}
.wa-spell-strip-placeholder {
  font-size: 0.9rem;
  color: #a78bfa;
  font-style: italic;
}
.wa-spell-rune {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.wa-spell-rune:hover {
  background: rgba(139, 92, 246, 0.9);
}
.wa-cast-label {
  font-size: 0.95rem;
  color: #c4b5fd;
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.wa-mission-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.wa-btn-cast {
  font-size: 1.1rem;
  padding: 0.6rem 1.25rem;
}
.wa-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
}
.wa-feedback.wa-feedback-success {
  background: rgba(34, 197, 94, 0.25);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #bbf7d0;
}
.wa-feedback.wa-feedback-fail {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fecaca;
}

/* Success screen */
.wa-success-screen {
  text-align: center;
  padding-top: 2rem;
}
.wa-success-content {
  font-size: 1.15rem;
  color: #f5f3ff;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  cursor: pointer;
  padding: 0.5rem 0;
}
.wa-success-content:hover {
  color: #fff;
}
.wa-success-next-btn {
  display: inline-block;
  font-size: 1.1rem;
  padding: 0.65rem 1.5rem;
}
.wa-success-content .wa-house-points {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  color: #fde047;
}

/* Mode select */
.wa-mode-screen {
  padding-top: 1.5rem;
}
.wa-mode-heading {
  font-size: 1.5rem;
  color: #f5f3ff;
  margin: 0 0 0.5rem;
}
.wa-mode-sub {
  color: #c4b5fd;
  margin: 0 0 1.5rem;
}
.wa-mode-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}
.wa-mode-card {
  padding: 1rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(167, 139, 250, 0.4);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.wa-mode-card:hover {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(167, 139, 250, 0.7);
  transform: translateY(-2px);
}
.wa-mode-card h3 {
  font-size: 1.1rem;
  color: #f5f3ff;
  margin: 0 0 0.35rem;
}
.wa-mode-card p {
  font-size: 0.9rem;
  color: #c4b5fd;
  margin: 0;
}
.wa-mode-progress {
  font-size: 0.9rem;
  color: #a78bfa;
  margin: 0;
}

/* Mission list */
.wa-list-heading {
  font-size: 1.35rem;
  color: #f5f3ff;
  margin: 0 0 0.35rem;
}
.wa-list-sub {
  color: #c4b5fd;
  margin: 0 0 1rem;
}
.wa-mission-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.wa-mission-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.15s;
}
.wa-mission-list-item:hover {
  background: rgba(0, 0, 0, 0.35);
}
.wa-mission-list-item.wa-completed {
  border-color: rgba(34, 197, 94, 0.4);
}
.wa-mission-list-item .wa-mission-name {
  font-weight: 600;
  color: #f5f3ff;
}
.wa-mission-list-item .wa-mission-meta {
  font-size: 0.85rem;
  color: #a78bfa;
}

@media (max-width: 480px) {
  .wa-cell {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
  .wa-token {
    width: 26px;
    height: 26px;
  }
  .wa-rune-btn {
    width: 44px;
    height: 44px;
  }
}
