/* Sistem desain bersama Game Web QIKO. Dipakai hub, Tetris, dan Snake.
   Satu palet, satu sistem radius, satu hierarki tombol. */

:root {
  --bg: #0b0b0f;
  --surface: #14141c;
  --surface-raised: #1c1c26;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #f4f4f5;
  --on-accent: #0b0b0f;
  --success: #34d399;
  --error: #f87171;
  --warning: #fbbf24;
  --radius-card: 14px;
  --radius-button: 12px;
  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-number: ui-monospace, "SF Mono", "JetBrains Mono", monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.5;
}

/* Isi halaman: maksimal 400px, rata tengah, padding 14px di HP. */
.wrap {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 16px 14px 24px;
}

h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
}

h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
}

p {
  margin: 0;
}

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

.small {
  font-size: 12px;
}

.num {
  font-family: var(--font-number);
  font-variant-numeric: tabular-nums;
}

/* Label kecil kapital, maksimal 2 per layar (SKOR, LEVEL). */
.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
}

/* Tombol. Satu hierarki: putih untuk aksi utama, permukaan untuk lainnya.
   Target sentuh minimal 48px. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Status klaim: warna selalu ditemani teks, tidak pernah warna saja. */
.status-ok {
  color: var(--success);
}

.status-error {
  color: var(--error);
}

.status-warn {
  color: var(--warning);
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
