.game-shell {
  max-width: 1360px;
  position: relative;
}

.game-header {
  margin-bottom: 12px;
}

.start-screen {
  min-height: 300px;
  margin-bottom: 14px;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 22px;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 34%, rgba(109, 240, 166, 0.22), transparent 24%),
    radial-gradient(circle at 22% 16%, rgba(243, 189, 77, 0.18), transparent 28%),
    linear-gradient(100deg, rgba(7, 22, 34, 0.98), rgba(9, 45, 54, 0.94));
}

.start-screen::before {
  content: "VAULT DEFENSE";
  position: absolute;
  right: -14px;
  bottom: 8px;
  color: rgba(238, 249, 255, 0.055);
  font-size: clamp(3rem, 11vw, 8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  pointer-events: none;
}

.start-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(22, 216, 199, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(22, 216, 199, 0.10) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.40;
}

.start-screen.is-cleared {
  display: none;
}

.start-copy {
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.start-copy h1 {
  max-width: 820px;
  font-size: clamp(2rem, 5vw, 4.7rem);
  line-height: 0.95;
}

.start-copy p {
  max-width: 760px;
  color: var(--muted);
}

.mission-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mission-rules li {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  padding: 8px 10px;
  font-weight: 700;
}

.player-badge-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 10px;
  align-items: stretch;
}

.badge-token {
  min-height: 96px;
  border-radius: 8px;
  border: 1px solid rgba(123, 211, 234, 0.26);
  background:
    radial-gradient(circle at 50% 20%, rgba(243, 189, 77, 0.20), transparent 42%),
    rgba(255, 255, 255, 0.06);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.badge-token .badge-medal {
  width: 42px;
  height: 42px;
}

.badge-token .ui-icon {
  width: 24px;
  height: 24px;
}

.badge-token span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-token strong {
  font-size: 0.82rem;
  line-height: 1.15;
}

.badge-token.locked {
  opacity: 0.68;
  filter: grayscale(0.45);
}

.badge-token.active {
  border-color: rgba(243, 189, 77, 0.48);
  box-shadow: inset 0 0 24px rgba(243, 189, 77, 0.10);
}

.badge-disclaimer {
  max-width: 760px;
  color: var(--muted);
  font-size: 0.9rem;
}

.vault-core-preview {
  width: 210px;
  height: 210px;
  display: grid;
  place-items: center;
  position: relative;
  justify-self: center;
  z-index: 1;
}

.vault-ring {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 2px solid rgba(22, 216, 199, 0.32);
  box-shadow: 0 0 42px rgba(22, 216, 199, 0.18);
}

.vault-ring::before,
.vault-ring::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 2px dashed rgba(182, 129, 34, 0.55);
  animation: spin-vault 7s linear infinite;
}

.vault-ring::after {
  inset: 54px;
  border-color: rgba(31, 122, 79, 0.45);
  animation-duration: 4.8s;
  animation-direction: reverse;
}

.vault-core {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 35%, #178b91, var(--navy));
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 0 10px rgba(22, 216, 199, 0.12), 0 0 30px rgba(22, 216, 199, 0.24);
}

.start-button {
  align-self: end;
  justify-self: start;
}

.mission-hud {
  display: grid;
  grid-template-columns: repeat(8, minmax(96px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.hud-cell {
  min-height: 70px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 56, 72, 0.94), rgba(8, 26, 39, 0.94));
  border: 1px solid var(--line);
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.hud-cell span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hud-cell strong {
  display: block;
  margin-top: 8px;
  font-size: 1.16rem;
  color: var(--gold);
}

.vault-banner {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin-bottom: 12px;
  background:
    linear-gradient(90deg, rgba(22, 216, 199, 0.10), transparent 55%),
    var(--panel);
}

.vault-symbol {
  width: 132px;
  height: 100px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 35%, rgba(22, 216, 199, 0.24), transparent 36%),
    var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  box-shadow: 0 0 0 8px rgba(22, 216, 199, 0.10), 0 0 30px rgba(22, 216, 199, 0.16);
}

.vault-symbol::before {
  content: "";
  position: absolute;
  width: 50px;
  height: 34px;
  border: 8px solid var(--teal);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  top: -28px;
  left: 41px;
}

.vault-symbol span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
}

.vault-progress-copy {
  display: grid;
  gap: 10px;
}

.vault-progress-copy h1 {
  font-size: clamp(1.5rem, 3vw, 2.45rem);
  line-height: 1.05;
}

.vault-progress-copy p {
  color: var(--muted);
}

.wave-rail {
  padding: 12px;
  margin-bottom: 12px;
  display: grid;
  gap: 10px;
}

.wave-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.wave-node {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  font-weight: 700;
}

.wave-node.active {
  background: var(--gold-soft);
  color: #725014;
  border-color: rgba(182, 129, 34, 0.35);
}

.wave-node.correct {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(31, 122, 79, 0.28);
}

.wave-node.incorrect {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(180, 59, 59, 0.28);
}

.challenge-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.question-panel {
  padding: 22px;
  display: grid;
  gap: 16px;
  background:
    radial-gradient(circle at 86% 8%, rgba(243, 189, 77, 0.10), transparent 28%),
    var(--panel);
}

.question-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.question-count {
  color: var(--muted);
  font-weight: 700;
}

.question-panel h2 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.05;
}

