/* =========================================================
   MiniNúcleos — Gamified Dark / Neon Mode
   Base secreta · Portales de aprendizaje
   ========================================================= */
:root {
  --bg-space: #0b0f19;
  --bg-space-2: #0f172a;
  --bg-card: rgba(22, 31, 49, 0.78);
  --bg-card-border: rgba(255, 255, 255, 0.1);

  --neon-math: #10b981;
  --neon-math-glow: rgba(16, 185, 129, 0.4);
  --neon-purple: #8b5cf6;
  --neon-purple-deep: #4c1d95;
  --neon-cyan: #06b6d4;
  --neon-pink: #ec4899;
  --neon-amber: #f59e0b;

  --math-color: #3b82f6;
  --lang-color: #ec4899;
  --sci-color: #06b6d4;
  --civic-color: #a78bfa;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  --font-heading: "Plus Jakarta Sans", "Fredoka", system-ui, sans-serif;
  --font-body: "Inter", "Plus Jakarta Sans", system-ui, sans-serif;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.mn-body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: var(--font-body);
  background-color: var(--bg-space);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(139, 92, 246, 0.18) 0%, transparent 42%),
    radial-gradient(circle at 82% 8%, rgba(6, 182, 212, 0.12) 0%, transparent 38%),
    radial-gradient(circle at 70% 85%, rgba(16, 185, 129, 0.12) 0%, transparent 42%),
    linear-gradient(180deg, #0b0f19 0%, #0f172a 55%, #0b1220 100%);
  overflow-x: hidden;
}

/* stars grid */
body.mn-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 28% 62%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 28%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 72% 44%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 16%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 64% 78%, #fff 50%, transparent 51%);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  margin: 0;
}

.mn-wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px 72px;
}

/* —— Sticky glass header —— */
.mn-top {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.mn-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.mn-brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  color: #041016;
  background: linear-gradient(135deg, var(--neon-math), var(--neon-cyan));
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.35);
}

.mn-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.mn-brand__text strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
}
.mn-brand__text span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mn-nav-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: 0.25s ease;
}
.mn-chip:hover {
  border-color: rgba(6, 182, 212, 0.5);
  background: rgba(6, 182, 212, 0.12);
  transform: translateY(-1px);
}
.mn-chip--home {
  color: var(--neon-math);
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
}

/* Player / XP */
.mn-player {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.mn-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 30%, #fff 0 8%, transparent 9%),
    linear-gradient(160deg, #67e8f9, #8b5cf6 55%, #312e81);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.35);
  position: relative;
  flex-shrink: 0;
}
.mn-avatar::after {
  content: "🚀";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
}
.mn-player__meta { flex: 1; min-width: 0; }
.mn-player__meta strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.mn-xp-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.mn-xp-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-math), #a3e635);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.55);
  animation: xpLoad 1.6s ease forwards 0.25s;
}
@keyframes xpLoad {
  from { width: 0; }
  to { width: 68%; }
}

/* —— Hero —— */
.mn-hero {
  position: relative;
  margin-top: 22px;
  min-height: min(68vh, 560px);
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  align-items: center;
  gap: 8px;
}

.mn-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(105deg, rgba(11, 15, 25, 0.2) 0%, rgba(11, 15, 25, 0.55) 48%, rgba(11, 15, 25, 0.35) 100%),
    radial-gradient(circle at 78% 42%, rgba(139, 92, 246, 0.32), transparent 38%),
    radial-gradient(circle at 18% 70%, rgba(16, 185, 129, 0.22), transparent 36%),
    radial-gradient(circle at 40% 0%, rgba(6, 182, 212, 0.18), transparent 42%),
    linear-gradient(135deg, #0d1530, #15102a 48%, #0a1a22);
}

/* Old portal ring removed — replaced by constellation stage */

