/* ===================== VARIABLES ===================== */
:root {
  --royal: #1a3a8f;
  --royal-dark: #0f2460;
  --royal-light: #2a50b0;
  --royal-pale: #dce6f7;
  --pink: #e8a0bf;
  --pink-light: #f5d0e4;
  --pink-dark: #c0608e;
  --white: #ffffff;
  --off-white: #f5f7ff;
  --gray-50: #f0f2fa;
  --gray-100: #e2e6f5;
  --gray-300: #a8b4d0;
  --gray-500: #6b7a99;
  --gray-700: #3a4460;
  --dark: #0d1b3e;
  --success: #2ecc71;
  --danger: #e74c3c;
  --warning: #f39c12;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(26,58,143,0.12);
  --shadow-lg: 0 8px 40px rgba(26,58,143,0.18);
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}
 
/* ===================== RESET ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off-white);
  color: var(--dark);
  min-height: 100vh;
  overflow-x: hidden;
}
 
/* ===================== UTILITY ===================== */
.hidden { display: none !important; }
.active { display: flex; }
 
/* ===================== PAGES ===================== */
.page { min-height: 100vh; width: 100%; }
#page-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, var(--royal-dark) 0%, var(--royal) 50%, var(--royal-light) 100%);
  overflow: hidden;
}
#page-app { display: flex; flex-direction: column; }
 
/* ===================== AUTH ===================== */
.auth-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.25;
}
.b1 { width: 400px; height: 400px; background: var(--pink); top: -100px; right: -100px; animation: floatBlob 8s ease-in-out infinite; }
.b2 { width: 300px; height: 300px; background: #4a6fd4; bottom: -80px; left: -80px; animation: floatBlob 10s ease-in-out infinite reverse; }
.b3 { width: 200px; height: 200px; background: var(--pink-light); top: 50%; left: 30%; animation: floatBlob 7s ease-in-out infinite 2s; }
 
@keyframes floatBlob {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}
 
.auth-card {
  background: rgba(255,255,255,0.97);
  border-radius: 28px;
  padding: 48px 44px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  animation: slideUp 0.5s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
 
.logo-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  cursor: pointer;
}
.logo-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--royal), var(--royal-light));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 26px; color: white;
  box-shadow: 0 4px 12px rgba(26,58,143,0.3);
}
.logo-icon.sm { width: 36px; height: 36px; font-size: 20px; border-radius: 10px; }
.logo-text { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 28px; color: var(--royal); }
.logo-text.sm { font-size: 20px; }
.logo-lockup.small { margin-bottom: 0; }
.logo-img { height: 56px; width: auto; object-fit: contain; } /* Logoen når du logger inn */
.logo-img.sm { height: 42px; width: auto; object-fit: contain; min-width: 120px; } /* Logoen i nav-bar */
 
.auth-tagline { color: var(--gray-500); font-size: 14px; margin-bottom: 28px; }
 
.tab-row { display: flex; gap: 4px; background: var(--gray-50); padding: 4px; border-radius: 12px; margin-bottom: 24px; }
.tab-btn {
  flex: 1; padding: 10px; border: none; background: transparent;
  border-radius: 10px; cursor: pointer; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500; color: var(--gray-500); transition: var(--transition);
}
.tab-btn.active { background: white; color: var(--royal); box-shadow: var(--shadow); font-weight: 600; }
 
.input-field {
  width: 100%; padding: 13px 16px;
  border: 2px solid var(--gray-100); border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif; font-size: 15px; color: var(--dark);
  background: white; transition: var(--transition); outline: none;
  margin-bottom: 12px; display: block;
}
.input-field:focus { border-color: var(--royal); box-shadow: 0 0 0 3px rgba(26,58,143,0.1); }
select.input-field { cursor: pointer; }
.input-label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; display: block; }
 
textarea.input-field {
  resize: vertical;
  min-height: 160px;
  line-height: 1.6;
}
textarea.input-field.short { min-height: 100px; }
 
