/* ═══════════════════════════════════════════════
   FAHIMNI — Modern Teen-First Design System
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* ── Core Palette ── */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #1f1f35;
  --bg-input: #16162a;
  --bg-glass: rgba(26, 26, 46, 0.7);

  /* ── Accent Gradients ── */
  --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #a855f7 50%, #6c5ce7 100%);
  --gradient-accent: linear-gradient(135deg, #00cec9 0%, #0984e3 100%);
  --gradient-warm: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
  --gradient-gold: linear-gradient(135deg, #fdcb6e 0%, #f39c12 100%);
  --gradient-hero: linear-gradient(160deg, #0a0a0f 0%, #1a1040 40%, #0d1b3e 70%, #0a0a0f 100%);
  --gradient-mesh: radial-gradient(ellipse at 20% 50%, rgba(108,92,231,0.15) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 20%, rgba(0,206,201,0.1) 0%, transparent 50%),
                    radial-gradient(ellipse at 50% 80%, rgba(253,121,168,0.08) 0%, transparent 50%);

  /* ── Text ── */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #a78bfa;

  /* ── Borders & Shadows ── */
  --border: rgba(148, 163, 184, 0.1);
  --border-focus: rgba(108, 92, 231, 0.5);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.15);
  --shadow-glow-sm: 0 0 20px rgba(108, 92, 231, 0.1);

  /* ── Radii ── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* ── Transitions ── */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: #c4b5fd; }

/* ═══════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s var(--ease-out);
}

.navbar.scrolled {
  padding: 0.7rem 2rem;
  background: rgba(10, 10, 15, 0.95);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  transition: all 0.2s;
}
.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 92, 231, 0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(148,163,184,0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
}
.btn-ghost:hover { color: var(--text-primary); }

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

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

.btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ═══════════════════════════════════════════════
   LANDING PAGE — HERO
   ═══════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-mesh);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(108, 92, 231, 0.15);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-accent);
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: #00cec9;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.hero h1 .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.6s var(--ease-out) 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s var(--ease-out) 0.3s both;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin-top: 4rem;
  animation: fadeInUp 0.6s var(--ease-out) 0.4s both;
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

/* ── Floating Orbs ── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}
.orb-1 {
  width: 400px; height: 400px;
  background: #6c5ce7;
  top: -100px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 300px; height: 300px;
  background: #00cec9;
  bottom: -50px; right: -80px;
  animation-delay: -3s;
}
.orb-3 {
  width: 200px; height: 200px;
  background: #fd79a8;
  top: 40%; left: 60%;
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -30px) scale(1.05); }
  66%      { transform: translate(-20px, 20px) scale(0.95); }
}

/* ═══════════════════════════════════════════════
   FEATURES SECTION
   ═══════════════════════════════════════════════ */
.features {
  padding: 6rem 2rem;
  background: var(--bg-primary);
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-accent);
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 92, 231, 0.3);
  box-shadow: var(--shadow-glow);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════
   CTA SECTION
   ═══════════════════════════════════════════════ */
.cta-section {
  padding: 6rem 2rem;
  text-align: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-mesh);
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-content p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════
   AUTH PAGE (login.html)
   ═══════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 3rem;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-mesh);
}

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.auth-logo {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 2rem;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  text-align: center;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  border: none;
  background: transparent;
  font-family: inherit;
}

.auth-tab.active {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(108, 92, 231, 0.3);
}

.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeIn 0.3s ease; }

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

/* ═══════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-select option {
  background: var(--bg-input);
  color: var(--text-primary);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.form-error {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 0.35rem;
  display: none;
}

.form-group.has-error .form-input,
.form-group.has-error .form-select {
  border-color: #ef4444;
}

.form-group.has-error .form-error {
  display: block;
}

/* ── Test Score Rows ── */
.test-score-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: end;
}

