/* ===========================================================================
   QUANTA - game-specific styles. Shared HUD / end-banner / help primitives live
   in platform/ui.css; this file only carries QUANTA-specific pieces.
   =========================================================================== */

.quanta-root {
  width: 100%;
  height: 100%;
}

/* --- Setup screen --------------------------------------------------------- */
.quanta-setup {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px;
  text-align: center;
}
.quanta-setup-h {
  font-size: 54px;
  letter-spacing: 16px;
  margin: 8px 0 4px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.quanta-setup-p {
  color: var(--muted);
  margin: 0 0 28px;
}
.quanta-setup-block {
  margin: 22px 0;
}
.quanta-setup-block h3 {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}
.quanta-choice-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.quanta-choice {
  flex: 1 1 150px;
  max-width: 200px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s, transform 0.1s, background 0.15s;
}
.quanta-choice:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.quanta-choice.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--panel));
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.quanta-choice-title {
  font-weight: 700;
  font-size: 16px;
}
.quanta-choice-sub {
  font-size: 12px;
  color: var(--muted);
}
.quanta-hint {
  color: var(--muted);
  font-size: 13px;
  max-width: 480px;
  margin: 18px auto 0;
  line-height: 1.6;
}
.quanta-hint b {
  color: var(--text);
  background: var(--border);
  padding: 1px 6px;
  border-radius: 4px;
}
.quanta-start {
  margin-top: 22px;
  font-size: 17px;
  padding: 14px 34px;
}

/* --- Game layout ---------------------------------------------------------- */
.quanta-game {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px;
}
.quanta-board-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}
.quanta-canvas {
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  background: #000;
  cursor: pointer;
  /* Touch: rotations should not pan/zoom the page, and no long-press menu. */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* --- HUD (QUANTA-specific bits) ------------------------------------------- */
.quanta-hud {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.quanta-message {
  min-height: 20px;
  color: var(--accent);
  font-size: 14px;
  font-style: italic;
}

/* --- End banner (in-board) ------------------------------------------------ */
.quanta-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 6, 12, 0.82);
  border-radius: 16px;
  backdrop-filter: blur(4px);
}
.quanta-stars {
  font-size: 34px;
  letter-spacing: 6px;
  color: var(--warn);
  margin: 4px 0 14px;
  text-shadow: 0 0 16px color-mix(in srgb, var(--warn) 60%, transparent);
}

/* --- Help overlay --------------------------------------------------------- */
.quanta-help {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 9, 0.8);
  backdrop-filter: blur(6px);
  padding: 20px;
}
.quanta-help-card {
  position: relative;
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}
.quanta-help-card h2 {
  margin-top: 0;
  color: var(--accent);
  letter-spacing: 3px;
}
.quanta-help-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 820px) {
  .quanta-game {
    grid-template-columns: 1fr;
  }
  /* Board first, HUD below it on narrow screens. */
  .quanta-board-wrap {
    order: -1;
  }
}
