/* ===== КОСМИЧЕСКИЙ ГРАФФИТИ СТИЛЬ - FIZZIKA ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&family=Permanent+Marker&family=Caveat:wght@400;700&family=Oswald:wght@400;600;700&display=swap');

:root {
  --neon-pink: #ff4dab;
  --neon-blue: #00d4ff;
  --neon-green: #39ff14;
  --neon-yellow: #ffe600;
  --neon-purple: #b44dff;
  --neon-orange: #ff8533;
  --dark-bg: #06060f;
  --dark-card: #13131f;
  --dark-surface: #1c1c2c;
  --text-main: #f2f2f7;
  --text-dim: #a5a5bd;
  --graffiti-red: #ff3d55;
  --graffiti-blue: #3d7bff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  background: var(--dark-bg);
  color: var(--text-main);
  line-height: 1.8;
  overflow-x: hidden;
}

/* ===== КОСМОС: звёзды, туманности, метеоры ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 50% at 12% 30%, rgba(180,77,255,0.10), transparent 60%),
    radial-gradient(ellipse 60% 45% at 85% 20%, rgba(0,212,255,0.09), transparent 60%),
    radial-gradient(ellipse 80% 55% at 50% 88%, rgba(255,77,171,0.08), transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(57,255,20,0.04), transparent 60%);
}

/* три слоя мерцающих звёзд */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 27% 64%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 41% 33%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1px 1px at 58% 77%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 73% 25%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 86% 55%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 94% 12%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1px 1px at 8% 82%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 33% 12%, rgba(0,212,255,0.8), transparent),
    radial-gradient(1px 1px at 64% 8%, rgba(255,77,171,0.8), transparent),
    radial-gradient(1.5px 1.5px at 49% 92%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 90% 82%, rgba(255,230,0,0.7), transparent),
    radial-gradient(1px 1px at 18% 44%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 78% 46%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 5% 55%, rgba(57,255,20,0.7), transparent),
    radial-gradient(1px 1px at 52% 37%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 68% 62%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 38% 70%, rgba(255,255,255,0.6), transparent);
  animation: twinkle 6s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* падающие звёзды */
.shooting-star {
  position: fixed;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 2px rgba(255,255,255,0.7);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  animation: shoot 9s linear infinite;
}

.shooting-star:nth-of-type(1) { top: 12%; left: 68%; animation-delay: 0s; }
.shooting-star:nth-of-type(2) { top: 35%; left: 90%; animation-delay: 3s; }
.shooting-star:nth-of-type(3) { top: 60%; left: 20%; animation-delay: 6s; }

@keyframes shoot {
  0% { transform: translate(0, 0); opacity: 0; }
  2% { opacity: 1; }
  8% { transform: translate(220px, 130px); opacity: 0; }
  100% { transform: translate(220px, 130px); opacity: 0; }
}

/* планета в небе */
.planet {
  position: fixed;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  top: 12%;
  right: 4%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 32% 32%, rgba(255,255,255,0.32), transparent 42%),
    radial-gradient(circle at 60% 70%, rgba(255,77,171,0.5), transparent 60%),
    radial-gradient(circle at 30% 50%, rgba(180,77,255,0.55), transparent 55%),
    linear-gradient(135deg, #7a2fd0, #2a6fd0 55%, #0f3b7a);
  box-shadow:
    inset -14px -10px 30px rgba(0,0,0,0.5),
    0 0 40px rgba(180,77,255,0.25);
  animation: floaty 12s ease-in-out infinite;
}

.planet::after {
  content: '';
  position: absolute;
  top: 18%; left: -28%;
  width: 156%;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border-bottom: 3px solid rgba(0,212,255,0.55);
  box-shadow: 0 2px 10px rgba(0,212,255,0.2);
  transform: rotate(-12deg);
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* ===== НАВБАР ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(6, 6, 15, 0.9);
  backdrop-filter: blur(22px);
  border-bottom: 2px solid var(--neon-pink);
  padding: 0 20px;
}

.navbar .nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.7rem;
  color: var(--neon-pink);
  text-decoration: none;
  text-shadow: 0 0 22px rgba(255,77,171,0.55);
  letter-spacing: 2px;
}

.nav-logo span {
  color: var(--neon-blue);
  text-shadow: 0 0 22px rgba(0,212,255,0.55);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links a {
  color: var(--text-main);
  text-decoration: none;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 8px 14px;
  border-radius: 4px;
  transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--neon-pink);
  background: rgba(255,77,171,0.12);
  text-shadow: 0 0 10px rgba(255,77,171,0.45);
}

.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 5px;
  z-index: 1001;
}

