@import url("/static/fonts/fonts.css");

:root {
  --orange: #F0471F;
  --green: #3FA45B;
  --orange-dark: #C8340F;
  --charcoal: #2D292B;
  --charcoal-soft: #3A3538;
  --grey-900: #464143;
  --grey-500: #8C8589;
  --grey-300: #CFC9CB;
  --grey-150: #E6E1E2;
  --cream: #F5F3F1;
  --white-soft: #FBFAF9;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(45, 41, 43, 0.12);
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", "Noto Sans Ethiopic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, .display {
  font-family: "Outfit", "Inter", "Noto Sans Ethiopic", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 12px;
}

button:disabled { cursor: not-allowed; opacity: 0.55; }

input, select, textarea {
  font: inherit;
  color: inherit;
  border: 1.5px solid var(--grey-300);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: var(--white-soft);
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240, 71, 31, 0.15);
}

.btn-primary {
  background: var(--orange);
  color: var(--white-soft);
  padding: 1rem 1.4rem;
  font-weight: 600;
  width: 100%;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover:not(:disabled) { background: var(--orange-dark); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }

.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--grey-300);
  padding: 0.7rem 1.1rem;
  font-weight: 500;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--charcoal); }

.muted { color: var(--grey-500); }
.error {
  color: var(--orange-dark);
  background: rgba(240, 71, 31, 0.08);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
}
.hidden { display: none !important; }

/* ---------------------------------------------------------------- player */

.play-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem 2rem;
  max-width: 560px;
  margin: 0 auto;
  gap: 1.25rem;
}

.play-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.play-header img { height: 26px; }

.pill {
  background: var(--charcoal);
  color: var(--white-soft);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.card {
  background: var(--white-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem;
}

.lead { font-size: 1.05rem; line-height: 1.5; }

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--grey-900);
}

.progress-track {
  height: 6px;
  background: var(--grey-150);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.q-meta {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--grey-500);
}

/* The same clock the hall screen shows, at the foot of the phone. */
.play-footer {
  padding-top: 0.5rem;
  text-align: center;
}

/* A little watch sitting under the card. */
.watch {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--grey-150), var(--grey-300));
  box-shadow: 0 6px 16px rgba(45, 41, 43, 0.18);
}
.watch-face {
  display: block;
  width: 100%;
  padding: 0.6rem 1.4rem;
  border-radius: 13px;
  background: var(--charcoal);
  color: var(--white-soft);
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.question-text {
  font-family: "Outfit", "Noto Sans Ethiopic", sans-serif;
  line-height: 1.3;
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 700;
  margin: 1rem 0 1.25rem;
}

.choices { display: grid; gap: 0.7rem; }

.choice {
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  width: 100%;
  background: var(--white-soft);
  border: 1.5px solid var(--grey-300);
  border-radius: 14px;
  padding: 1rem;
  font-size: 1.02rem;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice .letter {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--grey-150);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Hover only on a real pointer. On a phone it sticks after a tap and reads as a hint. */
@media (hover: hover) and (pointer: fine) {
  .choice:hover:not(:disabled) { border-color: var(--grey-500); }
}

.choice:active:not(:disabled) { border-color: var(--grey-500); }

/* The tapped option, kept neutral so nothing looks like a right or wrong signal. */
.choice.picked { border-color: var(--charcoal); background: var(--grey-150); }
.choice.picked .letter { background: var(--charcoal); color: var(--white-soft); }

.score-badge {
  font-family: "Outfit", sans-serif;
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--orange);
}

.stat-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.stat {
  flex: 1;
  background: var(--cream);
  border-radius: 12px;
  padding: 0.9rem;
  text-align: center;
}
.stat .value {
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}
.stat .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-500);
  margin-top: 0.15rem;
}

.rank-line {
  border-left: 4px solid var(--orange);
  background: var(--cream);
  border-radius: 0 12px 12px 0;
  padding: 0.9rem 1rem;
  margin-top: 1.25rem;
}

/* ------------------------------------------------------------- languages */

.lang-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  width: 100%;
  background: var(--grey-150);
  border-radius: 999px;
  padding: 0.3rem;
  margin-bottom: 1.25rem;
}
.lang-switch button {
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  font-size: 1rem;
  font-weight: 700;
  background: transparent;
  color: var(--grey-900);
}
.lang-switch button.on {
  background: var(--orange);
  color: var(--white-soft);
}

.lang-label {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-500);
}

/* Milliseconds sit smaller and quieter than the minutes and seconds. */
.ms {
  font-size: 0.62em;
  opacity: 0.7;
  margin-left: 0.05em;
  letter-spacing: 0;
}
