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

body {
  min-height: 100vh;
  background: #111827;
  color: #edf2f7;
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
}

html,
body {
  overscroll-behavior: none;
}

.site-header {
  align-items: center;
  background: #162033;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 16px 22px;
}

.brand {
  color: #f6c453;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
}

nav a {
  color: #cbd5e1;
  margin-left: 16px;
  text-decoration: none;
}

nav a:hover { color: #f6c453; }

.game-area {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 1fr) 320px;
  min-height: calc(100svh - 58px);
  padding: 18px;
}

#game {
  background: #0b1220;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  min-height: 620px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

#game canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}

.side-panel {
  background: #192338;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 18px;
}

.side-panel h1 {
  color: #f6c453;
  font-size: 1.65rem;
  line-height: 1.1;
  margin-bottom: 10px;
}

.side-panel h2 {
  color: #fff;
  font-size: 1.05rem;
  margin: 18px 0 10px;
}

#dailyChallenge {
  color: #cbd5e1;
  margin-bottom: 14px;
}

.hint {
  background: rgba(246,196,83,0.1);
  border: 1px solid rgba(246,196,83,0.2);
  border-radius: 8px;
  color: #f7deb0;
  margin-bottom: 14px;
  padding: 10px;
}

.stat-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.stat-grid div {
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 10px;
}

.stat-grid span {
  color: #93a4bc;
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.stat-grid strong {
  display: block;
  font-size: 1rem;
  margin-top: 3px;
}

.progress-wrap {
  background: rgba(0,0,0,0.32);
  border-radius: 999px;
  height: 12px;
  margin-top: 16px;
  overflow: hidden;
}

#distanceProgress {
  background: linear-gradient(90deg, #61d394, #f6c453, #ff6f61);
  height: 100%;
  width: 0%;
}

.panel-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

button {
  background: #f6c453;
  border: 0;
  border-radius: 999px;
  color: #172033;
  cursor: pointer;
  font-weight: 800;
  min-height: 40px;
  padding: 9px 14px;
}

.share-feedback {
  color: #a7f3d0;
  min-height: 24px;
  margin-top: 10px;
}

.content {
  background: #0f1728;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 42px 20px;
}

.container {
  max-width: 860px;
  margin: 0 auto;
}

.content h2 {
  color: #f6c453;
  margin-bottom: 12px;
}

.content p,
.content li {
  color: #cbd5e1;
  margin-bottom: 10px;
}

.content ul { margin-left: 22px; }

footer {
  background: #0b1220;
  color: #7c8ca3;
  font-size: 0.88rem;
  padding: 28px 20px;
  text-align: center;
}

footer p { margin-top: 10px; }

@media (max-width: 980px) {
  .game-area { grid-template-columns: 1fr; }
  #game { min-height: 620px; }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav a {
    display: inline-block;
    margin: 0 14px 0 0;
  }

  .game-area {
    padding: 0;
  }

  #game {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    min-height: 78svh;
  }

  .side-panel {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
  }
}
