/* ─── Science Command Word Decoder — Visual & Minimalist CSS ──────────────── */

:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --success-color: #10b981;
  --success-soft: #ecfdf5;
  --danger-color: #ef4444;
  --danger-soft: #fef2f2;
  --card-bg: #ffffff;
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius: 14px;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
}

.hidden { display: none !important; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }

/* ─── TOP BAR ─────────────────────────────────────────────────────────────── */
.top-bar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-tabs-pill {
  display: flex;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 99px;
  gap: 0.25rem;
}

.tab-pill-btn {
  background: transparent;
  border: none;
  padding: 0.45rem 1.1rem;
  border-radius: 99px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.tab-pill-btn:hover { color: var(--text-color); }
.tab-pill-btn.active {
  background: var(--card-bg);
  color: var(--primary-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.tab-badge {
  background: var(--primary-color);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

/* ─── HERO HEADER ─────────────────────────────────────────────────────────── */
.decoder-hero {
  text-align: center;
  padding: 2rem 0 1.5rem;
}

.decoder-hero h1 {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
  color: #0f172a;
}

.decoder-hero h1 span { color: var(--primary-color); }

.decoder-hero p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ─── 1. VISUAL RECIPE CARDS GRID ─────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.visual-recipe-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.visual-recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.card-top-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

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

.card-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.card-tagline {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

.golden-rule-box {
  background: #f8fafc;
  border-left: 5px solid var(--primary-color);
  padding: 0.85rem 1rem;
  border-radius: 0 10px 10px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.example-snippet {
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.65rem;
  line-height: 1.5;
}

.example-snippet.bad {
  background: #fef2f2;
  color: #991b1b;
  border: 1.5px solid #fecaca;
}

.example-snippet.good {
  background: #f0fdf4;
  color: #166534;
  border: 1.5px solid #bbf7d0;
  font-weight: 600;
}

.trap-pill {
  font-size: 0.88rem;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1.5px solid #fde68a;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.4;
}

/* ─── 2. QUICK-TAP DRILL VIEW ─────────────────────────────────────────────── */
#drill-view {
  max-width: 720px;
  margin: 0 auto 3rem;
}

.drill-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.quiz-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.level-indicator {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.level-indicator.level-1 {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.level-indicator.level-2 {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.quiz-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  text-transform: uppercase;
  background: #e0f2fe;
  color: #0369a1;
}

.quiz-question-box {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.command-word-highlight {
  background: #fef08a;
  color: #854d0e;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #fde047;
}

.choices-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.choice-card-btn {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-color);
}

.choice-card-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  background: var(--primary-soft);
  transform: translateY(-2px);
}

.choice-card-btn.reveal-correct {
  border-color: var(--success-color);
  background: #f0fdf4;
  color: #166534;
  font-weight: 600;
}

.choice-card-btn.reveal-wrong {
  border-color: var(--danger-color);
  background: #fef2f2;
  color: #991b1b;
  opacity: 0.85;
}

.quiz-feedback-box {
  margin-top: 1.25rem;
  padding: 1.1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.5;
  animation: popIn 0.2s ease;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.quiz-feedback-box.correct {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  color: #166534;
}

.quiz-feedback-box.wrong {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
}

.btn-next-quiz {
  width: 100%;
  padding: 0.95rem;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1.25rem;
  transition: opacity 0.2s;
}

.btn-next-quiz:hover { opacity: 0.9; }

/* ─── 3. YOUR PROGRESS DASHBOARD VIEW ─────────────────────────────────────── */
#progress-view {
  max-width: 860px;
  margin: 0 auto 3rem;
}

.progress-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-card-val {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.stat-card-badge {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-color);
}

.mastery-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.75rem;
}

.mastery-card-header {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.breakdown-bars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.word-progress-row {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

.word-progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.progress-track {
  background: #e2e8f0;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  background: var(--primary-color);
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 0.4s ease;
}

.progress-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn-progress-action {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-progress-action.primary {
  background: var(--primary-color);
  color: #fff;
}

.btn-progress-action.secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.btn-progress-action:hover { opacity: 0.9; transform: translateY(-1px); }

/* ─── 4. PROGRESS UNLOCK GATE CARD ────────────────────────────────────────── */
.unlock-gate-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 520px;
  margin: 1.5rem auto 2.5rem;
}

.unlock-gate-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.unlock-gate-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.unlock-gate-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.unlock-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
}

.unlock-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.unlock-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.unlock-input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.unlock-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.unlock-submit-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.2s;
}

.unlock-submit-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 1rem;
}

/* ─── TUTOR PROMO BANNER ─────────────────────────────────────────────────── */
.tutor-promo-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}

.tutor-promo-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.25rem; }
.tutor-promo-card p  { font-size: 0.825rem; opacity: 0.85; max-width: 540px; }

.btn-whatsapp-cta {
  background: #25D366;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.3rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  white-space: nowrap;
}

.btn-whatsapp-cta:hover {
  background: #20ba5a;
  transform: translateY(-2px);
}
