*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1a1f2e 0%, #0d1117 100%);
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  color: #e6edf3;
}

.rc-game-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  max-width: 100%;
}

.rc-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  justify-content: center;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.rc-hud-item .rc-label {
  opacity: 0.75;
  margin-right: 0.35rem;
}

#game {
  display: block;
  width: min(960px, 100%);
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-radius: 8px;
  box-shadow:
    0 0 0 3px #2d333b,
    0 12px 40px rgba(0, 0, 0, 0.45);
  background: #5c94fc;
  touch-action: none;
}

.rc-help {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.7;
  text-align: center;
  max-width: 42rem;
}

.rc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(4px);
}

.rc-overlay.hidden {
  display: none;
}

.rc-overlay-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 1.75rem 2rem;
  max-width: 22rem;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.rc-overlay-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.rc-overlay-card p {
  margin: 0 0 1.25rem;
  opacity: 0.85;
  line-height: 1.45;
}

.rc-btn {
  display: inline-block;
  margin: 0.35rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.95rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: #238636;
  color: #fff;
  font-weight: 600;
}

.rc-btn:hover {
  filter: brightness(1.08);
}

.rc-btn-secondary {
  background: #30363d;
  color: #e6edf3;
}

.rc-btn-next {
  background: #1f6feb;
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
}

.rc-btn-next.hidden {
  display: none;
}

@media (max-width: 520px) {
  .rc-hud {
    font-size: 0.85rem;
    gap: 0.75rem 1rem;
  }
}
