/* style.css — all styling */
:root {
  --bg: #0e1320;
  --bg2: #161d31;
  --surface: #1b2440;
  --surface2: #223056;
  --text: #ece7d8;
  --muted: #9aa3c0;
  --accent: #e7b658;
  --accent2: #f0c878;
  --good: #6fcf97;
  --bad: #ff6b6b;
  --info: #7aa2ff;
  --border: rgba(231, 182, 88, 0.18);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3eee0;
    --bg2: #fbf6e9;
    --surface: #ffffff;
    --surface2: #f5efdd;
    --text: #2b2a26;
    --muted: #6a6557;
    --accent: #a9761b;
    --accent2: #c08920;
    --good: #2f8a5a;
    --bad: #c0392b;
    --info: #2f5db8;
    --border: rgba(169, 118, 27, 0.25);
    --shadow: 0 18px 50px rgba(80, 60, 10, 0.18);
    color-scheme: light;
  }
}

html[data-theme="dark"] {
  --bg: #0e1320; --bg2: #161d31; --surface: #1b2440; --surface2: #223056;
  --text: #ece7d8; --muted: #9aa3c0; --accent: #e7b658; --accent2: #f0c878;
  --good: #6fcf97; --bad: #ff6b6b; --info: #7aa2ff;
  --border: rgba(231, 182, 88, 0.18);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f3eee0; --bg2: #fbf6e9; --surface: #ffffff; --surface2: #f5efdd;
  --text: #2b2a26; --muted: #6a6557; --accent: #a9761b; --accent2: #c08920;
  --good: #2f8a5a; --bad: #c0392b; --info: #2f5db8;
  --border: rgba(169, 118, 27, 0.25);
  --shadow: 0 18px 50px rgba(80, 60, 10, 0.18);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, color-mix(in srgb, var(--info) 8%, transparent), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-height: 100vh;
}

.card {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(180deg, var(--surface), var(--surface2));
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 24px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 200px at 50% -20%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
  pointer-events: none;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  position: relative;
}

.brand { display: flex; align-items: center; gap: 12px; }

.mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--accent), var(--accent2));
  color: #1a1405;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
  flex: 0 0 auto;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tag {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

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

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 12px;
  min-width: 54px;
}

.stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stat-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.progress {
  height: 6px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.play { display: flex; flex-direction: column; gap: 14px; position: relative; }

.lyric-wrap {
  position: relative;
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 30px 24px;
  text-align: center;
}

.quote {
  position: absolute;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.45;
  font-family: Georgia, "Times New Roman", serif;
}
.q1 { top: 8px; left: 12px; }
.q2 { bottom: -2px; right: 12px; }

.lyric {
  margin: 0;
  font-size: 1.06rem;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  letter-spacing: 0.005em;
}

.meta {
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.choice {
  appearance: none;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 35%, transparent);
  color: var(--text);
  padding: 14px 12px;
  border-radius: 13px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  text-align: center;
  line-height: 1.25;
}

.choice:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 18%, transparent);
}

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

.choice:active:not(:disabled) { transform: translateY(0); }

.choice:disabled { cursor: default; opacity: 0.85; }
.choice.correct {
  border-color: var(--good);
  background: color-mix(in srgb, var(--good) 18%, transparent);
  color: var(--good);
  opacity: 1;
}
.choice.wrong {
  border-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 16%, transparent);
  color: var(--bad);
  opacity: 1;
}

.feedback {
  min-height: 1.2em;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  transition: opacity 0.2s ease;
}
.feedback.good { color: var(--good); }
.feedback.bad { color: var(--bad); }
.feedback.info { color: var(--info); }

.actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 11px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn.primary {
  background: linear-gradient(160deg, var(--accent), var(--accent2));
  color: #1a1405;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn.primary:hover:not(:disabled) { transform: translateY(-2px); }
.btn.primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn.ghost:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.btn.ghost:disabled { opacity: 0.35; cursor: not-allowed; }

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.link {
  appearance: none;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.link:hover { text-decoration: underline; }

@media (max-width: 420px) {
  .card { padding: 18px 16px 14px; border-radius: 18px; }
  .choices { grid-template-columns: 1fr; }
  .lyric { font-size: 0.98rem; }
  .brand-text h1 { font-size: 1.04rem; }
  .tag { font-size: 0.72rem; }
  .stat { padding: 5px 10px; min-width: 46px; }
  .stat-val { font-size: 1.1rem; }
  .actions .btn { padding: 10px 16px; font-size: 0.84rem; flex: 1; }
}
