/* ==========================================================================
   HUMAN VERIFICATION - FLAT HTML LIGHT MODE INTERFACE
   ========================================================================== */

:root {
  --bg-page: #f0f2f5;
  --bg-card: #ffffff;
  --bg-subtle: #f8f9fa;
  --border-color: #d0d7de;
  --border-dark: #b0b8c0;

  --text-main: #24292f;
  --text-muted: #57606a;
  --text-light: #6e7781;

  --btn-default-bg: #f6f8fa;
  --btn-default-border: #d0d7de;
  --btn-default-hover: #e9ecef;

  --primary-color: #198754;
  --primary-border: #146c43;
  --primary-hover: #157347;

  --accent-gold: #b45309;
  --danger-color: #cf222e;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.hidden {
  display: none !important;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
}

/* Container */
.container {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

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

.shield-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.header-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.header-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Flat Buttons */
.flat-btn {
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 4px;
  border: 1px solid var(--btn-default-border);
  background: var(--btn-default-bg);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.flat-btn:hover {
  background: var(--btn-default-hover);
}

.flat-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.flat-btn.sm-btn {
  font-size: 0.8rem;
  padding: 5px 10px;
}

.flat-btn.lg-btn {
  font-size: 1rem;
  padding: 10px 24px;
}

.flat-btn.primary-btn {
  background: var(--primary-color);
  border-color: var(--primary-border);
  color: #ffffff;
}

.flat-btn.primary-btn:hover {
  background: var(--primary-hover);
}

.flat-btn.action-btn {
  padding: 8px 18px;
}

/* Stepper Tabs */
.stepper {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-card);
  overflow: hidden;
}

.step-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 1px solid var(--border-color);
  background: var(--bg-card);
  white-space: nowrap;
}

.step-tab:last-child {
  border-right: none;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eaeef2;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.step-tab.active {
  background: #f6fcf8;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

.step-tab.active .step-badge {
  background: var(--primary-color);
  color: #ffffff;
}

.step-tab.completed {
  color: #146c43;
}

.step-tab.completed .step-badge {
  background: #146c43;
  color: #ffffff;
}

/* Main Card */
.main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 22px;
}

.stage-section {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.stage-section.active {
  display: flex;
}

.stage-header {
  border-bottom: 1px solid #eaeef2;
  padding-bottom: 10px;
}

.stage-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.stage-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #eaeef2;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.target-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   STAGE 1: CANVAS
   ========================================================================== */
.canvas-panel {
  position: relative;
  width: 100%;
  height: 380px;
  border: 1px solid var(--border-color);
  background: #fafafa;
  border-radius: 4px;
  overflow: hidden;
}

#fruit-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.toast {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 4px;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}

.toast.hidden {
  opacity: 0;
  display: none;
}

.toast.wrong {
  background: #fff0f0;
  border: 1px solid #ffc2c2;
  color: #cf222e;
}

.toast.correct {
  background: #f0fff4;
  border: 1px solid #b7ebc5;
  color: #157347;
}

/* ==========================================================================
   STAGE 2: PLEASE VERITY™ (MINECRAFT ANALOG HORROR ARG)
   ========================================================================== */
.verity-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 8px 0;
}

/* ARG Badge */
.verity-arg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fefce8;
  border: 1px solid #fde047;
  color: #854d0e;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Persona Card */
.verity-persona-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  transition: all 0.3s ease;
}

.verity-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 76px;
}

/* Floating Yellow Sphere */
.verity-avatar-sphere {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fef08a, #eab308 55%, #ca8a04 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(234, 179, 8, 0.45);
  animation: verityBob 2.8s ease-in-out infinite;
  transition: all 0.3s ease;
}

@keyframes verityBob {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-6px) rotate(2deg);
  }
}

.verity-face-emoji {
  font-size: 2.3rem;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}

