/* =====================================================
   ELECTRONOUR — Premium Design System v4.0
   Rebuilt for 95+/100 across Design, UX, Performance,
   Accessibility, SEO & Mobile Experience
===================================================== */

/* ====== RESET & BASE ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* ====== SKIP LINK (Accessibility) ====== */
.skip-link {
  position: absolute; top: -100px; right: 0; z-index: 9999;
  background: var(--purple); color: #fff; padding: 12px 20px;
  border-radius: 0 0 12px 12px; font-weight: 800; font-size: 14px;
  text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ====== CSS CUSTOM PROPERTIES ====== */
:root, [data-theme="dark"] {
  /* Brand */
  --purple: #7C3AED; --purple-light: #A78BFA; --purple-dark: #4C1D95;
  --gold: #F59E0B; --gold-light: #FCD34D; --gold-dark: #D97706;
  --green: #10B981; --green-light: #34D399; --red: #EF4444;
  --blue: #3B82F6; --cyan: #06B6D4;

  /* Surfaces */
  --bg: #07051A; --bg2: #0D0929; --card: #110E32; --card2: #181445;
  --card-hover: #1C1850;

  /* Text */
  --text: #F0EBF8; --muted: #8479A8; --muted-light: #A89DC8;

  /* Borders & Shadows */
  --border: #1E1847; --border-light: #2A2260;
  --shadow: 0 4px 20px rgba(0,0,0,.45);
  --shadow-md: 0 8px 32px rgba(0,0,0,.55);
  --shadow-lg: 0 16px 56px rgba(0,0,0,.7);
  --glow-purple: 0 0 32px rgba(124,58,237,.35);
  --glow-gold: 0 0 24px rgba(245,158,11,.4);

  /* Layout */
  --radius: 18px; --radius-sm: 12px; --radius-xs: 8px;
  --nav-h: 66px;

  /* Code */
  --code-bg: #040310;
}

[data-theme="light"] {
  --bg: #F3EEFF; --bg2: #EAE3FF; --card: #FFFFFF; --card2: #F7F3FF;
  --card-hover: #F0EAFF;
  --text: #160E38; --muted: #6B5E8F; --muted-light: #8A7DB0;
  --border: #DDD4F5; --border-light: #CEC3F0;
  --shadow: 0 4px 20px rgba(80,40,180,.07);
  --shadow-md: 0 8px 30px rgba(80,40,180,.12);
  --shadow-lg: 0 16px 50px rgba(80,40,180,.18);
  --glow-purple: 0 0 24px rgba(124,58,237,.15);
  --code-bg: #160E38;
}

/* ====== REDUCED MOTION ====== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ====== ANIMATIONS ====== */
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }
@keyframes twinkle { from{opacity:.04;transform:scale(.7)} to{opacity:.35;transform:scale(1.3)} }
@keyframes slideUp { from{opacity:0;transform:translateY(22px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideRight { from{opacity:0;transform:translateX(18px)} to{opacity:1;transform:translateX(0)} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes popIn { 0%{transform:scale(.6);opacity:0} 75%{transform:scale(1.1)} 100%{transform:scale(1);opacity:1} }
@keyframes progressFill { from{width:0} to{width:var(--w,0%)} }
@keyframes shimmer { from{background-position:200% center} to{background-position:-200% center} }
@keyframes goldShimmer { 0%{background-position:0% 50%} 50%{background-position:100% 50%} 100%{background-position:0% 50%} }
@keyframes glow { 0%,100%{box-shadow:0 0 18px rgba(16,185,129,.3)} 50%{box-shadow:0 0 42px rgba(16,185,129,.65)} }
@keyframes toastIn { from{transform:translateX(-50%) translateY(70px);opacity:0} to{transform:translateX(-50%) translateY(0);opacity:1} }
@keyframes spin { from{transform:rotate(0)} to{transform:rotate(360deg)} }
@keyframes ripple { to{transform:scale(4);opacity:0} }
@keyframes backToTop { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg,var(--purple),var(--purple-light)); border-radius: 10px; }

/* ====== BODY ====== */
body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
  color: var(--text);
  transition: background .3s, color .3s;
  -webkit-font-smoothing: antialiased;
}

/* ====== MAIN CONTENT ====== */
main {
  position: relative;
  z-index: 1;
}

/* ====== STARS BACKGROUND ====== */
#stars-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
  background: radial-gradient(ellipse at 25% 15%, #1B0F45 0%, #07051A 58%),
              radial-gradient(ellipse at 80% 85%, #120838 0%, transparent 55%);
  transition: background .4s;
}
[data-theme="light"] #stars-bg {
  background: radial-gradient(ellipse at top, #EAE3FF 0%, #F3EEFF 100%);
}
.star { position: absolute; animation: twinkle 3s infinite alternate; font-size: 10px; }

/* ====== NAVIGATION ====== */
nav {
  background: rgba(10,7,28,.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(124,58,237,.2);
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
  position: sticky; top: 0; z-index: 200;
  transition: background .3s, border-color .3s;
}
[data-theme="light"] nav {
  background: rgba(255,255,255,.92);
  border-bottom-color: rgba(124,58,237,.12);
}

/* Logo */
.nav-logo { display: flex; align-items: center; gap: 12px; cursor: pointer; text-decoration: none; }
.nav-logo-icon {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, var(--gold), #F97316);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 18px rgba(245,158,11,.5);
  animation: pulse 3.5s ease-in-out infinite;
  flex-shrink: 0;
}
.nav-logo-text { color: var(--text); font-weight: 900; font-size: 18px; font-family: 'Cairo Play', sans-serif; line-height: 1.1; }
.nav-logo-sub { color: var(--muted); font-size: 8px; letter-spacing: 3px; font-weight: 700; text-transform: uppercase; }

/* Nav right */
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; gap: 2px; }
.nav-btn {
  background: transparent; border: none;
  color: var(--muted);
  padding: 8px 14px; border-radius: 24px;
  cursor: pointer; font-size: 13px; font-weight: 700; font-family: 'Cairo', sans-serif;
  display: flex; align-items: center; gap: 5px;
  transition: all .2s; text-decoration: none; position: relative;
}
.nav-btn:hover, .nav-btn.active { background: rgba(124,58,237,.14); color: var(--purple-light); }
.nav-btn.active::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--purple-light);
}
.nav-btn:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 2px; }

