/* ============================================================
   AI Learning Website - Styles
   ============================================================ */

:root {
  --sidebar-w: 280px;
  --topnav-h: 60px;
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --bg: #f0f4f8;
  --card-bg: #ffffff;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active: #6366f1;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --code-bg: #1e1e2e;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Top Navigation ── */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topnav-h);
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  padding: 0 24px 0 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.brand {
  width: var(--sidebar-w);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  text-decoration: none;
  cursor: pointer;
}

.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 11px;
  color: var(--sidebar-text);
  margin-top: -2px;
}

.topnav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-info {
  color: var(--sidebar-text);
  font-size: 13px;
}

.progress-bar-mini {
  width: 120px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

/* ── Layout ── */
.layout {
  display: flex;
  padding-top: var(--topnav-h);
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed;
  top: var(--topnav-h);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  padding: 16px 0;
  border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #475569;
  padding: 16px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 0;
  transition: all 0.15s;
  color: var(--sidebar-text);
  text-decoration: none;
  position: relative;
}

.nav-item:hover {
  background: rgba(99,102,241,0.1);
  color: #c7d2fe;
}

.nav-item.active {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}

.nav-item.active .nav-icon { background: rgba(99,102,241,0.3); }

.nav-label { font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.nav-num { font-size: 10px; color: #475569; margin-top: 1px; }

.nav-check {
  margin-left: auto;
  width: 18px; height: 18px;
  background: var(--success);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: white;
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-check.done { opacity: 1; }

/* ── Main Content ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
}

.section {
  display: none;
  padding: 40px 48px;
  max-width: 1000px;
  animation: fadeIn 0.25s ease;
}

.section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Home Page ── */
.hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #1e40af 100%);
  border-radius: 20px;
  padding: 60px 48px;
  color: white;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.4) 0%, transparent 70%);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: 20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(6,182,212,0.3) 0%, transparent 70%);
}

.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero p {
  font-size: 17px;
  opacity: 0.85;
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  gap: 32px;
}

.hero-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: #a5b4fc;
}

.hero-stat-label {
  font-size: 12px;
  opacity: 0.7;
  margin-top: -4px;
}

/* ── Module Cards (Home) ── */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.module-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--primary));
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.module-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.module-card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: var(--icon-bg, #eef2ff);
}

.module-card-meta .module-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.module-card-meta .module-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.module-card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: #f1f5f9;
  color: #475569;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 500;
}

/* ── Section Header ── */
.section-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--badge-bg, #eef2ff);
  color: var(--badge-color, var(--primary));
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}

.section-header h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
  line-height: 1.2;
}

.section-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.7;
}

.learning-objectives {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-top: 20px;
}

.learning-objectives h4 {
  font-size: 13px;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.learning-objectives ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.learning-objectives li {
  background: #dcfce7;
  color: #166534;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12.5px;
  font-weight: 500;
}

.learning-objectives li::before { content: '✓ '; }

/* ── Content Blocks ── */
.content-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.content-card h2 {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 10px;
  color: var(--text-primary);
}

.content-card p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
  font-size: 15px;
}

.content-card ul, .content-card ol {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 12px;
}

.content-card li { margin-bottom: 4px; }