.burger span {
  width: 30px;
  height: 3px;
  background: var(--neon-pink);
  border-radius: 3px;
  transition: all 0.3s;
  box-shadow: 0 0 8px rgba(255,77,171,0.5);
}

.burger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ===== ГЕРОЙ ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px 60px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background:
    repeating-conic-gradient(
      from 0deg at 50% 50%,
      transparent 0deg 88deg,
      rgba(255,77,171,0.025) 88deg 90deg
    );
  animation: rotateBg 70s linear infinite;
}

@keyframes rotateBg { to { transform: rotate(360deg); } }

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 1.08;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-blue), var(--neon-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 34px rgba(255,77,171,0.35));
  animation: glitch 5s infinite;
}

@keyframes glitch {
  0%, 95%, 100% { transform: translate(0); }
  96% { transform: translate(-3px, 1px); }
  97% { transform: translate(3px, -1px); }
  98% { transform: translate(-1px, -2px); }
  99% { transform: translate(2px, 2px); }
}

.hero-sub {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.35rem, 3vw, 2rem);
  color: var(--neon-yellow);
  margin-bottom: 36px;
  text-shadow: 0 0 22px rgba(255,230,0,0.35);
}

.hero-desc {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: #d3d3e6;
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-btn {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  padding: 18px 50px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 0 34px rgba(255,77,171,0.35);
  border: 1px solid rgba(255,255,255,0.15);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 55px rgba(255,77,171,0.6);
}

.hero-btn::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(transparent, rgba(255,255,255,0.12), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

/* ===== РАЗДЕЛЫ ===== */
.section-title {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  color: var(--neon-blue);
  text-shadow: 0 0 22px rgba(0,212,255,0.35);
}

.section-title::after {
  content: '';
  display: block;
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue));
  margin: 15px auto 0;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(255,77,171,0.5);
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 80px 20px;
  position: relative;
  z-index: 1;
}

/* ===== КАРТОЧКИ УРОКОВ ===== */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}

.lesson-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.03), transparent 40%),
    var(--dark-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 35px 30px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}

.lesson-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue), var(--neon-green));
}

.lesson-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transition: left 0.6s;
}

.lesson-card:hover::after { left: 100%; }

.lesson-card:hover {
  transform: translateY(-8px);
  border-color: var(--neon-pink);
  box-shadow:
    0 22px 44px rgba(0,0,0,0.5),
    0 0 34px rgba(255,77,171,0.18);
}

.lesson-num {
  font-family: 'Permanent Marker', cursive;
  font-size: 3rem;
  color: var(--neon-pink);
  opacity: 0.28;
  line-height: 1;
  margin-bottom: 10px;
  text-shadow: 0 0 22px rgba(255,77,171,0.25);
}

.lesson-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 900;
  margin-bottom: 12px;
  color: #fff;
  line-height: 1.3;
}

.lesson-card p {
  font-size: 0.98rem;
  color: #c4c4d6;
  line-height: 1.7;
}

.lesson-tag {
  display: inline-block;
  font-family: 'Oswald', sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 15px;
  font-weight: 600;
}

.tag-mech { background: rgba(255,77,171,0.15); color: var(--neon-pink); border: 1px solid rgba(255,77,171,0.35); }
.tag-thermo { background: rgba(255,133,51,0.15); color: var(--neon-orange); border: 1px solid rgba(255,133,51,0.35); }
.tag-elec { background: rgba(0,212,255,0.15); color: var(--neon-blue); border: 1px solid rgba(0,212,255,0.35); }
.tag-optic { background: rgba(255,230,0,0.15); color: var(--neon-yellow); border: 1px solid rgba(255,230,0,0.35); }
.tag-quantum { background: rgba(180,77,255,0.16); color: var(--neon-purple); border: 1px solid rgba(180,77,255,0.35); }
.tag-mol { background: rgba(57,255,20,0.13); color: var(--neon-green); border: 1px solid rgba(57,255,20,0.35); }

/* ===== СТРАНИЦА УРОКА ===== */
.lesson-page {
  padding-top: 96px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.lesson-header {
  text-align: center;
  padding: 60px 20px 36px;
  position: relative;
}

.lesson-header h1 {
  font-family: 'Permanent Marker', cursive;
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lesson-header .breadcrumb {
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  color: #b0b0c8;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.lesson-header .breadcrumb a { color: var(--neon-blue); text-decoration: none; }
.lesson-header .breadcrumb a:hover { color: var(--neon-pink); }

.lesson-content {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px 100px;
}

.lesson-content h2 {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.85rem;
  color: var(--neon-pink);
  margin: 52px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255,77,171,0.25);
  text-shadow: 0 0 15px rgba(255,77,171,0.2);
  line-height: 1.3;
}

.lesson-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--neon-blue);
  margin: 32px 0 14px;
  line-height: 1.3;
}

