/* ===================================================
   REVIEWER QUEST — Coffee-Themed Design System
   Mobile-First CSS
   =================================================== */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lato:wght@300;400;700&display=swap");

/* ── CSS VARIABLES ── */
:root {
  --espresso: #1c0f0a;
  --dark-roast: #2e1503;
  --mocha: #4a2512;
  --caramel: #8b5a2b;
  --latte: #c49a6c;
  --cream: #f5e6d0;
  --foam: #fdf6ec;
  --gold: #d4a853;
  --text-dark: #1c0f0a;
  --text-mid: #4a2512;
  --text-light: #8b5a2b;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;

  --shadow-soft: 0 4px 20px rgba(28, 15, 10, 0.15);
  --shadow-card: 0 8px 40px rgba(28, 15, 10, 0.25);
  --shadow-glow: 0 0 30px rgba(212, 168, 83, 0.3);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET & BASE ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Lato", sans-serif;
  background-color: var(--espresso);
  color: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── COFFEE BACKGROUND TEXTURE ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(
      ellipse at 20% 20%,
      rgba(74, 37, 18, 0.6) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 80%,
      rgba(46, 21, 3, 0.8) 0%,
      transparent 60%
    ),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234A2512' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

/* ── TYPOGRAPHY ── */
h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  line-height: 1.2;
}

/* ── NAVBAR ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(28, 15, 10, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(196, 154, 108, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.logo-text span {
  color: var(--latte);
}

/* ── MAIN LAYOUT ── */
.main-content {
  padding: 1.5rem 1rem 4rem;
  max-width: 700px;
  margin: 0 auto;
}

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(212, 168, 83, 0.15);
  border: 1px solid rgba(212, 168, 83, 0.35);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-xl);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  color: var(--foam);
  margin-bottom: 0.6rem;
}

.hero h1 span {
  color: var(--gold);
}

.hero p {
  font-size: 0.95rem;
  color: var(--latte);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
}

/* ── CARD ── */
.card {
  background: rgba(46, 21, 3, 0.55);
  border: 1px solid rgba(196, 154, 108, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  margin-bottom: 1.25rem;
}

.card-title {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  color: var(--cream);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── FILE UPLOAD ZONE ── */
.upload-zone {
  border: 2px dashed rgba(196, 154, 108, 0.35);
  border-radius: var(--radius-md);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(28, 15, 10, 0.3);
  position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--gold);
  background: rgba(212, 168, 83, 0.08);
  box-shadow: var(--shadow-glow);
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.upload-text {
  color: var(--latte);
  font-size: 0.9rem;
  line-height: 1.5;
}

.upload-text strong {
  color: var(--gold);
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.upload-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.4rem;
}

/* File selected state */
.upload-zone.file-selected {
  border-color: var(--gold);
  background: rgba(212, 168, 83, 0.08);
}

.file-info {
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: rgba(212, 168, 83, 0.1);
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  margin-top: 0.85rem;
}

.file-info.visible {
  display: flex;
}

.file-info-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.file-info-name {
  font-size: 0.85rem;
  color: var(--cream);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-info-size {
  font-size: 0.75rem;
  color: var(--latte);
}

.file-remove {
  background: none;
  border: none;
  color: var(--latte);
  cursor: pointer;
  font-size: 1rem;
  margin-left: auto;
  padding: 0.2rem;
  border-radius: 50%;
  transition: var(--transition);
  flex-shrink: 0;
}

.file-remove:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
}

/* ── DIVIDER ── */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--caramel);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(196, 154, 108, 0.25);
}

/* ── TEXTAREA ── */
.prompt-textarea {
  width: 100%;
  background: rgba(28, 15, 10, 0.5);
  border: 1.5px solid rgba(196, 154, 108, 0.25);
  border-radius: var(--radius-md);
  color: var(--cream);
  font-family: "Lato", sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 1rem;
  resize: vertical;
  min-height: 120px;
  transition: var(--transition);
  outline: none;
}

.prompt-textarea::placeholder {
  color: var(--caramel);
}

.prompt-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
  background: rgba(28, 15, 10, 0.7);
}

/* ── QUIZ TYPE RADIO GROUP ── */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  background: rgba(28, 15, 10, 0.45);
  border: 1.5px solid rgba(196, 154, 108, 0.2);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  transition: var(--transition);
}

.radio-label:hover {
  border-color: var(--gold);
  background: rgba(212, 168, 83, 0.1);
}

.radio-label input[type="radio"] {
  accent-color: var(--gold);
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

.radio-text {
  font-size: 0.95rem;
  color: var(--cream);
  font-weight: 700;
}

/* ── SETTINGS ROW ── */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.settings-label {
  font-size: 0.85rem;
  color: var(--latte);
  font-weight: 700;
}

.count-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.count-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(196, 154, 108, 0.35);
  background: rgba(28, 15, 10, 0.4);
  color: var(--latte);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  line-height: 1;
}