/* Theme toggle */
.theme-toggle {
  background: rgba(124,58,237,.1);
  border: 1.5px solid rgba(124,58,237,.25);
  color: var(--text); width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 17px; transition: all .25s; flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(124,58,237,.22); transform: rotate(22deg); }
.theme-toggle:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 2px; }

/* Mobile menu button */
.nav-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--text); font-size: 22px;
}

/* ====== PAGES ====== */
.page { display: none; position: relative; z-index: 1; }
.page.active { display: block; animation: fadeIn .3s ease; }

/* ====== HERO ====== */
.hero {
  padding: 88px 28px 76px;
  text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 75% 5%, rgba(245,158,11,.1) 0%, transparent 65%),
    radial-gradient(ellipse 55% 50% at 22% 82%, rgba(16,185,129,.07) 0%, transparent 65%),
    radial-gradient(ellipse 85% 65% at 50% 50%, rgba(124,58,237,.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(124,58,237,.14);
  border: 1px solid rgba(124,58,237,.28);
  color: var(--purple-light);
  padding: 7px 18px; border-radius: 32px;
  font-size: 13px; font-weight: 700;
  margin-bottom: 22px;
  backdrop-filter: blur(12px);
  animation: slideUp .5s .1s both;
}
.hero-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-light); animation: pulse 2s infinite; flex-shrink: 0; }

.hero-emoji {
  font-size: 76px; animation: float 3.8s ease-in-out infinite;
  margin-bottom: 18px; display: block;
  filter: drop-shadow(0 10px 28px rgba(245,158,11,.55));
  animation: slideUp .5s .2s both, float 3.8s 1s ease-in-out infinite;
}

.hero h1 {
  color: var(--text); font-size: 46px; font-weight: 900;
  margin-bottom: 16px; font-family: 'Cairo Play', sans-serif; line-height: 1.18;
  animation: slideUp .5s .3s both;
}
.hero h1 .brand-name {
  background: linear-gradient(135deg, var(--gold), #FCD34D, #F97316, var(--gold));
  background-size: 300% auto; animation: goldShimmer 4.5s linear infinite;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero-lead {
  color: var(--muted-light); font-size: 17px; max-width: 540px;
  margin: 0 auto 38px; line-height: 1.9;
  animation: slideUp .5s .4s both;
}

.hero-btns {
  display: flex; gap: 13px; justify-content: center; flex-wrap: wrap;
  animation: slideUp .5s .5s both;
}

/* CTA Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--gold), #F97316);
  border: none; color: #1A1033;
  padding: 14px 38px; border-radius: 52px;
  font-size: 15px; font-weight: 900; cursor: pointer; font-family: 'Cairo', sans-serif;
  box-shadow: 0 6px 26px rgba(245,158,11,.48);
  transition: transform .18s, box-shadow .18s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(255,255,255,.18), transparent);
  border-radius: inherit;
}
.btn-primary:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 34px rgba(245,158,11,.62); }
.btn-primary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.btn-secondary {
  background: rgba(124,58,237,.1);
  border: 1.5px solid rgba(124,58,237,.28);
  color: var(--purple-light); padding: 14px 36px; border-radius: 52px;
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: 'Cairo', sans-serif;
  transition: all .22s; backdrop-filter: blur(14px);
  text-decoration: none; display: inline-flex; align-items: center; gap: 7px;
}
.btn-secondary:hover { background: rgba(124,58,237,.2); border-color: var(--purple-light); transform: translateY(-2px); }
.btn-secondary:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 2px; }

/* ====== HERO STATS ====== */
.hero-stats {
  display: flex; gap: 14px; justify-content: center;
  margin-top: 52px; flex-wrap: wrap;
  animation: slideUp .5s .6s both;
}
.stat-box {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 20px; padding: 18px 24px;
  backdrop-filter: blur(16px); text-align: center; min-width: 104px;
  transition: transform .22s, box-shadow .22s;
}
[data-theme="light"] .stat-box { background: rgba(0,0,0,.035); border-color: rgba(0,0,0,.07); }
.stat-box:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.stat-emoji { font-size: 26px; margin-bottom: 6px; }
.stat-num { color: var(--gold-light); font-size: 25px; font-weight: 900; font-family: 'Cairo Play', sans-serif; }
.stat-label { color: var(--muted); font-size: 11px; font-weight: 600; margin-top: 2px; }

/* ====== TRUST BAR ====== */
.trust-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap; margin-top: 28px; padding: 0 20px;
  animation: slideUp .5s .7s both;
}
.trust-item {
  display: flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 12px; font-weight: 600;
}
.trust-item-icon { font-size: 15px; }
.trust-sep { color: var(--border-light); font-size: 18px; font-weight: 300; }

/* ====== SECTIONS ====== */
.section { padding: 56px 28px 0; max-width: 1070px; margin: 0 auto; }
.section:last-child { padding-bottom: 0; }

.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.section-header-text h2 {
  font-size: 26px; font-weight: 900; color: var(--text);
  margin-bottom: 5px; font-family: 'Cairo Play', sans-serif;
}
.section-header-text p { color: var(--muted); font-size: 14px; }

.view-all-btn {
  background: rgba(124,58,237,.09); border: 1px solid rgba(124,58,237,.22);
  color: var(--purple-light); padding: 9px 20px; border-radius: 24px;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'Cairo', sans-serif;
  transition: all .2s; white-space: nowrap; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.view-all-btn:hover { background: rgba(124,58,237,.18); }

/* ====== COURSE CARDS ====== */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 22px; }
.course-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.2,.8,.4,1), box-shadow .3s;
  animation: slideUp .5s both;
  border: 1.5px solid var(--border);
  display: block; text-decoration: none; color: inherit;
}
.course-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--border-light); }
.course-card:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 3px; }