.btn-primary {
  background: linear-gradient(135deg, var(--royal), var(--royal-light));
  color: white; border: none; border-radius: var(--radius-sm);
  padding: 13px 24px; font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: var(--transition); box-shadow: 0 4px 12px rgba(26,58,143,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,58,143,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.full { width: 100%; margin-top: 4px; }
.btn-primary.big { padding: 16px 24px; font-size: 17px; border-radius: var(--radius); }
 
.btn-secondary {
  background: var(--gray-50); color: var(--royal);
  border: 2px solid var(--royal-pale); border-radius: var(--radius-sm);
  padding: 11px 22px; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: var(--transition);
}
.btn-secondary:hover { background: var(--royal-pale); }
 
.btn-ghost {
  background: none; border: none; color: var(--royal);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer; padding: 8px 12px; border-radius: var(--radius-sm);
  transition: var(--transition);
}
.btn-ghost:hover { background: var(--royal-pale); }
 
.auth-hint { font-size: 13px; color: var(--gray-500); text-align: center; margin-top: 12px; }
.auth-hint a { color: var(--royal); }
.auth-msg { font-size: 14px; text-align: center; margin-top: 8px; min-height: 20px; font-weight: 500; }
 
/* ===================== NAV ===================== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 72px;
  box-shadow: 0 2px 12px rgba(26,58,143,0.07);
}
.nav-center { display: flex; gap: 4px; }
.nav-left { flex-shrink: 0; min-width: 150px; }
.nav-btn {
  background: none; border: none; padding: 8px 14px; border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--gray-500); cursor: pointer; transition: var(--transition);
}
.nav-btn:hover, .nav-btn.active-nav { background: var(--royal-pale); color: var(--royal); }
.nav-right { display: flex; align-items: center; gap: 12px; }
 
.streak-badge {
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: white; padding: 6px 12px; border-radius: 20px;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(255,107,53,0.3);
}
.nav-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--royal-pale); cursor: pointer;
  border: 2px solid var(--royal); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
 
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: white; border-top: 1px solid var(--gray-100);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(26,58,143,0.08);
}
.bottom-nav button {
  flex: 1; background: none; border: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 20px; cursor: pointer; padding: 4px;
  transition: var(--transition);
}
.bottom-nav button span { font-size: 10px; font-family: 'DM Sans', sans-serif; color: var(--gray-500); }
.bottom-nav button.active-nav span { color: var(--royal); font-weight: 700; }
 
/* ===================== MAIN ===================== */
.main-content { flex: 1; overflow-y: auto; }
.section { padding: 32px 32px 100px; max-width: 1100px; margin: 0 auto; flex-direction: column; }
.section.active { display: flex; }
 
/* ===================== HOME ===================== */
.home-hero {
  background: linear-gradient(135deg, var(--royal) 0%, var(--royal-light) 70%, #3a60c8 100%);
  border-radius: 24px; padding: 40px;
  color: white; margin-bottom: 40px;
  position: relative; overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(232,160,191,0.2);
  border-radius: 50%;
}
.hero-text h1 { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.hero-text p { opacity: 0.85; font-size: 16px; margin-bottom: 32px; }
.hero-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-card {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius); padding: 16px 24px;
  flex: 1; min-width: 100px; text-align: center;
}
.stat-card.accent { background: rgba(232,160,191,0.25); border-color: rgba(232,160,191,0.4); }
.stat-num { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; }
.stat-label { font-size: 12px; opacity: 0.75; margin-top: 4px; }
 
.section-title {
  font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700;
  color: var(--dark); margin-bottom: 16px; margin-top: 8px;
}
 
/* ===================== CARDS ===================== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 32px; }
 
.test-card {
  background: white; border-radius: var(--radius);
  border: 2px solid var(--gray-100); padding: 24px;
  cursor: pointer; transition: var(--transition);
  position: relative; overflow: hidden;
  animation: fadeIn 0.3s ease forwards;
}
.test-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--royal), var(--pink));
}
.test-card:hover { border-color: var(--royal); box-shadow: var(--shadow); transform: translateY(-2px); }
 
.card-subject {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--royal);
  background: var(--royal-pale); padding: 3px 10px;
  border-radius: 20px; display: inline-block; margin-bottom: 12px;
}
.card-title { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.card-desc { font-size: 13px; color: var(--gray-500); line-height: 1.5; margin-bottom: 16px; }
.card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--gray-500); align-items: center; }
.card-meta span { display: flex; align-items: center; gap: 4px; }
.card-actions { display: flex; gap: 8px; margin-top: 16px; }
.card-btn {
  flex: 1; padding: 10px; border: none; border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.card-btn.primary { background: var(--royal); color: white; }
.card-btn.primary:hover { background: var(--royal-dark); }
.card-btn.secondary { background: var(--gray-50); color: var(--royal); }
.card-btn.secondary:hover { background: var(--royal-pale); }
 
.card-badge-public { position: absolute; top: 14px; right: 14px; font-size: 12px; color: var(--gray-300); }
 
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
 
/* ===================== EXPLORE ===================== */
.explore-header { margin-bottom: 24px; }
.explore-header h1 { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; margin-bottom: 16px; }
.search-bar {
  display: flex; align-items: center; gap: 12px;
  background: white; border: 2px solid var(--gray-100);
  border-radius: 50px; padding: 12px 20px;
  box-shadow: var(--shadow); transition: var(--transition);
}
.search-bar:focus-within { border-color: var(--royal); }
.search-icon { font-size: 16px; }
.search-bar input { flex: 1; border: none; outline: none; font-family: 'DM Sans', sans-serif; font-size: 15px; }
 
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip {
  padding: 7px 16px; border-radius: 20px; border: 2px solid var(--gray-100);
  background: white; font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; color: var(--gray-700); transition: var(--transition);
}
.chip:hover { border-color: var(--royal); color: var(--royal); }
.chip.active { background: var(--royal); color: white; border-color: var(--royal); }
 
/* ===================== CREATE ===================== */
.section-desc { color: var(--gray-500); margin-bottom: 28px; font-size: 15px; }
.create-form { background: white; border-radius: 24px; padding: 32px; box-shadow: var(--shadow); }
.form-row { margin-bottom: 20px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.two-col .input-field { margin-bottom: 0; }
 
.upload-zone {
  border: 2px dashed var(--gray-300); border-radius: var(--radius);
  padding: 40px; text-align: center; cursor: pointer;
  transition: var(--transition); background: var(--gray-50);
}
.upload-zone:hover { border-color: var(--royal); background: var(--royal-pale); }
.upload-icon { font-size: 40px; margin-bottom: 12px; }
.upload-zone p { color: var(--gray-500); font-size: 14px; }
.upload-hint { font-size: 12px !important; color: var(--gray-300) !important; margin-top: 6px; }
 
.file-list { padding: 16px; background: var(--gray-50); border-radius: var(--radius-sm); margin-bottom: 16px; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.file-item:last-child { border-bottom: none; }
 
.or-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; color: var(--gray-300); font-size: 13px; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-100); }
 
input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 6px;
  background: var(--gray-100); border-radius: 3px; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px;
  background: var(--royal); border-radius: 50%;
  box-shadow: 0 2px 6px rgba(26,58,143,0.3);
}
#q-count-val { font-weight: 700; color: var(--royal); font-size: 18px; }
 
.checkbox-group { display: flex; gap: 20px; flex-wrap: wrap; }
.checkbox-group label {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; cursor: pointer;
}
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--royal); }
 