.verity-status-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.verity-status-pill.delighted {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.verity-status-pill.angry {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.verity-bubble {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  flex: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.verity-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 22px;
  border-width: 6px 8px 6px 0;
  border-style: solid;
  border-color: transparent var(--border-color) transparent transparent;
}

.verity-bubble::after {
  content: '';
  position: absolute;
  left: -7px;
  top: 22px;
  border-width: 6px 7px 6px 0;
  border-style: solid;
  border-color: transparent #ffffff transparent transparent;
}

.verity-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: #b45309;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 3px;
}

.verity-dialogue-text {
  font-size: 0.92rem;
  font-weight: 500;
  color: #1e293b;
  margin: 0;
  line-height: 1.45;
  min-height: 2.8em;
}

/* Glitch / Horror Mode when enraged */
.verity-persona-card.glitched {
  background: #1c0b0b !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6) !important;
  animation: verityGlitchShake 0.1s infinite alternate;
}

@keyframes verityGlitchShake {
  0% {
    transform: translate(-2px, 1px);
  }

  100% {
    transform: translate(2px, -1px);
  }
}

.verity-persona-card.glitched .verity-avatar-sphere {
  background: radial-gradient(circle at 35% 35%, #f87171, #dc2626 55%, #7f1d1d 100%) !important;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.9) !important;
}

.verity-persona-card.glitched .verity-bubble {
  background: #2b0c0c !important;
  border-color: #ef4444 !important;
}

.verity-persona-card.glitched .verity-name {
  color: #fca5a5 !important;
}

.verity-persona-card.glitched .verity-dialogue-text {
  color: #fecaca !important;
  font-family: monospace, sans-serif !important;
}

/* Devotion Meter */
.verity-meter-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
}

.verity-meter-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.verity-meter-lbl {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.verity-meter-val {
  font-size: 0.92rem;
  font-weight: 800;
  color: #eab308;
  font-variant-numeric: tabular-nums;
}

.verity-meter-track {
  width: 100%;
  height: 12px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.verity-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #eab308, #10b981);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Steps Container */
.verity-steps-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.verity-step-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  animation: verityFadeIn 0.35s ease-out;
}

@keyframes verityFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.verity-prompt-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 12px;
}

/* Phase 1: Best Friend Pledge Card */
.verity-pledge-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fefce8;
  border: 2px solid #fde047;
  border-radius: 8px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(234, 179, 8, 0.1);
}

.verity-pledge-card:hover {
  background: #fef9c3;
  border-color: #eab308;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.2);
}

.verity-pledge-card.checked {
  background: #f0fdf4;
  border-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.verity-custom-checkbox {
  width: 32px;
  height: 32px;
  border: 2px solid #d97706;
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.verity-custom-checkbox.checked {
  background: #10b981;
  border-color: #10b981;
}

.verity-check-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-top-color: #eab308;
  border-radius: 50%;
  animation: veritySpin 0.7s linear infinite;
}

@keyframes veritySpin {
  to {
    transform: rotate(360deg);
  }
}

.verity-check-mark {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 900;
}

.verity-pledge-content {
  flex: 1;
}

.verity-pledge-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #b45309;
  display: block;
  margin-bottom: 2px;
}

.verity-pledge-sub {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  line-height: 1.35;
}

/* Phase 2: Mining Tribute Grid */
.verity-tribute-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.verity-tribute-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.verity-tribute-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  background: #ffffff;
  border-color: #94a3b8;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.verity-tribute-btn.selected-correct {
  background: #ecfeff;
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.35);
}

.verity-tribute-btn.shake-error {
  animation: verityShake 0.4s ease-in-out;
  border-color: #ef4444;
  background: #fee2e2;
}

@keyframes verityShake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-8px);
  }

  75% {
    transform: translateX(8px);
  }
}

.tribute-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.tribute-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
}

.tribute-sub {
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
}

/* Phase 3: Runaway Arena */
.verity-runaway-arena {
  position: relative;
  height: 90px;
  width: 100%;
  background: #fefce8;
  border: 2px dashed #fde047;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.verity-stamp-btn {
  padding: 12px 26px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #713f12;
  background: linear-gradient(135deg, #fef08a, #facc15);
  border: 2px solid #eab308;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.35);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
}

.verity-stamp-btn:hover {
  box-shadow: 0 6px 18px rgba(234, 179, 8, 0.5);
}

.verity-stamp-btn.ready-to-click {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.35);
  animation: verityPulseReady 1.2s infinite alternate;
}

