:root {
  --bg: #12141c;
  --surface: #1c2030;
  --text: #e8eaf2;
  --muted: #9aa1b8;
  --accent: #ffc83d;
  --accent-text: #1a1a1a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

main { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }

.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface);
}
.brand { font-weight: 700; color: var(--accent); text-decoration: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h2 { margin: 0; font-size: 1.1rem; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.9rem; flex: 1; }
.card-actions { display: flex; gap: 8px; }

.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  text-decoration: none;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn.primary { background: var(--accent); color: var(--accent-text); }

a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.detail-hero { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .detail-hero { grid-template-columns: 1.2fr 1fr; } }
.detail-hero img { width: 100%; height: auto; border-radius: 12px; }
.levels, .characters { padding-left: 20px; color: var(--muted); }
.tag { color: var(--accent); font-size: 0.8rem; }

#game-root { min-height: 60vh; }

.play-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.end-panel {
  margin-top: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
}
.end-panel h2 { margin: 0 0 8px; }
.end-panel p { margin: 0 0 14px; color: var(--muted); }
