/* Tebak Gambar — mobile-first, tema cerah sederhana */

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

:root {
  --bg: #f7f3ea;
  --surface: #ffffff;
  --ink: #1f2933;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --yellow: #f59e0b;
  --border: #d6d3cd;
  --radius: 14px;
  --shadow: 0 2px 6px rgba(31, 41, 51, 0.08);
}

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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  line-height: 1.45;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 28px;
  min-height: 100dvh;
}

.screen[hidden] {
  display: none !important;
}

/* HUD */
.hud {
  margin-bottom: 12px;
}

.progress {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  margin-bottom: 10px;
}

.stats {
  display: flex;
  gap: 10px;
}

.stat {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

/* Emoji hero */
.emoji-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  margin: 16px 0 8px;
  font-size: 110px;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}

.question {
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 16px;
  padding: 0 8px;
}

/* Options */
.options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 360px) {
  .options {
    grid-template-columns: 1fr 1fr;
  }
}

.option-btn {
  min-height: 56px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.08s ease, border-color 0.12s ease, background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.option-btn:active:not(:disabled) {
  transform: scale(0.97);
  background: #f0f4ff;
  border-color: var(--accent);
}

.option-btn:disabled {
  cursor: default;
  opacity: 0.95;
}

.option-btn.correct {
  background: var(--green-soft);
  border-color: var(--green);
  color: #14532d;
}

.option-btn.wrong {
  background: var(--red-soft);
  border-color: var(--red);
  color: #7f1d1d;
}

.option-btn.reveal {
  border-color: var(--green);
  background: var(--green-soft);
}

/* Feedback */
.feedback {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feedback[hidden] {
  display: none;
}

.feedback-banner {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

.feedback-banner.correct {
  color: var(--green);
}

.feedback-banner.wrong {
  color: var(--red);
}

.feedback-fact {
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

/* Buttons */
.btn {
  min-height: 52px;
  padding: 12px 20px;
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  width: 100%;
}

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

.btn-next {
  background: var(--accent);
  color: #fff;
}

.btn-next:hover,
.btn-next:focus-visible {
  background: var(--accent-dark);
}

.btn-replay {
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  min-height: 56px;
}

.btn-replay:hover,
.btn-replay:focus-visible {
  background: var(--accent-dark);
}

/* End screen */
#end-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80dvh;
}

.end-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 20px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 360px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.end-emoji {
  font-size: 64px;
  line-height: 1;
}

.end-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
}

.end-score {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.end-score-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.end-score-value {
  font-size: 56px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.end-best {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 14px;
}

.end-msg {
  font-size: 15px;
  color: var(--muted);
}

.btn-replay {
  margin-top: 8px;
}

/* Focus visible */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