.mn-hero__beams {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.mn-hero__beams span {
  position: absolute;
  top: -20%;
  width: 70px;
  height: 140%;
  filter: blur(14px);
  transform-origin: top center;
  animation: beamPulse 7s ease-in-out infinite;
  opacity: 0.4;
}
.mn-hero__beams span:nth-child(1) {
  left: 12%;
  transform: rotate(-18deg);
  background: linear-gradient(180deg, rgba(6,182,212,.28), transparent 70%);
}
.mn-hero__beams span:nth-child(2) {
  left: 38%;
  transform: rotate(10deg);
  animation-delay: 1.2s;
  background: linear-gradient(180deg, rgba(139,92,246,.25), transparent 70%);
}
@keyframes beamPulse {
  0%, 100% { opacity: .25; }
  50% { opacity: .55; }
}

/* Constellation of worlds (replaces empty circle) */
.mn-hero__stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 28px);
  min-height: 320px;
}
.mn-constellation {
  position: relative;
  width: min(340px, 86%);
  aspect-ratio: 1;
}
.mn-star-core {
  position: absolute;
  inset: 28%;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(99, 102, 241, 0.35), rgba(16, 185, 129, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 40px rgba(139, 92, 246, 0.35),
    inset 0 0 30px rgba(6, 182, 212, 0.15);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.mn-star-core__glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35), transparent 60%);
  animation: corePulse 4s ease-in-out infinite;
}
.mn-star-core__icon {
  position: relative;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.35));
  animation: shipBob 3.2s ease-in-out infinite;
}
.mn-star-core__ring {
  position: absolute;
  inset: 10%;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  animation: ringDrift 10s linear infinite;
}
@keyframes corePulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes shipBob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}
@keyframes ringDrift {
  to { transform: rotate(360deg); }
}

.mn-sat {
  position: absolute;
  width: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #fff;
  z-index: 2;
  animation: satFloat 4.5s ease-in-out infinite;
}
.mn-sat span {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mn-sat em {
  font-style: normal;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #cbd5e1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.mn-sat:hover span {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 14px 32px rgba(139, 92, 246, 0.35);
}
.mn-sat--1 { top: 2%; left: 36%; animation-delay: 0s; }
.mn-sat--1 span { border-color: rgba(16, 185, 129, 0.55); box-shadow: 0 0 20px rgba(16, 185, 129, 0.25); }
.mn-sat--2 { top: 28%; right: 0; animation-delay: 0.6s; }
.mn-sat--2 span { border-color: rgba(249, 115, 22, 0.55); box-shadow: 0 0 20px rgba(249, 115, 22, 0.22); }
.mn-sat--3 { bottom: 8%; right: 14%; animation-delay: 1.1s; }
.mn-sat--3 span { border-color: rgba(52, 211, 153, 0.55); box-shadow: 0 0 20px rgba(52, 211, 153, 0.22); }
.mn-sat--4 { bottom: 18%; left: 0; animation-delay: 0.35s; }
.mn-sat--4 span { border-color: rgba(45, 212, 191, 0.55); box-shadow: 0 0 20px rgba(45, 212, 191, 0.22); }
.mn-sat--5 { top: 34%; left: 2%; animation-delay: 0.9s; }
.mn-sat--5 span { border-color: rgba(251, 191, 36, 0.55); box-shadow: 0 0 20px rgba(251, 191, 36, 0.22); }
.mn-sat--6 { top: 8%; right: 8%; animation-delay: 1.3s; }
.mn-sat--6 span { border-color: rgba(129, 140, 248, 0.6); box-shadow: 0 0 20px rgba(129, 140, 248, 0.28); }
@keyframes satFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.mn-dust {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #67e8f9;
  top: 18%;
  right: 22%;
  opacity: 0.7;
  box-shadow: 0 0 12px #67e8f9;
  animation: dustTwinkle 2.8s ease-in-out infinite;
}
.mn-dust--2 {
  top: 62%;
  left: 28%;
  width: 6px;
  height: 6px;
  background: #c4b5fd;
  box-shadow: 0 0 10px #c4b5fd;
  animation-delay: 0.8s;
}
.mn-dust--3 {
  top: 48%;
  right: 8%;
  width: 5px;
  height: 5px;
  background: #fbbf24;
  box-shadow: 0 0 10px #fbbf24;
  animation-delay: 1.4s;
}
@keyframes dustTwinkle {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}

.mn-hero__content {
  position: relative;
  z-index: 1;
  padding: clamp(28px, 5vw, 52px);
  max-width: 680px;
}

.mn-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 8px;
}

.mn-hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 0.95;
  margin-bottom: 14px;
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.35);
}
.mn-hero h1 em {
  font-style: normal;
  color: var(--neon-math);
  text-shadow: 0 0 28px rgba(16, 185, 129, 0.45);
}