/* ── Code Blocks ── */
.code-block {
  background: var(--code-bg);
  border-radius: var(--radius-sm);
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.code-lang {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #7c85a2;
  text-transform: uppercase;
}

.copy-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #7c85a2;
  border-radius: 5px;
  padding: 3px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover { background: rgba(255,255,255,0.15); color: #c4c9d4; }
.copy-btn.copied { color: var(--success); border-color: var(--success); }

.code-block pre {
  padding: 20px;
  margin: 0;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
}

.code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* ── Callout Boxes ── */
.callout {
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
  display: flex;
  gap: 12px;
  font-size: 14px;
  line-height: 1.65;
}

.callout-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.callout.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.callout.warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.callout.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.callout.tip { background: #fdf4ff; border: 1px solid #e9d5ff; color: #6b21a8; }

/* ── Diagram Boxes ── */
.diagram {
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin: 16px 0;
  text-align: center;
}

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

.flow-box {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.flow-box.accent { background: #eef2ff; border-color: #c7d2fe; color: var(--primary); }
.flow-box.green { background: #f0fdf4; border-color: #86efac; color: #166534; }
.flow-box.blue { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.flow-box.purple { background: #fdf4ff; border-color: #d8b4fe; color: #7e22ce; }
.flow-box.orange { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.flow-box.cyan { background: #ecfeff; border-color: #a5f3fc; color: #0e7490; }

.flow-arrow {
  color: var(--text-secondary);
  font-size: 18px;
  margin: 0 4px;
  flex-shrink: 0;
}

.flow-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.flow-arrow-down {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 3px 0;
}

/* ── Comparison Table ── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table th {
  background: #f8fafc;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.compare-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

.compare-table tr:hover td { background: #f8fafc; }

.badge-green { background: #dcfce7; color: #166534; border-radius: 4px; padding: 1px 7px; font-size: 11px; font-weight: 600; }
.badge-blue { background: #dbeafe; color: #1d4ed8; border-radius: 4px; padding: 1px 7px; font-size: 11px; font-weight: 600; }
.badge-orange { background: #ffedd5; color: #9a3412; border-radius: 4px; padding: 1px 7px; font-size: 11px; font-weight: 600; }
.badge-purple { background: #f3e8ff; color: #6b21a8; border-radius: 4px; padding: 1px 7px; font-size: 11px; font-weight: 600; }

/* ── Key Concept Cards ── */
.concepts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.concept-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.concept-item .concept-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.concept-item .concept-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Section Nav Buttons ── */
.section-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.15s;
  text-decoration: none;
}

.nav-btn:hover { border-color: var(--primary); color: var(--primary); background: #eef2ff; }
.nav-btn.primary { background: var(--primary); color: white; border-color: var(--primary); }
.nav-btn.primary:hover { background: var(--primary-dark); }

/* ── Mark Done Button ── */
.done-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--success);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s;
}

.done-btn:hover { background: #059669; }
.done-btn.completed { background: #6b7280; cursor: default; }

/* ── Two-column layout ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 14px 0;
}

@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ── Agent/RAG architecture diagrams ── */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  margin: 16px 0;
}

.arch-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.arch-box {
  border: 1.5px solid;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  min-width: 100px;
}

.arch-box.user { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.arch-box.llm { border-color: #d8b4fe; background: #fdf4ff; color: #7e22ce; }
.arch-box.tool { border-color: #86efac; background: #f0fdf4; color: #166534; }
.arch-box.memory { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.arch-box.db { border-color: #a5f3fc; background: #ecfeff; color: #0e7490; }
.arch-box.embed { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.arch-box.retriever { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }

.arch-separator {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.arch-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
  .section { padding: 24px 20px; }
  .hero { padding: 36px 24px; }
  .hero h1 { font-size: 28px; }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Syntax Highlighting (Prism Tomorrow theme customizations) ── */
code[class*="language-"],
pre[class*="language-"] {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace !important;
}

/* ============================================================
   AUTH SYSTEM — Modals, Topbar, Forms
   ============================================================ */

/* ── Modal Overlay (shared by auth + payment) ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: modalFadeIn 0.18s ease; }

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideUp 0.2s ease;
}
.modal-box-auth { max-width: 460px; }

@keyframes modalSlideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: #e2e8f0; color: #1e293b; }

/* ── Auth Form ── */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid #f1f5f9;
  padding: 20px 32px 0;
}
.auth-tab {
  background: none;
  border: none;
  padding: 10px 0;
  margin-right: 28px;
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.auth-tab:hover  { color: #1e293b; }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.auth-form { padding: 28px 32px 32px; }

.auth-title {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.auth-sub {
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 26px;
  line-height: 1.5;
}

.auth-field { margin-bottom: 18px; }
.auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  color: #1e293b;
}
.auth-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.auth-field input::placeholder { color: #cbd5e1; }

.auth-pw-wrap { position: relative; }
.auth-pw-wrap input { padding-right: 56px; }
.pw-toggle {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}
.pw-toggle:hover { color: #475569; }

/* Password strength */
.pw-strength-bar {
  height: 4px;
  background: #f1f5f9;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 2px;
  width: 0;
  transition: width 0.2s ease, background 0.2s ease;
}
.pw-strength-label {
  font-size: 11.5px;
  margin-top: 4px;
  display: block;
  font-weight: 600;
}

.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.auth-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.auth-terms {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.5;
}
.auth-terms a { color: var(--primary); text-decoration: none; }

.auth-submit {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.auth-submit:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.auth-links {
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.auth-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-link:hover { color: var(--primary-dark); }

/* Spinner inside buttons */
.auth-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Topbar — Guest (not logged in) ── */
.topnav-guest-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topnav-login-btn {
  padding: 7px 16px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #c7d2fe;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.topnav-login-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); color: #fff; }

.topnav-register-btn {
  padding: 7px 16px;
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.topnav-register-btn:hover { background: var(--primary-dark); }

/* ── Topbar — Logged-in user pill ── */
.topnav-user-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.topnav-user-pill:hover { background: rgba(255,255,255,0.13); }

.topnav-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topnav-username { font-size: 13px; font-weight: 600; color: #e2e8f0; }

/* Dropdown menu */
.topnav-user-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.15);
  border: 1px solid #e2e8f0;
  min-width: 220px;
  z-index: 200;
  overflow: hidden;
  animation: menuFadeIn 0.15s ease;
}
.topnav-user-menu.open { display: block; }

@keyframes menuFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tum-item {
  padding: 10px 16px;
  font-size: 13.5px;
  color: #374151;
  cursor: pointer;
  transition: background 0.1s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tum-item:hover { background: #f8fafc; }
.tum-item.tum-info {
  cursor: default;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 16px;
}
.tum-item.tum-info strong { font-size: 14px; color: #1e293b; }
.tum-item.tum-info span   { font-size: 12px; color: #94a3b8; }
.tum-item.tum-logout { color: #ef4444; }
.tum-item.tum-logout:hover { background: #fef2f2; }
.tum-divider { height: 1px; background: #f1f5f9; margin: 2px 0; }

/* ── Topbar credit pill ── */
.topnav-credit-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(99,102,241,0.18);
  border: 1px solid rgba(99,102,241,0.3);
  cursor: pointer;
  transition: background 0.15s;
}
.topnav-credit-pill:hover { background: rgba(99,102,241,0.28); }
.topnav-credit-pill .credit-balance { font-size: 12.5px; font-weight: 700; color: #a5b4fc; }

/* ── Topbar interview button ── */
.topnav-interview-btn {
  padding: 7px 14px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.topnav-interview-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ── Toast Notification ── */
.auth-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1e293b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}
.auth-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Payment Modal internals ── */
.pm-header { padding: 28px 28px 0; }
.pm-title  { font-size: 22px; font-weight: 800; color: #1e293b; margin-bottom: 6px; }
.pm-balance { font-size: 14px; color: #64748b; margin-bottom: 10px; }
.pm-sub-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #f0fdf4; border: 1px solid #86efac; color: #166534;
  border-radius: 20px; padding: 3px 12px; font-size: 12.5px; font-weight: 600;
  margin-bottom: 10px;
}
.pm-tabs {
  display: flex;
  border-bottom: 2px solid #f1f5f9;
  padding: 0 28px;
  margin-top: 12px;
}
.pm-tab {
  background: none; border: none;
  padding: 10px 0; margin-right: 24px;
  font-size: 13.5px; font-weight: 600; color: #94a3b8;
  cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.pm-tab:hover  { color: #1e293b; }
.pm-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.pm-tab-content { padding: 20px 28px 28px; }
.pm-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 16px;
  position: relative;
}
.pm-card-featured {
  background: linear-gradient(135deg, #eef2ff, #fdf4ff);
  border-color: #c7d2fe;
}
.pm-badge-best {
  position: absolute; top: -10px; left: 20px;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  color: #fff; border-radius: 20px;
  padding: 3px 12px; font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
}
.pm-card-title { font-size: 16px; font-weight: 800; color: #1e293b; margin-bottom: 4px; }
.pm-card-desc  { font-size: 13px; color: #64748b; margin-bottom: 16px; line-height: 1.5; }
.pm-price-big  { font-size: 36px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.pm-price-big span { font-size: 14px; font-weight: 600; color: #94a3b8; }

.pm-features { list-style: none; margin-bottom: 18px; }
.pm-features li { font-size: 13.5px; color: #374151; padding: 3px 0; }

.pm-slider-section { margin-bottom: 16px; }
.pm-slider-section label { font-size: 13px; font-weight: 600; color: #374151; display: block; margin-bottom: 10px; }
.credit-slider {
  width: 100%; height: 6px; border-radius: 3px;
  accent-color: var(--primary); margin-bottom: 10px;
}
.pm-price-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.pm-hint { color: #94a3b8; font-size: 13px; }

.pm-presets { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.pm-preset {
  flex: 1; min-width: 70px;
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 9px; padding: 8px 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  text-align: center; transition: all 0.15s;
}
.pm-preset:hover   { border-color: var(--primary); color: var(--primary); }
.pm-preset.popular { border-color: #f59e0b; color: #d97706; background: #fffbeb; }
.pm-preset small   { display: block; font-size: 11px; font-weight: 500; color: #94a3b8; margin-top: 2px; }

.pm-demo-notice {
  background: #fffbeb; border: 1px solid #fde68a;
  color: #92400e; border-radius: 8px;
  padding: 8px 12px; font-size: 12.5px; margin-bottom: 12px;
}
.pm-buy-btn {
  width: 100%; padding: 12px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.pm-buy-btn:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); }
.pm-buy-btn-disabled { background: #94a3b8 !important; cursor: not-allowed !important; transform: none !important; }

.pm-compare { overflow-x: auto; }
.pm-compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pm-compare-table th, .pm-compare-table td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; text-align: left; }
.pm-compare-table th { font-weight: 700; color: #94a3b8; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.pm-compare-table .highlight { color: var(--primary); font-weight: 700; }

.pm-tx-list { max-height: 280px; overflow-y: auto; }
.pm-tx {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #f1f5f9;
}
.pm-tx:last-child { border-bottom: none; }
.pm-tx-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: #f1f5f9; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.pm-tx-detail { flex: 1; min-width: 0; }
.pm-tx-note { font-size: 13px; font-weight: 600; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-tx-date { font-size: 11.5px; color: #94a3b8; margin-top: 1px; }
.pm-tx-amount { font-size: 14px; font-weight: 700; flex-shrink: 0; }
.pm-tx-amount.credit { color: var(--success); }
.pm-tx-amount.debit  { color: var(--danger); }

/* ── Interview Section ── */
.iv-topbar {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.iv-tab-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: all 0.15s;
}
.iv-tab-btn:hover  { border-color: var(--primary); color: var(--primary); }
.iv-tab-btn.iv-tab-active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Setup page */
.iv-setup-hero { text-align: center; margin-bottom: 32px; }
.iv-hero-icon  { font-size: 56px; margin-bottom: 12px; }
.iv-setup-hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 10px; }
.iv-setup-hero p  { color: var(--text-secondary); font-size: 15px; max-width: 520px; margin: 0 auto; line-height: 1.7; }

.iv-credit-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: #eef2ff; border: 1px solid #c7d2fe;
  border-radius: 12px; padding: 14px 20px; margin-bottom: 28px;
}
.iv-credit-info { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #374151; }
.iv-low-credit  { color: var(--danger); font-size: 13px; font-weight: 600; }
.iv-buy-btn {
  padding: 7px 18px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background 0.15s;
}
.iv-buy-btn:hover { background: var(--primary-dark); }

.iv-setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
@media (max-width: 720px) { .iv-setup-grid { grid-template-columns: 1fr; } }

.iv-setup-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.iv-setup-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }

.iv-module-select { display: flex; flex-direction: column; gap: 6px; }
.iv-module-option {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--text-secondary);
  transition: background 0.1s;
}
.iv-module-option:hover { background: #f8fafc; }
.iv-module-option input { accent-color: var(--primary); flex-shrink: 0; }

.iv-settings { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.iv-setting-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13.5px; color: var(--text-secondary);
}
.iv-select {
  padding: 5px 10px; border: 1px solid var(--border);
  border-radius: 7px; font-size: 13px; color: var(--text-primary);
  background: #fff; cursor: pointer; outline: none;
}
.iv-select:focus { border-color: var(--primary); }

.iv-cost-box {
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: 9px; padding: 14px 16px; margin-bottom: 16px;
}
.iv-cost-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 3px 0;
  color: var(--text-secondary);
}
.iv-cost-row strong { color: var(--text-primary); }

.iv-start-btn {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 800; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.2px;
}
.iv-start-btn:hover:not(.iv-start-locked) { opacity: 0.9; transform: translateY(-1px); }
.iv-start-locked { background: #94a3b8 !important; cursor: pointer; }

.iv-how-it-works { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.iv-how-it-works h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.iv-steps { display: flex; gap: 16px; flex-wrap: wrap; }
.iv-step  { display: flex; gap: 12px; flex: 1; min-width: 180px; }
.iv-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.iv-step > div:last-child { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

/* Interview — active question */
.iv-progress-bar-wrap { margin-bottom: 24px; }
.iv-progress-info {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-secondary); margin-bottom: 8px;
}
.iv-diff-badge { border-radius: 20px; padding: 2px 10px; font-size: 11.5px; font-weight: 700; }
.iv-timer { margin-left: auto; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: #94a3b8; }
.iv-progress-track { height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.iv-progress-fill  { height: 100%; background: linear-gradient(90deg, var(--primary), var(--purple)); border-radius: 3px; transition: width 0.4s ease; }

.iv-question-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 20px;
  border-left: 4px solid var(--primary);
}
.iv-q-num  { font-size: 11px; font-weight: 700; color: var(--primary); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px; }
.iv-q-text { font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.5; margin-bottom: 14px; }
.iv-q-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.iv-tag    { background: #f1f5f9; color: #64748b; border-radius: 20px; padding: 2px 10px; font-size: 11.5px; }

.iv-answer-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.iv-answer-label   { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 10px; display: block; }
.iv-textarea {
  width: 100%; min-height: 180px;
  border: 1.5px solid var(--border); border-radius: 9px;
  padding: 14px; font-size: 14.5px; line-height: 1.7;
  font-family: inherit; resize: vertical; outline: none;
  color: var(--text-primary); transition: border-color 0.15s;
}
.iv-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.iv-textarea::placeholder { color: #cbd5e1; }

.iv-answer-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.iv-word-count { font-size: 12px; color: #94a3b8; }
.iv-submit-btn {
  padding: 11px 26px; background: var(--primary); color: #fff;
  border: none; border-radius: 9px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background 0.15s, transform 0.1s;
}
.iv-submit-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

.iv-skip-row { text-align: center; }
.iv-skip-btn {
  background: none; border: none; color: #94a3b8;
  font-size: 13px; cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px;
}
.iv-skip-btn:hover { color: #64748b; }

/* Reveal / compare screen */
.iv-reveal-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.iv-reveal-header { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.iv-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 680px) { .iv-two-col { grid-template-columns: 1fr; } }

.iv-answer-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.iv-your-answer  { border-top: 3px solid #94a3b8; }
.iv-model-answer { border-top: 3px solid var(--primary); }
.iv-answer-box-label { font-size: 12px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.iv-answer-text { font-size: 13.5px; color: var(--text-secondary); line-height: 1.75; white-space: pre-wrap; }

.iv-rating-section { margin-bottom: 8px; }
.iv-rating-label   { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; }
.iv-stars { display: flex; gap: 8px; flex-wrap: wrap; }
.iv-star {
  flex: 1; min-width: 60px;
  background: #f8fafc; border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px 8px;
  text-align: center; cursor: pointer;
  transition: all 0.15s;
}
.iv-star:hover    { border-color: var(--primary); background: #eef2ff; }
.iv-star.selected { background: #eef2ff; border-color: #a5b4fc; }
.iv-star.active   { background: var(--primary); border-color: var(--primary); }
.iv-star.active .iv-star-num, .iv-star.active .iv-star-label { color: #fff; }
.iv-star-num   { display: block; font-size: 18px; font-weight: 800; color: var(--text-primary); }
.iv-star-label { display: block; font-size: 11px; color: #94a3b8; margin-top: 3px; }

/* Results */
.iv-results {}
.iv-results-hero { text-align: center; margin-bottom: 32px; }
.iv-results-icon { font-size: 64px; margin-bottom: 12px; }
.iv-results-hero h1 { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.iv-results-hero p  { color: var(--text-secondary); font-size: 15px; }

.iv-results-stats {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px;
}
@media (max-width: 600px) { .iv-results-stats { grid-template-columns: repeat(2,1fr); } }

.iv-stat-box {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; text-align: center;
}
.iv-stat-val   { font-size: 30px; font-weight: 800; color: var(--primary); }
.iv-stat-label { font-size: 12px; color: #94a3b8; font-weight: 600; margin-top: 4px; }

.iv-results-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 20px;
}
.iv-results-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }

.iv-bars { display: flex; flex-direction: column; gap: 10px; }
.iv-bar-row { display: flex; align-items: center; gap: 12px; }
.iv-bar-label { font-size: 13px; color: var(--text-secondary); width: 110px; flex-shrink: 0; }
.iv-bar-track { flex: 1; height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.iv-bar-fill  { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.iv-bar-count { font-size: 13px; font-weight: 700; color: var(--text-primary); width: 20px; text-align: right; }

/* Review list */
.iv-review-list { display: flex; flex-direction: column; gap: 8px; }
.iv-review-item {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.iv-review-item summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; cursor: pointer; list-style: none;
  background: #f8fafc; font-size: 13.5px;
}
.iv-review-item summary:hover { background: #f1f5f9; }
.iv-review-item[open] summary { border-bottom: 1px solid var(--border); }
.iv-review-num { font-size: 11px; font-weight: 700; color: #94a3b8; flex-shrink: 0; }
.iv-review-q   { flex: 1; color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-review-rating { border-radius: 20px; padding: 2px 10px; font-size: 11.5px; font-weight: 700; flex-shrink: 0; }
.iv-review-detail { padding: 16px; }
.iv-review-section { margin-bottom: 14px; }
.iv-review-section strong { font-size: 12px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; display: block; margin-bottom: 6px; }
.iv-review-section p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.7; }

.iv-results-actions {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; border-top: 1px solid var(--border);
}

/* Question browser */
.iv-qbrowser { display: flex; flex-direction: column; gap: 6px; }
.iv-qb-item  { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.iv-qb-item summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; cursor: pointer; list-style: none;
  background: #f8fafc; font-size: 13.5px; font-weight: 600;
}
.iv-qb-item summary:hover { background: #f1f5f9; }
.iv-qb-item[open] summary { border-bottom: 1px solid var(--border); }
.iv-qb-num  { font-size: 11px; font-weight: 700; color: #94a3b8; flex-shrink: 0; min-width: 28px; }
.iv-qb-q    { flex: 1; color: var(--text-primary); }
.iv-qb-answer { padding: 16px 20px; font-size: 14px; color: var(--text-secondary); line-height: 1.75; }

/* Sidebar credit pill */
.nav-credit-pill {
  margin-left: auto;
  padding: 2px 8px;
  background: rgba(99,102,241,0.15);
  border-radius: 12px;
}

/* ============================================================
   GUEST / APP-MODE TOGGLE
   ============================================================ */

/* --- guest: hide app chrome, show landing --- */
body:not(.app-mode) .sidebar          { display: none !important; }
body:not(.app-mode) .main             { margin-left: 0 !important; }
body:not(.app-mode) #home,
body:not(.app-mode) #mod1,
body:not(.app-mode) #mod2,
body:not(.app-mode) #mod3,
body:not(.app-mode) #mod4,
body:not(.app-mode) #mod5,
body:not(.app-mode) #mod6,
body:not(.app-mode) #mod7,
body:not(.app-mode) #interview        { display: none !important; }
body:not(.app-mode) #landing          { display: block !important; }

body:not(.app-mode) .topnav-credit-pill,
body:not(.app-mode) .topnav-interview-btn,
body:not(.app-mode) .progress-info,
body:not(.app-mode) .progress-bar-mini { display: none !important; }

/* --- logged in: hide landing --- */
body.app-mode #landing                { display: none !important; }

/* ============================================================
   LANDING PAGE STYLES
   ============================================================ */
.landing-page {
  display: none; /* shown via :not(.app-mode) rule above */
  min-height: 100vh;
  background: #fff;
}

/* ── Hero ── */
.lp-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4f46e5 80%, #6366f1 100%);
  padding: 80px 40px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  min-height: 520px;
}
.lp-hero-inner { flex: 1; max-width: 560px; }
.lp-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  color: #c7d2fe;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 24px;
}
.lp-hero-title {
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.lp-gradient-text {
  background: linear-gradient(90deg, #a5b4fc, #e879f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lp-hero-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.8);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 500px;
}
.lp-cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.lp-btn-primary {
  padding: 14px 28px;
  background: #fff;
  color: #4f46e5;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.lp-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.lp-btn-secondary {
  padding: 14px 28px;
  background: transparent;
  color: #e0e7ff;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.lp-btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); color: #fff; }

.lp-hero-stats { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.lp-hero-stat { text-align: center; }
.lp-stat-num  { font-size: 26px; font-weight: 900; color: #fff; line-height: 1; }
.lp-stat-label { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.lp-stat-div { width: 1px; height: 36px; background: rgba(255,255,255,0.2); }

/* ── Code preview panel ── */
.lp-hero-visual { flex-shrink: 0; }
.lp-code-preview {
  background: #0f172a;
  border-radius: 16px;
  padding: 20px 24px;
  width: 360px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
}
.lp-code-dots { display: flex; gap: 6px; margin-bottom: 16px; }
.lp-code-dots span { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.lp-code-dots span:first-child  { background: #ef4444; }
.lp-code-dots span:nth-child(2) { background: #f59e0b; }
.lp-code-dots span:nth-child(3) { background: #10b981; }

.lp-code-line       { color: #94a3b8; line-height: 1.8; }
.lp-code-blank      { height: 1.8em; }
.lp-code-indent     { padding-left: 24px; }
.lp-code-indent2    { padding-left: 48px; }
.lp-c-kw  { color: #c084fc; }
.lp-c-fn  { color: #60a5fa; }
.lp-c-str { color: #86efac; }
.lp-c-num { color: #fb923c; }
.lp-code-cursor {
  display: inline-block;
  width: 2px; height: 16px;
  background: #6366f1;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-top: 8px;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── Trust bar ── */
.lp-trust-bar {
  background: #f0f4f8;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 40px;
}
.lp-trust-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.lp-trust-item { font-size: 13.5px; color: #475569; font-weight: 500; }
.lp-trust-sep  { color: #cbd5e1; }

/* ── Section scaffolding ── */
.lp-section { padding: 80px 40px; }
.lp-section-alt { background: #f8fafc; }
.lp-section-dark { background: #0f172a; }
.lp-section-inner { max-width: 1100px; margin: 0 auto; }
.lp-section-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 12px;
}
.lp-section-title {
  font-size: 34px;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
}
.lp-section-sub {
  font-size: 16px;
  color: #64748b;
  margin-bottom: 48px;
  text-align: center;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ── Module preview grid ── */
.lp-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.lp-module-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.lp-module-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--mc, #6366f1);
}
.lp-module-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.08); transform: translateY(-2px); }
.lp-mc-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.lp-mc-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.lp-mc-lock { font-size: 16px; opacity: 0.4; }
.lp-mc-num  { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.lp-mc-title { font-size: 16px; font-weight: 700; color: #1e293b; margin-bottom: 8px; }
.lp-mc-desc  { font-size: 13px; color: #64748b; line-height: 1.55; margin-bottom: 14px; }
.lp-mc-tags  { display: flex; gap: 6px; flex-wrap: wrap; }
.lp-mc-tags span {
  font-size: 11px; font-weight: 600;
  padding: 3px 9px;
  background: #f1f5f9;
  border-radius: 10px;
  color: #64748b;
}

/* Unlock card */
.lp-unlock-card {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lp-unlock-card::before { background: rgba(255,255,255,0.2); }
.lp-uc-inner { text-align: center; }
.lp-uc-icon  { font-size: 40px; margin-bottom: 12px; }
.lp-uc-title { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.lp-uc-sub   { font-size: 13px; color: rgba(255,255,255,0.75); }
.lp-unlock-card .lp-btn-primary { background: rgba(255,255,255,0.15); color: #fff; border: 1.5px solid rgba(255,255,255,0.4); }
.lp-unlock-card .lp-btn-primary:hover { background: rgba(255,255,255,0.25); }

/* ── How it works ── */
.lp-steps {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}
.lp-step { flex: 1; text-align: center; }
.lp-step-num {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.lp-step h3 { font-size: 17px; font-weight: 700; color: #f1f5f9; margin-bottom: 10px; }
.lp-step p  { font-size: 14px; color: #94a3b8; line-height: 1.65; }
.lp-step-arrow { font-size: 28px; color: rgba(255,255,255,0.2); padding-top: 14px; flex-shrink: 0; }

/* ── Interview feature ── */
.lp-interview-feature {
  display: flex;
  align-items: center;
  gap: 60px;
}
.lp-if-text { flex: 1; }
.lp-if-text .lp-section-title { text-align: left; }
.lp-if-bullets { list-style: none; margin: 20px 0 30px; display: flex; flex-direction: column; gap: 10px; }
.lp-if-bullets li { font-size: 14.5px; color: #475569; }
.lp-if-visual { flex-shrink: 0; width: 380px; }
.lp-iv-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.lp-iv-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.lp-iv-tag {
  background: #fdf4ff; color: #8b5cf6;
  font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 8px;
}
.lp-iv-progress { font-size: 12px; color: #94a3b8; font-weight: 600; }
.lp-iv-q { font-size: 15px; font-weight: 600; color: #1e293b; line-height: 1.55; margin-bottom: 18px; }
.lp-iv-answer-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  min-height: 80px;
  padding: 14px;
  margin-bottom: 18px;
}
.lp-iv-cursor { width: 2px; height: 18px; background: #6366f1; animation: blink 1s step-end infinite; }
.lp-iv-footer { display: flex; align-items: center; justify-content: space-between; }
.lp-iv-stars { font-size: 16px; letter-spacing: 2px; }
.lp-iv-btn {
  background: #6366f1; color: #fff;
  border: none; border-radius: 9px;
  padding: 9px 18px; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* ── Pricing ── */
.lp-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.lp-price-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 32px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.lp-price-featured {
  border-color: #6366f1;
  box-shadow: 0 8px 32px rgba(99,102,241,0.15);
}
.lp-pc-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #6366f1;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}
.lp-pc-icon  { font-size: 32px; margin-bottom: 12px; }
.lp-pc-name  { font-size: 15px; font-weight: 700; color: #1e293b; margin-bottom: 16px; }
.lp-pc-price { margin-bottom: 4px; }
.lp-price-big  { font-size: 42px; font-weight: 900; color: #1e293b; line-height: 1; }
.lp-price-unit { font-size: 16px; color: #64748b; margin-left: 2px; }
.lp-pc-desc  { font-size: 13px; color: #94a3b8; margin-bottom: 24px; }
.lp-pc-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  flex: 1;
}
.lp-pc-features li { font-size: 13.5px; color: #475569; }
.lp-btn-outline {
  width: 100%;
  padding: 13px;
  background: transparent;
  color: #6366f1;
  border: 1.5px solid #6366f1;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.lp-btn-outline:hover { background: #f0f4ff; }
.lp-price-featured .lp-btn-primary { width: 100%; padding: 13px; font-size: 14px; background: #6366f1; color: #fff; border-radius: 10px; }
.lp-price-featured .lp-btn-primary:hover { background: #4f46e5; transform: none; box-shadow: none; }

/* ── Final CTA ── */
.lp-final-cta {
  background: linear-gradient(135deg, #1e1b4b 0%, #4f46e5 100%);
  padding: 100px 40px;
}
.lp-btn-lg { padding: 18px 40px; font-size: 17px; border-radius: 14px; }

/* ── Footer ── */
.lp-footer {
  background: #0f172a;
  padding: 28px 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.lp-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lp-footer-brand { display: flex; align-items: center; gap: 12px; }
.lp-footer-links { display: flex; gap: 8px; }
.lp-footer-link {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: #94a3b8;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.lp-footer-link:hover { color: #e2e8f0; border-color: rgba(255,255,255,0.3); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .lp-hero { flex-direction: column; padding: 60px 24px; text-align: center; }
  .lp-hero-stats { justify-content: center; }
  .lp-hero-visual { display: none; }
  .lp-cta-row { justify-content: center; }
  .lp-hero-title { font-size: 36px; }
  .lp-interview-feature { flex-direction: column; }
  .lp-if-visual { width: 100%; }
  .lp-if-text .lp-section-title { text-align: center; }
  .lp-if-bullets { align-items: center; }
  .lp-pricing-grid { grid-template-columns: 1fr; max-width: 380px; }
  .lp-steps { flex-direction: column; align-items: center; }
  .lp-step-arrow { transform: rotate(90deg); padding: 0; }
  .lp-section { padding: 60px 24px; }
  .lp-trust-bar { padding: 14px 24px; }
}

/* ── Explicit app-mode section visibility ── */
body.app-mode .section.active {
  display: block !important;
}

/* ============================================================
   TRIAL BADGE (topnav)
   ============================================================ */
#topnav-trial { display: flex; align-items: center; }

.trial-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: default;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.trial-active   { background: rgba(16,185,129,0.18); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
.trial-expiring { background: rgba(245,158,11,0.18); color: #fcd34d; border: 1px solid rgba(245,158,11,0.3); cursor: pointer; }
.trial-expired  { background: rgba(239,68,68,0.18);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.3);  cursor: pointer; }
.trial-pro      { background: rgba(99,102,241,0.22); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.35); }
.trial-expiring:hover { background: rgba(245,158,11,0.28); }
.trial-expired:hover  { background: rgba(239,68,68,0.28); }

body:not(.app-mode) #topnav-trial { display: none !important; }

/* ============================================================
   PAYWALL SECTION
   ============================================================ */
body:not(.app-mode) #paywall { display: none !important; }

.pw-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  text-align: center;
}
.pw-icon  { font-size: 56px; margin-bottom: 16px; }
.pw-label {
  display: inline-block;
  background: #fef2f2;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.pw-title {
  font-size: 36px;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
  line-height: 1.15;
}
.pw-mod-name { color: #6366f1; }
.pw-sub {
  font-size: 16px;
  color: #64748b;
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto 48px;
}

/* Plans grid */
.pw-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto 36px;
}
.pw-plan {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 28px 24px;
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pw-plan-featured {
  border-color: #6366f1;
  box-shadow: 0 8px 32px rgba(99,102,241,0.15);
}
.pw-plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #6366f1;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 10px;
}
.pw-plan-icon  { font-size: 28px; margin-bottom: 4px; }
.pw-plan-name  { font-size: 14px; font-weight: 700; color: #1e293b; }
.pw-plan-price { margin: 4px 0; }
.pw-big        { font-size: 36px; font-weight: 900; color: #1e293b; line-height: 1; }
.pw-unit       { font-size: 14px; color: #64748b; margin-left: 2px; }
.pw-plan-note  { font-size: 12px; color: #94a3b8; margin-bottom: 8px; }
.pw-plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: #475569;
  flex: 1;
  margin-bottom: 20px;
}
.pw-btn-primary {
  width: 100%;
  padding: 12px;
  background: #6366f1;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.pw-btn-primary:hover { background: #4f46e5; }
.pw-btn-outline {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #6366f1;
  border: 1.5px solid #6366f1;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.pw-btn-outline:hover { background: #f0f4ff; }
.pw-back-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.15s;
}
.pw-back-btn:hover { color: #475569; }

@media (max-width: 600px) {
  .pw-plans { grid-template-columns: 1fr; }
  .pw-title { font-size: 28px; }
}
