/* ========================================
   QUIZ — Questions, Answers, Mini-Game Modes
   Card Game Minimal Edition
   ======================================== */

/* ===== QUIZ SCREEN ===== */
#quiz {
  padding: 60px 0 0;
  display: flex;
  flex-direction: column;
}
.quiz-top {
  padding: 0 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.progress-wrap {
  flex: 1;
  height: 3px;
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--accent-1);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.progress-text {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  white-space: nowrap;
  font-family: 'Syne', sans-serif;
}
.quiz-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}
.quiz-footer {
  padding: 16px 24px 40px;
  display: flex;
  gap: 12px;
}
.quiz-footer .btn { flex: 1; }

/* Question card — physical card feel */
.question-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  opacity: 0;
  transform: translateY(40px) rotate(2deg);
  animation: cardIn 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: var(--card-shadow-lg);
  position: relative;
}
/* Subtle card corner marks */
.question-card::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 14px;
  width: 16px;
  height: 16px;
  border-top: 2px solid var(--accent-1);
  border-left: 2px solid var(--accent-1);
  border-radius: 3px 0 0 0;
  opacity: 0.25;
}
.question-card::after {
  content: '';
  position: absolute;
  bottom: 10px;
  right: 14px;
  width: 16px;
  height: 16px;
  border-bottom: 2px solid var(--accent-1);
  border-right: 2px solid var(--accent-1);
  border-radius: 0 0 3px 0;
  opacity: 0.25;
}

.question-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
}
.question-text {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.3px;
}

/* Answer options — card-like chips */
.answer-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.answer-opt {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  position: relative;
}
.answer-opt:hover { border-color: var(--answer-hover-border); }
.answer-opt.selected {
  border-color: var(--accent-1);
  background: var(--accent-1-bg);
  box-shadow: 0 0 0 1px var(--accent-1-border);
}
.answer-opt:active { transform: scale(0.98); }

/* Mode badge */
.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-1);
  font-family: 'Syne', sans-serif;
  margin-bottom: 4px;
  opacity: 0;
  animation: badgePop 0.4s ease 0.2s forwards;
}

/* ===== MODE: THIS OR THAT (2-card VS) ===== */
.tot-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  opacity: 0;
  transform: translateY(40px) rotate(2deg);
  animation: cardIn 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.tot-matchup {
  display: flex;
  gap: 10px;
  width: 100%;
  align-items: stretch;
}
.tot-matchup.tot-single .tot-side {
  min-height: 180px;
}
.tot-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  line-height: 1.35;
  box-shadow: var(--card-shadow);
}
.tot-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-1);
  opacity: 0;
  transition: opacity 0.3s;
}
.tot-side.selected {
  border-color: var(--accent-1);
  transform: scale(1.03);
  box-shadow: var(--card-shadow-hover);
}
.tot-side.selected::before { opacity: 0.1; }
.tot-side.dimmed {
  opacity: 0.3;
  transform: scale(0.95);
}
.tot-vs {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 4px;
}

/* ===== MODE: BUBBLE POP (multi-select) ===== */
.bubble-hint {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  margin-top: -8px;
}
.bubble-field {
  position: relative;
  flex: 1;
  min-height: 220px;
  overflow: hidden;
}
.bubble {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  padding: 12px;
  animation: bubbleFloat 3s ease-in-out infinite;
  line-height: 1.25;
  box-shadow: var(--card-shadow);
}
.bubble:nth-child(1) { animation-delay: 0s; }
.bubble:nth-child(2) { animation-delay: 0.5s; }
.bubble:nth-child(3) { animation-delay: 1s; }
.bubble:nth-child(4) { animation-delay: 1.5s; }
.bubble.selected {
  border-color: var(--accent-1);
  background: var(--accent-1-bg);
  box-shadow: 0 0 0 3px var(--accent-1-border), var(--card-shadow-hover);
}

