
:root{
  --bg:#070910;
  --bg2:#0f1219;
  --text:#f4f4f4;
  --muted:#b7b7b7;

  --red:#7b0000;
  --red2:#5a0000;
  --red3:#9b0000;

  --gold:#f6b74a;
  --gold2:#ffcf75;

  --border: rgba(255, 255, 255, 0.10);
  --shadow: 0 18px 50px rgba(0,0,0,.65);
  --shadow2: 0 24px 70px rgba(0,0,0,.75);

  --ok:#00c853;
  --bad:#ff1744;
}
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(1200px 700px at 50% 0%, rgba(155,0,0,.10), transparent 60%),
              radial-gradient(900px 450px at 12% 18%, rgba(246,183,74,.05), transparent 55%),
              radial-gradient(900px 450px at 88% 18%, rgba(246,183,74,.04), transparent 55%),
              linear-gradient(180deg, var(--bg), var(--bg2));
  color:var(--text);
  direction:rtl;
  overflow-x:hidden;
}
body.ltr{ direction:ltr; }
a{ color:inherit; text-decoration:none; }
.brand-link{ color:var(--gold2); font-weight:900; text-decoration:none; }
.brand-link:hover{ filter:brightness(1.08); text-decoration:underline; }
.wrap{ position:relative; z-index:1; max-width:1200px; margin:0 auto; padding:22px 18px 30px; }

/* HERO (AWS Matrix style) */
.hero{
  position:sticky;
  top:0;
  z-index:10;
  background: linear-gradient(135deg, #070a10, #06070c);
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 24px rgba(0,0,0,.55);
  overflow:hidden;
}
.hero-canvas{ position:absolute; inset:0; width:100%; height:100%; opacity:.88; pointer-events:none; filter: contrast(115%) saturate(105%); }
.hero-overlay{
  position:absolute; inset:0;
  background:
    radial-gradient(900px 260px at 55% 0%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(900px 260px at 25% 0%, rgba(246,183,74,.16), transparent 60%),
    radial-gradient(900px 300px at 75% 30%, rgba(155,0,0,.12), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.55));
  pointer-events:none;
}
.hero-inner{
  position:relative; z-index:2;
  max-width:1200px; margin:0 auto;
  padding:18px 18px 14px;
  display:flex; gap:14px; flex-wrap:wrap; align-items:flex-end; justify-content:space-between;
}
.hero-title{ margin:0; font-weight:950; font-size:26px; letter-spacing:.4px; text-shadow: 0 10px 30px rgba(0,0,0,.55); }
.hero-sub{ margin-top:6px; color:rgba(255,255,255,.78); font-size:13px; line-height:1.7; }
.hero-right{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-end; }

.pill{
  background: rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.14);
  border-radius:999px;
  padding:8px 12px;
  color:rgba(255,255,255,.88);
  font-size:13px;
  direction:ltr;
  backdrop-filter: blur(6px);
}
.pill b{ color:#fff; }

.btn{
  padding:10px 14px;
  border:none;
  border-radius:14px;
  background: linear-gradient(180deg, var(--red3), var(--red2));
  color:#fff;
  font-weight:900;
  cursor:pointer;
  transition:.18s ease;
  box-shadow: 0 12px 26px rgba(0,0,0,.45);
}
.btn:hover{ transform: translateY(-1px); filter:brightness(1.07); box-shadow: 0 16px 32px rgba(0,0,0,.55); }
.btn.secondary{ background: rgba(0,0,0,.35); border:1px solid rgba(255,255,255,.14); box-shadow:none; }
.btn.secondary:hover{ background: rgba(255,255,255,.06); transform:none; }

hr.sep{ border:none; border-top:1px solid rgba(255,255,255,.08); margin:18px 0; }
.small{ color:rgba(255,255,255,.70); font-size:13px; line-height:1.8; }

/* red cards */
.grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap:22px; margin-top:26px; }
.grid.center{ max-width:860px; margin-left:auto; margin-right:auto; }
.card{
  background: linear-gradient(180deg, rgba(155,0,0,.95), rgba(90,0,0,.95));
  border:1px solid rgba(255,255,255,.10);
  border-radius:22px;
  padding:22px 22px;
  min-height:170px;
  box-shadow: var(--shadow);
  transition:.22s ease;
  position:relative;
  overflow:hidden;
}
.card::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(540px 200px at 20% 0%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(520px 200px at 80% 0%, rgba(246,183,74,.18), transparent 60%);
  opacity:.95;
  pointer-events:none;
}
.card:hover{ transform: translateY(-6px); box-shadow: var(--shadow2); border-color: rgba(246,183,74,.35); }
.card .t{ position:relative; z-index:2; font-weight:950; font-size:22px; margin:0 0 10px 0; }
.card .d{ position:relative; z-index:2; font-size:14px; line-height:1.7; color: rgba(255,255,255,.86); }

