/* ============================================================
   DeductIQ — Premium Deductive Reasoning Game Styles
   ============================================================ */

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

:root {
  --bg-deep:    #080b14;
  --bg-panel:   #0d1220;
  --bg-card:    #111827;
  --bg-card2:   #161f32;
  --border:     rgba(255,255,255,0.07);
  --border-glow:rgba(167,139,250,0.35);

  --purple:     #a78bfa;
  --purple-d:   #7c3aed;
  --blue:       #60a5fa;
  --cyan:       #22d3ee;
  --pink:       #f472b6;
  --green:      #4ade80;
  --amber:      #fbbf24;
  --red:        #f87171;

  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --transition: 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease:       0.2s ease;

  /* Level palettes */
  --basic-from:  #4ade80; --basic-to:  #22d3ee;
  --easy-from:   #60a5fa; --easy-to:   #a78bfa;
  --inter-from:  #f97316; --inter-to:  #f472b6;
  --adv-from:    #f43f5e; --adv-to:    #fbbf24;
}

html { font-size: 16px; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Animated Background ────────────────────────────────── */
.bg-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: floatOrb 14s ease-in-out infinite alternate;
}
.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #7c3aed, transparent);
  top: -150px; left: -100px;
  animation-duration: 12s;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #0ea5e9, transparent);
  bottom: -100px; right: -80px;
  animation-duration: 16s; animation-delay: -4s;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #f472b6, transparent);
  top: 40%; left: 50%;
  animation-duration: 20s; animation-delay: -8s;
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}
@keyframes floatOrb {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.12); }
}

/* ── Screens ────────────────────────────────────────────── */
.screen {
  position: relative; z-index: 10;
  display: none; opacity: 0;
  min-height: 100vh;
  transition: opacity 0.4s ease;
}
.screen.active {
  display: flex; opacity: 1;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 48px;
}

/* ── HOME ───────────────────────────────────────────────── */
.home-container {
  width: 100%; max-width: 840px;
  display: flex; flex-direction: column;
  align-items: center; gap: 40px;
}

/* Logo */
.logo-area { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.logo-icon {
  width: 80px; height: 80px;
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
  box-shadow: 0 0 40px rgba(167,139,250,0.2);
  animation: iconPulse 3s ease-in-out infinite;
}
@keyframes iconPulse {
  0%,100% { box-shadow: 0 0 40px rgba(167,139,250,0.2); }
  50%      { box-shadow: 0 0 60px rgba(167,139,250,0.4); }
}
.logo-icon svg { width: 100%; height: 100%; }
.logo-title {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -2px;
  color: var(--text-primary);
}
.logo-title .accent {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-tagline {
  font-size: 1rem; color: var(--text-secondary);
  font-weight: 400; letter-spacing: 0.5px;
}

/* Level Grid */
.level-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px; width: 100%;
}
@media(max-width:600px){ .level-grid{ grid-template-columns: 1fr; } }

.level-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex; align-items: center;
  gap: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--ease), box-shadow var(--ease);
}
.level-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--card-gradient, linear-gradient(135deg, rgba(74,222,128,0.06), rgba(34,211,238,0.06)));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.level-card:hover::before { opacity: 1; }
.level-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--card-border, rgba(74,222,128,0.4));
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px var(--card-glow, rgba(74,222,128,0.15));
}
.level-card:active { transform: translateY(-1px) scale(1); }

/* Per-level colours */
.level-card[data-level="basic"]        { --card-gradient: linear-gradient(135deg, rgba(74,222,128,0.08), rgba(34,211,238,0.08)); --card-border: rgba(74,222,128,0.4); --card-glow: rgba(74,222,128,0.15); }
.level-card[data-level="easy"]         { --card-gradient: linear-gradient(135deg, rgba(96,165,250,0.08), rgba(167,139,250,0.08)); --card-border: rgba(96,165,250,0.4); --card-glow: rgba(96,165,250,0.15); }
.level-card[data-level="intermediate"] { --card-gradient: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(244,114,182,0.08)); --card-border: rgba(249,115,22,0.4); --card-glow: rgba(249,115,22,0.15); }
.level-card[data-level="advanced"]     { --card-gradient: linear-gradient(135deg, rgba(244,63,94,0.08), rgba(251,191,36,0.08)); --card-border: rgba(244,63,94,0.4); --card-glow: rgba(244,63,94,0.15); }

.level-badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 1px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.level-icon { font-size: 2.2rem; flex-shrink: 0; }
.level-info { flex: 1; }
.level-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.level-desc { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.4; }
.level-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.meta-tag {
  font-size: 0.65rem; font-weight: 600;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 8px;
  color: var(--text-secondary);
}
.level-arrow {
  font-size: 1.2rem; color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}