@keyframes verityPulseReady {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.05);
  }
}

/* ==========================================================================
   STAGE 3: BLACKJACK
   ========================================================================== */
.table-panel {
  background: #1b5e20;
  border: 1px solid #0f4014;
  border-radius: 4px;
  padding: 18px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.table-hand-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hand-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hand-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #c8e6c9;
  text-transform: uppercase;
}

.score-badge {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 700;
}

.cards-row {
  display: flex;
  gap: 8px;
  min-height: 86px;
  align-items: center;
  flex-wrap: wrap;
}

/* Playing Card */
.card-item {
  width: 60px;
  height: 86px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px;
  user-select: none;
  position: relative;
}

.card-item.red {
  color: #cf222e;
}

.card-corner {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.card-corner.bottom {
  align-items: flex-end;
  transform: rotate(180deg);
}

.card-center-suit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.3rem;
}

.card-item.face-down {
  background: #1e293b;
  border: 1px solid #ffffff;
}

.card-item.face-down::after {
  content: '♠';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.2);
  font-size: 1.6rem;
}

.table-msg-bar {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 6px 12px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.table-btns-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding-top: 4px;
}

.table-btns-row .flat-btn {
  background: #ffffff;
  border-color: #ffffff;
  color: #0f172a;
}

.table-btns-row .flat-btn.primary-btn {
  background: #f59e0b;
  border-color: #d97706;
  color: #000000;
}

.table-btns-row .flat-btn.hidden {
  display: none;
}

/* ==========================================================================
   STAGE 4: FLOW FREE PUZZLE
   ========================================================================== */
.flow-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.flow-canvas-wrap {
  position: relative;
  display: inline-block;
  border: 2px solid var(--border-dark);
  border-radius: 4px;
  background: #ffffff;
  touch-action: none;
}

#flow-canvas {
  display: block;
  cursor: pointer;
}

.flow-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.flow-status {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.flow-status.complete {
  color: var(--primary-color);
  font-weight: 700;
}

/* ==========================================================================
   STAGE 5: COMPLETE & DRAMATIC REDIRECT
   ========================================================================== */
.complete-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
  gap: 14px;
}

.dramatic-box {
  padding: 24px 0;
}

.check-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  background: #f0fff4;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
}

.dramatic-timer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 6px 0;
}

.dramatic-counter {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--primary-color);
  font-family: var(--font-mono);
  letter-spacing: -0.05em;
}

.dramatic-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 4px;
}

.flat-progress {
  width: 100%;
  max-width: 320px;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.flat-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--primary-color);
  transition: width 0.1s linear;
}

.redirect-txt {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.unskippable-notice {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 4px;
}

/* ==========================================================================
   STAGE 5: INKLING AI VERIFICATION
   ========================================================================== */

.ai-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ai-model-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.ai-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: ai-pulse 1.8s infinite;
}

@keyframes ai-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }

  70% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.ai-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Loading & Live Thinking Box */
.ai-loading-state {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
}

.thinking-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.thinking-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
}

.thinking-pulse-icon {
  font-size: 1.1rem;
  animation: pulse-slow 2s infinite ease-in-out;
}

@keyframes pulse-slow {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.15);
    opacity: 0.8;
  }
}

.thinking-live-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #86efac;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.04em;
}

/* Thinking Terminal */
.thinking-terminal {
  background: #0f172a;
  border-radius: 6px;
  border: 1px solid #1e293b;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: var(--font-mono);
}

.thinking-terminal-top {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e293b;
  padding: 6px 12px;
  border-bottom: 1px solid #334155;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.t-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.t-dot.red {
  background: #ef4444;
}

.t-dot.yellow {
  background: #eab308;
}

.t-dot.green {
  background: #22c55e;
}

.terminal-label {
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: 0.03em;
}

.thinking-stream-content {
  padding: 12px;
  min-height: 140px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #cbd5e1;
  scrollbar-width: thin;
  scrollbar-color: #334155 #0f172a;
}