/* ===== MODE: COUNTDOWN BLITZ ===== */
.blitz-timer-bar {
  width: 100%;
  height: 4px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}
.blitz-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 3px;
  background: var(--accent-1);
  transition: width 0.1s linear;
}
.blitz-timer-fill.urgent {
  background: #ef4444;
}
.blitz-label {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 28px;
  text-align: center;
  color: var(--text);
  margin-bottom: 4px;
  transition: color 0.3s;
}
.blitz-label.urgent { color: #ef4444; }
.answer-options.blitz-mode .answer-opt {
  animation: blitzSlide 0.3s ease backwards;
}
.answer-options.blitz-mode .answer-opt:nth-child(1) { animation-delay: 0.05s; }
.answer-options.blitz-mode .answer-opt:nth-child(2) { animation-delay: 0.15s; }
.answer-options.blitz-mode .answer-opt:nth-child(3) { animation-delay: 0.25s; }
.answer-options.blitz-mode .answer-opt:nth-child(4) { animation-delay: 0.35s; }

/* ===== MODE: SWIPE PICK — Full-card multi-select list ===== */
.swipe-card-question {
  gap: 16px;
}
.swipe-hint {
  font-size: 11px;
  color: var(--text-dim);
  font-family: 'Syne', sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: -4px;
}
.swipe-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.swipe-list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  box-shadow: var(--card-shadow);
  user-select: none;
  -webkit-user-select: none;
}
.swipe-list-card:active {
  transform: scale(0.98);
}
.swipe-list-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}
.swipe-list-check {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-1);
  min-width: 24px;
  text-align: center;
}
.swipe-list-card.selected {
  border-color: var(--accent-1);
  background: var(--accent-1-bg);
  box-shadow: 0 0 0 1px var(--accent-1-border), var(--card-shadow-hover);
}
.swipe-list-card.selected .swipe-list-text {
  color: var(--accent-1);
}

/* ===== MODE: RANKING ===== */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: var(--card-shadow);
}
.rank-item .rank-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-1-bg);
  border: 1.5px solid var(--accent-1-border);
  color: var(--accent-1);
  font-size: 12px;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s;
}
.rank-item.picked {
  border-color: var(--accent-1);
  background: var(--accent-1-bg);
}
.rank-item.picked .rank-num {
  background: var(--accent-1);
  color: #fff;
}
.rank-item.dimmed { opacity: 0.35; }
.rank-label {
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* ===== MODE: BLIND GUESS (answer + predict) ===== */
.bg-card {
  transition: border-color 0.3s ease;
}
.bg-phase-own {
  border-color: var(--accent-1);
}
.bg-phase-guess {
  border-color: #A855F7;
}
.bg-phase-guess::before {
  border-color: #A855F7;
  opacity: 0.3;
}
.bg-phase-guess::after {
  border-color: #A855F7;
  opacity: 0.3;
}
.bg-phase-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 4px;
}
.bg-phase-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  background: var(--surface);
  color: var(--text-dim);
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.bg-phase-dot.active {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 12px var(--accent-1-border);
}
.bg-phase-guess .bg-phase-dot.active {
  background: #A855F7;
  border-color: #A855F7;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}
.bg-phase-dot.done {
  background: var(--accent-1-bg);
  border-color: var(--accent-1);
  color: var(--accent-1);
}
.bg-phase-dot.done.clickable {
  cursor: pointer;
  position: relative;
}
.bg-phase-dot.done.clickable::after {
  content: '↩';
  position: absolute;
  top: -16px;
  font-size: 11px;
  color: var(--accent-1);
  animation: badgePop 0.4s ease 0.3s forwards;
  opacity: 0;
}
.bg-phase-dot.done.clickable:active {
  transform: scale(0.9);
}
.bg-phase-line {
  flex: 0 0 40px;
  height: 2px;
  background: var(--border);
  transition: background 0.3s ease;
}
.bg-phase-line.filled {
  background: var(--accent-1);
}
.bg-phase-label {
  font-size: 13px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  color: var(--accent-1);
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0;
  animation: badgePop 0.4s ease 0.15s forwards;
}
.bg-phase-guess .bg-phase-label {
  color: #A855F7;
}
/* "yours" badge on own-pick options in guess phase */
.bg-own-pick {
  position: relative;
}
.bg-your-badge {
  position: absolute;
  top: -8px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #A855F7;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'Syne', sans-serif;
  line-height: 1.4;
}
/* Guess phase selected state uses purple accent */
.bg-phase-guess .answer-opt.selected {
  border-color: #A855F7;
  background: rgba(168, 85, 247, 0.08);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.2);
}

