* {
  box-sizing: border-box;
}

:root {
  --bg: #050816;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --gold: #facc15;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --green: #22c55e;
  --danger: #ef4444;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.12), transparent 34%),
    radial-gradient(circle at 80% 10%, rgba(244, 114, 182, 0.14), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(250, 204, 21, 0.10), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app {
  width: min(1480px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.subtitle {
  max-width: 640px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  padding: 11px 15px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.24);
}

button.primary {
  background: linear-gradient(135deg, #14b8a6, #3b82f6);
  border-color: transparent;
}

button.danger {
  color: #fecaca;
}

.game-shell {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 26px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 30px 100px rgba(0,0,0,0.42);
}

.top-bar,
.bottom-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
}

.top-bar span,
.bottom-bar span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
}

#gold {
  color: var(--gold);
}

#gameCanvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: crosshair;
}

.tips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.tips article {
  padding: 16px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255,255,255,0.09);
}

.tips h3 {
  margin: 0 0 6px;
}

.tips p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 760px) {
  .hero {
    display: block;
  }

  .controls {
    justify-content: flex-start;
    margin-top: 16px;
  }

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


.dangerText {
  color: #fb7185 !important;
}

#gameCanvas {
  max-height: 78vh;
}