.level-card:hover .level-arrow { transform: translateX(4px); color: var(--text-primary); }

/* High Scores Section */
.high-scores-section {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.hs-title {
  font-size: 1rem; font-weight: 700;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
  color: var(--text-secondary);
}
.hs-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px;
}
@media(max-width:600px){ .hs-grid{ grid-template-columns: repeat(2,1fr); } }

.hs-chip {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.hs-chip-level { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.hs-chip-score { font-size: 1.5rem; font-weight: 800; }
.hs-chip-score.basic-col   { color: var(--green); }
.hs-chip-score.easy-col    { color: var(--blue); }
.hs-chip-score.inter-col   { color: #f97316; }
.hs-chip-score.adv-col     { color: var(--pink); }

/* ── GAME HEADER ────────────────────────────────────────── */
#screen-game {
  padding: 0;
  background: transparent;
}
.game-header {
  width: 100%;
  padding: 16px 24px;
  display: flex; align-items: center; gap: 16px;
  background: rgba(8,11,20,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.btn-back {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  transition: all var(--ease);
  font-family: 'Outfit', sans-serif;
}
.btn-back:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.game-meta-bar { flex: 1; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.meta-chip {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.score-chip { border-color: rgba(167,139,250,0.3); background: rgba(167,139,250,0.08); }

/* Timer Ring */
.timer-ring-wrap { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.timer-ring { transform: rotate(-90deg); }
.timer-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 4; }
.timer-arc {
  fill: none;
  stroke: var(--purple); stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 138.2; /* 2π×22 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.5s ease;
}
.timer-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

/* ── GAME BODY ──────────────────────────────────────────── */
.game-body {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 24px;
  padding: 32px 16px 48px;
  width: 100%; max-width: 720px;
  margin: 0 auto;
}

/* Question Card */
.question-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: cardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.qcard-top { padding: 28px 32px 24px; background: var(--bg-card2); }
.qcard-bottom { padding: 24px 32px 28px; }
.qcard-divider { height: 1px; background: var(--border); }
.q-label {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); margin-bottom: 14px;
}
.q-premises {
  display: flex; flex-direction: column; gap: 8px;
}
.q-premise {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 1rem; line-height: 1.5; color: var(--text-primary);
}
.premise-num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.3);
  border-radius: 50%;
  font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: var(--purple);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}
.q-question {
  font-size: 1.1rem; font-weight: 600;
  color: var(--text-primary); line-height: 1.5;
  border-left: 3px solid var(--purple);
  padding-left: 16px;
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px; width: 100%;
}
@media(max-width:480px){ .options-grid{ grid-template-columns:1fr; } }

.option-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  color: var(--text-primary);
  font-size: 0.95rem; font-weight: 500;
  cursor: pointer; text-align: left;
  font-family: 'Outfit', sans-serif;
  position: relative; overflow: hidden;
  transition: all var(--transition);
  line-height: 1.4;
}
.option-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.option-btn:hover:not(:disabled)::before { opacity: 1; }
.option-btn:hover:not(:disabled) {
  border-color: rgba(167,139,250,0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.option-btn.correct {
  border-color: var(--green) !important;
  background: rgba(74,222,128,0.1) !important;
  box-shadow: 0 0 20px rgba(74,222,128,0.2);
}
.option-btn.wrong {
  border-color: var(--red) !important;
  background: rgba(248,113,113,0.1) !important;
}
.option-btn:disabled { cursor: not-allowed; }
.option-letter {
  display: inline-block;
  width: 24px; height: 24px;
  background: rgba(255,255,255,0.07);
  border-radius: 6px;
  font-size: 0.75rem; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  text-align: center; line-height: 24px;
  margin-right: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Feedback Bar */
.feedback-bar {
  display: none;
  width: 100%;
  border-radius: var(--radius-md);
  padding: 16px 22px;
  align-items: flex-start; gap: 14px;
  border: 1px solid;
  animation: feedIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes feedIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.feedback-bar.show { display: flex; }
.feedback-bar.correct-fb {
  background: rgba(74,222,128,0.08);
  border-color: rgba(74,222,128,0.35);
}
.feedback-bar.wrong-fb {
  background: rgba(248,113,113,0.08);
  border-color: rgba(248,113,113,0.35);
}
.feedback-icon {
  font-size: 1.4rem; flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.correct-fb .feedback-icon { background: rgba(74,222,128,0.2); }
.wrong-fb   .feedback-icon { background: rgba(248,113,113,0.2); }
.fb-main { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.correct-fb .fb-main { color: var(--green); }
.wrong-fb   .fb-main { color: var(--red); }
.fb-explain { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }

/* Next Button */
.btn-next {
  background: linear-gradient(135deg, var(--purple-d), var(--blue));
  border: none; color: white;
  padding: 14px 36px;
  border-radius: var(--radius-md);
  font-size: 1rem; font-weight: 700;
  cursor: pointer; font-family: 'Outfit', sans-serif;
  display: flex; align-items: center; gap: 8px;
  transition: all var(--transition);
  box-shadow: 0 8px 30px rgba(124,58,237,0.35);
}
.btn-next:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(124,58,237,0.5); }
.btn-next:active { transform: translateY(-1px); }

/* ── RESULT ─────────────────────────────────────────────── */
.result-container {
  width: 100%; max-width: 560px;
  display: flex; flex-direction: column;
  align-items: center; gap: 24px;
  animation: cardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.result-trophy {
  font-size: 5rem;
  animation: trophyBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes trophyBounce {
  from { opacity: 0; transform: scale(0.3) rotate(-15deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}
.result-title {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900; letter-spacing: -1px;
  text-align: center;
}
.result-level-tag {
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1.5px;
}

.result-score-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
}
.rsc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
}
.rsc-label { font-size: 0.9rem; color: var(--text-secondary); }
.rsc-value { font-size: 1.1rem; font-weight: 700; }
.rsc-value.highlight { color: var(--purple); }
.rsc-value.bonus { color: var(--cyan); }
.rsc-value.grand {
  font-size: 2rem; font-weight: 900;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.rsc-divider { height: 1px; background: var(--border); margin: 8px 0; }

/* Stars */
.result-stars { display: flex; gap: 8px; }
.result-stars .star {
  font-size: 2rem;
  animation: starPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  filter: grayscale(1); opacity: 0.25;
}
.result-stars .star.filled {
  filter: none; opacity: 1;
}
.star:nth-child(1) { animation-delay: 0.1s; }
.star:nth-child(2) { animation-delay: 0.2s; }
.star:nth-child(3) { animation-delay: 0.3s; }
.star:nth-child(4) { animation-delay: 0.4s; }
.star:nth-child(5) { animation-delay: 0.5s; }
@keyframes starPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.high-score-notice {
  background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(244,63,94,0.15));
  border: 1px solid rgba(251,191,36,0.35);
  border-radius: var(--radius-md);
  padding: 12px 28px;
  font-size: 0.95rem; font-weight: 700; color: var(--amber);
  animation: cardIn 0.4s ease;
}

.result-btns { display: flex; gap: 12px; width: 100%; }

.btn-primary, .btn-secondary {
  flex: 1; padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; font-family: 'Outfit', sans-serif;
  transition: all var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple-d), var(--blue));
  border: none; color: white;
  box-shadow: 0 8px 30px rgba(124,58,237,0.3);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(124,58,237,0.5); }
.btn-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border); color: var(--text-primary);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }

.all-scores-section {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.all-scores-section h3 {
  font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); margin-bottom: 16px;
}

/* Score Row in result */
.score-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.score-row:last-child { border-bottom: none; }
.sr-level { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.sr-dot { width: 8px; height: 8px; border-radius: 50%; }
.sr-score { font-weight: 800; font-size: 1.1rem; }

/* ── Utilities ──────────────────────────────────────────── */
.icon-trophy { font-size: 1.1rem; }

/* Progress Bar */
.progress-bar-wrap {
  width: 100%; height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  transition: width 0.5s ease;
}

/* Score Pulse Animation */
@keyframes scorePulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); color: var(--green); }
  100% { transform: scale(1); }
}
.score-pulse { animation: scorePulse 0.5s ease; }

/* Shake on wrong */
@keyframes shake {
  0%,100%{ transform: translateX(0); }
  20%    { transform: translateX(-8px); }
  40%    { transform: translateX(8px); }
  60%    { transform: translateX(-5px); }
  80%    { transform: translateX(5px); }
}
.shake { animation: shake 0.4s ease; }

/* Mobile tweaks */
@media(max-width:480px) {
  .game-header { padding: 12px 16px; gap: 8px; }
  .game-body { padding: 20px 12px 40px; }
  .qcard-top, .qcard-bottom { padding: 20px; }
  .result-score-card { padding: 20px; }
}

/* ── MODE TOGGLE ────────────────────────────────────────── */
.mode-toggle {
  display: flex; gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 5px;
}
.mode-btn {
  flex: 1;
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  transition: all 0.25s ease;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
}
.mode-btn.active {
  background: linear-gradient(135deg, var(--purple-d), #2563eb);
  color: white;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.mode-btn:not(.active):hover {
  background: rgba(255,255,255,0.07);
  color: var(--text-primary);
}
.mode-hint {
  font-size: 0.8rem; color: var(--text-muted);
  text-align: center;
  transition: all 0.3s ease;
}

/* ── GAP FILL CARD ──────────────────────────────────────── */
.gap-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: cardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gap-card-label {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); margin-bottom: 20px;
}
.gap-text {
  font-size: 1.05rem; line-height: 2.2;
  color: var(--text-primary); font-weight: 400;
}

/* ── BLANK BOXES ────────────────────────────────────────── */
.blank-box {
  display: inline-flex;
  align-items: center; justify-content: center;
  min-width: 100px; height: 36px;
  padding: 0 12px;
  background: rgba(167,139,250,0.08);
  border: 2px dashed rgba(167,139,250,0.4);
  border-radius: 8px;
  margin: 0 4px;
  cursor: pointer;
  font-size: 0.9rem; font-weight: 600;
  color: var(--purple);
  vertical-align: middle;
  transition: all 0.2s ease;
  position: relative;
  font-family: 'JetBrains Mono', monospace;
}
.blank-box:empty::before {
  content: '▢';
  opacity: 0.35;
  font-size: 1.1rem;
  font-family: sans-serif;
}
.blank-box.blank-filled {
  background: rgba(167,139,250,0.15);
  border-style: solid;
  border-color: var(--purple);
  color: var(--text-primary);
  cursor: pointer;
}
.blank-box.blank-filled:hover {
  background: rgba(248,113,113,0.1);
  border-color: var(--red);
  color: var(--red);
}
.blank-box.blank-filled:hover::after {
  content: '✕';
  position: absolute;
  top: -8px; right: -8px;
  font-size: 0.6rem;
  background: var(--red);
  color: white;
  border-radius: 50%;
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}
.blank-box.blank-correct {
  background: rgba(74,222,128,0.15) !important;
  border-style: solid !important;
  border-color: var(--green) !important;
  color: var(--green) !important;
  cursor: default;
}
.blank-box.blank-wrong {
  background: rgba(248,113,113,0.15) !important;
  border-style: solid !important;
  border-color: var(--red) !important;
  color: var(--red) !important;
  cursor: default;
  text-decoration: line-through;
}
.blank-correct-word {
  display: inline-block;
  color: var(--green);
  font-weight: 700;
  margin-left: 4px;
}

/* ── WORD BANK ──────────────────────────────────────────── */
.word-bank-wrap {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.word-bank-label {
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); margin-bottom: 14px;
}
.word-bank {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.word-chip {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 9px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.word-chip:hover:not(:disabled) {
  background: rgba(167,139,250,0.15);
  border-color: var(--purple);
  color: var(--purple);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(124,58,237,0.25);
}
.word-chip:active:not(:disabled) { transform: translateY(-1px); }
.word-chip:disabled, .word-chip.used {
  opacity: 0.25;
  cursor: not-allowed;
  text-decoration: line-through;
  transform: none !important;
  box-shadow: none !important;
}
.word-chip.correct-used {
  opacity: 0.5;
  background: rgba(74,222,128,0.08);
  border-color: rgba(74,222,128,0.3);
  color: var(--green);
  text-decoration: none;
}

/* ── CHECK BUTTON ───────────────────────────────────────── */
.btn-check {
  background: linear-gradient(135deg, #059669, #22d3ee);
  border: none; color: white;
  padding: 14px 36px;
  border-radius: var(--radius-md);
  font-size: 1rem; font-weight: 700;
  cursor: pointer; font-family: 'Outfit', sans-serif;
  display: flex; align-items: center; gap: 8px;
  transition: all var(--transition);
  box-shadow: 0 8px 30px rgba(5,150,105,0.35);
}
.btn-check:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(5,150,105,0.5); }
.btn-check:active { transform: translateY(-1px); }

/* ── PROGRESS DOTS ──────────────────────────────────────── */
.gap-progress {
  display: flex; gap: 8px; align-items: center;
}
.progress-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.15);
  transition: all 0.3s ease;
}
.progress-dot.done-correct { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px rgba(74,222,128,0.5); }
.progress-dot.done-wrong   { background: var(--red);   border-color: var(--red);   }
.progress-dot.current      { background: var(--purple); border-color: var(--purple); box-shadow: 0 0 8px rgba(167,139,250,0.5); transform: scale(1.3); }

/* ── INSTRUCTION CHIP ───────────────────────────────────── */
.gap-instruction {
  font-size: 0.85rem; color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  text-align: center; width: 100%;
  font-style: italic;
}

