/* =====================================================================
   Be Cyber Smart — shared design system (v2, "warm family" theme)
   Used by: index.html, quiz.html, dashboard.html, certification.html,
            privacy.html
   Load order: this file first, then any page-specific <style> overrides.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&family=Noto+Sans+Tamil:wght@400;500;600;700&display=swap');

:root{
  /* --- warm, light, family-friendly palette --- */
  --bg:            #FFF9F0;
  --bg-deep:       #FFF2DE;
  --panel:         #FFFFFF;
  --panel-2:       #FFF6E9;
  --ink:           #2B2418;
  --ink-dim:       #6B6152;
  --ink-dimmer:    #9A8F7C;

  --coral:         #2F6FED;   /* primary CTA / brand accent */
  --coral-deep:    #1F4FBE;
  --teal:          #1FAFA0;   /* secondary accent, "safe" cues */
  --teal-deep:     #128577;
  --gold:          #F5A623;   /* highlight / streaks / badges */
  --mint:          #3FBE86;   /* correct */
  --red:           #E6483A;   /* incorrect / alerts */
  --sky:           #4FA8E3;   /* info */

  --line:          rgba(43,36,24,0.10);
  --line-strong:   rgba(43,36,24,0.18);
  --shadow-soft:   0 18px 40px -16px rgba(90,62,20,0.18);
  --shadow-lift:   0 26px 56px -18px rgba(90,62,20,0.24);

  --font-display: 'Baloo 2', 'Noto Sans Devanagari', 'Noto Sans Tamil', 'Segoe UI', sans-serif;
  --font-body:    'Inter', 'Noto Sans Devanagari', 'Noto Sans Tamil', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Inter', monospace;

  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  background:
    radial-gradient(1100px 560px at 12% -8%, rgba(47,111,237,0.10), transparent 60%),
    radial-gradient(900px 480px at 108% 6%, rgba(31,175,160,0.10), transparent 55%),
    var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}

a{ color:var(--teal-deep); }

/* ---------- keyboard focus ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible{
  outline:2.5px solid var(--coral); outline-offset:2px; border-radius:8px;
}

/* ---------- layout shells ---------- */
.stage{ width:100%; max-width:680px; margin:0 auto; padding:40px 16px 80px; }
@media (max-width:480px){ .stage{ padding:28px 14px 64px; } }

.brand-row{
  display:flex; align-items:center; justify-content:center; gap:10px;
  margin-bottom:18px; color:var(--coral-deep);
  font-family:var(--font-display); font-weight:700; font-size:15px;
  letter-spacing:0.02em;
}
.brand-row svg{ width:22px; height:22px; flex:none; }

.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-soft);
  overflow:hidden;
  position:relative;
}
.card::before{
  content:""; position:absolute; top:0; left:0; right:0; height:8px;
  background:linear-gradient(90deg, var(--coral), var(--gold), var(--teal));
}
.pad{ padding:34px 30px 30px; }
@media (max-width:480px){ .pad{ padding:24px 18px 22px; } }

/* ---------- compact shared site nav (brand + links + hamburger) ----------
   Renders via assets/js/nav.js. Deliberately slim — vertical space here
   was pushing quiz/certification content (and the Next button) below
   the fold on desktop. */
.site-nav{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:8px 0; margin-bottom:14px; position:relative;
}
.brand-mini{
  display:flex; align-items:center; gap:7px; text-decoration:none;
  font-family:var(--font-display); font-weight:700; font-size:14.5px; color:var(--coral-deep);
  flex:none;
}
.brand-mini svg{ width:19px; height:19px; flex:none; }
.nav-links-inline{ display:flex; gap:2px; flex-wrap:wrap; justify-content:flex-end; }
.nav-links-inline a{
  font-family:var(--font-body); font-weight:600; font-size:12.5px; text-decoration:none;
  color:var(--ink-dim); padding:6px 11px; border-radius:999px; transition:background .15s ease, color .15s ease;
  white-space:nowrap;
}
.nav-links-inline a:hover, .nav-links-inline a.active{ background:rgba(47,111,237,0.12); color:var(--coral-deep); }
.hamburger-btn{ display:none; align-items:center; justify-content:center; background:none; border:none; color:var(--ink); cursor:pointer; padding:10px; flex:none; }
.hamburger-btn svg{ width:20px; height:20px; }

@media (max-width:600px){
  .hamburger-btn{ display:block; }
  .nav-links-inline{
    display:none; position:absolute; top:100%; right:0; left:0; margin-top:6px;
    flex-direction:column; justify-content:flex-start; gap:2px;
    background:var(--panel); border:1px solid var(--line); border-radius:14px;
    padding:8px; box-shadow:var(--shadow-soft); z-index:80;
  }
  .nav-links-inline.open{ display:flex; }
  .nav-links-inline a{ padding:10px 12px; }
}

