:root {
  --orange: #F7931A;
  --orange-dark: #C97000;
  --orange-light: #FFB347;
  --gold: #FFD700;
  --dark: #0A0A0A;
  --dark2: #111111;
  --dark3: #1A1A1A;
  --dark4: #222222;
  --white: #FFFFFF;
  --grey: #AAAAAA;
  --light-grey: #F0F0F0;
  --green: #00C896;
  --blue: #4A9EFF;
  --purple: #9B59B6;
  --red: #FF4757;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  background: var(--dark);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SPLASH SCREEN ===== */
#splash {
  position: fixed;
  inset: 0;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
#splash.hide { opacity:0; pointer-events:none; transform: scale(1.05); visibility:hidden; }

.splash-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: var(--orange);
  text-align: center;
  line-height: 1;
  letter-spacing: -2px;
  animation: pulseGlow 2s ease-in-out infinite;
}
.splash-logo span { color: var(--white); }

.splash-sub {
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  color: var(--grey);
  margin-top: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.bitcoin-symbol-big {
  font-size: 8rem;
  color: var(--orange);
  margin-bottom: 1rem;
  animation: spin-slow 8s linear infinite;
  display: inline-block;
  text-shadow: 0 0 60px rgba(247,147,26,0.5);
}

.splash-btn {
  margin-top: 2.5rem;
  background: var(--orange);
  color: var(--dark);
  border: none;
  padding: 1rem 3rem;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 0 30px rgba(247,147,26,0.4);
}
.splash-btn:hover { background: var(--orange-light); transform: scale(1.05); box-shadow: 0 0 50px rgba(247,147,26,0.6); }

/* ===== MAIN APP ===== */
#app { display:none; }
#app.visible { display: block; }

/* ===== HEADER ===== */
header {
  background: var(--dark2);
  border-bottom: 2px solid var(--orange);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--orange);
  letter-spacing: -1px;
}
.logo span { color: var(--white); }

.xp-bar-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  max-width: 400px;
  margin: 0 2rem;
}
.xp-label { font-family:'Space Mono',monospace; font-size:0.7rem; color:var(--orange); white-space:nowrap; }
.xp-bar {
  flex:1;
  height: 8px;
  background: var(--dark4);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--orange-dark);
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  border-radius: 4px;
  transition: width 1s ease;
  width: 0%;
}
.xp-num { font-family:'Space Mono',monospace; font-size:0.7rem; color:var(--gold); white-space:nowrap; }

.header-coins {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--dark3);
  border: 1px solid var(--orange);
  border-radius: 20px;
  padding: 0.4rem 0.8rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--gold);
}

/* ===== NAV ===== */
nav {
  background: var(--dark3);
  padding: 0 2rem;
  display: flex;
  gap: 0;
  border-bottom: 1px solid #2a2a2a;
  overflow-x: auto;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  z-index: 99;
}
nav::-webkit-scrollbar { height: 3px; }
nav::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 3px; }