.count-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 168, 83, 0.1);
}

.count-display {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 2.5rem;
  text-align: center;
}

/* ── GENERATE BUTTON ── */
.btn-generate {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--gold) 0%, #b8892a 100%);
  border: none;
  border-radius: var(--radius-xl);
  color: var(--espresso);
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 20px rgba(212, 168, 83, 0.4);
  letter-spacing: 0.5px;
  margin-top: 1.25rem;
}

.btn-generate:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 168, 83, 0.55);
  background: linear-gradient(135deg, #e8b85a 0%, var(--gold) 100%);
}

.btn-generate:active:not(:disabled) {
  transform: translateY(0);
}

.btn-generate:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── LOADING STATE ── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 15, 10, 0.85);
  backdrop-filter: blur(8px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.loading-overlay.visible {
  display: flex;
}

.coffee-loader {
  position: relative;
  width: 70px;
  height: 70px;
}

.coffee-cup {
  font-size: 3rem;
  animation: steam-pulse 1.5s ease-in-out infinite;
}

@keyframes steam-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.loader-ring {
  position: absolute;
  inset: -8px;
  border: 3px solid rgba(212, 168, 83, 0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  color: var(--latte);
  text-align: center;
}

.loading-subtext {
  font-size: 0.8rem;
  color: var(--caramel);
}

/* ── TOAST NOTIFICATIONS ── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: calc(100% - 2rem);
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: rgba(46, 21, 3, 0.95);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(196, 154, 108, 0.2);
  animation: toast-in 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: all;
}

.toast.toast-exit {
  animation: toast-out 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast.error {
  border-left: 3px solid #ff6b6b;
}
.toast.success {
  border-left: 3px solid #6bcb77;
}
.toast.info {
  border-left: 3px solid var(--gold);
}

.toast-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}
.toast-msg {
  font-size: 0.85rem;
  color: var(--cream);
  line-height: 1.4;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
}

/* ═══════════════════════════════════════════════
   REVIEWER PAGE (reviewer.html)
   ═══════════════════════════════════════════════ */

/* ── REVIEWER HEADER ── */
.reviewer-header {
  text-align: center;
  padding: 1.5rem 0 1rem;
}

.reviewer-header h2 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  color: var(--foam);
  margin-bottom: 0.3rem;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.progress-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(196, 154, 108, 0.15);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--caramel), var(--gold));
  border-radius: 99px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-label {
  font-size: 0.8rem;
  color: var(--latte);
  white-space: nowrap;
  font-weight: 700;
  min-width: 2.5rem;
  text-align: right;
}

/* ── SCORE BAR ── */
.score-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.65rem 1.25rem;
  background: rgba(212, 168, 83, 0.1);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(212, 168, 83, 0.2);
  margin: 0.5rem 0 1rem;
}

.score-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.score-value {
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.score-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--caramel);
}

.score-divider {
  width: 1px;
  height: 28px;
  background: rgba(196, 154, 108, 0.25);
}

/* ── FLASHCARD ── */
.flashcard-scene {
  perspective: 1200px;
  margin: 0.5rem 0 1.25rem;
}