/* ===================== QUIZ ===================== */
#section-quiz {
  background: var(--off-white);
  padding: 0; max-width: none;
  min-height: calc(100vh - 64px);
}
.quiz-container {
  max-width: 700px; margin: 0 auto;
  padding: 24px 24px 80px;
  display: flex; flex-direction: column; gap: 20px;
}
.quiz-header {
  display: flex; align-items: center; justify-content: space-between;
}
.quiz-title { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: var(--dark); }
.quiz-progress-text { font-size: 14px; color: var(--gray-500); font-weight: 600; }
 
.quiz-progress-bar { background: var(--gray-100); border-radius: 3px; height: 6px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: linear-gradient(90deg, var(--royal), var(--pink)); border-radius: 3px; transition: width 0.4s ease; }
 
.quiz-card {
  background: white; border-radius: 24px;
  padding: 36px; box-shadow: var(--shadow);
  animation: cardIn 0.35s cubic-bezier(0.4,0,0.2,1);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
.q-type-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--pink-dark);
  background: var(--pink-light); padding: 4px 12px;
  border-radius: 20px; display: inline-block; margin-bottom: 16px;
}
.q-text { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 700; line-height: 1.4; margin-bottom: 28px; }
 
.q-options { display: flex; flex-direction: column; gap: 12px; }
.opt-choice {
  padding: 16px 20px; border: 2px solid var(--gray-100);
  border-radius: var(--radius); cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 15px;
  transition: var(--transition); text-align: left;
  background: white; display: flex; align-items: center; gap: 12px;
}
.opt-choice:hover { border-color: var(--royal); background: var(--royal-pale); }
.opt-choice.selected { border-color: var(--royal); background: var(--royal-pale); color: var(--royal); }
.opt-choice.correct { border-color: var(--success); background: #e8f8f0; color: #1a7a4a; }
.opt-choice.wrong { border-color: var(--danger); background: #fdf0ef; color: #a32b1e; }
.opt-letter {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gray-100); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.opt-choice.selected .opt-letter { background: var(--royal); color: white; }
 
.tf-row { display: flex; gap: 16px; margin-top: 8px; }
.tf-btn {
  flex: 1; padding: 20px; border: 2px solid var(--gray-100);
  border-radius: var(--radius); cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 18px; font-weight: 600;
  background: white; transition: var(--transition);
}
.tf-btn:hover { transform: scale(1.02); }
 
.q-feedback {
  background: white; border-radius: 24px;
  padding: 36px; box-shadow: var(--shadow);
  text-align: center;
  animation: cardIn 0.3s ease;
}
.feedback-icon { font-size: 56px; margin-bottom: 16px; }
.feedback-text { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.feedback-explanation { font-size: 15px; color: var(--gray-500); line-height: 1.6; margin-bottom: 24px; background: var(--gray-50); padding: 16px; border-radius: var(--radius-sm); text-align: left; }
 
/* ===================== RESULTS ===================== */
.quiz-results {
  background: white; border-radius: 24px;
  padding: 48px; box-shadow: var(--shadow);
  text-align: center; animation: cardIn 0.4s ease;
}
.results-emoji { font-size: 72px; margin-bottom: 16px; }
.quiz-results h2 { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; margin-bottom: 20px; }
.results-score { font-family: 'Syne', sans-serif; font-size: 48px; font-weight: 800; color: var(--royal); }
.results-pct { font-size: 20px; color: var(--gray-500); margin-bottom: 16px; }
.results-msg { font-size: 16px; margin-bottom: 24px; color: var(--gray-700); }
.results-breakdown { background: var(--gray-50); border-radius: var(--radius); padding: 20px; margin-bottom: 28px; text-align: left; }
.breakdown-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.breakdown-item:last-child { border-bottom: none; }
.breakdown-label { color: var(--gray-700); flex: 1; }
.breakdown-status { font-weight: 600; font-size: 16px; }
.results-btns { display: flex; gap: 12px; justify-content: center; }
 
/* ===================== GENERATING ===================== */
#section-generating {
  background: linear-gradient(135deg, var(--royal-dark), var(--royal));
  color: white; min-height: calc(100vh - 64px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px; max-width: none;
}
.generating-screen { text-align: center; max-width: 460px; }
.gen-spinner {
  width: 64px; height: 64px; margin: 0 auto 32px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--pink);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.generating-screen h2 { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.generating-screen p { opacity: 0.75; margin-bottom: 40px; }
.gen-steps { display: flex; flex-direction: column; gap: 12px; }
.gen-step {
  padding: 14px 20px; background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm); font-size: 14px;
  color: rgba(255,255,255,0.5); transition: var(--transition);
  border-left: 3px solid transparent;
}
.gen-step.done { color: white; border-left-color: var(--pink); background: rgba(255,255,255,0.15); }
 
/* ===================== PROFILE ===================== */
.profile-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.profile-card {
  background: white; border-radius: 24px; padding: 32px;
  box-shadow: var(--shadow); text-align: center; align-self: start;
}
.avatar-display {
  width: 100px; height: 100px; margin: 0 auto 16px;
  border-radius: 50%; background: var(--royal-pale);
  border: 3px solid var(--royal); overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 48px;
}
.profile-name { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.profile-streak { color: var(--gray-500); font-size: 14px; margin-bottom: 20px; }
.profile-stats-row { display: flex; gap: 16px; justify-content: center; margin-bottom: 24px; }
.mini-stat { text-align: center; }
.mini-stat b { display: block; font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--royal); }
.mini-stat span { font-size: 12px; color: var(--gray-500); }
 
.avatar-builder { background: white; border-radius: 24px; padding: 32px; box-shadow: var(--shadow); }
.avatar-builder h2 { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; margin-bottom: 24px; }
.avatar-preview-wrap {
  display: flex; justify-content: center; margin-bottom: 28px;
}
#avatar-canvas {
  border-radius: 50%; border: 4px solid var(--royal);
  box-shadow: 0 4px 20px rgba(26,58,143,0.2);
}
.avatar-options { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }
.opt-group label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-500); margin-bottom: 8px; display: block; }
.opt-row { display: flex; gap: 10px; flex-wrap: wrap; }
.opt-btn {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  border: 2px solid var(--gray-100); background: var(--gray-50);
  font-size: 20px; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.opt-btn:hover { border-color: var(--royal); }
.opt-btn.active { border-color: var(--royal); background: var(--royal-pale); box-shadow: 0 0 0 2px var(--royal); }
 
/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(13,27,62,0.6);
  backdrop-filter: blur(4px); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  background: white; border-radius: 24px; padding: 36px;
  max-width: 440px; width: 100%; box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
.modal-card h2 { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.modal-card p { color: var(--gray-500); font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
 
/* ===================== MOBILE ===================== */
@media (max-width: 768px) {
  .nav-center, .nav-left .logo-text.sm { display: none; }
  .bottom-nav { display: flex; }
  .section { padding: 20px 16px 100px; }
  .home-hero { padding: 24px; }
  .hero-text h1 { font-size: 24px; }
  .hero-stats { gap: 10px; }
  .stat-card { padding: 12px 16px; }
  .stat-num { font-size: 22px; }
  .profile-layout { grid-template-columns: 1fr; }
  .quiz-card { padding: 24px; }
  .q-text { font-size: 18px; }
  .create-form { padding: 20px; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 24px; margin: 16px; }
  .results-btns { flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
}
 
@media (max-width: 400px) {
  .hero-stats { flex-direction: column; }
  .stat-card { min-width: auto; }
}
 
/* Subtle pink accents */
.pink-dot { display: inline-block; width: 8px; height: 8px; background: var(--pink); border-radius: 50%; margin-left: 6px; }
 
/* ===== FRIENDS ===== */
.friend-card {
  display: flex; align-items: center; gap: 16px;
  background: white; border-radius: var(--radius);
  border: 2px solid var(--gray-100); padding: 16px;
  margin-bottom: 12px; transition: var(--transition);
}
.friend-card:hover { border-color: var(--royal); }
.friend-avatar { font-size: 36px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--royal-pale); border-radius: 50%; }
.friend-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.friend-info b { font-size: 15px; font-weight: 700; }
.friend-info span { font-size: 13px; color: var(--gray-500); }
 
/* ===== AVATAR PICKER ===== */
.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.avatar-option {
  background: none;
  border: 3px solid var(--gray-100);
  border-radius: 12px;
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.avatar-option img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-option span {
  font-size: 11px;
  color: var(--gray-500);
  font-family: 'DM Sans', sans-serif;
}
.avatar-option:hover { border-color: var(--royal); }
.avatar-option.active {
  border-color: var(--royal);
  background: var(--royal-pale);
  box-shadow: 0 0 0 2px var(--royal);
}
.avatar-option.active span { color: var(--royal); font-weight: 700; }
 
@media (max-width: 768px) {
  .avatar-picker-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .avatar-option img { width: 48px; height: 48px; }
}
 
/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark);
  color: white;
  padding: 40px 24px;
  margin-top: auto;
}
.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-tagline {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  transition: var(--transition);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}
.footer-link:hover {
  color: white;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
}
.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}