.lesson-content p {
  font-size: 1.08rem;
  margin-bottom: 18px;
  color: #e2e2ee;
  line-height: 1.85;
}

.lesson-content ul, .lesson-content ol {
  margin: 15px 0 28px 26px;
}

.lesson-content li {
  margin-bottom: 10px;
  color: #d5d5e4;
  line-height: 1.85;
  font-size: 1.05rem;
}

.lesson-content strong {
  color: #fff;
  font-weight: 700;
}

.lesson-content table {
  color: #ddddea;
}

/* ===== ФОРМУЛЫ ===== */
.formula-box {
  background: linear-gradient(150deg, rgba(180,77,255,0.08), transparent 45%),
    var(--dark-surface);
  border: 1px solid rgba(255,77,171,0.25);
  border-left: 4px solid var(--neon-pink);
  border-radius: 12px;
  padding: 26px 30px;
  margin: 26px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.3);
}

.formula-box::before {
  content: 'F M E';
  position: absolute;
  top: -12px; right: 12px;
  font-family: 'Permanent Marker', cursive;
  font-size: 4rem;
  color: rgba(255,77,171,0.06);
  pointer-events: none;
}

.formula {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--neon-yellow);
  text-shadow: 0 0 16px rgba(255,230,0,0.35);
  line-height: 1.45;
  word-break: break-word;
}

.formula-desc {
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  color: #c8c8dd;
  margin-top: 8px;
}

.info-box {
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 12px;
  padding: 20px 25px;
  margin: 26px 0;
}

.info-box h4 {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--neon-blue);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.info-box p,
.warning-box p {
  color: #dbdbe9;
  line-height: 1.8;
  font-size: 1.05rem;
}

.warning-box {
  background: rgba(255,61,85,0.06);
  border: 1px solid rgba(255,61,85,0.25);
  border-radius: 12px;
  padding: 20px 25px;
  margin: 26px 0;
}

.warning-box h4 {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--graffiti-red);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* ===== НАВИГАЦИЯ МЕЖДУ УРОКАМИ ===== */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 20px 80px;
  position: relative;
  z-index: 1;
}

.lesson-nav a {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--neon-blue);
  text-decoration: none;
  padding: 13px 24px;
  border: 1px solid rgba(0,212,255,0.35);
  border-radius: 8px;
  transition: all 0.3s;
  font-size: 0.88rem;
  background: rgba(6,6,15,0.6);
}

.lesson-nav a:hover {
  background: rgba(0,212,255,0.1);
  border-color: var(--neon-blue);
  box-shadow: 0 0 22px rgba(0,212,255,0.2);
}