.thought-line {
  word-break: break-word;
  white-space: pre-wrap;
}

.thought-line.phase {
  color: #38bdf8;
  font-weight: 600;
}

.thought-line.live {
  color: #a7f3d0;
}

.thought-line.system {
  color: #94a3b8;
  font-style: italic;
}

.cursor-blink {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: #38bdf8;
  vertical-align: middle;
  animation: cursor-blink-anim 1s infinite;
  margin-left: 3px;
}

@keyframes cursor-blink-anim {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.thinking-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 4px 2px;
}

.ai-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary-color);
  border-right-color: #22c55e;
  border-radius: 50%;
  animation: ai-spin 0.8s linear infinite;
}

.ai-spinner.sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
  flex-shrink: 0;
}

/* Dynamic Challenge Card */
.ai-challenge-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
}

.challenge-category-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.82rem;
}

.category-icon {
  font-size: 1.15rem;
}

.category-name {
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.category-difficulty {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text-muted);
}

.challenge-prompt-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.challenge-headline {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.challenge-story {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

.challenge-instructions {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  background: #f8fafc;
  border-left: 3px solid var(--primary-color);
  padding: 8px 12px;
  border-radius: 0 4px 4px 0;
  margin-top: 4px;
}

/* Dynamic Interactive Workspace */
.ai-interactive-workspace {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* CHESS WIDGET */
.chess-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.chess-interactive-hint {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 9999px;
  text-align: center;
  transition: all 0.2s ease;
}

.chess-board-wrap {
  position: relative;
  background: #3e2723;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  user-select: none;
}

.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 40px);
  grid-template-rows: repeat(8, 40px);
  border: 2px solid #271406;
}

.chess-sq {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, transform 0.1s ease;
}

.chess-sq.light {
  background: #f0d9b5;
  color: #24292f;
}

.chess-sq.dark {
  background: #b58863;
  color: #24292f;
}

.chess-sq.selected {
  background: #79a83b !important;
  box-shadow: inset 0 0 0 2px #557a26;
}

.chess-sq.target-hint::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(46, 125, 50, 0.55);
  pointer-events: none;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
}

.chess-sq.wrong-move {
  background: #f87171 !important;
  animation: shake-sm 0.35s ease;
}

@keyframes shake-sm {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

.chess-sq.in-check {
  background: #ef4444 !important;
  animation: pulse-check 1s infinite alternate;
}

@keyframes pulse-check {
  from {
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
  }

  to {
    box-shadow: inset 0 0 16px rgba(239, 68, 68, 0.9);
  }
}

.chess-sq .piece {
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  transition: transform 0.12s ease;
}

.chess-sq:hover .piece {
  transform: scale(1.1);
}

.chess-coord-rank {
  position: absolute;
  top: 2px;
  left: 3px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.45);
  pointer-events: none;
  line-height: 1;
}

.chess-coord-file {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.45);
  pointer-events: none;
  line-height: 1;
}

/* 3x3 SLIDING TILE PUZZLE */
.slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.slider-board {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  grid-template-rows: repeat(3, 80px);
  gap: 6px;
  background: #cbd5e1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #94a3b8;
}

.slider-tile {
  background: #ffffff;
  border: 2px solid #94a3b8;
  border-radius: 6px;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.12s ease, background 0.12s ease;
  color: var(--text-main);
}

.slider-tile:hover:not(.empty) {
  background: #f1f5f9;
  border-color: var(--primary-color);
  transform: scale(0.98);
}

.slider-tile.empty {
  background: transparent;
  border: 2px dashed #cbd5e1;
  box-shadow: none;
  cursor: default;
}

.slider-tile.correct {
  background: #ecfdf5;
  border-color: #34d399;
  color: #065f46;
}

.slider-stat-row {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 2x2 RUBIK'S CUBE MINI SIMULATOR */
.rubiks-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.rubiks-net {
  display: grid;
  grid-template-columns: repeat(4, 52px);
  grid-template-rows: repeat(3, 52px);
  gap: 4px;
  background: #1e293b;
  padding: 10px;
  border-radius: 8px;
}

.face-cell {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  background: #0f172a;
  padding: 2px;
  border-radius: 4px;
}

.sticker {
  border-radius: 2px;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.4);
}