.nav-btn {
  background: none;
  border: none;
  color: var(--grey);
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}
.nav-btn:hover { color: var(--orange); }
.nav-btn.active { color: var(--orange); border-bottom-color: var(--orange); }
.nav-btn.locked { color: #444; cursor: not-allowed; }
.nav-btn.locked::after { content: ' 🔒'; }

/* Nav links (for multi-page navigation) */
a.nav-btn {
  text-decoration: none;
  display: inline-block;
}

/* ===== CONTENT ===== */
main { min-height: calc(100vh - 120px); padding-top: 116px; }

.section { display: none; padding: 2rem; max-width: 1100px; margin: 0 auto; }
.section.active { display: block; animation: fadeIn 0.4s ease; }

/* ===== HERO SECTION ===== */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(247,147,26,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(247,147,26,0.15);
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 1rem;
}
.hero h1 .highlight { color: var(--orange); }
.hero p {
  font-size: 1.1rem;
  color: var(--grey);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* ===== LEVEL CARDS ===== */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.level-card {
  background: var(--dark3);
  border: 2px solid #2a2a2a;
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}
.level-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.level-card.beginner::before { background: linear-gradient(90deg, var(--green), #00ff88); }
.level-card.intermediate::before { background: linear-gradient(90deg, var(--orange), var(--gold)); }
.level-card.advanced::before { background: linear-gradient(90deg, var(--purple), #ff6b9d); }
.level-card.expert::before { background: linear-gradient(90deg, var(--red), var(--orange)); }

.level-card:hover { border-color: var(--orange); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.level-card.locked-card { opacity: 0.5; cursor: not-allowed; }
.level-card.locked-card:hover { transform: none; }

.level-emoji { font-size: 3rem; margin-bottom: 1rem; display: block; }
.level-title { font-family:'Syne',sans-serif; font-weight:800; font-size:1.4rem; margin-bottom:0.3rem; }
.level-duration { font-family:'Space Mono',monospace; font-size:0.7rem; color:var(--orange); letter-spacing:2px; text-transform:uppercase; margin-bottom:1rem; }
.level-desc { color:var(--grey); font-size:0.9rem; line-height:1.6; margin-bottom:1.5rem; }
.level-modules { display:flex; flex-wrap:wrap; gap:0.4rem; margin-bottom:1.5rem; }
.module-tag {
  background: rgba(247,147,26,0.1);
  border: 1px solid rgba(247,147,26,0.3);
  color: var(--orange);
  font-size:0.7rem;
  padding:0.2rem 0.6rem;
  border-radius:4px;
  font-family:'Space Mono',monospace;
}
.level-btn {
  width:100%;
  background: var(--orange);
  color: var(--dark);
  border:none;
  padding:0.8rem;
  font-family:'Syne',sans-serif;
  font-weight:800;
  font-size:0.9rem;
  letter-spacing:1px;
  text-transform:uppercase;
  cursor:pointer;
  border-radius:8px;
  transition:all 0.2s;
}
.level-btn:hover { background:var(--orange-light); }
.level-btn.locked-btn { background:#333; color:#666; cursor:not-allowed; }

/* ===== MODULE VIEWER ===== */
.module-viewer {
  background: var(--dark3);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #2a2a2a;
}
.module-header {
  background: linear-gradient(135deg, var(--dark4), var(--dark3));
  border-bottom: 2px solid var(--orange);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.module-icon { font-size: 3rem; }
.module-meta { flex: 1; }
.module-level-badge {
  display: inline-block;
  background: var(--orange);
  color: var(--dark);
  font-family:'Space Mono',monospace;
  font-size:0.65rem;
  padding:0.2rem 0.6rem;
  border-radius:4px;
  letter-spacing:2px;
  text-transform:uppercase;
  margin-bottom:0.5rem;
}
.module-title { font-family:'Syne',sans-serif; font-weight:800; font-size:1.8rem; letter-spacing:-1px; }
.module-subtitle { color:var(--grey); margin-top:0.3rem; font-size:0.95rem; }

.module-progress {
  display: flex;
  gap: 0.4rem;
  padding: 1rem 2rem;
  background: var(--dark4);
  border-bottom: 1px solid #2a2a2a;
  align-items: center;
}
.progress-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #333;
  transition: background 0.3s;
}
.progress-dot.done { background: var(--orange); }
.progress-dot.active { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

.lesson-content { padding: 2rem; }
.lesson-content h2 { font-family:'Syne',sans-serif; font-weight:800; font-size:1.5rem; margin-bottom:1rem; color:var(--orange); }
.lesson-content h3 { font-family:'Syne',sans-serif; font-weight:700; font-size:1.15rem; margin:1.5rem 0 0.7rem; }
.lesson-content p { line-height:1.8; color:#ddd; margin-bottom:1rem; font-size:0.98rem; }
.lesson-content ul { padding-left:1.5rem; margin-bottom:1rem; }
.lesson-content ul li { line-height:1.8; color:#ddd; margin-bottom:0.3rem; font-size:0.95rem; }

/* ===== INFO BOXES ===== */
.info-box {
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.info-box.tip { background: rgba(0,200,150,0.1); border-left: 4px solid var(--green); }
.info-box.warning { background: rgba(247,147,26,0.1); border-left: 4px solid var(--orange); }
.info-box.fact { background: rgba(74,158,255,0.1); border-left: 4px solid var(--blue); }
.info-box.fun { background: rgba(255,215,0,0.1); border-left: 4px solid var(--gold); }
.info-box-icon { font-size:1.5rem; flex-shrink:0; }
.info-box-text { font-size:0.92rem; line-height:1.7; color:#ddd; }
.info-box-text strong { color: var(--white); display:block; margin-bottom:0.3rem; font-family:'Syne',sans-serif; }

/* ===== VISUAL DIAGRAMS ===== */
.visual-block {
  background: var(--dark4);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 2rem;
  margin: 1.5rem 0;
  text-align: center;
}
.visual-block h4 { font-family:'Syne',sans-serif; color:var(--orange); margin-bottom:1.5rem; }

.money-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.timeline-item {
  text-align: center;
  padding: 1rem;
  background: var(--dark3);
  border-radius: 8px;
  border: 1px solid #333;
  min-width: 90px;
}
.timeline-item .t-icon { font-size: 2rem; display:block; margin-bottom:0.3rem; }
.timeline-item .t-label { font-size:0.7rem; color:var(--grey); font-family:'Space Mono',monospace; }
.timeline-arrow { color: var(--orange); font-size:1.5rem; }

.blockchain-visual {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  overflow-x: auto;
  padding: 1rem 0;
}
.block-item {
  background: var(--dark3);
  border: 2px solid var(--orange);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  text-align: center;
  min-width: 90px;
  position: relative;
}
.block-item .block-num { font-family:'Space Mono',monospace; font-size:0.65rem; color:var(--orange); }
.block-item .block-data { font-size:0.7rem; color:var(--grey); margin-top:0.3rem; }
.block-item .block-hash { font-family:'Space Mono',monospace; font-size:0.55rem; color:#555; margin-top:0.3rem; word-break:break-all; }
.chain-link { color:var(--orange); font-size:1.2rem; }

.supply-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  height: 120px;
  padding-bottom: 1rem;
  border-bottom: 2px solid #333;
  margin-bottom: 0.5rem;
}
.supply-bar {
  background: linear-gradient(0deg, var(--orange), var(--gold));
  border-radius: 4px 4px 0 0;
  min-width: 24px;
  position: relative;
  transition: all 0.5s ease;
}
.supply-bar-label { font-size:0.6rem; color:var(--grey); margin-top:0.3rem; text-align:center; font-family:'Space Mono',monospace; }

/* ===== QUIZ ===== */
.quiz-section {
  background: var(--dark4);
  border: 2px solid var(--orange);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}
.quiz-section::before {
  content: '⚡ QUIZ TIME';
  position: absolute;
  top: 0; left:0; right:0;
  background: var(--orange);
  color: var(--dark);
  font-family:'Syne',sans-serif;
  font-weight:800;
  font-size:0.75rem;
  letter-spacing:3px;
  text-align:center;
  padding:0.3rem;
}
.quiz-section { padding-top: 2.5rem; }
.quiz-q { font-family:'Syne',sans-serif; font-weight:700; font-size:1.1rem; margin-bottom:1.2rem; }
.quiz-options { display:flex; flex-direction:column; gap:0.7rem; }
.quiz-opt {
  background: var(--dark3);
  border: 2px solid #333;
  border-radius: 10px;
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  font-size:0.95rem;
  transition: all 0.2s;
  text-align:left;
  color:var(--white);
}
.quiz-opt:hover { border-color: var(--orange); background:rgba(247,147,26,0.05); }
.quiz-opt.correct { border-color:var(--green); background:rgba(0,200,150,0.1); }
.quiz-opt.wrong { border-color:var(--red); background:rgba(255,71,87,0.1); }
.quiz-feedback {
  margin-top:1rem;
  padding:1rem;
  border-radius:8px;
  font-weight:600;
  display:none;
}
.quiz-feedback.show { display:block; }
.quiz-feedback.correct-fb { background:rgba(0,200,150,0.15); color:var(--green); }
.quiz-feedback.wrong-fb { background:rgba(255,71,87,0.15); color:var(--red); }

/* ===== SATOSHI EXPLORER ===== */
.sat-calc {
  background: var(--dark4);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.sat-calc h4 { font-family:'Syne',sans-serif; color:var(--orange); margin-bottom:1rem; }
.sat-input-row { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; }
.sat-input {
  background: var(--dark3);
  border: 2px solid #333;
  border-radius:8px;
  color:var(--white);
  font-family:'Space Mono',monospace;
  font-size:1rem;
  padding:0.8rem 1rem;
  width: 160px;
  outline:none;
  transition:border-color 0.2s;
}
.sat-input:focus { border-color:var(--orange); }
.sat-label { color:var(--grey); font-size:0.85rem; }
.sat-result { font-family:'Space Mono',monospace; font-size:1.1rem; color:var(--gold); margin-top:0.5rem; }

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--orange);
  color: var(--dark);
  border:none;
  padding:0.9rem 2rem;
  font-family:'Syne',sans-serif;
  font-weight:800;
  font-size:0.9rem;
  letter-spacing:1px;
  text-transform:uppercase;
  cursor:pointer;
  border-radius:8px;
  transition:all 0.2s;
}
.btn-primary:hover { background:var(--orange-light); transform:scale(1.03); }
.btn-secondary {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
  padding:0.8rem 1.5rem;
  font-family:'Syne',sans-serif;
  font-weight:700;
  font-size:0.85rem;
  letter-spacing:1px;
  text-transform:uppercase;
  cursor:pointer;
  border-radius:8px;
  transition:all 0.2s;
}
.btn-secondary:hover { background:rgba(247,147,26,0.1); }

/* ===== ACHIEVEMENT ===== */
.achievement-popup {
  position: fixed;
  top: 80px;
  right: 1rem;
  background: var(--dark3);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  z-index: 9000;
  display:flex;
  align-items:center;
  gap:1rem;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 300px;
  box-shadow: 0 10px 40px rgba(255,215,0,0.2);
}
.achievement-popup.show { transform: translateX(0); }
.ach-icon { font-size:2rem; }
.ach-text { flex:1; }
.ach-title { font-family:'Syne',sans-serif; font-weight:800; font-size:0.9rem; color:var(--gold); }
.ach-desc { font-size:0.75rem; color:var(--grey); margin-top:0.2rem; }

/* ===== BACK BTN ===== */
.back-btn {
  display:flex;
  align-items:center;
  gap:0.5rem;
  color:var(--orange);
  background:none;
  border:none;
  cursor:pointer;
  font-family:'Syne',sans-serif;
  font-weight:700;
  font-size:0.9rem;
  margin-bottom:1.5rem;
  padding:0;
  transition:gap 0.2s;
}
.back-btn:hover { gap:0.8rem; }

/* ===== RESOURCES ===== */
.resource-card {
  background: var(--dark3);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  display:flex;
  align-items:flex-start;
  gap:1rem;
  transition:border-color 0.2s;
}
.resource-card:hover { border-color: var(--orange); }
.resource-icon { font-size:2rem; flex-shrink:0; }
.resource-info { flex:1; }
.resource-title { font-family:'Syne',sans-serif; font-weight:700; margin-bottom:0.3rem; }
.resource-desc { font-size:0.85rem; color:var(--grey); line-height:1.6; }
.resource-link {
  display:inline-block;
  margin-top:0.5rem;
  color:var(--orange);
  font-family:'Space Mono',monospace;
  font-size:0.75rem;
  text-decoration:none;
}
.resource-link:hover { color:var(--gold); }

/* ===== GLOSSARY ===== */
.glossary-item {
  border-bottom: 1px solid #222;
  padding: 1rem 0;
}
.glossary-item:last-child { border-bottom:none; }
.glossary-term { font-family:'Syne',sans-serif; font-weight:700; font-size:1rem; color:var(--orange); margin-bottom:0.3rem; }
.glossary-def { font-size:0.9rem; color:#ccc; line-height:1.6; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes pulseGlow {
  0%,100% { text-shadow: 0 0 20px rgba(247,147,26,0.5); }
  50% { text-shadow: 0 0 50px rgba(247,147,26,0.9), 0 0 80px rgba(247,147,26,0.4); }
}
@keyframes spin-slow { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes float {
  0%,100% { transform:translateY(0); }
  50% { transform:translateY(-8px); }
}

.float { animation: float 3s ease-in-out infinite; }

/* Confetti dots */
.confetti { position:fixed; pointer-events:none; z-index:9998; }
.confetti-dot {
  position:absolute;
  width:10px; height:10px;
  border-radius:50%;
  animation: confettiFall 2s ease-in forwards;
}
@keyframes confettiFall {
  0% { top:-20px; opacity:1; }
  100% { top:100vh; opacity:0; transform:rotate(720deg) scale(0); }
}

/* ===== LIGHTNING PAYMENT STYLES ===== */
.sat-preset {
  background: var(--dark4);
  border: 2px solid #333;
  border-radius: 8px;
  color: var(--white);
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  padding: 0.6rem 0.3rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  line-height: 1.3;
}
.sat-preset:hover { border-color: var(--gold); color: var(--gold); }
.sat-preset.active-preset { border-color: var(--gold); background: rgba(255,215,0,0.1); color: var(--gold); }

.unlock-card {
  background: var(--dark4);
  border: 2px solid #333;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}
.unlock-card:hover { border-color: var(--orange); background: rgba(247,147,26,0.05); }
.unlock-card.selected-unlock { border-color: var(--orange); background: rgba(247,147,26,0.08); }

.lightning-pulse {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(255,215,0,0.6); }
  70% { box-shadow: 0 0 0 10px rgba(255,215,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,215,0,0); }
}

@media(max-width:600px) {
  header { padding:0.7rem 1rem; }
  .xp-bar-wrap { display:none; }
  nav { top: 58px; }
  .section { padding:1rem; }
  .module-header { flex-direction:column; text-align:center; }
}

/* ===== SCOREBOARD ===== */
.scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.score-card {
  background: var(--dark3);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 1.5rem;
  text-align:center;
}
.score-card .s-num { font-family:'Syne',sans-serif; font-weight:800; font-size:2rem; color:var(--orange); }
.score-card .s-label { font-size:0.75rem; color:var(--grey); margin-top:0.3rem; font-family:'Space Mono',monospace; }

/* Lesson nav */
.lesson-nav {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:1.5rem 2rem;
  border-top:1px solid #2a2a2a;
  background:var(--dark4);
}
.lesson-counter { font-family:'Space Mono',monospace; font-size:0.75rem; color:var(--grey); }

/* Step section within lesson */
.step-box {
  background: rgba(247,147,26,0.07);
  border: 1px solid rgba(247,147,26,0.2);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  margin: 1rem 0;
  display:flex;
  gap:1rem;
  align-items:flex-start;
}
.step-num {
  background: var(--orange);
  color: var(--dark);
  width:28px; height:28px;
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-family:'Syne',sans-serif; font-weight:800; font-size:0.85rem;
  flex-shrink:0; margin-top:2px;
}
.step-content { flex:1; font-size:0.95rem; line-height:1.7; color:#ddd; }
.step-content strong { color:var(--white); }

/* Emoji big display */
.big-emoji { font-size:4rem; display:block; text-align:center; margin:1rem 0; animation:float 3s ease-in-out infinite; }

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  z-index: 9999;
  background: var(--orange);
  color: #000;
  border: none;
  border-radius: 50px;
  padding: 0.7rem 1.1rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(247,147,26,0.4);
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.back-to-top:hover { background: var(--gold); transform: translateY(-3px); }

/* ===== BACK BUTTON ===== */
.page-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--orange);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0;
  margin-bottom: 1.5rem;
  transition: gap 0.2s;
  text-decoration: none;
}
.page-back-btn:hover { gap: 0.8rem; color: var(--gold); }

/* ===== YOUTUBE THUMBNAIL ===== */
.yt-thumb {
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #000;
}
.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yt-thumb .yt-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  transition: background 0.2s;
}
.yt-thumb:hover .yt-play { background: rgba(0,0,0,0.2); }
.yt-play-icon {
  width: 60px;
  height: 60px;
  background: rgba(255,0,0,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  transition: transform 0.2s;
}
.yt-thumb:hover .yt-play-icon { transform: scale(1.1); }
.yt-iframe-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 10px;
  overflow: hidden;
}
.yt-iframe-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