/* ===== BLIND GUESS RESULTS ===== */
.ch-guess-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.ch-guess {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
}
.ch-guess.correct {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.06);
}
.ch-guess.wrong {
  border-color: #EF4444;
  background: rgba(239, 68, 68, 0.06);
}
.ch-guess-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Syne', sans-serif;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.ch-guess.correct .ch-guess-label { color: #10B981; }
.ch-guess.wrong .ch-guess-label { color: #EF4444; }
.ch-guess-text {
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
}
.ch-guess-actual {
  font-size: 11px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-dim);
  margin-top: 3px;
}
.ch-guess-actual:empty { display: none; }

/* ===== MODE: ELIMINATE (Last One Standing) ===== */
.eliminate-card {
  gap: 16px;
}
.eliminate-hint {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  margin-top: -4px;
}
.eliminate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.eliminate-item {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 10px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  box-shadow: var(--card-shadow);
  min-height: 64px;
  line-height: 1.3;
}
.eliminate-item:active {
  transform: scale(0.95);
}
.eliminate-item.eliminated {
  opacity: 0.2;
  border-color: var(--border);
  background: var(--surface);
  transform: scale(0.9);
}
.eliminate-item.eliminated .eliminate-text {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.eliminate-x {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #ef4444;
  opacity: 0.7;
}
.eliminate-item.survivor {
  border-color: var(--accent-1);
  background: var(--accent-1-bg);
  box-shadow: 0 0 0 3px var(--accent-1-border), var(--card-shadow-hover);
  transform: scale(1.06);
  animation: survivorPulse 0.5s ease;
}
.eliminate-count {
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  text-align: center;
  letter-spacing: 1px;
}
@keyframes survivorPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1.06); }
}

/* ===== INLINE WAITING (per-question partner wait) ===== */
.inline-waiting {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  opacity: 0;
  animation: cardIn 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.inline-waiting-anim {
  margin: 12px 0;
}
.inline-waiting-text {
  font-size: 14px;
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.5;
}

/* ===== INLINE REVEAL (per-question comparison) ===== */
.inline-reveal {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  animation: cardIn 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.inline-reveal .reveal-vs-block {
  width: 100%;
  display: flex;
  gap: 12px;
  margin: 8px 0;
}
.inline-reveal .reveal-vs-card {
  flex: 1;
  padding: 20px 14px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  text-align: center;
  box-shadow: var(--card-shadow);
  animation: countPop 0.35s ease both;
}
.inline-reveal .reveal-vs-card.them-card {
  animation-delay: 0.1s;
}
.inline-reveal .rv-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.inline-reveal .rv-answer {
  font-size: 16px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  line-height: 1.4;
}
.inline-reveal .reveal-reaction {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  animation: countPop 0.4s ease 0.3s forwards;
}
.inline-reveal .reaction-emoji {
  font-size: 36px;
}
.inline-reveal .reaction-text {
  font-size: 14px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.inline-reveal .matched-text {
  color: #10B981;
}
.inline-reveal .diff-text {
  color: var(--text-dim);
}
.inline-reveal.matched .reveal-vs-card {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.06);
}
.inline-reveal.differ .reveal-vs-card {
  border-color: var(--card-border);
}
