/* =========================================================
   Greek/Latin General Vocab Test — calmer, theme-friendly UI
   - Inherits theme fonts/colours
   - Removes heavy red text
   - Uses gentle tints for feedback states
   ========================================================= */

/* ---------- Theme-aware tokens ---------- */
:root {
  /* If your theme defines CSS variables, we try to use them;
     otherwise these fall back to neutral defaults. */
  --glvq-text: inherit;
  --glvq-muted: rgba(0,0,0,0.65);
  --glvq-border: rgba(0,0,0,0.12);
  --glvq-border-strong: rgba(0,0,0,0.18);
  --glvq-surface: rgba(255,255,255,0.92);
  --glvq-surface-2: rgba(0,0,0,0.02);

  --glvq-radius: 14px;
  --glvq-radius-sm: 10px;

  /* Accents (soft) */
  --glvq-good: rgba(34, 197, 94, 1);
  --glvq-good-bg: rgba(34, 197, 94, 0.12);

  --glvq-bad: rgba(239, 68, 68, 1);
  --glvq-bad-bg: rgba(239, 68, 68, 0.10);

  --glvq-info: rgba(59, 130, 246, 1);
  --glvq-info-bg: rgba(59, 130, 246, 0.10);

  --glvq-warn: rgba(245, 158, 11, 1);
  --glvq-warn-bg: rgba(245, 158, 11, 0.12);

  --glvq-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* ---------- Container & typography ---------- */
.glvq-container {
  font-family: inherit !important;
  color: inherit !important;
  max-width: 820px;
  margin: 40px auto;
  padding: 0;
  background: var(--glvq-surface);
  border: 1px solid var(--glvq-border);
  border-radius: var(--glvq-radius);
  box-shadow: var(--glvq-shadow);
  overflow: hidden;
}

.glvq-header {
  padding: 26px 28px 18px;
  border-bottom: 1px solid var(--glvq-border);
  background: linear-gradient(to bottom, rgba(0,0,0,0.01), transparent);
}

.glvq-title {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: 0.2px;
  font-family: inherit !important;
  color: inherit !important;
  text-align: center;
}

.glvq-subtitle {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--glvq-muted);
  text-align: center;
  font-family: inherit !important;
}

.glvq-body {
  padding: 30px 28px 28px;
}

/* The lemma/prompt */
.glvq-prompt {
  font-family: inherit !important;
  font-size: 54px;
  line-height: 1.1;
  font-weight: 650;
  text-align: center;
  margin: 10px 0 22px;
  color: inherit !important;
}

/* ---------- Options ---------- */
.glvq-options {
  display: grid;
  gap: 12px;
  margin: 0 auto 18px;
  max-width: 640px;
}

.glvq-option {
  font-family: inherit !important;
  color: inherit !important;     /* crucial: stops red/white inheritance surprises */
  background: #fff;
  border: 1px solid var(--glvq-border);
  border-radius: var(--glvq-radius-sm);
  padding: 16px 18px;
  font-size: 18px;
  line-height: 1.25;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
  user-select: none;
}

.glvq-option:hover {
  background: var(--glvq-surface-2);
  border-color: var(--glvq-border-strong);
}

.glvq-option:active {
  transform: translateY(1px);
}

/* Correct/Incorrect states: NO red/green text. Only soft tints + border. */
.glvq-option.glvq-correct {
  background: var(--glvq-good-bg) !important;
  border-color: rgba(34, 197, 94, 0.55) !important;
  color: inherit !important;
}

.glvq-option.glvq-wrong {
  background: var(--glvq-bad-bg) !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  color: inherit !important;
}

/* If your JS adds a "disabled" state after correct answer */
.glvq-option[aria-disabled="true"],
.glvq-option.glvq-disabled {
  opacity: 0.75;
  cursor: default;
}

/* ---------- Feedback panels ---------- */
.glvq-feedback {
  max-width: 640px;
  margin: 12px auto 20px;
  font-family: inherit !important;
  color: inherit !important;
}

.glvq-feedback p {
  margin: 10px 0;
  font-size: 16px;
  line-height: 1.5;
  color: inherit !important;  /* removes red text from feedback */
}

/* A neutral “card” look for feedback lines */
.glvq-feedback .glvq-card {
  background: #fff;
  border: 1px solid var(--glvq-border);
  border-radius: var(--glvq-radius-sm);
  padding: 14px 16px;
}

/* Optional specialised notice boxes */
.glvq-feedback .glvq-note,
.glvq-feedback .glvq-irregular {
  border-left: 4px solid var(--glvq-info);
  background: var(--glvq-info-bg);
  border-radius: var(--glvq-radius-sm);
  padding: 12px 14px;
}

.glvq-feedback .glvq-irregular {
  border-left-color: var(--glvq-warn);
  background: var(--glvq-warn-bg);
}

/* ---------- Nudge (“stop guessing”) ---------- */
.glvq-nudge {
  max-width: 640px;
  margin: 10px auto 0;
  padding: 10px 14px;
  border-radius: var(--glvq-radius-sm);
  border: 1px solid var(--glvq-border);
  background: var(--glvq-surface-2);
  color: var(--glvq-muted);
  font-family: inherit !important;
  font-size: 14px;
}

/* ---------- Next button ---------- */
.glvq-next-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.glvq-next {
  font-family: inherit !important;
  font-size: 18px;
  font-weight: 650;
  padding: 14px 28px;
  border-radius: 12px;
  border: 1px solid var(--glvq-border);
  background: rgba(0,0,0,0.04);
  color: inherit !important;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease, border-color 120ms ease;
}

.glvq-next:hover {
  background: rgba(0,0,0,0.07);
  border-color: var(--glvq-border-strong);
}

.glvq-next:active {
  transform: translateY(1px);
}

/* ---------- Summary screen ---------- */
.glvq-summary {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.glvq-summary-title {
  font-family: inherit !important;
  font-size: 26px;
  font-weight: 650;
  margin: 0 0 8px;
}

.glvq-summary-stats {
  font-family: inherit !important;
  color: var(--glvq-muted);
  margin: 0 0 16px;
}

.glvq-summary-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.glvq-summary-btn {
  font-family: inherit !important;
  font-size: 16px;
  font-weight: 650;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--glvq-border);
  background: #fff;
  color: inherit !important;
  cursor: pointer;
}

.glvq-summary-btn:hover {
  background: var(--glvq-surface-2);
}

/* ---------- Mobile ---------- */
@media (max-width: 680px) {
  .glvq-container { margin: 20px 12px; }
  .glvq-header { padding: 20px 16px 14px; }
  .glvq-body { padding: 22px 16px 20px; }
  .glvq-title { font-size: 26px; }
  .glvq-prompt { font-size: 42px; }
  .glvq-option { font-size: 16px; padding: 14px 14px; }
}