/* ---------- language switcher (Index page only — the single place the
   language preference is set; scales to many languages without eating
   horizontal space). English is pinned as its own always-visible pill;
   the dropdown next to it covers every other language and shows the
   name of whichever one is currently selected, so it's obvious at a
   glance that there's more than just English on offer. ---------- */
.lang-switch{ display:flex; align-items:center; gap:6px; flex:none; }
.lang-pill{
  font-family:var(--font-body); font-weight:700; font-size:12.5px; color:var(--ink-dim);
  background:transparent; border:1.5px solid var(--line-strong); border-radius:999px;
  padding:6px 12px; cursor:pointer; white-space:nowrap;
}
.lang-pill.active{ color:var(--coral-deep); background:rgba(47,111,237,0.10); border-color:rgba(47,111,237,0.35); }
.lang-dd{ position:relative; flex:none; }
.lang-dd-btn{
  display:flex; align-items:center; gap:6px; font-family:var(--font-body); font-weight:700;
  font-size:12.5px; color:var(--ink-dim); background:transparent;
  border:1.5px solid var(--line-strong); border-radius:999px; padding:6px 12px; cursor:pointer;
  white-space:nowrap;
}
.lang-dd-btn.active{ color:var(--teal-deep); background:rgba(31,175,160,0.10); border-color:rgba(31,175,160,0.35); }
.lang-dd-btn .lang-dd-globe{ font-size:12px; line-height:1; }
.lang-dd-btn .chev{ font-size:10px; opacity:0.7; }
.lang-dd-list{
  display:none; position:absolute; right:0; top:calc(100% + 6px);
  background:var(--panel); border:1px solid var(--line); border-radius:14px;
  box-shadow:var(--shadow-soft); min-width:140px; max-height:260px; overflow-y:auto;
  padding:6px; z-index:90;
}
.lang-dd.open .lang-dd-list{ display:block; }
.lang-dd-list button{
  display:block; width:100%; text-align:left; background:none; border:none;
  padding:9px 12px; border-radius:10px; font-size:13.5px; font-weight:600;
  color:var(--ink-dim); cursor:pointer; font-family:var(--font-body);
}
.lang-dd-list button:hover, .lang-dd-list button.active{ background:rgba(47,111,237,0.10); color:var(--coral-deep); }

/* ---------- question header: icon + text on one line, saves vertical space ---------- */
.q-head{ display:flex; align-items:flex-start; gap:12px; margin-bottom:18px; }
.q-head .q-icon{ margin-bottom:0; }
.q-head .q-text{ margin:0; }

/* ---------- typography ---------- */
.eyebrow{
  display:inline-block; font-family:var(--font-body); font-weight:700; font-size:12px;
  letter-spacing:0.08em; text-transform:uppercase; color:var(--coral-deep);
  background:rgba(47,111,237,0.12); padding:6px 12px; border-radius:999px; margin-bottom:14px;
}
h1{
  font-family:var(--font-display); font-weight:700; font-size:clamp(26px,5vw,34px);
  line-height:1.15; margin:0 0 12px; color:var(--ink); letter-spacing:-0.01em;
}
h2{ font-family:var(--font-display); font-weight:700; color:var(--ink); }
.lede{ font-size:16px; line-height:1.6; color:var(--ink-dim); margin:0 0 20px; }

/* ---------- buttons ---------- */
.btn{
  font-family:var(--font-display); font-weight:700; font-size:17px; border:none;text-decoration:none; 
  border-radius:16px; padding:16px 26px; cursor:pointer; width:100%; color:#fff;
  background:linear-gradient(135deg, var(--coral), var(--coral-deep));
  box-shadow: 0 0 0 1px rgba(47,111,237,0.25), 0 14px 30px -14px rgba(31,79,190,0.55);
  transition: transform .12s ease, box-shadow .12s ease, filter .15s ease;
}
.btn:active{ transform: translateY(2px); }
.btn:hover{ filter:brightness(1.05); }
.btn:disabled{ opacity:.42; cursor:not-allowed; box-shadow:none; transform:none; filter:none; }

.btn-teal{ text-decoration:none; background:linear-gradient(135deg, var(--teal), var(--teal-deep)); box-shadow:0 0 0 1px rgba(31,175,160,0.25), 0 14px 30px -14px rgba(18,133,119,0.55); }

