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

:root {
  color-scheme: dark;
  font-family: "Inter", system-ui, sans-serif;
  --bg: #0b0f14;
  --card: #141b25;
  --text: #f5f7fb;
  --muted: #b7c0ce;
  --accent: #5dd17f;
  --border: #273246;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(20, 27, 37, 0.5);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  gap: 1rem;
}

.brand {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 600;
}

.brand:hover {
  color: var(--text);
}

.title {
  flex: 1;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.game-container {
  display: flex;
  gap: 2rem;
  padding: 2rem;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.game-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 200px;
  flex-shrink: 0;
}

.controls-info {
  background: rgba(20, 27, 37, 0.6);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  font-size: 0.9rem;
}

.controls-info h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.controls-info p {
  margin-bottom: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

.reset-button {
  background: var(--accent);
  color: #0b0f14;
  border: none;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.reset-button:hover {
  transform: translateY(-2px);
  background: #3ac165;
}

.game-stage {
  flex: 1;
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #1a2618;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

#game-container {
  width: 100%;
  height: 100%;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hud {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  display: flex;
  gap: 1.5rem;
  background: rgba(8, 12, 18, 0.7);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(93, 209, 127, 0.3);
  font-size: 0.9rem;
  font-weight: 600;
}

.stat {
  color: var(--muted);
}

.stat span {
  color: var(--accent);
}

@media (max-width: 1000px) {
  .game-container {
    flex-direction: column;
    gap: 1rem;
  }

  .game-info {
    width: 100%;
    flex-direction: row;
  }

  .controls-info {
    flex: 1;
  }

  .hud {
    flex-direction: column;
    gap: 0.5rem;
  }
}