/* question blocks */
.qcard{
  margin-top:14px;
  background: rgba(0,0,0,.36);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  padding:14px 14px;
  box-shadow: 0 14px 44px rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
}
.qhead{ display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; align-items:center; }
.qnum{ color: var(--gold2); font-weight:950; direction:ltr; text-shadow: 0 8px 24px rgba(0,0,0,.6); }
.qtoolbar{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

/* Flip 3D */
.flip3d{ position:relative; perspective: 1200px; }
.flip3d-inner{ position:relative; transform-style: preserve-3d; transition: transform 420ms cubic-bezier(.2,.8,.2,1); }
.flip3d.flipped .flip3d-inner{ transform: rotateY(180deg); }
.flip3d-face{ backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip3d-back{ transform: rotateY(180deg); position:absolute; inset:0; }

.qtext{ margin:10px 0 12px; font-size:18px; line-height:1.85; color: rgba(255,255,255,.94); }
.opts{ display:grid; gap:10px; }
.opt{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  border-radius:16px;
  padding:12px 12px;
  cursor:pointer;
  transition:.16s ease;
  font-size:15.5px;
  line-height:1.65;
}
.opt:hover{ border-color: rgba(246,183,74,.35); transform: translateY(-1px); box-shadow: 0 0 0 2px rgba(246,183,74,.09); }
.opt.disabled{ cursor:not-allowed; opacity:0.88; transform:none; }
.opt.correct{ border-color: rgba(0,200,83,.65); box-shadow: 0 0 0 2px rgba(0,200,83,.10); }
.opt.wrong{ border-color: rgba(255,23,68,.65); box-shadow: 0 0 0 2px rgba(255,23,68,.10); }

.status{
  margin-top:10px;
  font-size:13.5px;
  color: rgba(255,255,255,.82);
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.result{
  margin-top:18px;
  background: linear-gradient(180deg, rgba(155,0,0,.55), rgba(0,0,0,.35));
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  padding:16px;
  display:none;
  box-shadow: 0 16px 58px rgba(0,0,0,.65);
}
.result h2{ margin:0 0 10px; color: var(--gold2); font-size:22px; text-shadow: 0 10px 30px rgba(0,0,0,.6); }
.result p{ margin:6px 0; line-height:1.85; color: rgba(255,255,255,.92); font-size:15.5px; }
.badge{ display:inline-block; padding:4px 10px; border-radius:999px; border:1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.35); color: rgba(255,255,255,.88); font-size:12px; }
footer{
  padding:22px 18px;
  color: rgba(255,255,255,.70);
  text-align:center;
  font-size:12px;
  background: linear-gradient(180deg, rgba(155,0,0,.22), transparent 70%);
  border-top: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 560px){
  .grid{ grid-template-columns: 1fr; }
  .card{ min-height:150px; }
  .hero-title{ font-size:22px; }
}


/* === Universal tweaks (visibility + centered hero) === */
.hero-inner{
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-right{
  justify-content: center;
}
/* Make pills wrap nicely centered */
.hero-right .pill{
  margin-top: 2px;
}

/* Yellow visibility for toolbar pills + secondary button */
.qtoolbar .pill,
.status .pill{
  color: var(--gold2);
  border-color: rgba(246,183,74,.65);
  background: rgba(0,0,0,.45);
}
.qtoolbar .pill b,
.status .pill b{ color: var(--gold2); }

.btn.secondary{
  color: var(--gold2);
  border-color: rgba(246,183,74,.65);
  background: rgba(0,0,0,.40);
}
.btn.secondary:hover{
  background: rgba(246,183,74,.12);
  border-color: rgba(246,183,74,.85);
}

/* Better mobile spacing */
@media (max-width: 720px){
  .hero-inner{ padding:16px 14px 12px; }
  .hero-title{ font-size:20px; }
  .hero-sub{ font-size:12px; }
  .pill{ font-size:12px; padding:7px 10px; }
  .btn{ padding:9px 12px; border-radius:13px; }
}



/* =====================================================
   PREMIUM (free) learning-platform polish
   - fixes hero pills turning into long bars
   - clean typography, spacing, glass panels
   - mobile/tablet responsive
   ===================================================== */

:root{
  --glass: rgba(10,12,18,.55);
  --glass2: rgba(10,12,18,.36);
  --stroke: rgba(255,255,255,.12);
  --stroke2: rgba(246,183,74,.35);
  --accent: rgba(246,183,74,.95);
  --accent2: rgba(246,183,74,.55);
}

body{
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(246,183,74,.10), transparent 60%),
    radial-gradient(900px 450px at 12% 18%, rgba(155,0,0,.08), transparent 55%),
    radial-gradient(900px 450px at 88% 18%, rgba(155,0,0,.07), transparent 55%),
    linear-gradient(180deg, #070910, #0f1219);
}

.hero{
  padding: 20px 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hero-inner{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  gap: 12px;
}
.hero-title{
  margin:0;
  font-weight: 950;
  letter-spacing: .4px;
  font-size: 30px;
  line-height: 1.25;
  text-shadow: 0 18px 45px rgba(0,0,0,.65);
}
.hero-sub{
  max-width: 980px;
  margin: 0 auto;
  color: rgba(255,255,255,.78);
  font-size: 13.5px;
  line-height: 1.75;
}
.hero-right{
  width: 100%;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap: 10px !important;
  margin-top: 6px;
}

/* Pills: keep them compact inline, never full-width */
.pill{
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(246,183,74,.45);
  color: rgba(255,205,120,.95);
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
  backdrop-filter: blur(10px);
}
.pill b{ color: #fff; font-weight: 900; }

/* Main wrap spacing */
.wrap{ padding-top: 18px; }

/* Cards become premium glass */
.card{
  background: linear-gradient(180deg, rgba(18,20,28,.70), rgba(10,12,18,.55)) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 18px 55px rgba(0,0,0,.65) !important;
  overflow:hidden;
}
.card::after{
  background:
    radial-gradient(540px 200px at 20% 0%, rgba(246,183,74,.14), transparent 60%),
    radial-gradient(520px 200px at 80% 0%, rgba(155,0,0,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 60%) !important;
  opacity: 1 !important;
}
.card .t{
  font-size: 22px;
  text-shadow: 0 18px 45px rgba(0,0,0,.65);
}
.card .d{ color: rgba(255,255,255,.82); }

/* Buttons: premium */
.btn{
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(155,0,0,.92), rgba(90,0,0,.92));
  border: 1px solid rgba(255,255,255,.10);
}
.btn:hover{ filter: brightness(1.08); }
.btn.secondary{
  background: rgba(0,0,0,.35) !important;
  border: 1px solid rgba(246,183,74,.55) !important;
  color: rgba(255,205,120,.98) !important;
}
.btn.secondary:hover{
  background: rgba(246,183,74,.10) !important;
  border-color: rgba(246,183,74,.85) !important;
}

/* Question card: glass */
.qcard{
  background: rgba(0,0,0,.33) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 20px 70px rgba(0,0,0,.70) !important;
}
.qnum{ color: rgba(255,205,120,.98) !important; }

/* Toolbar pills visibility */
.qtoolbar .pill,
.status .pill{
  border-color: rgba(246,183,74,.60) !important;
  color: rgba(255,205,120,.98) !important;
}

/* Options */
.opt{
  background: rgba(0,0,0,.30) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
}
.opt:hover{
  border-color: rgba(246,183,74,.60) !important;
  box-shadow: 0 0 0 3px rgba(246,183,74,.10) !important;
}

/* Result box */
.result{
  background: linear-gradient(180deg, rgba(246,183,74,.10), rgba(0,0,0,.35)) !important;
  border: 1px solid rgba(246,183,74,.28) !important;
}

/* Footer: clean */
footer{
  background: linear-gradient(180deg, rgba(246,183,74,.07), transparent 70%) !important;
}

/* Responsive */
@media (max-width: 900px){
  .hero-title{ font-size: 24px; }
  .grid{ gap: 18px; }
}
@media (max-width: 560px){
  .hero-title{ font-size: 20px; }
  .pill{ padding: 9px 12px; font-size: 12px; }
  .card{ padding: 18px; }
  .qtext{ font-size: 16.5px; }
}


.hero-center{max-width:1100px;margin:0 auto;}


/* =====================================================
   PREMIUM Enhancements (keep OLD colors / red theme)
   - smooth sticky top bar
   - subtle hover glow on cards
   - premium page transitions
   ===================================================== */

/* keep original red palette dominant */
:root{
  --red:#7b0000;
  --red2:#5a0000;
  --red3:#9b0000;
  --gold:#f6b74a;
  --gold2:#ffcf75;
}

/* Smooth sticky hero */
.hero{
  position: sticky !important;
  top: 0 !important;
  z-index: 999 !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .25s ease, background .25s ease, border-color .25s ease;
}

/* add a tiny top border glow like paid platforms */
.hero::before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246,183,74,.55), transparent);
  opacity:.9;
  pointer-events:none;
}

.hero-inner{ gap: 10px !important; }

/* restore old-style pills but keep compact */
.pill{
  background: rgba(0,0,0,.35) !important;
  border: 1px solid rgba(246,183,74,.42) !important;
  color: rgba(255,255,255,.88) !important;
  box-shadow: 0 12px 26px rgba(0,0,0,.45) !important;
}
.pill b{ color:#fff !important; }

/* keep toolbar pills yellow-visible */
.qtoolbar .pill,
.status .pill{
  color: var(--gold2) !important;
  border-color: rgba(246,183,74,.65) !important;
}

/* Cards: bring back old red card feel with subtle premium glow */
.card{
  background: linear-gradient(180deg, rgba(155,0,0,.95), rgba(90,0,0,.95)) !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  box-shadow: 0 18px 55px rgba(0,0,0,.65) !important;
  transform: translateZ(0);
}

.card:hover{
  transform: translateY(-7px) scale(1.01);
  border-color: rgba(246,183,74,.45) !important;
  box-shadow:
    0 22px 70px rgba(0,0,0,.78),
    0 0 0 3px rgba(246,183,74,.10),
    0 0 42px rgba(246,183,74,.14);
}

/* add a soft light sweep on hover */
.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background: radial-gradient(520px 220px at 20% 10%, rgba(255,255,255,.10), transparent 60%),
              radial-gradient(520px 220px at 80% 10%, rgba(246,183,74,.20), transparent 60%);
  opacity:.0;
  transition: opacity .22s ease;
  pointer-events:none;
}
.card:hover::before{ opacity:.95; }

/* Buttons: keep old red with smoother hover */
.btn{
  transition: transform .14s ease, filter .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover{ transform: translateY(-1px); filter: brightness(1.08); }

/* Page transitions (fade + slight lift) */
html{ scroll-behavior:smooth; }
body{
  animation: pageIn .26s ease both;
}
@keyframes pageIn{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform: translateY(0); }
}
body.page-out{
  animation: pageOut .20s ease both;
}
@keyframes pageOut{
  from{ opacity:1; transform: translateY(0); }
  to{ opacity:0; transform: translateY(-6px); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  body{ animation:none !important; }
  body.page-out{ animation:none !important; }
  .card, .btn{ transition:none !important; }
}


/* Live stats pills container */
#liveStatsBox{margin-right:6px;}
@media (max-width:560px){#liveStatsBox{width:100%;}}
/* Header always visible (no disappearing) */
.hero{ position:sticky !important; top:0 !important; z-index:9999 !important; }
.hero, .hero *{ transform: none; }
/* Strong feedback colors (green/red fill) */
.opt.correct{
  background: rgba(0,200,83,.14) !important;
  border-color: rgba(0,200,83,.75) !important;
  box-shadow: 0 0 0 2px rgba(0,200,83,.16), 0 12px 30px rgba(0,200,83,.10) !important;
}
.opt.wrong{
  background: rgba(255,23,68,.14) !important;
  border-color: rgba(255,23,68,.78) !important;
  box-shadow: 0 0 0 2px rgba(255,23,68,.16), 0 12px 30px rgba(255,23,68,.10) !important;
}


/* =====================================================
   Collapsing Sticky Header (Premium)
   - Scroll down: header shrinks, keeps stats visible
   - Top of page: header returns to full size
   ===================================================== */
.hero{
  transform: translateZ(0);
  will-change: padding, box-shadow, background;
}
.hero.compact{
  padding: 8px 0 10px !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
}
.hero.compact .hero-title{
  font-size: 20px !important;
  line-height: 1.15 !important;
}
.hero.compact .hero-sub{
  max-height: 0 !important;
  opacity: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  transition: opacity .18s ease, max-height .18s ease;
}
.hero .hero-sub{
  transition: opacity .22s ease, max-height .22s ease;
}
.hero.compact .hero-right{
  margin-top: 4px !important;
}
.hero.compact canvas.hero-canvas{opacity:.75;transition:opacity .22s ease;}

.hero canvas.hero-canvas{
  transition: opacity .22s ease;
}

/* Make pills slightly smaller in compact mode */
.hero.compact .pill{
  padding: 8px 12px !important;
  font-size: 12px !important;
}
@media (max-width:560px){
  .hero.compact .hero-title{ font-size: 17px !important; }
  .hero.compact .pill{ padding: 7px 10px !important; }
}
/* Collapsing Sticky Header - inner padding shrink */
.hero.compact .hero-inner{
  padding: 10px 18px 8px !important;
  align-items: center !important;
}
/* Stronger compact effect */
.hero{ transition: padding .22s ease, box-shadow .22s ease; }
.hero.compact{ min-height: auto !important; }
.hero.compact .hero-center{ transform: translateY(-2px); transition: transform .22s ease; }
/* Home page: slightly brighter, more eye-friendly while keeping original palette */
.home-page{
  background:
    radial-gradient(1200px 500px at 70% 20%, rgba(255, 180, 0, .10), transparent 60%),
    radial-gradient(900px 420px at 25% 35%, rgba(255, 60, 60, .10), transparent 60%),
    radial-gradient(1200px 900px at 50% 120%, rgba(0, 180, 255, .07), transparent 60%),
    var(--bg);
}
.home-page .wrap{ padding-top: 34px; }

/* Ensure header/footer placeholders take space immediately */
#hdr, #ftr{ min-height: 1px; }
/* =========================
   Header V2 collapse (Udemy-like)
   ========================= */
.hero{ transition: padding .22s ease, box-shadow .22s ease, background .22s ease; }
.hero-inner{ transition: padding .22s ease; }
.hero-center{ transition: opacity .18s ease, transform .18s ease, max-height .18s ease; }
.hero.compact{ backdrop-filter: blur(8px); }
.hero.compact .hero-inner{
  padding: 8px 16px 8px !important;
  min-height: 62px;
}
.hero.compact .hero-center{
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero.compact .hero-right{
  width: 100%;
  justify-content: center !important;
  margin-top: 0 !important;
}
.hero.compact .pill{
  padding: 8px 12px !important;
  font-size: 12px !important;
}
/* Keep a tiny title for index when compact and no pills */
.hero.compact .hero-mini{
  display: inline-flex;
}
.hero-mini{
  display:none;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.4px;
  color:#fff;
}
.hero-mini a{ color:#f5c542; text-decoration:none; }
/* Progress bar (Correct/Wrong) */
.progressWrap{margin:10px 0 18px 0;}
.progressTrack{
  width:100%;
  height:12px;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,200,0,.25);
  overflow:hidden;
  box-shadow: inset 0 0 18px rgba(0,0,0,.35);
}
.progressGood, .progressBad{
  height:100%;
  float:left;
  transition: width .25s ease;
}
.progressGood{ background: linear-gradient(90deg, rgba(0,220,120,.65), rgba(0,180,90,.85)); }
.progressBad{ background: linear-gradient(90deg, rgba(255,70,70,.65), rgba(255,30,30,.85)); }
.progressMeta{
  margin-top:8px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start;
}
.progressMeta .pill{border-color: rgba(255,200,0,.35);}
/* Home button emphasis */
#backHomeBtn, a.home-strong, button.home-strong{
  border-color: rgba(255,200,0,.85) !important;
  box-shadow: 0 0 0 1px rgba(255,200,0,.18), 0 0 26px rgba(255,180,0,.18);
}
#backHomeBtn:hover, a.home-strong:hover, button.home-strong:hover{
  box-shadow: 0 0 0 1px rgba(255,200,0,.28), 0 0 34px rgba(255,180,0,.28);
}
/* Inline finish button under each question */
.qactions{display:flex; justify-content:flex-start; gap:10px; margin-top:10px;}
.finish-inline{padding:10px 14px; border-radius:999px; border:1px solid rgba(255,200,0,.35);}
/* Term highlighting + inline explanation */
.term{
  color: rgba(255, 215, 0, 0.95);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 200, 0, 0.25);
}
.term-explain{
  display:inline-block;
  margin-inline-start:6px;
  margin-top:6px;
  
  color: rgba(255, 215, 0, 0.92);
  font-weight: 600;
}
.evalBox{
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,200,0,.20);
  background: rgba(0,0,0,.25);
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.evalBox .pill{ border-color: rgba(255,200,0,.25); }
/* Glossary page */
.glossaryWrap{max-width:1100px;margin:0 auto;padding:24px 16px}
.glossaryHead{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:14px}
.glossarySearch{flex:1;min-width:240px}
.glossarySearch input{width:100%;padding:12px 14px;border-radius:14px;border:1px solid rgba(255,200,0,.22);background:rgba(0,0,0,.35);color:#fff;outline:none}
.glossaryTable{width:100%;border-collapse:separate;border-spacing:0 10px}
.glossaryRow{background:rgba(0,0,0,.28);border:1px solid rgba(255,200,0,.18);border-radius:16px;overflow:hidden}
.glossaryRow td{padding:14px 14px;vertical-align:top}
.glossaryTerm{color:rgba(255,215,0,.98);font-weight:800;letter-spacing:.4px;white-space:nowrap}
.glossaryDef{color:rgba(255,255,255,.88);line-height:1.6}
/* Home Glossary Section */
.homeGlossary{max-width:1100px;margin:18px auto 0;padding:0 16px}
.homeGlossaryBox{
  background:rgba(0,0,0,.28);
  border:1px solid rgba(255,200,0,.18);
  border-radius:18px;
  padding:16px 16px;
  backdrop-filter: blur(10px);
}
.homeGlossaryTitle{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.homeGlossaryTitle h3{margin:0;color:#fff;font-size:18px}
.homeGlossaryTitle .sub{color:rgba(255,255,255,.75);font-size:13px}
.homeGlossaryBtns{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.btnGold{
  background:linear-gradient(180deg, rgba(255,200,0,.22), rgba(255,200,0,.06));
  border:1px solid rgba(255,200,0,.32);
  color:rgba(255,230,140,.98);
}
.btnGold:hover{filter:brightness(1.08)}

/* ===== Glossary CTA (Home) ===== */
.home-glossary-cta{
  margin: 18px auto 0;
  max-width: 980px;
  text-align:center;
}
.btn-glossary{
  display:inline-flex;
  flex-direction:column;
  gap:6px;
  padding: 12px 18px;
  border-radius: 16px;
  border:1px solid rgba(255,197,61,.55);
  color:#ffd56a;
  text-decoration:none;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.btn-glossary:hover{ transform: translateY(-1px); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.btn-glossary__title{ font-weight:900; font-size: 1.05rem; }
.btn-glossary__meta{ opacity:.9; }
.home-glossary-cta__sub{ margin-top:8px; opacity:.85; font-size:.95rem; }

/* ===== Glossary Page ===== */
.page-glossary .container { max-width: 1280px; }
.glossary-hero{
  display:flex; gap:16px; align-items:flex-start; justify-content:space-between;
  padding: 18px 18px; border-radius: 18px;
  border: 1px solid rgba(255,197,61,.18);
  background: linear-gradient(180deg, rgba(0,0,0,.40), rgba(0,0,0,.18));
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}
.glossary-title{ margin:0; font-size: clamp(22px, 3vw, 34px); letter-spacing: .2px; }
.glossary-sub{ margin:8px 0 0; opacity:.85; }
.glossary-hero__right{ min-width: 320px; display:flex; flex-direction:column; gap:10px; }
.pill-row{ display:flex; gap:10px; justify-content:flex-end; }
.pill{
  cursor:pointer; user-select:none;
  padding: 10px 14px; border-radius: 999px;
  border: 1px solid rgba(255,197,61,.45);
  background: rgba(0,0,0,.28);
  color: #ffd56a; font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.pill:hover{ transform: translateY(-1px); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.pill--active{ background: rgba(255,197,61,.12); box-shadow: 0 12px 32px rgba(255,197,61,.10); }
.glossary-search{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.30);
  color: #fff;
  outline:none;
}
.glossary-layout{
  margin-top: 14px;
  display:grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
}
.glossary-sidebar{
  position: sticky;
  top: 84px;
  align-self:start;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.26);
  backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.30);
}
.glossary-sidebar__header{
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display:flex; align-items:center; justify-content:space-between;
}
.glossary-cats{ padding: 10px; display:flex; flex-direction:column; gap:8px; max-height: calc(100vh - 160px); overflow:auto; }
.cat-btn{
  cursor:pointer;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  color: #fff;
  display:flex; align-items:center; justify-content:space-between;
}
.cat-btn:hover{ border-color: rgba(255,197,61,.35); box-shadow: 0 12px 28px rgba(0,0,0,.35); }
.cat-btn--active{ border-color: rgba(255,197,61,.55); box-shadow: 0 16px 34px rgba(255,197,61,.10); }
.cat-badge{
  font-size:.85rem;
  padding: 2px 8px;
  border-radius: 999px;
  color: #ffd56a;
  border: 1px solid rgba(255,197,61,.35);
  background: rgba(255,197,61,.10);
}
.glossary-results{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(0,0,0,.30);
  overflow:hidden;
}
.glossary-meta{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display:flex; align-items:center; justify-content:space-between;
  opacity:.92;
}
.glossary-list{
  padding: 12px 12px 16px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.glossary-card{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.26));
  padding: 12px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.glossary-term{ display:flex; gap:10px; align-items:center; justify-content:space-between; font-weight: 900; }
.term-cat{ font-size: .82rem; opacity:.85; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255,197,61,.25); color:#ffd56a; }
.glossary-def{ margin-top: 8px; line-height: 1.55; }
.glossary-def.secondary{ opacity:.78; }
@media (max-width: 980px){
  .glossary-layout{ grid-template-columns: 1fr; }
  .glossary-sidebar{ position: relative; top:auto; }
  .glossary-list{ grid-template-columns: 1fr; }
  .glossary-hero{ flex-direction:column; }
  .glossary-hero__right{ width: 100%; min-width: auto; }
  .pill-row{ justify-content:flex-start; }
}


/* Header nav links */
.pill-link{ text-decoration:none; font-weight:800; color:#fff; }
.pill-link:hover{ filter:brightness(1.08); }
.pill-home{
  border-color: rgba(255, 200, 0, .75) !important;
  box-shadow: 0 0 0 1px rgba(255, 200, 0, .15), 0 10px 30px rgba(255, 200, 0, .08);
}
.pill-home:hover{ box-shadow: 0 0 0 1px rgba(255, 200, 0, .25), 0 14px 40px rgba(255, 200, 0, .12); }

/* Footer */
.footer{ margin-top:40px; padding:18px 14px; }
.footer-inner{ max-width:1200px; margin:0 auto; display:flex; gap:14px; align-items:center; justify-content:space-between; }
.footer a{ color:#ffd15a; text-decoration:none; font-weight:800; }
.footer-note{ opacity:.75; font-size:14px; }

/* Glossary */
.cat-section{ margin:22px 0; padding:16px; border-radius:18px; border:1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.28); }
.cat-section h2{ margin:0 0 10px; font-size:20px; }
.term-card{ padding:12px 14px; border-radius:14px; border:1px solid rgba(255,255,255,.08); margin:10px 0; background: rgba(0,0,0,.22); }
.term-card strong{ display:block; font-size:16px; margin-bottom:6px; color:#ffd15a; }
.term-card p{ margin:0; line-height:1.6; opacity:.95; }


/* Matrix canvas layer */
.hero{position:relative; overflow:hidden;}
.hero-matrix-canvas{position:absolute; inset:0; width:100%; height:100%; z-index:0; opacity:.55; pointer-events:none;}
.hero-inner{position:relative; z-index:1;}

/* Collapsing sticky header */
.hero{position:sticky; top:0;}
.hero{transition:padding .25s ease, min-height .25s ease, backdrop-filter .25s ease;}
.hero .hero-title{transition:font-size .25s ease, transform .25s ease;}
.hero .hero-sub{transition:opacity .2s ease, max-height .2s ease; overflow:hidden;}
.hero.hero-collapsed{min-height:86px; padding-top:14px; padding-bottom:14px;}
.hero.hero-collapsed .hero-title{font-size:1.35rem; transform:translateY(-2px);}
.hero.hero-collapsed .hero-sub{opacity:0; max-height:0;}



/* ===== Glossary: Category Tiles (No Inputs) ===== */
.glossary-hero { margin-top: 10px; margin-bottom: 18px; text-align: center; }
.glossary-section { margin: 18px 0 28px; }
.is-hidden { display: none !important; }

.glossary-cat-grid {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.glossary-cat-card {
  text-align: center;
  cursor: pointer;
  padding: 22px 18px;
  border-radius: 22px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.glossary-cat-card-title {
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .3px;
}

.glossary-cat-card-sub {
  margin-top: 8px;
  opacity: .9;
  font-weight: 700;
}

.glossary-cat-card-hint {
  margin-top: 10px;
  opacity: .75;
  font-size: 13px;
}

.glossary-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.glossary-view-meta { text-align: center; flex: 1; min-width: 240px; }
.glossary-cat-title { margin: 0; font-size: 22px; font-weight: 900; }
.glossary-cat-count { margin-top: 6px; opacity: .85; font-weight: 700; }

.glossary-table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.28);
}

.glossary-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.glossary-table thead th {
  position: sticky;
  top: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(10px);
  padding: 14px 12px;
  font-weight: 900;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.glossary-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  vertical-align: top;
}

.term-chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,215,0,.55);
  color: #ffd35a;
  font-weight: 900;
  background: rgba(0,0,0,.35);
}

.term-ar, .term-en { opacity: .95; font-weight: 650; line-height: 1.55; }
.term-ar { direction: rtl; text-align: right; display: inline-block; }
.term-en { direction: ltr; text-align: left; display: inline-block; }

@media (max-width: 980px) {
  .glossary-cat-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
@media (max-width: 620px) {
  .glossary-cat-grid { grid-template-columns: 1fr; }
  .glossary-cat-card { min-height: 120px; }
}