.sticker.white {
  background: #ffffff;
}

.sticker.yellow {
  background: #facc15;
}

.sticker.red {
  background: #ef4444;
}

.sticker.orange {
  background: #f97316;
}

.sticker.green {
  background: #22c55e;
}

.sticker.blue {
  background: #3b82f6;
}

.rubiks-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* GEOGUESSR CARDS */
.geoguessr-clues {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  width: 100%;
  margin-bottom: 12px;
}

.geo-clue-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.geo-clue-lbl {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.geo-clue-val {
  font-weight: 600;
  color: var(--text-main);
}

/* MULTIPLE CHOICE / OPTIONS GRID */
.ai-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.ai-option-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: all 0.15s ease;
  line-height: 1.35;
}

.ai-option-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.option-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ai-option-btn.selected-correct {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.ai-option-btn.selected-correct .option-badge {
  background: #10b981;
  color: white;
  border-color: #059669;
}

.ai-option-btn.selected-wrong {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.ai-option-btn.selected-wrong .option-badge {
  background: #ef4444;
  color: white;
  border-color: #dc2626;
}

/* TEXT / NUMERIC INPUT WIDGET */
.ai-input-row {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  margin-top: 8px;
}

.ai-text-input {
  flex: 1;
  font-family: var(--font-family);
  font-size: 0.95rem;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  outline: none;
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 0.15s ease;
}

.ai-text-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.15);
}

/* Controls Bar */
.ai-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.ai-status-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 560px) {
  .ai-options-grid {
    grid-template-columns: 1fr;
  }

  .slider-board {
    grid-template-columns: repeat(3, 68px);
    grid-template-rows: repeat(3, 68px);
  }

  .chess-board {
    grid-template-columns: repeat(8, 32px);
    grid-template-rows: repeat(8, 32px);
  }

  .chess-sq {
    width: 32px;
    height: 32px;
    font-size: 1.4rem;
  }

  .main-card {
    padding: 16px 12px;
  }

  .stepper {
    flex-direction: column;
  }

  .step-tab {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .reel-box {
    width: 80px;
    height: 90px;
  }

  .symbol {
    font-size: 2.3rem;
    line-height: 90px;
  }

  .canvas-panel {
    height: 300px;
  }

  .dramatic-counter {
    font-size: 3rem;
  }
}

/* ==========================================================================
   DEBUG ADMIN PANEL
   ========================================================================== */
.debug-admin-panel {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f8fafc;
  font-family: var(--font-family);
  font-size: 0.8rem;
  max-width: 95vw;
  overflow-x: auto;
  transition: all 0.2s ease;
}

.debug-admin-panel.minimized .admin-controls {
  display: none;
}

.admin-header-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding-right: 6px;
  border-right: 1px solid rgba(148, 163, 184, 0.25);
  white-space: nowrap;
}

.admin-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.admin-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  font-family: var(--font-mono);
}

.admin-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}

.admin-btn.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

.admin-btn.action-btn {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.admin-btn.action-btn:hover {
  background: #16a34a;
  color: #ffffff;
}

.admin-toggle-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.8rem;
  line-height: 1;
}

.admin-toggle-btn:hover {
  color: #ffffff;
}

/* ==========================================================================
   STAGE 6: ADVANCED PHYSICS & MATH EXAM (AI GRADED)
   ========================================================================== */
.exam-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
}

.exam-main-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Exam Banner */
.exam-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  gap: 14px;
}

.exam-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.exam-banner-icon {
  font-size: 2rem;
  line-height: 1;
}

.exam-banner-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.exam-banner-sub {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin: 0;
}

.exam-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

/* Question Cards List */
.exam-questions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.exam-question-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.25s ease;
  position: relative;
}

.exam-question-card:focus-within {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
  background: #ffffff;
}

.exam-question-card.evaluated-pass {
  border-color: #10b981 !important;
  background: #f0fdf4 !important;
}

