:root {
  --primary: #2563eb;
  --bg-dark: #050505;
  --text: #ffffff;
  --panel: #111111;
  --line: #262626;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Courier New', Courier, monospace;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 12%, #1a1a1a 0, transparent 38%),
    radial-gradient(circle at 86% 88%, #101010 0, transparent 34%), var(--bg-dark);
  touch-action: manipulation;
}
.game-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 14px 18px;
}
.screen {
  width: min(540px, 100%);
}
.hidden {
  display: none !important;
}
.card-lite {
  border-radius: 14px;
  border: 2px solid var(--line);
}

/* 3DIMLI Dialog (dark variant) — matches Ui/components/Dialog.tsx DialogContent */
.card {
  background: hsl(240 10% 3.9%);
  color: hsl(0 0% 98%);
  border: 1px solid hsl(240 3.7% 15.9%);
  border-radius: 0.5rem;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.5),
    0 4px 6px -4px rgba(0, 0, 0, 0.5);
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
  max-width: 32rem;
  margin: 0 auto;
  text-align: left;
}
.card h1,
.card h2 {
  margin: 0;
  color: hsl(0 0% 98%);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  text-transform: none;
  text-shadow: none;
}
.card p {
  margin: 0;
  color: hsl(240 5% 64.9%);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
}
.card .result-line {
  color: hsl(0 0% 98%);
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}
.card button {
  justify-self: end;
  margin-top: 0.5rem;
}

/* Matches 3DIMLI ExploreButton (dark variant) */
button {
  background: transparent;
  color: #d4d4d4;
  border: 1px solid #404040;
  border-radius: 9999px;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.15s ease;
}
button:hover {
  background-color: #262626;
  color: #f5f5f5;
  border-color: #525252;
  transform: translateY(-1px);
}
button:active {
  transform: translateY(0);
  filter: brightness(0.95);
}
.hud {
  background: linear-gradient(180deg, #121212, #090909);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 0.92rem;
}
.hud span {
  color: var(--primary);
  font-weight: 700;
}
.canvas-wrap {
  background: linear-gradient(180deg, #101010, #080808);
  padding: 10px;
}
#gameCanvas {
  width: 100%;
  display: block;
  background: var(--bg-dark);
  border-radius: 10px;
}
.legend {
  margin: 10px 0 0;
  color: #9f9f9f;
  font-size: 0.82rem;
  text-align: center;
}
.result-line {
  font-size: 1.05rem;
}
@media (max-width: 600px) {
  .game-shell {
    align-items: center;
    padding: 72px 16px;
  }
  .screen {
    width: min(460px, 100%);
  }
  .hud {
    font-size: 0.85rem;
    gap: 6px 10px;
  }
}