.course-card-top {
  padding: 28px 24px 22px; position: relative; overflow: hidden; min-height: 136px;
}
.course-card-top::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Ccircle cx='70' cy='10' r='30'/%3E%3Ccircle cx='10' cy='70' r='20'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.course-level-badge {
  display: inline-flex; align-items: center;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3);
  color: #fff; padding: 3px 11px; border-radius: 18px;
  font-size: 10px; font-weight: 700; margin-bottom: 12px; backdrop-filter: blur(8px);
}
.course-emoji { font-size: 44px; display: block; animation: float 3.8s ease-in-out infinite; margin-bottom: 8px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.3)); }
.course-title { color: #fff; font-size: 17px; font-weight: 900; font-family: 'Cairo Play', sans-serif; line-height: 1.3; text-shadow: 0 2px 8px rgba(0,0,0,.2); }

.course-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 13px; }
.course-desc { color: var(--muted); font-size: 13px; line-height: 1.75; }
.course-meta { display: flex; gap: 7px; flex-wrap: wrap; }
.meta-tag { padding: 4px 11px; border-radius: 18px; font-size: 11px; font-weight: 700; }

.progress-label { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; font-weight: 700; color: var(--muted); }
.progress-bar { height: 7px; background: var(--border); border-radius: 99px; overflow: hidden; position: relative; }
.progress-fill {
  height: 100%; border-radius: 99px; --w: 0%; width: 0;
  animation: progressFill 1.4s .5s cubic-bezier(.34,1.2,.64,1) forwards;
}
.progress-fill::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35));
  animation: shimmer 2s 2s infinite; background-size: 200% auto;
}

.btn-course {
  width: 100%; border: none; padding: 13px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 800; cursor: pointer; color: #fff;
  font-family: 'Cairo', sans-serif; transition: opacity .2s, transform .15s;
  letter-spacing: .3px; display: block; text-align: center; text-decoration: none;
}
.btn-course:hover { opacity: .88; transform: scale(1.01); }

