:root {
  --navy: #07162f;
  --ink: #eaf4ff;
  --cyan: #63e7f4;
  --yellow: #ffe66b;
  --pink: #ff6f91;
  --panel: #10254a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 70% 5%, #1c4f82 0, transparent 28%),
    linear-gradient(140deg, #07162f, #0b2445 65%, #102b4f);
}
button {
  font: inherit;
  cursor: pointer;
}
.page-shell {
  width: min(100%, 1100px);
  margin: auto;
  padding: 22px 20px 30px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 25px;
}
.brand {
  color: var(--cyan);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.02em;
}
header p {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  font-weight: bold;
}
header span {
  color: var(--yellow);
}
.panel {
  border: 1px solid #4382a3;
  border-radius: 25px;
  background: linear-gradient(
    125deg,
    rgba(16, 37, 74, 0.97),
    rgba(10, 29, 58, 0.92)
  );
  box-shadow: 0 18px 55px #0006;
}
.start-panel {
  min-height: 500px;
  padding: clamp(28px, 6vw, 68px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 35px;
}
.eyebrow,
.picker-title {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 0.78rem;
  letter-spacing: 0.17em;
  font-weight: bold;
}
h1 {
  font-size: clamp(3.6rem, 8vw, 6.9rem);
  line-height: 0.78;
  letter-spacing: -0.09em;
  margin: 0;
}
h1 em {
  color: var(--cyan);
  font-style: normal;
}
.lede {
  max-width: 460px;
  line-height: 1.55;
  color: #c4d9ed;
  margin: 30px 0 0;
}
.pilot-picker {
  padding: 25px;
  background: #071b38a8;
  border: 1px solid #2e6385;
  border-radius: 18px;
}
.pilot-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.pilot-option {
  border: 2px solid transparent;
  border-radius: 12px;
  background: #17365e;
  color: var(--ink);
  padding: 8px 2px;
  transition: 0.15s;
}
.pilot-option:hover,
.pilot-option.selected {
  border-color: var(--yellow);
  background: #24517a;
  transform: translateY(-2px);
}
.avatar {
  width: 44px;
  height: 44px;
  margin: auto auto 5px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(145deg, #f7ab77, #834e57);
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pilot-option span {
  display: block;
  font-size: 0.7rem;
  font-weight: bold;
}
.asset-note {
  margin: 18px 0 0;
  color: #a8c7df;
  line-height: 1.35;
  font-size: 0.78rem;
}
.asset-note code {
  color: var(--cyan);
}
.primary-button {
  grid-column: 1/-1;
  justify-self: center;
  min-width: 245px;
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  background: var(--yellow);
  color: #102344;
  font-weight: 900;
  box-shadow: 0 4px 0 #d2a900;
}
.primary-button:hover {
  transform: translateY(-2px);
}
.primary-button span {
  padding-left: 16px;
  font-size: 1.2em;
}
.controls-copy {
  grid-column: 1/-1;
  text-align: center;
  margin: 0;
  color: #a8c7df;
  font-size: 0.76rem;
  line-height: 1.5;
}
.hidden {
  display: none !important;
}
.game-wrap {
  max-width: 930px;
  margin: auto;
}
.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.hud > div {
  padding: 8px 12px;
  border-radius: 9px;
  background: #0c2749;
  border: 1px solid #285f80;
}
.hud-label {
  display: block;
  color: #8bbbd7;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}
.hud strong {
  color: #fff;
}
.lives strong {
  color: var(--pink);
  letter-spacing: 2px;
}
.canvas-frame {
  position: relative;
  overflow: hidden;
  border: 2px solid #4b9abe;
  border-radius: 16px;
  background: #04162f;
  box-shadow: 0 16px 44px #0007;
}
.canvas-frame canvas {
  display: block;
  width: 100%;
  aspect-ratio: 3/2;
  touch-action: none;
}
.message-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-content: center;
  text-align: center;
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 3rem);
  text-shadow: 0 3px 0 #061225;
}
.message-overlay small {
  display: block;
  padding-top: 10px;
  font-size: 0.35em;
  color: var(--yellow);
  letter-spacing: 0.08em;
}
.mobile-controls {
  display: none;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 7px;
  margin: 14px auto;
  max-width: 310px;
}
.mobile-controls button {
  min-height: 50px;
  border: 1px solid #58a4c8;
  border-radius: 13px;
  color: #fff;
  font-size: 1.5rem;
  background: #133c66;
}
.mobile-controls #fireButton {
  color: #132640;
  background: var(--yellow);
}
.game-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}
.secondary-button,
.text-button {
  border: 0;
  background: transparent;
  color: #c6e9fb;
  padding: 9px;
}
.secondary-button {
  border: 1px solid #5994b5;
  border-radius: 999px;
}
.text-button {
  text-decoration: underline;
}
@media (max-width: 650px) {
  .page-shell {
    padding: 15px 12px 24px;
  }
  header p {
    display: none;
  }
  .pilot-picker {
    padding: 16px 4px;
  }
  .start-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: 30px 22px;
    gap: 28px;
  }
  h1 {
    font-size: 4.4rem;
  }
  .mobile-controls {
    display: grid;
  }
  .hud {
    gap: 5px;
  }
  .hud > div {
    padding: 7px;
  }
  .hud strong {
    font-size: 0.85rem;
  }
  .lives strong {
    letter-spacing: 0;
  }
  .canvas-frame {
    border-radius: 12px;
  }
  .controls-copy {
    font-size: 0.7rem;
  }
}