.exam-question-card.evaluated-fail {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
}

.exam-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.exam-q-domain {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.exam-q-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.exam-q-prompt {
  font-size: 0.96rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Formula Highlight Box */
.exam-eq-box {
  background: #090d16;
  color: #f8fafc;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 1.15rem;
  letter-spacing: 0.4px;
  margin-bottom: 16px;
  overflow-x: auto;
  border-left: 4px solid #8b5cf6;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  user-select: text;
}

/* KaTeX custom sizing and overrides inside the dark box */
.exam-eq-box .katex-display {
  margin: 0 !important;
  color: #f8fafc !important;
}

.exam-eq-box .katex {
  font-size: 1.28rem !important;
  color: #f8fafc !important;
  text-rendering: geometricPrecision;
}

.exam-eq-box .katex .base {
  margin-top: 2px;
  margin-bottom: 2px;
}

/* Fallback math formatting */
.math-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'KaTeX_Main', 'Cambria Math', 'STIX Two Math', 'Times New Roman', Georgia, serif;
  font-size: 1.18rem;
  color: #f8fafc;
  letter-spacing: 0.5px;
  flex-wrap: wrap;
  gap: 6px;
  font-style: normal;
}

.math-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  padding: 0 4px;
  margin: 0 2px;
}

.math-num {
  border-bottom: 1.5px solid #94a3b8;
  padding: 0 4px 2px 4px;
  text-align: center;
  font-size: 0.9em;
}

.math-den {
  padding: 2px 4px 0 4px;
  text-align: center;
  font-size: 0.9em;
}

.math-sqrt {
  display: inline-flex;
  align-items: center;
}

.math-sqrt-symbol {
  font-size: 1.3em;
  line-height: 1;
  margin-right: 1px;
}

.math-radicand {
  border-top: 1.5px solid #94a3b8;
  padding: 0 3px;
}

.math-paren {
  font-size: 1.4em;
  line-height: 1;
  color: #94a3b8;
}

.exam-open-response-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exam-input-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.exam-textarea {
  width: 100%;
  min-height: 64px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.45;
  resize: vertical;
  transition: all 0.2s ease;
}

.exam-textarea:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.exam-input-hint {
  font-size: 0.72rem;
  color: #64748b;
}

/* Controls */
.exam-controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.exam-submit-btn {
  background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 12px 24px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3) !important;
  transition: all 0.2s ease !important;
  cursor: pointer;
}

.exam-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45) !important;
}

.exam-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.exam-grading-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #7c3aed;
}

.spinner-ring {
  width: 18px;
  height: 18px;
  border: 2px solid #ddd6fe;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: examSpin 0.8s linear infinite;
}

@keyframes examSpin {
  to {
    transform: rotate(360deg);
  }
}

/* AI Report Card */
.exam-report-card {
  background: #ffffff;
  border: 2px solid #8b5cf6;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
  animation: examFadeIn 0.4s ease-out;
}

@keyframes examFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 14px;
}

.report-score-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.score-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ede9fe;
  border: 3px solid #8b5cf6;
  font-size: 1.4rem;
  font-weight: 900;
  color: #6d28d9;
  flex-shrink: 0;
}

.score-denom {
  font-size: 0.75rem;
  color: #8b5cf6;
  font-weight: 700;
  margin-left: 2px;
}

.score-circle.passed {
  background: #dcfce7;
  border-color: #10b981;
  color: #15803d;
}

.score-circle.failed {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.score-meta h4 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 2px 0;
  color: #0f172a;
}

.score-meta p {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

.report-actions {
  display: flex;
  gap: 8px;
}

.report-critique-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-critique-item {
  border-radius: 8px;
  padding: 12px 16px;
  border-left: 4px solid #cbd5e1;
  background: #f8fafc;
}

.report-critique-item.pass {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.report-critique-item.fail {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.critique-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.critique-q-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.critique-chip {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.critique-chip.pass {
  background: #dcfce7;
  color: #15803d;
}

.critique-chip.fail {
  background: #fee2e2;
  color: #b91c1c;
}

.critique-text {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.45;
  margin: 0;
}