/* =====================================================
   BIOLOGY MENTOR — DESIGN TOKENS
   Theme: field-notebook / specimen-label, botanical lab
   ===================================================== */
:root {
  --bg: #F2F5EE;
  --surface: #FFFFFF;
  --ink: #16261C;
  --ink-soft: #4B5A50;
  --primary: #1F5E3E;
  --primary-dark: #143D28;
  --accent: #D98E3F;
  --accent-soft: #F3E1C4;
  --info: #3E7CA6;
  --border: #DCE3D6;
  --error: #B4432F;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(20, 40, 30, 0.08);
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

[data-theme="dark"] {
  --bg: #14201A;
  --surface: #1B2A22;
  --ink: #E9EFE7;
  --ink-soft: #A9B8AE;
  --primary: #3E8F63;
  --primary-dark: #0F1913;
  --accent: #E3A559;
  --accent-soft: #3A3222;
  --info: #5FA0CC;
  --border: #2E3D34;
  --error: #E06A54;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  max-width: 100%;
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  transition: background 0.2s ease, color 0.2s ease;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  color: var(--primary-dark);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.4em;
}

a { color: var(--info); }
p { color: var(--ink-soft); }

/* ---------- Layout ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }

/* ---------- Nav (specimen label bar) ---------- */
.nav {
  background: var(--primary-dark);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 3px solid var(--accent);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: 100%; }
.nav .brand { font-family: var(--font-display); font-size: 1.3rem; color: #fff; font-weight: 700; letter-spacing: 0.3px; text-decoration: none; flex-shrink: 0; }
.nav .brand span { color: var(--accent); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: #E9EFE7; text-decoration: none; font-size: 0.94rem; }
.nav-links a:hover { color: var(--accent); }
.theme-toggle-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: 999px;
  width: 34px; height: 34px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.theme-toggle-btn:hover { background: rgba(255,255,255,0.22); }

/* ---------- Mobile nav: scroll inside the bar, never widen the page ---------- */
@media (max-width: 760px) {
  .nav .wrap { padding: 0 14px; }
  .nav .brand { font-size: 1.05rem; }
  .nav-links {
    gap: 14px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: calc(100vw - 130px);
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { flex-shrink: 0; }
  .notif-wrap { flex-shrink: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1.5px solid var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Hero (specimen label) ---------- */
.hero {
  background: linear-gradient(180deg, #E7EEE1 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 80px 0 60px;
}
.hero-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
}
.hero h1 { font-size: 2.6rem; max-width: 680px; }
.hero p.lead { font-size: 1.1rem; max-width: 560px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Cards / specimen labels ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 6px;
  display: block;
}
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } .hero h1 { font-size: 2rem; } }

/* ---------- Chapter tabs (field-notebook style) ---------- */
.chapter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chapter-tab {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  cursor: pointer;
  color: var(--ink-soft);
}
.chapter-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Forms ---------- */
.form-card { max-width: 420px; margin: 60px auto; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: 8px; font-family: var(--font-body); font-size: 0.95rem;
  background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary);
}
.form-msg { font-size: 0.88rem; margin-top: 10px; padding: 10px 12px; border-radius: 8px; display: none; }
.form-msg.error { background: #FBE9E5; color: var(--error); display: block; }
.form-msg.success { background: #E4F0E8; color: var(--primary-dark); display: block; }

/* ---------- Dashboard ---------- */
.dash-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 26px 0; }
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.stat {
  font-family: var(--font-mono); background: var(--accent-soft); border-radius: 8px;
  padding: 10px 16px; font-size: 0.85rem; color: var(--primary-dark);
}
.stat b { display: block; font-size: 1.3rem; }

/* ---------- Question / Test taking ---------- */
.question-box { margin-bottom: 26px; }
.q-number { font-family: var(--font-mono); color: var(--accent); font-size: 0.85rem; }
.difficulty-pill { display:inline-block; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.6px; padding: 2px 9px; border-radius: 999px; margin-left: 8px; }
.difficulty-easy { background: #e6f4ea; color: #1e7e34; }
.difficulty-moderate { background: #fff4e0; color: #b8860b; }
.difficulty-tough { background: #fde8e8; color: #c0392b; }
.pyq-pill { display:inline-block; font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.6px; padding: 2px 9px; border-radius: 999px; margin-left: 8px; background: #e8eefd; color: #2952cc; }
.weightage-note { font-size: 0.78rem; color: var(--ink-soft); margin-left: 8px; }
.option-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 8px; margin-top: 8px; cursor: pointer; background: #fff;
}
.option-row:hover { border-color: var(--primary); }
.option-row.selected { border-color: var(--primary); background: #EAF3EC; }
.option-row.correct { border-color: var(--primary); background: #DCF0E2; }
.option-row.wrong { border-color: var(--error); background: #FBE9E5; }

/* ---------- Footer ---------- */
footer { background: var(--primary-dark); color: #cfe0d3; padding: 40px 0; margin-top: 60px; font-size: 0.88rem; }
footer a { color: #fff; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.muted { color: var(--ink-soft); font-size: 0.9rem; }
.hidden { display: none !important; }
.spinner { border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; width: 22px; height: 22px; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== NOTIFICATION PANEL (add-on, does not affect existing styles) ===== */
.notif-wrap { position: relative; display: inline-flex; align-items: center; }
.notif-bell { cursor: pointer; font-size: 1.15rem; position: relative; color: #E9EFE7; user-select: none; }
.notif-bell:hover { color: var(--accent); }
.notif-badge {
  position: absolute; top: -6px; right: -10px;
  background: var(--accent); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.notif-dropdown {
  position: absolute; top: 32px; right: 0; width: 300px; max-width: 85vw; max-height: 360px;
  overflow-y: auto; background: var(--surface); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18); z-index: 50;
}
.notif-item { padding: 12px 14px; border-bottom: 1px solid var(--accent-soft); }
.notif-item:last-child { border-bottom: none; }
.notif-unread { background: var(--accent-soft); }

/* ===== SOCIAL FLOATING BAR (add-on, does not affect existing styles) ===== */
.social-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 100;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.social-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25); text-decoration: none;
  transition: transform 0.15s ease;
}
.social-btn:hover { transform: scale(1.08); }
.social-btn svg { width: 26px; height: 26px; }
.wa-btn { background: #25D366; }
.tg-btn { background: #229ED9; }
.yt-btn { background: #FF0000; }
.ig-btn { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }

/* ===== CUSTOMISED BANNERS (add-on, does not affect existing styles) ===== */
#banner-section { padding: 22px 0 0; }
.banner-track {
  display: flex; transition: transform 0.5s ease;
  border-radius: 14px; overflow: hidden;
}
.banner-slide {
  min-width: 100%; position: relative; display: block; text-decoration: none;
}
.banner-slide img {
  width: 100%; height: auto; max-height: 320px; object-fit: cover; display: block;
}
.banner-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.6));
  color: #fff; padding: 18px 16px 12px; font-size: 0.95rem; font-weight: 600;
}
.banner-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.banner-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-soft);
  cursor: pointer;
}
.banner-dot.active { background: var(--accent); }