/* ===== ФУТЕР ===== */
.footer {
  background: linear-gradient(160deg, rgba(255,255,255,0.02), transparent),
    var(--dark-card);
  border-top: 2px solid rgba(255,77,171,0.25);
  padding: 44px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer p {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  color: #bcbcd0;
  line-height: 1.7;
}

.footer .footer-brand {
  font-family: 'Permanent Marker', cursive;
  color: var(--neon-pink);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 768px) {
  body { font-size: 1rem; }

  .burger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(6, 6, 15, 0.98);
    backdrop-filter: blur(22px);
    flex-direction: column;
    padding: 90px 30px 30px;
    gap: 5px;
    transition: right 0.4s ease;
    border-left: 2px solid var(--neon-pink);
  }

  .nav-links.open { right: 0; }

  .nav-links a {
    font-size: 1.05rem;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .lessons-grid { grid-template-columns: 1fr; gap: 18px; }
  .lesson-card { padding: 25px 22px; }
  .lesson-num { font-size: 2.2rem; }

  .hero h1 { font-size: clamp(2.1rem, 10vw, 3.5rem); }

  .lesson-nav { flex-direction: column; }
  .lesson-nav a { text-align: center; }

  .lesson-content { padding: 0 16px 60px; }

  .formula { font-size: 1.45rem; }
  .formula-box { padding: 22px 16px; }

  .planet { width: 90px; height: 90px; right: -24px; top: 9%; }
  .shooting-star { animation-duration: 14s; }
}

@media (max-width: 480px) {
  .navbar .nav-inner { height: 60px; }
  .nav-logo { font-size: 1.35rem; }
  .container { padding: 50px 15px; }
  .section-title { font-size: 1.85rem; }
  .hero { padding: 80px 15px 40px; }
  .hero-btn { padding: 15px 35px; font-size: 1rem; }
  .lesson-content p { font-size: 1.02rem; }
}

/* ===== ПОЛЗУНОК ДО ВВЕРХ ===== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  box-shadow: 0 0 20px rgba(255,77,171,0.35);
}

.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-3px); box-shadow: 0 0 34px rgba(255,77,171,0.55); }

/* ===== ПОИСК ===== */
.search-box {
  max-width: 500px;
  margin: 0 auto 40px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 16px 24px 16px 50px;
  background: rgba(28, 28, 44, 0.8);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  color: var(--text-main);
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.3s;
}

.search-box input::placeholder { color: #77778f; }

.search-box input:focus {
  border-color: var(--neon-pink);
  box-shadow: 0 0 22px rgba(255,77,171,0.18);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #77778f;
  font-size: 1.1rem;
}

/* ===== ВСЕ УРОКИ НА ОДНОЙ СТРАНИЦЕ / ФИЛЬТРЫ ===== */
.hero-btn.all-lessons-btn {
  display: block;
  width: fit-content;
  margin: 0 auto 30px;
  text-decoration: none;
  text-align: center;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 14px;
}
.filter-chip {
  background: var(--dark-surface);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-dim);
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.82rem;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s;
}
.filter-chip:hover { color: #fff; border-color: var(--neon-pink); box-shadow: 0 0 14px rgba(255,77,171,0.25); }
.filter-chip.active {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 18px rgba(255,77,171,0.35);
}
.filter-info {
  text-align: center;
  color: var(--neon-yellow);
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  margin: 14px 0 4px;
}
.filter-none {
  text-align: center;
  color: var(--neon-pink);
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 30px 10px;
}

.all-wrap {
  display: flex;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 20px 60px;
  position: relative;
  z-index: 1;
  align-items: flex-start;
}
.toc {
  flex: 0 0 260px;
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: rgba(19,19,31,0.85);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px 16px;
}
.toc-title {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.2rem;
  color: var(--neon-yellow);
  margin-bottom: 10px;
}
.toc-group {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.75rem;
  color: var(--neon-blue);
  margin: 16px 0 6px;
}
.toc-link {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  border-left: 2px solid transparent;
  transition: all 0.25s;
}
.toc-link span { color: var(--neon-pink); font-weight: 700; margin-right: 6px; font-size: 0.85rem; }
.toc-link:hover { background: rgba(255,77,171,0.12); color: #fff; }
.toc-link.on { border-left-color: var(--neon-pink); color: #fff; background: rgba(255,77,171,0.12); }
.toc-top {
  display: block;
  margin-top: 16px;
  text-align: center;
  color: var(--neon-purple);
  text-decoration: none;
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 1px;
}
.toc-top:hover { color: var(--neon-pink); }

.all-main { flex: 1; min-width: 0; }
.all-toolbar { margin-bottom: 30px; }
.all-search { max-width: 620px; margin: 0 auto 14px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 18px 0 8px;
}
.chip {
  background: var(--dark-surface);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-dim);
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s;
}
.chip:hover { color: #fff; border-color: var(--neon-blue); }
.chip.active {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 16px rgba(0,212,255,0.3);
}

.lesson-section {
  background: rgba(19,19,31,0.8);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 28px 30px 20px;
  margin-bottom: 30px;
  scroll-margin-top: 96px;
  transition: border-color 0.3s;
}
.lesson-section:hover { border-color: rgba(255,77,171,0.35); }
.lesson-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-bottom: 2px dashed rgba(255,255,255,0.12);
  padding-bottom: 12px;
  margin-bottom: 22px;
}
.lesson-section-num {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--neon-pink);
  background: rgba(255,77,171,0.12);
  border: 1px solid rgba(255,77,171,0.35);
  border-radius: 10px;
  padding: 4px 12px;
}
.lesson-section-title {
  font-family: 'Permanent Marker', cursive;
  font-size: 1.7rem;
  color: var(--neon-blue);
  margin: 0;
  text-shadow: 0 0 14px rgba(0,212,255,0.25);
}
.lesson-section .lesson-content {
  max-width: none;
  padding: 0;
}
.lesson-section .lesson-content h2 { margin-top: 30px; }
.lesson-section-back { text-align: center; margin-top: 26px; }
.lesson-section-back a {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  color: var(--neon-purple);
  text-decoration: none;
}
.lesson-section-back a:hover { color: var(--neon-pink); }

@media (max-width: 980px) {
  .all-wrap { flex-direction: column; }
  .all-main { order: 2; }
  .toc { flex: none; position: static; width: 100%; max-height: 300px; }
}