.mn-hero__lead {
  margin: 0 0 24px;
  font-size: clamp(1.02rem, 2.3vw, 1.2rem);
  font-weight: 500;
  color: #cbd5e1;
  max-width: 36ch;
  line-height: 1.45;
}

.mn-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 900px) {
  .mn-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    align-items: stretch;
  }
  .mn-hero__stage {
    order: -1;
    min-height: 280px;
    padding-bottom: 0;
  }
  .mn-constellation {
    width: min(300px, 92%);
  }
  .mn-hero__content {
    padding-top: 8px;
  }
}

/* 3D CTA */
.btn-primary-gamified,
.mn-btn--play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  color: #fff !important;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 1rem 1.8rem;
  border-radius: 16px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--neon-purple-deep), 0 12px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
}
.btn-primary-gamified:hover,
.mn-btn--play:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--neon-purple-deep), 0 15px 25px rgba(139, 92, 246, 0.4);
}
.btn-primary-gamified:active,
.mn-btn--play:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--neon-purple-deep), 0 5px 10px rgba(0, 0, 0, 0.3);
}

.mn-btn--ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.95rem 1.4rem;
  border-radius: 16px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: 0.2s ease;
}
.mn-btn--ghost:hover {
  border-color: rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}

/* —— Sections —— */
.mn-section { margin-top: 52px; }
.mn-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.mn-section__head h2 {
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  font-weight: 800;
}
.mn-section__head p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 40ch;
  line-height: 1.4;
}