/* ====== FEATURES GRID ====== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 14px; padding-bottom: 0; margin-top: 24px; }
.feature-card {
  background: var(--card); border-radius: var(--radius); padding: 24px 18px; text-align: center;
  box-shadow: var(--shadow); border: 1.5px solid var(--border);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(124,58,237,.3); }
.feature-icon { font-size: 38px; margin-bottom: 12px; display: block; }
.feature-title { font-weight: 800; color: var(--text); font-size: 14px; margin-bottom: 6px; }
.feature-desc { color: var(--muted); font-size: 12px; line-height: 1.65; }

/* ====== TESTIMONIALS ====== */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 24px; }
.testimonial-card {
  background: var(--card); border-radius: var(--radius); padding: 24px 22px;
  border: 1.5px solid var(--border); box-shadow: var(--shadow);
  position: relative; transition: transform .22s, box-shadow .22s;
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testimonial-quote { font-size: 26px; color: var(--purple-light); opacity: .5; line-height: 1; margin-bottom: 10px; }
.testimonial-text { color: var(--muted-light); font-size: 14px; line-height: 1.75; margin-bottom: 16px; }
.testimonial-author { display: flex; align-items: center; gap: 11px; }
.testimonial-avatar { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.testimonial-name { font-weight: 800; color: var(--text); font-size: 13px; }
.testimonial-role { color: var(--muted); font-size: 11px; font-weight: 600; margin-top: 1px; }
.testimonial-stars { color: var(--gold); font-size: 13px; margin-bottom: 6px; }

/* ====== FAQ ====== */
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.faq-item {
  background: var(--card); border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  overflow: hidden; transition: border-color .2s;
}
.faq-item.open { border-color: rgba(124,58,237,.35); }
.faq-q {
  width: 100%; background: none; border: none; text-align: right; cursor: pointer;
  padding: 18px 22px; font-size: 14px; font-weight: 700; color: var(--text);
  font-family: 'Cairo', sans-serif; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; transition: color .2s;
}
.faq-q:hover { color: var(--purple-light); }
.faq-arrow { color: var(--muted); font-size: 12px; transition: transform .3s; flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--purple-light); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .4s ease, padding .3s; }
.faq-item.open .faq-a { max-height: 200px; padding: 0 22px 18px; }
.faq-a p { color: var(--muted-light); font-size: 13px; line-height: 1.8; }

/* ====== CTA BLOCK ====== */
.cta-block {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  border-radius: 24px; padding: 52px 36px; text-align: center;
  position: relative; overflow: hidden; margin: 52px 0;
  box-shadow: var(--shadow-md);
}
.cta-block::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='70' cy='10' r='30'/%3E%3Ccircle cx='10' cy='70' r='20'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.cta-block h2 { color: #fff; font-size: 26px; font-weight: 900; margin-bottom: 10px; font-family: 'Cairo Play', sans-serif; position: relative; }
.cta-block p { color: #C4B5FD; font-size: 15px; margin-bottom: 26px; line-height: 1.75; position: relative; }
.cta-block .btn-primary { position: relative; }

/* ====== CATEGORY LABEL ====== */
.category-label { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.category-label-line { flex: 1; height: 1px; background: var(--border); }
.category-label-text { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: 1.8px; text-transform: uppercase; white-space: nowrap; }

/* ====== GAME BANNER ====== */
.game-course-banner {
  background: linear-gradient(135deg, #065F46, #059669, #10B981);
  border-radius: var(--radius); padding: 28px 32px;
  display: flex; align-items: center; gap: 26px;
  box-shadow: 0 12px 40px rgba(16,185,129,.3); border: 1.5px solid rgba(16,185,129,.4);
  transition: transform .28s, box-shadow .28s; position: relative; overflow: hidden;
  text-decoration: none; color: inherit;
}
.game-course-banner::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='50' cy='10' r='25'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.game-course-banner:hover { transform: translateY(-5px); box-shadow: 0 20px 55px rgba(16,185,129,.48); }
.game-course-banner:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.game-course-banner-emoji { font-size: 64px; animation: float 3.8s ease-in-out infinite; filter: drop-shadow(0 6px 20px rgba(0,0,0,.3)); flex-shrink: 0; z-index: 1; }
.game-course-banner-body { flex: 1; z-index: 1; }
.game-course-banner-badge { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg, var(--gold), #F97316); color: #1A1033; padding: 4px 13px; border-radius: 18px; font-size: 10px; font-weight: 900; margin-bottom: 10px; }
.game-course-banner-title { color: #fff; font-size: 21px; font-weight: 900; font-family: 'Cairo Play', sans-serif; margin-bottom: 6px; }
.game-course-banner-desc { color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.75; margin-bottom: 14px; }
.game-course-banner-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.game-course-banner-tag { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.22); color: #fff; padding: 4px 12px; border-radius: 18px; font-size: 11px; font-weight: 700; }
.game-course-banner-prog-label { display: flex; justify-content: space-between; color: rgba(255,255,255,.7); font-size: 11px; font-weight: 700; margin-bottom: 6px; }
.game-course-banner-bar { height: 8px; background: rgba(255,255,255,.2); border-radius: 99px; overflow: hidden; }
.game-course-banner-fill { height: 100%; background: linear-gradient(90deg, rgba(255,255,255,.75), #fff); border-radius: 99px; transition: width 1.2s cubic-bezier(.34,1.2,.64,1); }
.game-course-banner-btn {
  background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.4);
  color: #fff; padding: 12px 26px; border-radius: 48px;
  font-size: 14px; font-weight: 800; cursor: pointer; font-family: 'Cairo', sans-serif;
  transition: all .22s; flex-shrink: 0; z-index: 1; white-space: nowrap;
}
.game-course-banner-btn:hover { background: rgba(255,255,255,.28); border-color: #fff; }

.game-section-divider { display: flex; align-items: center; gap: 12px; margin: 30px 0 20px; }
.game-section-divider span { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.game-section-divider::before, .game-section-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }

/* ====== BACK BUTTON ====== */
.back-btn {
  background: var(--card); border: 1.5px solid var(--border);
  font-family: 'Cairo', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 24px; padding: 9px 18px; border-radius: 24px;
  transition: all .22s; color: var(--purple-light); text-decoration: none;
}
.back-btn:hover { background: rgba(124,58,237,.1); border-color: var(--purple-light); transform: translateX(4px); }

/* ====== COURSE DETAIL ====== */
.course-detail-wrap { max-width: 840px; margin: 0 auto; padding: 32px 24px 0; }
.course-hero {
  border-radius: 24px; padding: 36px 32px; margin-bottom: 28px;
  position: relative; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,.3);
}
.course-hero::before { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='50' cy='10' r='25'/%3E%3Ccircle cx='10' cy='50' r='18'/%3E%3C/g%3E%3C/svg%3E"); 
    pointer-events: none; 
}

.course-hero-emoji { 
    font-size: 62px; 
    display: block; 
    animation: float 3.2s ease-in-out infinite; 
    margin-bottom: 14px; 
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.3)); 
}.course-hero h1 { color: #fff; font-size: 27px; font-weight: 900; margin-bottom: 9px; font-family: 'Cairo Play', sans-serif; }
.course-hero p { color: rgba(255,255,255,.8); font-size: 14px; margin-bottom: 22px; line-height: 1.8; max-width: 680px; }
.course-hero-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-stat { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 12px 18px; backdrop-filter: blur(12px); }
.hero-stat-label { color: rgba(255,255,255,.7); font-size: 10px; font-weight: 600; margin-bottom: 2px; }
.hero-stat-val { color: #fff; font-size: 21px; font-weight: 900; font-family: 'Cairo Play', sans-serif; }
.hero-progress-bar { height: 11px; background: rgba(255,255,255,.2); border-radius: 99px; overflow: hidden; }
.hero-progress-fill { height: 100%; background: linear-gradient(90deg, rgba(255,255,255,.75), #fff); border-radius: 99px; --w: 0%; width: 0; animation: progressFill 1.5s .7s cubic-bezier(.34,1.2,.64,1) forwards; }

/* ====== LESSONS LIST ====== */
.lessons-title { font-size: 20px; font-weight: 900; color: var(--text); margin-bottom: 16px; font-family: 'Cairo Play', sans-serif; display: flex; align-items: center; gap: 9px; }
.lessons-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 80px; }
.lesson-item {
  background: var(--card); border-radius: var(--radius);
  padding: 16px 22px; display: flex; align-items: center; gap: 16px;
  cursor: pointer; box-shadow: var(--shadow); border: 1.5px solid var(--border);
  transition: transform .22s, box-shadow .22s, border-color .22s;
  animation: slideRight .4s both; text-decoration: none; color: inherit;
}
.lesson-item:hover { transform: translateX(-6px); box-shadow: var(--shadow-md); border-color: var(--border-light); }
.lesson-item:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 2px; }
.lesson-num { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.lesson-info { flex: 1; }
.lesson-name { font-weight: 700; color: var(--text); font-size: 14px; line-height: 1.4; }
.lesson-dur { color: var(--muted); font-size: 11px; margin-top: 3px; font-weight: 600; }
.lesson-badge { padding: 5px 14px; border-radius: 18px; font-size: 11px; font-weight: 700; white-space: nowrap; }

/* ====== GAME PAGE ====== */
.game-page { padding: 28px 24px 80px; max-width: 940px; margin: 0 auto; }
.game-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; background: var(--card); padding: 22px 24px; border-radius: var(--radius); border: 1.5px solid var(--border); box-shadow: var(--shadow); }
.game-title-main { font-size: 21px; font-weight: 900; color: var(--text); font-family: 'Cairo Play', sans-serif; }
.game-title-sub { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 600; }
.game-stats-row { display: flex; gap: 9px; flex-wrap: wrap; }
.gstat { background: var(--bg); border: 1.5px solid var(--border); border-radius: 12px; padding: 9px 15px; display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; color: var(--text); }
.gstat-icon { font-size: 16px; }
.xp-wrap { margin-bottom: 28px; background: var(--card); border-radius: var(--radius); padding: 18px 24px; box-shadow: var(--shadow); border: 1.5px solid var(--border); }
.xp-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 9px; font-weight: 700; }
.xp-bar { height: 11px; background: var(--border); border-radius: 99px; overflow: hidden; }
.xp-bar-fill { height: 100%; background: linear-gradient(90deg, var(--purple-dark), var(--purple), var(--purple-light)); border-radius: 99px; transition: width .9s cubic-bezier(.34,1.2,.64,1); }
.world-section { margin-bottom: 28px; }
.world-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 16px 20px; border-radius: var(--radius); border: 2px solid; }
.world-head-icon { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.world-head-name { font-size: 16px; font-weight: 900; font-family: 'Cairo Play', sans-serif; color: var(--text); }
.world-head-desc { font-size: 11px; opacity: .75; margin-top: 2px; font-weight: 600; color: var(--muted); }
.world-head-prog { margin-right: auto; font-size: 12px; font-weight: 800; padding: 6px 14px; border-radius: 18px; background: rgba(255,255,255,.1); color: var(--text); }
.lessons-game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 12px; }
.game-lesson-card { border-radius: var(--radius); padding: 16px 13px; text-align: center; cursor: pointer; border: 2px solid transparent; transition: transform .22s, box-shadow .22s, border-color .22s; position: relative; text-decoration: none; color: inherit; display: block; }
.game-lesson-card:hover:not(.locked) { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,.2); border-color: rgba(255,255,255,.22); }
.game-lesson-card.locked { opacity: .4; cursor: not-allowed; filter: grayscale(40%); }
.game-lesson-card:focus-visible { outline: 2px solid var(--purple-light); }
.glc-icon { font-size: 30px; margin-bottom: 8px; display: block; }
.glc-num { font-size: 10px; font-weight: 700; opacity: .65; margin-bottom: 2px; color: var(--muted); }
.glc-title { font-size: 11px; font-weight: 800; line-height: 1.4; margin-bottom: 5px; color: var(--text); }
.glc-dur { font-size: 10px; opacity: .65; font-weight: 600; color: var(--muted); }
.glc-stars { display: flex; justify-content: center; gap: 2px; margin-top: 5px; }
.glc-star { font-size: 12px; }
.glc-check { position: absolute; top: 7px; left: 7px; width: 20px; height: 20px; border-radius: 50%; background: var(--green-light); display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; font-weight: 900; animation: popIn .4s ease; box-shadow: 0 3px 10px rgba(16,185,129,.45); }
.glc-lock { position: absolute; top: 7px; left: 7px; font-size: 13px; opacity: .6; }

/* ====== LESSON PAGE ====== */
.lesson-wrap { max-width: 800px; margin: 0 auto; padding: 32px 24px 0; }
.lesson-header { border-radius: 24px; padding: 30px 28px; margin-bottom: 26px; position: relative; overflow: hidden; box-shadow: 0 12px 36px rgba(0,0,0,.3); }
.lesson-header::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='50' cy='10' r='28'/%3E%3C/g%3E%3C/svg%3E"); pointer-events: none; }
.lesson-course-tag { font-size: 12px; margin-bottom: 8px; opacity: .85; font-weight: 700; color: #fff; }
.lesson-header h1 { color: #fff; font-size: 23px; font-weight: 900; margin-bottom: 9px; font-family: 'Cairo Play', sans-serif; }
.lesson-dur-tag { background: rgba(255,255,255,.18); color: #fff; padding: 5px 15px; border-radius: 18px; font-size: 11px; display: inline-block; font-weight: 700; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.22); }

.video-box { background: var(--code-bg); border-radius: 18px; margin-bottom: 26px; position: relative; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.45); border: 1px solid var(--border); }
.video-frame { width: 100%; aspect-ratio: 16/9; border: none; display: block; }
.content-block { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 22px 26px; font-size: 14px; line-height: 1.95; color: var(--text); margin-bottom: 14px; animation: slideUp .4s both; }
.content-tip { background: rgba(245,158,11,.06); border-color: rgba(245,158,11,.32); position: relative; padding-right: 44px; }
.content-tip::before { content: '💡'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 18px; }
.content-code { background: var(--code-bg); border-color: rgba(124,58,237,.2); color: #C4B5FD; font-family: monospace; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-x: auto; direction: ltr; text-align: left; border-radius: var(--radius-sm); }

/* ====== QUIZ ====== */
.quiz-box {
  background: linear-gradient(135deg, rgba(109,40,217,.06), rgba(139,92,246,.1));
  border-radius: var(--radius); padding: 28px; border: 1.5px solid rgba(139,92,246,.22);
  margin-bottom: 80px;
}
.quiz-title { color: var(--purple-light); font-size: 17px; font-weight: 900; margin-bottom: 16px; font-family: 'Cairo Play', sans-serif; display: flex; align-items: center; gap: 8px; }
.quiz-q { font-weight: 700; color: var(--text); margin-bottom: 18px; font-size: 15px; line-height: 1.7; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 17px; }
.quiz-opt {
  background: var(--card); border: 1.5px solid var(--border); color: var(--text);
  padding: 14px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'Cairo', sans-serif;
  text-align: right; transition: all .2s; line-height: 1.55;
}
.quiz-opt:hover { background: rgba(124,58,237,.09); border-color: var(--purple-light); transform: translateY(-2px); }
.quiz-opt:focus-visible { outline: 2px solid var(--purple-light); }
.quiz-opt.selected { background: rgba(109,40,217,.17); border-color: var(--purple); }
.quiz-opt.correct { background: #D1FAE5; border-color: #10B981; color: #065F46; font-weight: 800; }
.quiz-opt.wrong { background: #FEE2E2; border-color: #EF4444; color: #991B1B; }
[data-theme="dark"] .quiz-opt.correct { background: rgba(16,185,129,.15); color: #6EE7B7; }
[data-theme="dark"] .quiz-opt.wrong { background: rgba(239,68,68,.15); color: #FCA5A5; }

.btn-check {
  width: 100%; background: linear-gradient(135deg, var(--purple-dark), var(--purple), var(--purple-light));
  border: none; color: #fff; padding: 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 800; cursor: pointer; font-family: 'Cairo', sans-serif;
  transition: opacity .2s, transform .15s; box-shadow: 0 5px 20px rgba(109,40,217,.38);
}
.btn-check:hover { opacity: .9; transform: scale(1.01); }
.btn-complete {
  width: 100%; background: linear-gradient(135deg, var(--green), var(--green-light));
  border: none; color: #fff; padding: 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 800; cursor: pointer; font-family: 'Cairo', sans-serif;
  margin-top: 11px; display: none; transition: opacity .2s, transform .15s;
  box-shadow: 0 5px 20px rgba(16,185,129,.4); animation: glow 2.8s infinite;
}
.btn-complete:hover { opacity: .9; transform: scale(1.01); }
.quiz-result {
  text-align: center; padding: 14px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 800; margin-top: 13px; display: none;
  animation: slideUp .4s ease; border: 1.5px solid;
}
.quiz-result.show { display: block; }

/* ====== CONTACT ====== */
.contact-center { max-width: 590px; margin: 0 auto; padding: 52px 24px 80px; text-align: center; }
.contact-icon { font-size: 66px; animation: float 3.2s ease-in-out infinite; margin-bottom: 18px; display: block; }
.contact-center h1 { font-size: 30px; font-weight: 900; color: var(--text); margin-bottom: 10px; font-family: 'Cairo Play', sans-serif; }
.contact-center > p { color: var(--muted-light); margin-bottom: 32px; font-size: 15px; line-height: 1.8; }
.contact-cards { display: flex; flex-direction: column; gap: 14px; text-align: right; }
.contact-card {
  background: var(--card); border-radius: var(--radius); padding: 20px 24px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow); border: 1.5px solid var(--border);
  transition: transform .22s, box-shadow .22s, border-color .22s;
  text-decoration: none; color: inherit;
}
.contact-card:hover { transform: translateX(-6px); box-shadow: var(--shadow-md); border-color: var(--border-light); }
.contact-card:focus-visible { outline: 2px solid var(--purple-light); outline-offset: 2px; }
.contact-card-static { cursor: default; }
.contact-card-static:hover { transform: none; box-shadow: var(--shadow); border-color: var(--border); }
.contact-icon-box { width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; flex-shrink: 0; }
.contact-label { font-weight: 800; color: var(--text); font-size: 15px; margin-bottom: 3px; }
.contact-handle { font-size: 12px; font-weight: 600; color: var(--muted); }
.contact-footer { margin-top: 36px; background: linear-gradient(135deg, var(--purple-dark), var(--purple)); border-radius: 24px; padding: 34px 28px; color: #fff; position: relative; overflow: hidden; }
.contact-footer::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='50' cy='10' r='28'/%3E%3C/g%3E%3C/svg%3E"); pointer-events: none; }
.contact-footer-icon { font-size: 46px; margin-bottom: 14px; display: block; animation: float 3.5s infinite; }
.contact-footer h3 { font-size: 19px; font-weight: 900; margin-bottom: 9px; font-family: 'Cairo Play', sans-serif; }
.contact-footer p { color: #C4B5FD; font-size: 14px; margin-bottom: 14px; line-height: 1.75; }
.contact-footer-by { color: #A78BFA; font-size: 12px; font-weight: 600; }
.contact-footer-by strong { color: var(--gold-light); }

/* ====== ALL COURSES PAGE ====== */
.all-courses { padding: 46px 24px 80px; max-width: 1070px; margin: 0 auto; }
.page-title { padding: 28px 24px 0; max-width: 1070px; margin: 0 auto; }
.page-title-inner { display: flex; align-items: center; gap: 14px; margin-bottom: 5px; }
.page-title-icon { width: 50px; height: 50px; border-radius: 16px; background: linear-gradient(135deg, var(--purple), var(--purple-light)); display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 6px 20px rgba(124,58,237,.32); }
.page-title h1 { font-size: 26px; font-weight: 900; color: var(--text); font-family: 'Cairo Play', sans-serif; }
.page-title p { color: var(--muted); font-size: 14px; margin-top: 5px; }

/* ====== BREADCRUMB ====== */
.breadcrumb { max-width: 1100px; margin: 16px auto 0; padding: 0 24px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--purple-light); }
.breadcrumb span.sep { opacity: .45; }

/* ====== COMPLETION BANNER ====== */
.completion-banner { background: linear-gradient(135deg, #059669, #10B981); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; display: flex; align-items: center; gap: 15px; color: #fff; animation: popIn .5s ease; }
.completion-banner-icon { font-size: 36px; flex-shrink: 0; }
.completion-banner-text h3 { font-size: 16px; font-weight: 900; margin-bottom: 2px; }
.completion-banner-text p { font-size: 12px; opacity: .85; font-weight: 600; }

/* ====== LESSON NAV LINKS ====== */
.lesson-nav-links { display: flex; justify-content: space-between; gap: 12px; margin: 28px auto 0; max-width: 760px; flex-wrap: wrap; }
.lesson-nav-links a { flex: 1; min-width: 140px; text-align: center; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--card2); border: 1.5px solid var(--border); color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; transition: all .22s; }
.lesson-nav-links a:hover { border-color: var(--purple-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lesson-nav-links a.disabled { opacity: .35; pointer-events: none; }

/* ====== TOAST ====== */
.game-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: #fff; padding: 13px 30px; border-radius: 24px;
  font-size: 14px; font-weight: 800; font-family: 'Cairo', sans-serif;
  z-index: 9999; opacity: 0; transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  box-shadow: 0 8px 40px rgba(109,40,217,.6); border: 1px solid rgba(255,255,255,.15);
  pointer-events: none;
}
.game-toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ====== BACK TO TOP ====== */
#back-to-top {
  position: fixed; bottom: 28px; left: 28px; z-index: 998;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  border: none; color: #fff; font-size: 18px; cursor: pointer;
  box-shadow: 0 6px 24px rgba(109,40,217,.5);
  display: none; align-items: center; justify-content: center;
  animation: backToTop .3s ease;
  transition: transform .2s, box-shadow .2s;
}
#back-to-top:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(109,40,217,.65); }
#back-to-top.visible { display: flex; }

/* ====== FOOTER ====== */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 44px 28px 28px; margin-top: 60px; position: relative; z-index: 1;
}
.footer-inner { max-width: 1070px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.footer-logo-icon { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, var(--gold), #F97316); display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 4px 16px rgba(245,158,11,.45); flex-shrink: 0; }
.footer-logo-text { font-weight: 900; font-size: 18px; font-family: 'Cairo Play', sans-serif; color: var(--text); line-height: 1.1; }
.footer-logo-sub { color: var(--muted); font-size: 8px; letter-spacing: 3px; font-weight: 700; text-transform: uppercase; }
.footer-desc { color: var(--muted); font-size: 13px; line-height: 1.8; }
.footer-socials { display: flex; gap: 10px; }
.footer-social {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: all .22s;
  text-decoration: none;
}
.footer-social:hover { border-color: var(--purple-light); transform: translateY(-3px); background: rgba(124,58,237,.1); }
.footer-col-title { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 16px; letter-spacing: .5px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links li a { color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; transition: color .2s; display: flex; align-items: center; gap: 6px; }
.footer-links li a:hover { color: var(--purple-light); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 22px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy { color: var(--muted); font-size: 12px; font-weight: 600; }
.footer-copy strong { color: var(--gold-light); }
.footer-badge { display: flex; align-items: center; gap: 7px; background: rgba(124,58,237,.08); border: 1px solid rgba(124,58,237,.2); border-radius: 18px; padding: 5px 14px; }
.footer-badge-text { color: var(--muted); font-size: 11px; font-weight: 700; }
.footer-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-light); animation: pulse 2s infinite; }

/* ====== TABLE & SVG CONTENT ====== */
.content-table th, .content-table td { padding: 9px 13px; border: 1px solid var(--border); text-align: right; }
.content-table th { background: rgba(124,58,237,.14); color: var(--purple-light); font-weight: 700; }
.content-table tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.content-svg svg { max-width: 100%; height: auto; border-radius: 10px; display: block; }

/* ====== LEVEL BADGE ====== */
.level-badge { display: inline-flex; align-items: center; gap: 7px; background: linear-gradient(135deg, var(--gold), #F97316); color: #1A1033; padding: 5px 15px; border-radius: 20px; font-size: 12px; font-weight: 800; box-shadow: 0 4px 14px rgba(245,158,11,.4); margin-bottom: 10px; }

/* ====== GAME BADGE ====== */
.game-badge { position: absolute; top: 10px; left: 10px; background: linear-gradient(135deg, var(--gold), #F97316); color: #1A1033; font-size: 9px; font-weight: 900; padding: 3px 11px; border-radius: 18px; z-index: 2; box-shadow: 0 3px 10px rgba(245,158,11,.4); }

/* ====== FILTER TABS ====== */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-tab { background: var(--card); border: 1.5px solid var(--border); color: var(--muted); padding: 8px 18px; border-radius: 30px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'Cairo', sans-serif; transition: all .2s; }
.filter-tab:hover { border-color: var(--purple-light); color: var(--purple-light); }
.filter-tab.active { background: rgba(124,58,237,.14); border-color: var(--purple); color: var(--purple-light); }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 64px 18px 58px; }
}

@media (max-width: 640px) {
  :root { --nav-h: 64px; }
  .hero h1 { font-size: 27px; }
  .hero-lead { font-size: 15px; }
  .hero-stats { gap: 9px; }
  .stat-box { min-width: 88px; padding: 13px 15px; }
  .courses-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .quiz-options { grid-template-columns: 1fr; }
  .lessons-game-grid { grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); }
  .game-topbar { flex-direction: column; align-items: flex-start; }
  .game-course-banner { flex-direction: column; text-align: center; }
  .game-course-banner-tags { justify-content: center; }
  .game-course-banner-btn { width: 100%; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .cta-block { padding: 36px 22px; }
  .hero-btns { gap: 10px; }
  .btn-primary, .btn-secondary { padding: 13px 26px; font-size: 14px; }
  .trust-bar { gap: 8px; }
  .trust-sep { display: none; }
  footer { padding: 36px 20px 24px; }

  /* ===== MOBILE: nav becomes a bottom icon bar (logo + links + toggle, no text) ===== */
  body { padding-bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom, 0px)); }

  nav {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    width: 100%; height: var(--nav-h);
    padding: 0 6px calc(env(safe-area-inset-bottom, 0px));
    border-bottom: none;
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 24px rgba(0,0,0,.3);
    z-index: 500;
  }
  [data-theme="light"] nav { box-shadow: 0 -6px 20px rgba(80,40,180,.12); }

  /* Logo: icon only, no name/subtitle */
  .nav-logo-text, .nav-logo-sub { display: none; }
  .nav-logo { gap: 0; }
  .nav-logo-icon { width: 38px; height: 38px; font-size: 17px; }

  /* Links + theme toggle spread evenly like a tab bar */
  .nav-right { flex: 1; justify-content: space-around; gap: 0; }
  .nav-links { flex: 1; justify-content: space-around; gap: 0; }
  .nav-btn { flex-direction: column; padding: 6px 8px; gap: 0; font-size: 19px; }
  .nav-btn span { display: none; }
  .nav-btn.active::after { bottom: 0; }
  .theme-toggle { width: 36px; height: 36px; font-size: 15px; }

  /* Keep floating elements above the bottom bar */
  #back-to-top { bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom, 0px)); left: 16px; }
  .game-toast { bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .stat-box { min-width: 78px; padding: 11px 12px; }
  .stat-num { font-size: 22px; }
  .footer-top { grid-template-columns: 1fr; }
}
/* ====== ABOUT US SECTION ====== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.about-badge {
  display: inline-block;
  background: rgba(124,58,237,.14);
  color: var(--purple-light);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.about-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  font-family: 'Cairo Play', sans-serif;
  margin-bottom: 14px;
  line-height: 1.4;
}
.about-text {
  color: var(--muted-light);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 12px;
}
.about-values {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.about-value {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.about-value-icon { font-size: 16px; }
.about-team-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 16px;
  transition: border-color .25s, box-shadow .25s;
}
.about-team-card:hover {
  border-color: rgba(124,58,237,.4);
  box-shadow: var(--glow-purple);
}
.about-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  margin: 0 auto 14px;
  box-shadow: 0 0 24px rgba(124,58,237,.35);
}
.about-member-name { font-size: 17px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.about-member-role { font-size: 13px; color: var(--purple-light); font-weight: 700; margin-bottom: 12px; }
.about-member-bio { font-size: 14px; color: var(--muted-light); line-height: 1.7; margin-bottom: 16px; }
.about-socials { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.about-social-btn {
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.25);
  color: var(--purple-light);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all .22s;
}
.about-social-btn:hover { background: rgba(124,58,237,.25); }
.about-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.about-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 8px;
  text-align: center;
}
.about-stat-num {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Cairo Play', sans-serif;
}
.about-stat-lbl { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }

/* ====== BOOKS SECTION ====== */
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.book-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.book-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(124,58,237,.35);
}
.book-cover {
  padding: 32px 20px 24px;
  text-align: center;
  position: relative;
}
.book-cover-emoji {
  font-size: 48px;
  display: block;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
}
.book-cover-title {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,.9);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.book-info { padding: 20px; }
.book-level-badge {
  display: inline-block;
  border-radius: 12px;
  padding: 3px 11px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
}
.book-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.45;
  font-family: 'Cairo Play', sans-serif;
}
.book-desc { font-size: 13px; color: var(--muted-light); line-height: 1.7; margin-bottom: 14px; }
.book-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.book-tag {
  background: rgba(124,58,237,.1);
  color: var(--purple-light);
  border-radius: 10px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
}
.book-btn {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: opacity .22s, transform .22s;
}
.book-btn:hover { opacity: .88; transform: scale(1.02); }

/* ====== ARTICLES SECTION ====== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  /* Fix: forces its own GPU compositing layer so the card paints
     immediately on load instead of staying blank until a repaint
     (mouse move/hover) — known Chromium bug when overflow:hidden +
     border-radius wraps a child using filter (drop-shadow on the emoji). */
  transform: translateZ(0);
  will-change: transform;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(124,58,237,.3);
}
.article-img {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.article-img-emoji { font-size: 44px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.25)); }
.article-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.article-category {
  display: inline-block;
  border-radius: 12px;
  padding: 3px 11px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 10px;
}
.article-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.45;
  font-family: 'Cairo Play', sans-serif;
}
.article-excerpt { font-size: 13px; color: var(--muted-light); line-height: 1.7; margin-bottom: 14px; flex: 1; }
.article-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.article-meta { font-size: 12px; color: var(--muted); font-weight: 600; }
.article-read-btn {
  font-size: 13px;
  font-weight: 800;
  color: var(--purple-light);
  text-decoration: none;
  transition: color .2s;
}
.article-read-btn:hover { color: var(--gold); }

/* ====== RESPONSIVE — NEW SECTIONS ====== */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .books-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .about-stats-row { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 580px) {
  .books-grid { grid-template-columns: 1fr; }
  .about-values { gap: 8px; }
}
/* ============================================================
   ELECTRONOUR — Premium Additions v5.0
   Welcome Modal, User Avatar, Login Button, UI Polish
============================================================ */

/* ====== NAV LOGIN BUTTON STYLE (base, can be overridden by avatar JS) ====== */
#nav-login-btn {
  display: none;
  padding: 8px 18px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
  border: none;
  cursor: pointer;
}
#nav-login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(99,102,241,0.45);
}
#nav-auth {
  display: flex;
  align-items: center;
  
}

/* ====== LOADING SKELETON ====== */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}

/* ====== TOAST IMPROVEMENTS ====== */
.game-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: linear-gradient(135deg, rgba(13,9,41,.98), rgba(18,12,54,.98));
  color: var(--text);
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 14px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  z-index: 50000;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(124,58,237,.1);
  white-space: nowrap;
  font-family: 'Cairo', sans-serif;
}
.game-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
[data-theme="light"] .game-toast {
  background: rgba(255,255,255,.97);
  border-color: rgba(124,58,237,.15);
  box-shadow: 0 8px 32px rgba(80,40,180,.15);
}

/* ====== BACK TO TOP IMPROVEMENTS ====== */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.28s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 4px 20px rgba(124,58,237,.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(124,58,237,.55);
}
#back-to-top:focus-visible { outline: 2px solid #A78BFA; outline-offset: 3px; }

/* ====== HERO ENHANCEMENTS ====== */
.hero-emoji {
  font-size: 56px;
  display: block;
  margin-bottom: 16px;
  animation: float 5s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(245,158,11,.45));
}
.brand-name {
  background: linear-gradient(135deg, #A78BFA 30%, #F59E0B 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ====== MOBILE NAV FIXES ====== */
@media (max-width: 640px) {
  nav {
    padding: 0 16px;
    height: 60px;
  }
  .nav-logo-text { font-size: 16px; }
  .nav-logo-sub { display: none; }
  .nav-links span { display: none; }
  .nav-btn { padding: 8px 10px; font-size: 16px; }
  #back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 16px; }
  .game-toast { font-size: 13px; padding: 12px 18px; white-space: nowrap; max-width: calc(100vw - 32px); }
}

@media (max-width: 380px) {
  .nav-btn { padding: 6px 8px; font-size: 14px; }
  #nav-login-btn { padding: 7px 12px; font-size: 12px; }
}

/* ====== COURSE CARD IMPROVEMENTS ====== */
.course-card {
  transition: transform 0.28s cubic-bezier(.34,1.2,.64,1), box-shadow 0.28s, border-color 0.28s;
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(124,58,237,.15);
}
.course-card:focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 3px;
}

/* ====== SECTION IMPROVEMENTS ====== */
.section {
  padding-top: 36px;
  padding-bottom: 36px;
}

/* ====== FORM GLOBAL ====== */
input, button, select, textarea {
  font-family: 'Cairo', sans-serif;
}

/* ====== CTA BLOCK ENHANCEMENT ====== */
.cta-block {
  background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(99,102,241,.1));
  border: 1px solid rgba(124,58,237,.25);
  border-radius: var(--radius);
  padding: 48px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(124,58,237,.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-block h2 { font-size: clamp(22px, 4vw, 30px); margin-bottom: 12px; }
.cta-block p { color: var(--muted-light); max-width: 480px; margin: 0 auto 24px; line-height: 1.7; }

/* ====== FOOTER IMPROVEMENTS ====== */
footer {
  background: rgba(7,5,26,.9);
  border-top: 1px solid var(--border);
  padding: 48px 28px 24px;
  position: relative;
  z-index: 1;
}
[data-theme="light"] footer {
  background: rgba(243,238,255,.9);
  border-top-color: var(--border);
}

/* ====== FOCUS STATES GLOBAL ====== */
:focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 2px;
}

/* ====== FEATURE CARD HOVER ====== */
.feature-card {
  transition: transform 0.25s cubic-bezier(.34,1.2,.64,1), box-shadow 0.25s, border-color 0.25s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124,58,237,.3);
  box-shadow: var(--shadow-md), 0 0 20px rgba(124,58,237,.08);
}

/* ====== TESTIMONIAL CARD HOVER ====== */
.testimonial-card {
  transition: transform 0.25s ease, box-shadow 0.25s, border-color 0.25s;
}
.testimonial-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124,58,237,.2);
  box-shadow: var(--shadow-md);
}

/* ====== ANIMATIONS ENHANCEMENT ====== */
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ====== SCROLL REVEAL ====== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== PRINT STYLES ====== */
@media print {
  nav, footer, #back-to-top, .game-toast, #welcome-modal { display: none !important; }
  body { background: white; color: black; }
}