.btn-ghost{
  display:block; text-align:center; text-decoration:none;
  font-weight:700; font-size:14.5px; color:var(--ink-dim);
  background:transparent; border:1.5px solid var(--line-strong); border-radius:14px;
  padding:12px 20px; margin-top:12px; transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.btn-ghost:hover{ border-color:var(--coral); background:rgba(47,111,237,0.06); color:var(--coral-deep); }

.btn-outline{
  font-weight:700; font-size:15px; border:2px solid var(--coral); color:var(--coral-deep);
  background:transparent; border-radius:16px; padding:14px 20px; cursor:pointer;
  font-family:var(--font-display); width:100%;
}

/* ---------- chips / pills ---------- */
.chip-row{ display:flex; gap:8px; flex-wrap:wrap; }
.chip{
  display:flex; align-items:center; gap:6px; background:var(--panel-2);
  border:1px solid var(--line); border-radius:999px; padding:7px 12px;
  font-size:12.5px; font-weight:700; color:var(--ink-dim);
}

/* ---------- progress ---------- */
.progress-track{ flex:1; height:10px; background:var(--panel-2); border-radius:999px; overflow:hidden; }
.progress-fill{ height:100%; background:linear-gradient(90deg, var(--gold), var(--coral)); border-radius:999px; transition:width .35s ease, height .35s ease; width:0%; }

/* ---------- quiz/certification full-screen popup (used by
   cyber-smart-quiz-india.html and certification.html) ---------- */
.quiz-modal-backdrop{
  position:fixed; inset:0; background:rgba(43,36,24,0.55);
  display:flex; align-items:center; justify-content:center; padding:10px; z-index:1000;
}
.quiz-modal{
  position:relative; background:var(--panel); border-radius:var(--radius-lg);
  width:100%; max-width:680px; height:96vh; height:96dvh;
  box-shadow:var(--shadow-lift); overflow:hidden; display:flex; flex-direction:column;
}
.quiz-modal-close{
  position:absolute; top:12px; right:12px; z-index:5; width:36px; height:36px;
  border-radius:50%; border:none; background:var(--panel-2); color:var(--ink-dim);
  font-size:16px; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center;
}
.quiz-modal-close:hover{ background:rgba(230,72,58,0.12); color:var(--red); }
.quiz-modal-scroll{ flex:1; min-height:0; overflow-y:auto; padding:44px 22px 22px; }
@media (max-width:480px){ .quiz-modal-scroll{ padding:40px 16px 18px; } }

/* Vertical progress rail on wide screens: reclaims the horizontal strip
   the progress bar takes at the top, giving the question/options
   column more height so "Next question" needs less scrolling. */
@media (min-width:700px){
  #screen-quiz{ display:flex; flex-direction:row; gap:18px; }
  #screen-quiz .progress-row{ flex-direction:column; width:14px; flex:none; align-self:stretch; margin-bottom:0; gap:0; }
  #screen-quiz .progress-row .progress-track{ width:10px; height:100%; margin:0 auto; }
  #screen-quiz .progress-row .progress-label{ display:none; }
  #screen-quiz .quiz-content{ flex:1; min-width:0; }
}

/* ---------- options / quiz ---------- */
.opt{
  text-align:left; font-size:15.5px; font-weight:600; color:var(--ink);
  background:var(--panel-2); border:2px solid transparent; border-radius:14px;
  padding:14px 16px; cursor:pointer; display:flex; align-items:center; gap:12px;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
  font-family:inherit; width:100%;
}
.opt:hover:not(:disabled){ border-color: var(--teal); transform: translateX(2px); }
.opt:disabled{ cursor:default; }
.opt .bullet{
  flex:none; width:26px; height:26px; border-radius:8px; background:var(--bg);
  border:2px solid var(--line-strong); display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:12px; color:var(--ink-dim);
}
.opt.correct{ background: rgba(63,190,134,0.14); border-color: var(--mint); }
.opt.correct .bullet{ background:var(--mint); border-color:var(--mint); color:#fff; }
.opt.incorrect{ background: rgba(230,72,58,0.12); border-color: var(--red); }
.opt.incorrect .bullet{ background:var(--red); border-color:var(--red); color:#fff; }

/* ---------- shared confirm/info modal (dashboard clear-history dialog,
   quiz/certification exit-confirm dialog) ---------- */
.modal-backdrop{ position:fixed; inset:0; background:rgba(43,36,24,0.45); display:flex; align-items:center; justify-content:center; padding:20px; z-index:1000; }
.modal-box{ background:var(--panel); border-radius:20px; padding:26px; max-width:420px; width:100%; box-shadow:var(--shadow-lift); }
.modal-box h3{ font-family:var(--font-display); font-size:19px; margin:0 0 10px; }
.modal-box p{ font-size:14px; line-height:1.6; color:var(--ink-dim); margin:0 0 18px; }
.modal-actions{ display:flex; gap:10px; }
.modal-actions button{ flex:1; }
.modal-cancel{ background:var(--panel-2); color:var(--ink-dim); border:1.5px solid var(--line-strong); border-radius:14px; padding:12px; font-weight:700; cursor:pointer; font-family:var(--font-body); }
.modal-confirm{ background:var(--red); color:#fff; border:none; border-radius:14px; padding:12px; font-weight:700; cursor:pointer; font-family:var(--font-body); }
.modal-confirm-coral{ background:linear-gradient(135deg, var(--coral), var(--coral-deep)); color:#fff; border:none; border-radius:14px; padding:12px; font-weight:700; cursor:pointer; font-family:var(--font-body); }

/* ---------- two-buttons-side-by-side row (quiz result / dashboard /
   certification result CTA rows) ---------- */
.dual-btn-row{ display:flex; gap:10px; }
.dual-btn-row > *{ flex:1; min-width:0; }

/* ---------- misc shared ---------- */
.hidden{ display:none !important; }
.status-msg{ text-align:center; color:var(--ink-dim); font-size:15px; padding:20px 0; }
.status-msg.error{ color:var(--red); font-weight:700; }
.footer-note{ text-align:center; font-size:12px; color:var(--ink-dimmer); margin-top:20px; }

.notice-bar{
  font-size:13px; line-height:1.5; color:var(--ink-dim); background:var(--panel-2);
  border:1px solid var(--line); border-radius:12px; padding:10px 14px; margin-bottom:16px;
}
.notice-bar strong{ color:var(--ink); }

/* ---------- streak / dashboard bits ---------- */
.streak-badge{
  display:inline-flex; align-items:center; gap:6px; font-family:var(--font-display);
  font-weight:800; font-size:20px; color:var(--coral-deep);
  background:rgba(47,111,237,0.12); border-radius:999px; padding:8px 18px;
}
.streak-icon{ width:22px; height:22px; flex:none; color:var(--gold); }

/* ---------- shared site footer (every page) ---------- */
.site-footer{ border-top:1px solid var(--line); padding:22px 0 4px; margin-top:20px; }
.site-footer-inner{ display:flex; flex-direction:column; gap:6px; font-size:12.5px; color:var(--ink-dimmer); }
.site-footer-inner a{ text-decoration:none; color:var(--ink-dim); }
.site-footer-inner a:hover{ color:var(--coral-deep); }
.site-footer-line{ margin:0; }
.site-footer-note{ margin:0; }
.site-footer-note a{ text-decoration:underline; }
.site-footer-links{ display:flex; gap:14px; flex-wrap:wrap; margin-top:6px; }

/* ---------- notification foreground toast + dashboard toggle
   (assets/js/notify.js) ---------- */
.notif-toast{
  position:fixed; top:16px; right:16px; left:16px; max-width:360px; margin:0 0 0 auto;
  background:var(--panel); border:1px solid var(--line); border-radius:16px;
  box-shadow:var(--shadow-lift); padding:14px 16px; z-index:1100;
}
.notif-toast strong{ display:block; font-family:var(--font-display); font-size:14px; color:var(--ink); margin-bottom:2px; }
.notif-toast p{ margin:0; font-size:13px; line-height:1.4; color:var(--ink-dim); }

.notif-toggle-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--panel-2); border:1px solid var(--line); border-radius:14px;
  padding:12px 14px; margin-top:10px;
}
.notif-toggle-row span{ font-size:13.5px; font-weight:600; color:var(--ink); }
.switch{ position:relative; display:inline-block; width:42px; height:24px; flex:none; }
.switch input{ opacity:0; width:0; height:0; }
.switch-slider{
  position:absolute; cursor:pointer; inset:0; background:var(--line-strong);
  border-radius:999px; transition:.15s ease;
}
.switch-slider::before{
  content:""; position:absolute; height:18px; width:18px; left:3px; bottom:3px;
  background:#fff; border-radius:50%; transition:.15s ease; box-shadow:0 1px 3px rgba(0,0,0,0.3);
}
.switch input:checked + .switch-slider{ background:var(--teal); }
.switch input:checked + .switch-slider::before{ transform:translateX(18px); }

/* ---------- install banner ---------- */
.install-banner{
  position:fixed; left:16px; right:16px; bottom:16px; max-width:640px; margin:0 auto;
  background:var(--panel); border:1px solid var(--line); border-radius:18px;
  box-shadow:var(--shadow-lift); padding:14px 16px; display:flex; align-items:center; gap:12px;
  z-index:999;
}
.install-banner p{ margin:0; font-size:13.5px; line-height:1.4; color:var(--ink); flex:1; }
.install-banner button{ flex:none; }
.install-banner .install-close{
  background:none; border:none; color:var(--ink-dimmer); font-size:20px; cursor:pointer; padding:0 4px; width:auto;
}