/* Reveal on scroll */
.mn-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.mn-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— Worlds grid —— */
.mn-worlds {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.card-world-active,
.mn-portal--math {
  position: relative;
  grid-column: span 6;
  min-height: 240px;
  background: var(--bg-card);
  border: 2px solid var(--neon-math);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 28px var(--neon-math-glow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.card-world-active:hover,
.mn-portal--math:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 12px 36px var(--neon-math-glow);
  border-color: #34d399;
}

.card-world-active.mn-portal--math {
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0.35) 100%),
    url("../matematicas/img/fondo-mundo-mate.png") center / cover no-repeat;
  min-height: 280px;
}
.card-world-active.mn-portal--simce {
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0.35) 100%),
    url("../simce/img/banner-simce-hub.png") center / cover no-repeat;
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.28);
  min-height: 280px;
}
.mn-portal--simce {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.28);
}
.mn-portal--simce:hover {
  border-color: #fbbf24;
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.4);
}
.mn-portal--simce .mn-portal__go {
  color: #fbbf24;
}
.card-world-active.mn-portal--hhgg {
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0.35) 100%),
    url("../ciencias-sociales/img/fondo-mundo-hhgg.png") center / cover no-repeat;
  min-height: 280px;
}
.mn-portal--hhgg {
  border-color: rgba(14, 165, 164, 0.7);
  box-shadow: 0 0 28px rgba(14, 165, 164, 0.28);
}
.mn-portal--hhgg:hover {
  border-color: #2dd4bf;
  box-shadow: 0 12px 36px rgba(14, 165, 164, 0.4);
}
.mn-portal--hhgg .mn-portal__go {
  color: #2dd4bf;
}
.card-world-active.mn-portal--nat {
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0.35) 100%),
    url("../ciencias-naturales/img/fondo-mundo-ciencias.png") center / cover no-repeat;
  min-height: 280px;
}
.mn-portal--nat {
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 0 28px rgba(34, 197, 94, 0.28);
}
.mn-portal--nat:hover {
  border-color: #4ade80;
  box-shadow: 0 12px 36px rgba(34, 197, 94, 0.4);
}
.mn-portal--nat .mn-portal__go {
  color: #4ade80;
}
.card-world-active.mn-portal--lang {
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0.35) 100%),
    url("../lenguaje/img/fondo-mundo-lenguaje.png") center / cover no-repeat;
  min-height: 280px;
}
.mn-portal--lang {
  border-color: rgba(249, 115, 22, 0.75);
  box-shadow: 0 0 28px rgba(249, 115, 22, 0.28);
}
.mn-portal--lang:hover {
  border-color: #fb923c;
  box-shadow: 0 12px 36px rgba(249, 115, 22, 0.4);
}
.mn-portal--lang .mn-portal__go {
  color: #fb923c;
}
.card-world-active.mn-portal--civic {
  background:
    linear-gradient(160deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0.35) 100%),
    url("../ciudadania-digital/img/fondo-mundo-ciudadania.png") center / cover no-repeat;
  min-height: 280px;
}
.mn-portal--civic {
  border-color: rgba(129, 140, 248, 0.75);
  box-shadow: 0 0 28px rgba(129, 140, 248, 0.28);
}
.mn-portal--civic:hover {
  border-color: #a5b4fc;
  box-shadow: 0 12px 36px rgba(129, 140, 248, 0.4);
}
.mn-portal--civic .mn-portal__go {
  color: #a5b4fc;
}
.badge-available--violet {
  background: rgba(129, 140, 248, 0.15);
  border-color: rgba(129, 140, 248, 0.4);
  color: #c7d2fe;
}
.badge-available--violet::before {
  background-color: #818cf8;
  box-shadow: 0 0 8px #818cf8;
}
.badge-available--pink {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.4);
  color: #fdba74;
}
.badge-available--pink::before {
  background-color: #fb923c;
  box-shadow: 0 0 8px #fb923c;
}
.badge-available--teal {
  background: rgba(14, 165, 164, 0.15);
  border-color: rgba(14, 165, 164, 0.4);
  color: #5eead4;
}
.badge-available--teal::before {
  background-color: #2dd4bf;
  box-shadow: 0 0 8px #2dd4bf;
}
.badge-available--amber {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.badge-available--amber::before {
  background-color: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.card-world-locked,
.mn-portal--soon {
  position: relative;
  grid-column: span 4;
  min-height: 220px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  filter: grayscale(0.65);
  opacity: 0.7;
  cursor: not-allowed;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: inherit;
  overflow: hidden;
}
.card-world-locked:hover,
.mn-portal--soon:hover {
  opacity: 0.9;
  filter: grayscale(0.25);
  border-color: rgba(255, 255, 255, 0.28);
}

.mn-portal__icon,
.world-icon {
  font-size: 2.8rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s ease;
  display: inline-block;
}
.card-world-active:hover .world-icon,
.mn-portal--math:hover .mn-portal__icon {
  transform: scale(1.12);
}

.mn-portal h3,
.card-world-active h3,
.card-world-locked h3 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.mn-portal p,
.card-world-active p,
.card-world-locked p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
  max-width: 34ch;
}
.mn-portal__go {
  margin-top: 14px;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--neon-math);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-world-active:hover .mn-portal__go span:last-child {
  transform: translateX(4px);
}
.mn-portal__go span:last-child {
  display: inline-block;
  transition: transform 0.25s ease;
}

.badge-available {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--neon-math);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-available::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--neon-math);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-math);
  animation: pulse-glow 1.8s infinite ease-in-out;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.badge-lock {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Tooltip locked */
.mn-tooltip-wrap { position: relative; }
.mn-tooltip {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.92);
  border: 1px solid rgba(139, 92, 246, 0.45);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 2;
}
.card-world-locked:hover .mn-tooltip,
.mn-portal--soon:hover .mn-tooltip,
.card-world-locked:focus-within .mn-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.lock-3d {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 1.4rem;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.4));
  transition: transform 0.25s ease;
}
.card-world-locked:hover .lock-3d {
  transform: translateY(-3px) scale(1.08);
}

/* —— Power-ups / rules —— */
.grid-rules,
.mn-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.rule-card,
.mn-rule-card {
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: left;
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.rule-card:hover,
.mn-rule-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.15);
}
.rule-icon {
  font-size: 2.2rem;
  margin-bottom: 0.7rem;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.2));
}
.rule-card h3,
.mn-rule-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.rule-card p,
.mn-rule-card p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
  font-size: 0.95rem;
}

/* —— Parents / leads —— */
.mn-parents-banner {
  margin-top: 52px;
  border-radius: 28px;
  padding: clamp(22px, 4vw, 36px);
  background:
    radial-gradient(circle at 12% 20%, rgba(139, 92, 246, 0.22), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.16), transparent 40%),
    rgba(22, 31, 49, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}