.btn-remove-test {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: #ef4444;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-remove-test:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ═══════════════════════════════════════════════
   PROFILE PAGE (profile.html) — Multi-Step
   ═══════════════════════════════════════════════ */
.profile-page {
  min-height: 100vh;
  padding: 6rem 1.5rem 3rem;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-progress {
  width: 100%;
  max-width: 600px;
  margin-bottom: 2rem;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 0.5s var(--ease-out);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.progress-step {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.3s;
}

.progress-step.active { color: var(--text-accent); }
.progress-step.done { color: #00cec9; }

.profile-card {
  width: 100%;
  max-width: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.profile-step { display: none; }
.profile-step.active { display: block; animation: fadeIn 0.4s ease; }

.profile-step h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.profile-step > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.step-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.step-actions .btn {
  flex: 1;
}

/* ═══════════════════════════════════════════════
   DASHBOARD PAGE (dashboard.html)
   ═══════════════════════════════════════════════ */
.dashboard-page {
  min-height: 100vh;
  background: var(--bg-primary);
}

.dash-hero {
  padding: 6rem 2rem 2rem;
  text-align: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.dash-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-mesh);
}

.dash-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.dash-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.dash-hero p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.dash-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Quick Prompts ── */
.quick-prompts {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.quick-prompt {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.quick-prompt:hover {
  border-color: rgba(108, 92, 231, 0.4);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

/* ── Chat Area ── */
.chat-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.chat-message {
  display: flex;
  gap: 1rem;
  animation: fadeInUp 0.4s var(--ease-out) both;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.chat-avatar.user {
  background: var(--gradient-warm);
}

.chat-avatar.ai {
  background: var(--gradient-primary);
}

.chat-bubble {
  flex: 1;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  line-height: 1.7;
}

.chat-bubble.user {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.chat-bubble.ai {
  background: var(--bg-card);
  border: 1px solid rgba(108, 92, 231, 0.2);
}

.chat-bubble.ai h1,
.chat-bubble.ai h2,
.chat-bubble.ai h3 {
  color: var(--text-primary);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.chat-bubble.ai h1 { font-size: 1.3rem; }
.chat-bubble.ai h2 { font-size: 1.15rem; }
.chat-bubble.ai h3 { font-size: 1rem; }

.chat-bubble.ai ul,
.chat-bubble.ai ol {
  margin-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.chat-bubble.ai li {
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

.chat-bubble.ai strong {
  color: var(--text-primary);
}

.chat-bubble.ai a {
  color: var(--text-accent);
}

.chat-bubble.ai code {
  background: rgba(108, 92, 231, 0.15);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.chat-bubble.ai pre {
  background: var(--bg-input);
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 0.75rem 0;
}

.chat-bubble.ai blockquote {
  border-left: 3px solid var(--text-accent);
  padding-left: 1rem;
  color: var(--text-secondary);
  margin: 0.75rem 0;
}

.chat-bubble.ai hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

.chat-bubble.ai img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 0.75rem 0;
}

/* ── Status Badge ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.pending {
  background: rgba(253, 203, 110, 0.15);
  color: #fdcb6e;
}

.status-badge.approved {
  background: rgba(0, 206, 201, 0.15);
  color: #00cec9;
}

.status-badge.flagged {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ── Input Area ── */
.chat-input-area {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--bg-primary) 60%, transparent);
  padding: 1.5rem 0 0;
}

.chat-input-wrap {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  transition: border-color 0.2s;
}

.chat-input-wrap:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.chat-input-wrap textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  resize: none;
  min-height: 24px;
  max-height: 150px;
  line-height: 1.5;
  padding: 0.4rem 0.5rem;
}

.chat-input-wrap textarea::placeholder {
  color: var(--text-muted);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ── Typing Indicator ── */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem 0;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* ═══════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastIn 0.4s var(--ease-out), toastOut 0.4s ease 3s forwards;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 360px;
}

.toast.success { border-left: 3px solid #00cec9; }
.toast.error   { border-left: 3px solid #ef4444; }
.toast.info    { border-left: 3px solid #6c5ce7; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100px); }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 640px) {
  .navbar { padding: 0.75rem 1rem; }
  .nav-links { gap: 0.25rem; }
  .nav-link { padding: 0.4rem 0.75rem; font-size: 0.8rem; }

  .hero { padding: 6rem 1.5rem 3rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat .number { font-size: 1.25rem; }

  .auth-card { padding: 1.75rem; }
  .profile-card { padding: 1.5rem; }

  .test-score-row { grid-template-columns: 1fr; }

  .chat-bubble { padding: 1rem; }

  .features { padding: 4rem 1rem; }
  .cta-section { padding: 4rem 1rem; }
}
