:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --border: #2d3a4d;
  --text: #e8eef4;
  --muted: #8b9cb3;
  --accent: #3ecf8e;
  --accent-dim: #2a9d6a;
  --danger: #e85d75;
  --food: #f4a261;
  --grid-line: rgba(255, 255, 255, 0.04);
  font-family: "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #1e3a5f 0%, var(--bg) 55%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.app {
  width: 100%;
  max-width: 440px;
}

.header {
  text-align: center;
  margin-bottom: 1rem;
}

.header h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.stats strong {
  color: var(--accent);
  font-weight: 600;
}

#game {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #0d1117;
  border: 1px solid var(--border);
}

.overlay {
  position: absolute;
  inset: 1rem;
  top: calc(1rem + 2.25rem);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.88);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.overlay.hidden {
  display: none;
}

.overlay-card {
  text-align: center;
  padding: 1.5rem;
  max-width: 280px;
}

.overlay-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.overlay-card p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.btn {
  appearance: none;
  border: none;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #061208;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(62, 207, 142, 0.35);
}

.btn:active {
  transform: translateY(0);
}

.footer {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