.mn-parents-banner__content { max-width: 720px; }
.mn-parents-banner h3 {
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 800;
  margin-bottom: 8px;
}
.mn-parents-banner p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.45;
}

.mn-newsletter-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  max-width: 540px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.mn-newsletter-form input[type="email"] {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 12px 16px;
}
.mn-newsletter-form input::placeholder { color: #64748b; }
.mn-newsletter-form .mn-btn--play,
.mn-newsletter-form button {
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  box-shadow: 0 4px 0 var(--neon-purple-deep);
  white-space: nowrap;
}
.mn-newsletter-form .mn-btn--play:active,
.mn-newsletter-form button:active {
  box-shadow: 0 1px 0 var(--neon-purple-deep);
}

.mn-form-note {
  margin: 14px 0 0 !important;
  color: var(--neon-math) !important;
  font-weight: 700 !important;
}

/* Modal toast success */
.mn-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mn-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mn-modal__card {
  width: min(92vw, 420px);
  border-radius: 22px;
  padding: 28px 24px;
  text-align: center;
  background: rgba(22, 31, 49, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.2);
  transform: translateY(12px) scale(0.96);
  transition: transform 0.25s ease;
}
.mn-modal.is-open .mn-modal__card {
  transform: translateY(0) scale(1);
}
.mn-modal__card h3 {
  margin: 8px 0;
  font-size: 1.35rem;
}
.mn-modal__card p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

/* Grades / missions reuse */
.mn-grades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.mn-grade {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 20px;
  padding: 22px 18px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  backdrop-filter: blur(10px);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.mn-grade:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.45);
}
.mn-grade--live {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.18);
}
.mn-grade--live:hover {
  border-color: var(--neon-math);
  box-shadow: 0 0 30px var(--neon-math-glow);
}
.mn-grade__lvl {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--neon-amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mn-grade h3 {
  margin: 8px 0 6px;
  font-size: 1.3rem;
}
.mn-grade p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
}
.mn-grade__status {
  margin-top: 14px;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--neon-math);
}
.mn-grade__status--soon { color: var(--text-muted); }

.mn-missions { display: grid; gap: 16px; }
.mn-mission {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.25);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-soft);
}
@media (min-width: 800px) {
  .mn-mission { grid-template-columns: 1.05fr 1fr; }
}
.mn-mission__visual {
  position: relative;
  min-height: 220px;
  background:
    radial-gradient(circle at 30% 40%, rgba(16,185,129,0.22), transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139,92,246,0.22), transparent 45%),
    linear-gradient(145deg, #12204a, #0d1838);
  display: grid;
  place-items: center;
  padding: 20px;
}
.mn-mission__body {
  padding: clamp(20px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.mn-mission__body h3 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
.mn-mission__body p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.45;
}
.mn-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.mn-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #cfe0ff;
}

.mn-video {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(236, 72, 153, 0.35);
  background: #000;
  aspect-ratio: 16 / 9;
}
.mn-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.mn-resource-link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.28);
  text-decoration: none;
  color: inherit;
  transition: 0.2s ease;
}
.mn-resource-link:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.55);
  background: rgba(6, 182, 212, 0.1);
}
.mn-resource-link__icon { font-size: 1.8rem; line-height: 1; }
.mn-resource-link__title {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--neon-cyan);
  margin-bottom: 4px;
}
.mn-resource-link__desc {
  display: block;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.35;
}

.mn-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 18px 0 10px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.mn-crumbs a { color: var(--neon-cyan); text-decoration: none; }
.mn-crumbs span { opacity: 0.5; }

.mn-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.mn-footer a {
  color: var(--neon-cyan);
  font-weight: 700;
  text-decoration: none;
}
.mn-footer strong { color: #fff; }

@media (max-width: 720px) {
  .mn-top { border-radius: 22px; }
  .card-world-active,
  .mn-portal--math,
  .mn-portal--simce,
  .mn-portal--hhgg,
  .mn-portal--nat,
  .mn-portal--lang,
  .mn-portal--civic,
  .card-world-locked,
  .mn-portal--soon { grid-column: span 12; }
  .mn-newsletter-form {
    flex-wrap: wrap;
    border-radius: 20px;
  }
  .mn-newsletter-form .mn-btn--play,
  .mn-newsletter-form button {
    width: 100%;
  }
}
