:root {
  --bg: #f3efe4;
  --panel: rgba(252, 249, 242, 0.88);
  --panel-border: rgba(53, 44, 33, 0.12);
  --text: #2d2418;
  --muted: #6a5a45;
  --accent: #d95d39;
  --accent-dark: #7a2e1e;
  --grid: #d8ccb6;
  --snake: #2f7d4f;
  --snake-head: #174f31;
  --food: #ff8c42;
  --shadow: 0 24px 60px rgba(71, 50, 24, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 214, 153, 0.8), transparent 30%),
    radial-gradient(circle at bottom right, rgba(217, 93, 57, 0.18), transparent 30%),
    linear-gradient(135deg, #efe7d3 0%, #f9f6ef 50%, #e6dcc5 100%);
  padding: 24px;
}

.app {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(320px, 1fr);
  gap: 24px;
  align-items: stretch;
}

.panel,
.game-shell {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.panel {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--accent-dark);
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 0.9;
}

.intro,
.controls {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(53, 44, 33, 0.08);
}

.stat-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-shell {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent-dark);
  font-weight: 700;
  letter-spacing: 0.03em;
}

#game-board {
  width: 100%;
  max-width: 640px;
  aspect-ratio: 1 / 1;
  align-self: center;
  border-radius: 22px;
  background: #f7f1e1;
  border: 2px solid rgba(53, 44, 33, 0.1);
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 24px;
  }

  .game-shell {
    padding: 16px;
  }
}