.flashcard {
  width: 100%;
  min-height: 230px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard.animate-in {
  animation: card-slide-in 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes card-slide-in {
  from {
    opacity: 0;
    transform: translateX(60px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.card-face {
  background: linear-gradient(
    145deg,
    rgba(74, 37, 18, 0.8) 0%,
    rgba(46, 21, 3, 0.9) 100%
  );
  border: 1px solid rgba(196, 154, 108, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  width: 100%;
}

/* Coffee ring decoration */
.card-face::before {
  content: "";
  position: absolute;
  top: -12px;
  right: -12px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(212, 168, 83, 0.1);
  pointer-events: none;
}

.card-face::after {
  content: "";
  position: absolute;
  top: -6px;
  right: -6px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  border: 2px solid rgba(212, 168, 83, 0.06);
  pointer-events: none;
}

.card-number {
  font-size: 0.72rem;
  color: var(--caramel);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.card-question {
  font-family: "Playfair Display", serif;
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: var(--foam);
  line-height: 1.5;
}

/* ── CHOICES ── */
.choices-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.choice-btn {
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  background: rgba(28, 15, 10, 0.45);
  border: 1.5px solid rgba(196, 154, 108, 0.2);
  border-radius: var(--radius-md);
  color: var(--cream);
  font-family: "Lato", sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.45;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(212, 168, 83, 0.1);
  transform: translateX(4px);
}

.choice-letter {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(196, 154, 108, 0.15);
  border: 1.5px solid rgba(196, 154, 108, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--latte);
  flex-shrink: 0;
  transition: var(--transition);
}

.choice-btn.correct {
  background: rgba(107, 203, 119, 0.15);
  border-color: #6bcb77;
  color: #a8f0ae;
}

.choice-btn.correct .choice-letter {
  background: #6bcb77;
  border-color: #6bcb77;
  color: var(--espresso);
}

.choice-btn.wrong {
  background: rgba(255, 107, 107, 0.12);
  border-color: #ff6b6b;
  color: #ffaaaa;
}

.choice-btn.wrong .choice-letter {
  background: #ff6b6b;
  border-color: #ff6b6b;
  color: white;
}

.choice-btn.reveal-correct {
  background: rgba(107, 203, 119, 0.1);
  border-color: rgba(107, 203, 119, 0.45);
  color: #a8f0ae;
}

.choice-btn:disabled {
  cursor: not-allowed;
}

/* ── EXPLANATION BOX ── */
.explanation-box {
  display: none;
  background: rgba(212, 168, 83, 0.08);
  border: 1px solid rgba(212, 168, 83, 0.25);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  animation: fade-in 0.3s ease;
}

.explanation-box.visible {
  display: block;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.explanation-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.explanation-text {
  font-size: 0.88rem;
  color: var(--latte);
  line-height: 1.55;
}

/* ── NAV BUTTONS ── */
.nav-buttons {
  display: flex;
  gap: 0.75rem;
}

.btn-nav {
  flex: 1;
  padding: 0.85rem;
  border-radius: var(--radius-xl);
  font-family: "Lato", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1.5px solid transparent;
}

.btn-skip {
  background: rgba(28, 15, 10, 0.45);
  border-color: rgba(196, 154, 108, 0.25);
  color: var(--latte);
}

.btn-skip:hover {
  border-color: var(--latte);
  background: rgba(196, 154, 108, 0.1);
}

.btn-next {
  background: linear-gradient(135deg, var(--gold) 0%, #b8892a 100%);
  color: var(--espresso);
  box-shadow: 0 4px 15px rgba(212, 168, 83, 0.35);
}

.btn-next:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 168, 83, 0.5);
}

.btn-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* ── RESULTS SCREEN ── */
.results-screen {
  display: none;
  text-align: center;
  padding: 1.5rem 0;
  animation: fade-in 0.5s ease forwards;
}

.results-screen.visible {
  display: block;
}

.results-trophy {
  font-size: 4rem;
  display: block;
  margin-bottom: 0.75rem;
  animation: trophy-pop 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

@keyframes trophy-pop {
  from {
    transform: scale(0) rotate(-15deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.results-title {
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--foam);
  margin-bottom: 0.4rem;
}

.results-subtitle {
  color: var(--latte);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.results-score-ring {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 4px solid var(--gold);
  box-shadow: var(--shadow-glow);
  margin-bottom: 1.5rem;
}

.results-percent {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.results-fraction {
  font-size: 0.8rem;
  color: var(--caramel);
}

.results-message {
  font-size: 0.95rem;
  color: var(--latte);
  margin-bottom: 1.75rem;
  line-height: 1.5;
  font-style: italic;
}

.results-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-retry {
  padding: 0.9rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--gold) 0%, #b8892a 100%);
  border: none;
  color: var(--espresso);
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(212, 168, 83, 0.4);
}

.btn-retry:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 168, 83, 0.55);
}

.btn-new {
  padding: 0.9rem;
  border-radius: var(--radius-xl);
  background: rgba(28, 15, 10, 0.5);
  border: 1.5px solid rgba(196, 154, 108, 0.3);
  color: var(--latte);
  font-family: "Lato", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-new:hover {
  border-color: var(--latte);
  background: rgba(196, 154, 108, 0.1);
  color: var(--cream);
}

/* ── REVIEWER LAYOUT ── */
.reviewer-content {
  display: block;
}

.quiz-section {
  display: block;
}

.quiz-section.hidden {
  display: none;
}

/* ── API KEY INPUT ── */
.api-key-input {
  width: 100%;
  background: rgba(28, 15, 10, 0.5);
  border: 1.5px solid rgba(196, 154, 108, 0.25);
  border-radius: var(--radius-md);
  color: var(--cream);
  font-family: "Lato", sans-serif;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  transition: var(--transition);
  outline: none;
}

.api-key-input::placeholder {
  color: var(--caramel);
}

.api-key-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
}

.api-key-hint {
  font-size: 0.75rem;
  color: var(--caramel);
  margin-top: 0.4rem;
  line-height: 1.4;
}

.api-key-hint a {
  color: var(--gold);
  text-decoration: none;
}

.api-key-hint a:hover {
  text-decoration: underline;
}

/* ── RESPONSIVE ── */
@media (min-width: 480px) {
  .main-content {
    padding: 2rem 1.5rem 5rem;
  }

  .choices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
}

@media (min-width: 700px) {
  .main-content {
    padding: 2.5rem 2rem 5rem;
  }

  .card {
    padding: 2rem;
  }

  .card-face {
    padding: 2rem;
  }

  .flashcard {
    min-height: 200px;
  }
}