.scenario-text {
  color: var(--ink);
  font-size: 1.08rem;
}

.answers {
  display: grid;
  gap: 10px;
}

.answer-button {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 42px 30px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.answer-button:hover,
.answer-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--gold);
  background: var(--gold-soft);
}

.answer-key {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(22, 216, 199, 0.14);
  color: var(--ink);
  font-weight: 700;
}

.answer-state {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.answer-state .ui-icon {
  width: 18px;
  height: 18px;
}

.answer-button.correct .answer-state {
  color: var(--green);
  background: rgba(109, 240, 166, 0.14);
}

.answer-button.incorrect .answer-state {
  color: var(--red);
  background: rgba(255, 111, 115, 0.14);
}

.answer-button.correct {
  border-color: rgba(31, 122, 79, 0.35);
  background: var(--green-soft);
}

.answer-button.incorrect {
  border-color: rgba(180, 59, 59, 0.35);
  background: var(--red-soft);
}

.answer-button:disabled {
  cursor: default;
}

.feedback-box {
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.055);
  border-left: 5px solid var(--teal);
  color: var(--muted);
}

.feedback-box.correct {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.feedback-box.incorrect {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.question-actions {
  display: flex;
  justify-content: flex-end;
}

.side-panel {
  display: grid;
  gap: 12px;
}

.progress-card {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.progress-card h2 {
  margin-top: 4px;
  font-size: 1.16rem;
}

.progress-list {
  display: grid;
  gap: 8px;
}

.progress-item {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.progress-item.current {
  background: var(--gold-soft);
  border-color: rgba(182, 129, 34, 0.35);
  color: #725014;
}

.progress-item.correct {
  background: var(--green-soft);
  border-color: rgba(31, 122, 79, 0.28);
  color: var(--green);
}

.progress-item.incorrect {
  background: var(--red-soft);
  border-color: rgba(180, 59, 59, 0.28);
  color: var(--red);
}

.combo-card {
  border-color: rgba(182, 129, 34, 0.32);
}

.combo-card p {
  color: var(--muted);
}

.combo-meter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.combo-meter span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
}

.combo-meter span.active {
  color: #071622;
  background: var(--gold);
  border-color: rgba(243, 189, 77, 0.65);
  box-shadow: 0 0 18px rgba(243, 189, 77, 0.24);
}

.result-panel {
  margin-top: 14px;
}

.result-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.result-breakdown div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 12px;
}

.result-breakdown span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.result-breakdown strong {
  display: block;
  margin-top: 5px;
}

.player-badge-card p {
  color: var(--muted);
}

.compact-badges {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.compact-badges .badge-medal {
  width: 44px;
  height: 44px;
  box-shadow: 0 0 22px rgba(243, 189, 77, 0.20);
}

.compact-badges .ui-icon {
  width: 24px;
  height: 24px;
}

@keyframes spin-vault {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1120px) {
  .mission-hud {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .challenge-grid {
    grid-template-columns: 1fr;
  }

  .side-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .start-screen,
  .vault-banner,
  .side-panel,
  .mission-hud,
  .result-breakdown {
    grid-template-columns: 1fr;
  }

  .player-badge-strip {
    grid-template-columns: 1fr;
  }

  .wave-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .question-panel {
    padding: 14px;
  }

  .question-actions,
  .question-actions .button,
  .wave-track {
    width: 100%;
    grid-template-columns: 1fr;
  }
}
