:root {
  --deep: #01010d;
  --navy: #050520;
  --nebula1: #6c0aef;
  --nebula2: #0a6ef5;
  --nebula3: #ef0a6c;
  --star: #e8f4ff;
  --glow: #7b4dff;
  --gold: #ffd700;
  --cyan: #00e5ff;
  --text: #c8d8f0;
}

/* MODO NEBULOSA */
body.modo-nebulosa {
  --deep: #0a0015;
  --navy: #12052d;
  --nebula1: #b45eff;
  --nebula2: #4da6ff;
  --nebula3: #ff70b5;
  --star: #fffde7;
  --glow: #c08eff;
  --cyan: #6efff0;
  --text: #f0e6ff;
}

/* MODO ALTO CONTRASTE */
body.alto-contraste {
  --deep: #000000;
  --navy: #000000;
  --nebula1: #ffff00;
  --nebula2: #00ffff;
  --nebula3: #ff00ff;
  --star: #ffffff;
  --glow: #ffff00;
  --cyan: #00ffff;
  --text: #ffffff;
  filter: contrast(1.2);
}

body.alto-contraste .planet-card,
body.alto-contraste .mision-card,
body.alto-contraste .glosario-item,
body.alto-contraste .constelacion-card,
body.alto-contraste .curio-card {
  border-width: 2px;
  border-color: white;
  background: black;
}

body.alto-contraste .btn-primary {
  background: yellow;
  color: black;
  border: 2px solid white;
}

body.alto-contraste .btn-outline {
  border-color: white;
  color: white;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--nebula1) var(--deep);
}

html::-webkit-scrollbar {
  width: 8px;
}

html::-webkit-scrollbar-track {
  background: var(--deep);
}

html::-webkit-scrollbar-thumb {
  background: var(--nebula1);
  border-radius: 10px;
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

body {
  background: var(--deep);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
  animation: bodyFadeIn 1s ease;
}

@keyframes bodyFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* NAVBAR COMPACTO */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  background: rgba(1, 1, 13, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(108, 10, 239, 0.3);
  transition: all 0.3s ease;
}

nav:hover {
  background: rgba(1, 1, 13, 0.95);
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--nebula2), var(--nebula1), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.3s ease;
  position: relative;
}

.logo::before {
  content: '✦';
  position: absolute;
  left: -20px;
  opacity: 0;
  transform: rotate(180deg) scale(0);
  transition: all 0.3s ease;
}

.logo:hover {
  background: linear-gradient(90deg, var(--cyan), var(--nebula1), var(--nebula2));
  -webkit-background-clip: text;
  text-shadow: 0 0 30px var(--cyan);
  transform: scale(1.05);
}

.logo:hover::before {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links > li > a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0 8px;
  height: 60px;
  line-height: 60px;
  transition: color 0.3s;
  white-space: nowrap;
}

.nav-links > li > a:hover {
  color: var(--cyan);
}

.dropdown {
  position: relative;
}

/* DROPDOWN MEJORADO (con scroll y mayor tamaño) */
.dropdown-menu {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(5, 5, 32, 0.97);
  border: 1px solid rgba(108, 10, 239, 0.4);
  border-radius: 8px;
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  box-shadow: 0 10px 30px rgba(108, 10, 239, 0.4);
  z-index: 1001;
  /* Personalizar barra de scroll */
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) var(--deep);
}

.dropdown-menu::-webkit-scrollbar {
  width: 6px;
}
.dropdown-menu::-webkit-scrollbar-track {
  background: var(--deep);
  border-radius: 10px;
}
.dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--cyan);
  border-radius: 10px;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 6px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.7rem;
  text-align: center;
  border-left: 2px solid transparent;
  transition: 0.2s;
}

.dropdown-menu a:hover {
  color: var(--cyan);
  background: rgba(108, 10, 239, 0.15);
  border-left-color: var(--cyan);
}

/* Categorías dentro del dropdown */
.dropdown-category {
  color: var(--gold);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 16px 4px;
  border-bottom: 1px solid rgba(255,215,0,0.2);
  margin-top: 5px;
}
.dropdown-category:first-of-type {
  margin-top: 0;
}

.nav-extra {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-left: 10px;
}

.icono-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text);
  padding: 0 5px;
  transition: transform 0.2s;
}

.icono-btn:hover {
  transform: scale(1.2);
  color: var(--cyan);
}

#sonido-toggle.activo {
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
}

/* SELECTOR DE IDIOMA */
.idioma-selector {
  display: flex;
  gap: 2px;
  margin-right: 5px;
}

.idioma-btn {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 6px;
  border: 1px solid var(--nebula1);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.idioma-btn.activo {
  background: var(--nebula1);
  color: white;
  border-color: var(--cyan);
}

.idioma-btn:hover:not(.activo) {
  background: rgba(108, 10, 239, 0.3);
}

/* MODAL DE TÉRMINOS */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.mostrar {
  opacity: 1;
  visibility: visible;
}

.modal-contenido {
  background: rgba(10, 10, 30, 0.95);
  border: 2px solid var(--nebula1);
  border-radius: 40px;
  padding: 3rem 2.5rem;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 0 60px rgba(108, 10, 239, 0.5);
  transform: scale(0.8) translateY(20px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.mostrar .modal-contenido {
  transform: scale(1) translateY(0);
}

.modal-contenido h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 1.5rem;
  animation: modalTitle 0.5s ease 0.2s both;
}

@keyframes modalTitle {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-contenido p {
  margin-bottom: 2rem;
  line-height: 1.8;
  color: var(--text);
}

.modal-botones {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.modal-legal {
  font-size: 0.8rem;
  color: rgba(200, 216, 240, 0.5);
}

/* HERO */
#inicio {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 40px;
}

.nebula-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(108, 10, 239, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 60%, rgba(10, 110, 245, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 80%, rgba(239, 10, 108, 0.15) 0%, transparent 60%);
  animation: nebulaPulse 8s ease-in-out infinite alternate, nebulaFloat 20s ease-in-out infinite;
}

@keyframes nebulaFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(10px, -10px) scale(1.02); }
  50% { transform: translate(-5px, 15px) scale(0.98); }
  75% { transform: translate(-15px, -5px) scale(1.01); }
}

@keyframes nebulaPulse {
  0% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.7; transform: scale(1); }
}

/* Partículas flotantes en el hero */
#inicio::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.8) 50%, transparent 50%),
    radial-gradient(2px 2px at 40% 70%, rgba(0,255,255,0.5) 50%, transparent 50%),
    radial-gradient(1px 1px at 60% 20%, rgba(255,255,255,0.6) 50%, transparent 50%),
    radial-gradient(2px 2px at 80% 60%, rgba(108,10,239,0.6) 50%, transparent 50%),
    radial-gradient(1px 1px at 10% 80%, rgba(255,255,255,0.5) 50%, transparent 50%),
    radial-gradient(2px 2px at 70% 40%, rgba(239,10,108,0.5) 50%, transparent 50%);
  animation: particlesFloat 15s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes particlesFloat {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-100vh) rotate(360deg); }
}

.hero-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 6px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 20px;
  animation: fadeUp 1s 0.2s both, textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(0, 229, 255, 0.5); }
  50% { text-shadow: 0 0 20px rgba(0, 229, 255, 0.8), 0 0 30px rgba(0, 229, 255, 0.4); }
}

.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -2px;
  margin-bottom: 30px;
  animation: fadeUp 1s 0.4s both, titlePulse 4s ease-in-out infinite;
}

.hero-title:hover {
  animation: titlePulse 0.5s ease-in-out;
}

@keyframes titlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.hero-title .line1 {
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 50%, var(--nebula2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  background-size: 200% 200%;
  animation: gradientMove 5s ease infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-title .line2 {
  background: linear-gradient(135deg, var(--nebula1) 0%, var(--nebula3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  font-size: 0.5em;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-top: 14px;
  background-size: 200% 200%;
  animation: gradientMove 5s ease infinite reverse;
}

.hero-desc {
  max-width: 640px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(200, 216, 240, 0.8);
  margin-bottom: 50px;
  animation: fadeUp 1s 0.6s both;
}

.hero-cta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 1s 0.8s both;
}

.btn {
  padding: 14px 36px;
  border-radius: 50px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  display: inline-block;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--nebula1), var(--nebula2));
  color: #fff;
  box-shadow: 0 0 30px rgba(108, 10, 239, 0.5);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 50px rgba(108, 10, 239, 0.8);
}

.btn-outline {
  background: transparent;
  color: var(--cyan);
  border: 1.5px solid var(--cyan);
}

.btn-outline:hover {
  background: rgba(0, 229, 255, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: rgba(200, 216, 240, 0.45);
  text-transform: uppercase;
  animation: fadeUp 1s 1s both;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--nebula1), transparent);
  animation: scrollAnim 2s ease-in-out infinite;
}

@keyframes scrollAnim {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SECTIONS */
.sec {
  position: relative;
  z-index: 1;
  padding: 100px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.sec-wide {
  max-width: 1400px;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 5px;
  color: var(--nebula1);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.1;
}

.section-title span {
  background: linear-gradient(90deg, var(--cyan), var(--nebula2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--nebula1), var(--cyan));
  border-radius: 2px;
  margin-bottom: 40px;
}

.sep-line {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.sep-line hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108, 10, 239, 0.4), transparent);
}

/* GALAXIA */
.galaxy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.galaxy-image {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(108, 10, 239, 0.35);
  box-shadow: 0 0 60px rgba(108, 10, 239, 0.2);
  transition: all 0.5s ease;
}

.galaxy-image:hover {
  transform: scale(1.02) rotate(1deg);
  box-shadow: 0 0 80px rgba(108, 10, 239, 0.4);
}

.galaxy-image img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

.galaxy-image:hover img {
  transform: scale(1.1);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.stat-card {
  background: rgba(108, 10, 239, 0.08);
  border: 1px solid rgba(108, 10, 239, 0.25);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card:hover {
  background: rgba(108, 10, 239, 0.18);
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 15px 40px rgba(108, 10, 239, 0.4);
}

.stat-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--cyan);
  transition: all 0.3s ease;
}

.stat-card:hover .stat-num {
  text-shadow: 0 0 20px var(--cyan);
  transform: scale(1.1);
}
  display: block;
}

.stat-label {
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: rgba(200, 216, 240, 0.55);
  margin-top: 4px;
  display: block;
}

/* PLANETAS (con efecto tilt) */
.planets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 20px;
}

.planet-card {
  background: rgba(5, 5, 32, 0.8);
  border: 1px solid rgba(108, 10, 239, 0.2);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

.planet-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(108,10,239,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.planet-card:hover::before {
  opacity: 1;
}

.planet-card:hover {
  border-color: rgba(108, 10, 239, 0.6);
  box-shadow: 0 30px 70px rgba(108, 10, 239, 0.5);
  transform: translateY(-15px) scale(1.02) rotateX(5deg);
}

.planet-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.planet-card:hover .planet-img {
  transform: scale(1.15) rotate(-3deg);
}

.planet-info {
  padding: 18px;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.planet-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.planet-type {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}

.planet-desc {
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(200, 216, 240, 0.65);
}

.planet-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.68rem;
  letter-spacing: 1px;
  font-weight: 600;
}

/* BUSCADOR DE PLANETAS */
.buscador-planetas {
  margin: 30px 0 20px;
  text-align: center;
}

.buscador-input {
  width: 100%;
  max-width: 500px;
  padding: 15px 25px;
  border-radius: 60px;
  border: 2px solid var(--nebula1);
  background: rgba(5, 5, 32, 0.7);
  color: white;
  font-size: 1rem;
  outline: none;
  transition: box-shadow 0.3s;
}

.buscador-input:focus {
  box-shadow: 0 0 30px rgba(108, 10, 239, 0.6);
}

/* AGUJERO NEGRO */
.bh-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.black-hole-anim {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.bh-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 10, 108, 0.4) 0%, rgba(108, 10, 239, 0.3) 30%, transparent 70%);
  animation: bhPulse 3s ease-in-out infinite;
}

@keyframes bhPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.12); opacity: 1; }
}

.bh-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(75deg);
}

.ring1 {
  width: 210px;
  height: 210px;
  border-color: rgba(239, 10, 108, 0.9);
  animation: ringRot 4s linear infinite;
  box-shadow: 0 0 20px rgba(239, 10, 108, 0.5);
}

.ring2 {
  width: 260px;
  height: 260px;
  border-color: rgba(255, 165, 0, 0.5);
  animation: ringRot 6s linear infinite reverse;
}

.ring3 {
  width: 295px;
  height: 295px;
  border-color: rgba(108, 10, 239, 0.3);
  animation: ringRot 10s linear infinite;
}

@keyframes ringRot {
  from { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(0deg); }
  to { transform: translate(-50%, -50%) rotateX(75deg) rotateZ(360deg); }
}

.bh-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 12px rgba(0, 0, 0, 0.9), 0 0 40px rgba(239, 10, 108, 0.6);
}

.bh-img {
  width: 100%;
  border-radius: 16px;
  margin-top: 28px;
  border: 1px solid rgba(239, 10, 108, 0.3);
  box-shadow: 0 0 40px rgba(239, 10, 108, 0.2);
}

.fact-list {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fact-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  background: rgba(239, 10, 108, 0.06);
  border: 1px solid rgba(239, 10, 108, 0.15);
  border-radius: 12px;
  transition: all 0.3s;
}

.fact-list li:hover {
  background: rgba(239, 10, 108, 0.12);
  border-color: rgba(239, 10, 108, 0.4);
  transform: translateX(6px);
}

.fact-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.fact-text {
  font-size: 0.92rem;
  line-height: 1.6;
}

.fact-text strong {
  color: #fff;
}

/* SISTEMA SOLAR */
.solar-img-wrap {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(10, 110, 245, 0.3);
  box-shadow: 0 0 60px rgba(10, 110, 245, 0.15);
  margin-top: 40px;
}

.solar-img-wrap img {
  width: 100%;
  display: block;
}

.solar-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.solar-card {
  background: linear-gradient(135deg, rgba(10, 110, 245, 0.1), rgba(108, 10, 239, 0.08));
  border: 1px solid rgba(10, 110, 245, 0.2);
  border-radius: 16px;
  padding: 26px;
  transition: all 0.3s;
}

.solar-card:hover {
  transform: translateY(-6px);
  border-color: rgba(10, 110, 245, 0.5);
  box-shadow: 0 20px 40px rgba(10, 110, 245, 0.2);
}

.solar-card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.solar-card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 8px;
}

.solar-card-text {
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(200, 216, 240, 0.7);
}

/* NEBULOSAS */
.nebula-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.nebula-item {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(108, 10, 239, 0.2);
}

.nebula-item img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}

.nebula-item:hover img {
  transform: scale(1.1);
}

.nebula-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(1, 1, 13, 0.95), transparent);
  padding: 20px 14px 14px;
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.3s;
}

.nebula-item:hover .nebula-caption {
  opacity: 1;
  transform: translateY(0);
}

.nebula-caption h4 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem;
  color: #fff;
  margin-bottom: 4px;
}

.nebula-caption p {
  font-size: 0.76rem;
  color: rgba(200, 216, 240, 0.7);
}

/* MISIONES */
.misiones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 40px;
}

.mision-card {
  background: rgba(10, 10, 30, 0.7);
  border: 1px solid var(--nebula2);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.mision-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(10, 110, 245, 0.3);
}

.mision-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 15px;
  border: 2px solid var(--cyan);
}

.mision-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  font-size: 1.2rem;
}

.mision-fecha {
  color: var(--cyan);
  font-weight: 600;
  margin: 5px 0;
}

/* GLOSARIO */
.glosario-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.glosario-item {
  background: rgba(108, 10, 239, 0.1);
  border: 1px solid var(--nebula1);
  border-radius: 15px;
  padding: 20px;
  transition: all 0.3s;
}

.glosario-item:hover {
  background: rgba(108, 10, 239, 0.2);
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(108, 10, 239, 0.3);
}

.glosario-item h3 {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 8px;
}

.glosario-item p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(200, 216, 240, 0.8);
}

/* CONSTELACIONES */
.constelaciones-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.constelacion-card {
  background: rgba(5, 5, 32, 0.7);
  border: 1px solid var(--cyan);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.3s;
}

.constelacion-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 229, 255, 0.2);
}

.constelacion-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 2px solid var(--cyan);
}

.constelacion-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  padding: 15px 15px 5px;
  font-size: 1rem;
}

.constelacion-card p {
  padding: 0 15px 15px;
  font-size: 0.8rem;
  color: rgba(200, 216, 240, 0.7);
}

/* CURIOSIDADES */
.curiosidades-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.curio-card {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 26px;
  background: rgba(5, 5, 32, 0.6);
  border: 1px solid rgba(108, 10, 239, 0.18);
  border-radius: 18px;
  transition: all 0.3s;
}

.curio-card:hover {
  background: rgba(108, 10, 239, 0.1);
  border-color: rgba(108, 10, 239, 0.5);
  transform: scale(1.02);
}

.curio-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.3rem;
  font-weight: 900;
  color: rgba(108, 10, 239, 0.3);
  line-height: 1;
  flex-shrink: 0;
}

.curio-content h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 8px;
}

.curio-content p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(200, 216, 240, 0.75);
}

/* CALCULADORAS (EDAD Y PESO) */
.calculadora-container {
  background: rgba(5,5,32,0.7);
  border: 2px solid var(--nebula2);
  border-radius: 40px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 0 60px rgba(10,110,245,0.2);
  margin-top: 40px;
}

.calculadora-input {
  margin-bottom: 30px;
}

.calculadora-input label {
  display: block;
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: var(--text);
}

.calculadora-input input {
  padding: 12px 20px;
  border-radius: 60px;
  border: 2px solid var(--nebula1);
  background: rgba(5,5,32,0.7);
  color: white;
  font-size: 1.2rem;
  width: 120px;
  text-align: center;
  margin-right: 10px;
}

.calculadora-resultados {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.resultado-card {
  background: rgba(108,10,239,0.15);
  border: 1px solid var(--cyan);
  border-radius: 16px;
  padding: 15px;
  text-align: center;
  transition: transform 0.3s;
}

.resultado-card:hover {
  transform: translateY(-5px);
  background: rgba(108,10,239,0.25);
  box-shadow: 0 0 20px var(--cyan);
}

.resultado-card h4 {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 8px;
}

.resultado-card .edad {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cyan);
}

/* COMPARADOR DE TAMAÑOS DE PLANETAS */
.comparador-container {
  background: rgba(5,5,32,0.7);
  border: 2px solid var(--nebula2);
  border-radius: 40px;
  padding: 30px;
  margin-top: 40px;
  text-align: center;
}

.comparador-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px;
  background: rgba(0,0,0,0.3);
  padding: 20px 0;
}

#comparador-canvas {
  display: block;
  width: 100%;
  height: auto;
  min-width: 600px;
  background: transparent;
}

.comparador-controles {
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.comparador-checkbox {
  background: rgba(108,10,239,0.15);
  border: 1px solid var(--cyan);
  border-radius: 30px;
  padding: 5px 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.comparador-checkbox:hover {
  background: rgba(108,10,239,0.3);
  transform: scale(1.05);
}

.comparador-checkbox input {
  accent-color: var(--cyan);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.comparador-checkbox label {
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.comparador-btns {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

.comparador-btns .btn {
  padding: 10px 25px;
}

.comparador-escala {
  color: rgba(200,216,240,0.6);
  font-size: 0.9rem;
  margin-top: 15px;
}

@media (max-width: 768px) {
  .comparador-checkbox {
    padding: 3px 10px;
  }
  .comparador-checkbox label {
    font-size: 0.85rem;
  }
}

/* HOY EN LA HISTORIA */
.historia-container {
  background: rgba(5,5,32,0.6);
  border-radius: 30px;
  padding: 30px;
  border: 1px solid var(--gold);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.historia-eventos {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.historia-evento {
  background: rgba(108,10,239,0.1);
  border-left: 5px solid var(--gold);
  border-radius: 15px;
  padding: 15px 20px;
  transition: transform 0.3s;
}

.historia-evento:hover {
  transform: translateX(10px);
  background: rgba(108,10,239,0.2);
  box-shadow: 0 5px 20px rgba(255,215,0,0.2);
}

.historia-fecha {
  font-family: 'Orbitron', sans-serif;
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 5px;
}

.historia-desc {
  color: var(--text);
  line-height: 1.6;
}

.historia-vacio {
  color: rgba(200,216,240,0.7);
  font-style: italic;
  text-align: center;
  padding: 30px;
}

.historia-cargando {
  color: var(--cyan);
  text-align: center;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* EFEMÉRIDES ASTRONÓMICAS */
.efemerides-container {
  background: rgba(5,5,32,0.6);
  border-radius: 30px;
  padding: 30px;
  border: 1px solid var(--gold);
  min-height: 200px;
}

.efemerides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.efemerides-card {
  background: rgba(108,10,239,0.15);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--cyan);
  transition: transform 0.3s;
}

.efemerides-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,229,255,0.2);
}

.efemerides-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--cyan);
  font-size: 1.3rem;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 5px;
}

.efemerides-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.efemerides-item .label {
  color: rgba(200,216,240,0.8);
}

.efemerides-item .value {
  color: #fff;
  font-weight: 600;
}

.efemerides-ubicacion {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--gold);
}

.efemerides-cargando {
  color: var(--cyan);
  text-align: center;
  animation: pulse 1.5s infinite;
  padding: 40px;
}

.efemerides-error {
  color: var(--nebula3);
  text-align: center;
  padding: 30px;
  font-size: 1.1rem;
}

.efemerides-nota {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: rgba(200,216,240,0.6);
  font-style: italic;
}

/* LÍNEA DE TIEMPO */
.timeline-container {
  background: rgba(5,5,32,0.5);
  border-radius: 40px;
  padding: 40px 20px;
  border: 1px solid var(--nebula1);
  margin-top: 40px;
}

.timeline-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.timeline-event {
  flex: 1 1 150px;
  text-align: center;
  padding: 15px 5px;
  background: rgba(108,10,239,0.15);
  border-radius: 30px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.timeline-event:hover {
  background: rgba(108,10,239,0.3);
  border-color: var(--cyan);
  transform: scale(1.05);
}

.timeline-event.activo {
  background: linear-gradient(135deg, var(--nebula1), var(--nebula2));
  border-color: white;
  box-shadow: 0 0 30px var(--nebula1);
}

.timeline-info {
  background: rgba(0,0,0,0.6);
  border-radius: 20px;
  padding: 25px;
  border-left: 5px solid var(--cyan);
  font-size: 1.1rem;
  line-height: 1.8;
  color: rgba(200,216,240,0.9);
  min-height: 100px;
}

/* QUIZ */
.quiz-container {
  background: rgba(5,5,32,0.7);
  border: 2px solid var(--nebula2);
  border-radius: 40px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 60px rgba(10,110,245,0.2);
  margin-top: 40px;
}

.quiz-pregunta {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 30px;
  line-height: 1.4;
}

.quiz-opciones {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.opcion-btn {
  background: rgba(108,10,239,0.2);
  border: 2px solid var(--nebula1);
  border-radius: 60px;
  padding: 15px 10px;
  font-size: 1.1rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
}

.opcion-btn:hover:not(:disabled) {
  background: rgba(108,10,239,0.4);
  border-color: var(--cyan);
  transform: translateY(-3px);
}

.opcion-btn.correcta {
  background: #00a86b;
  border-color: #00ffaa;
  color: white;
}

.opcion-btn.incorrecta {
  background: #b22222;
  border-color: #ff6b6b;
  color: white;
}

.opcion-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.quiz-score {
  font-size: 1.2rem;
  color: var(--cyan);
  font-weight: 600;
  margin-right: 20px;
}

.quiz-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* CLIMA ESPACIAL */
.clima-container {
  background: rgba(5,5,32,0.6);
  border-radius: 30px;
  padding: 30px;
  border: 1px solid var(--nebula2);
}

.clima-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.clima-card {
  background: rgba(108,10,239,0.15);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(0,229,255,0.3);
  transition: transform 0.3s;
}

.clima-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: 0 10px 30px rgba(0,229,255,0.2);
}

.clima-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--cyan);
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.clima-valor {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin: 10px 0;
}

.clima-unidad {
  font-size: 0.9rem;
  color: rgba(200,216,240,0.7);
}

.clima-alertas {
  margin-top: 20px;
  padding: 15px;
  background: rgba(239,10,108,0.1);
  border-radius: 15px;
  border-left: 5px solid var(--nebula3);
}

.clima-alertas h4 {
  font-family: 'Orbitron', sans-serif;
  color: var(--nebula3);
  margin-bottom: 10px;
}

.clima-alertas ul {
  list-style: none;
  padding: 0;
}

.clima-alertas li {
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* NOTICIAS */
.noticias-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.noticia-card {
  background: rgba(5,5,32,0.7);
  border: 1px solid var(--nebula1);
  border-radius: 20px;
  padding: 20px;
  transition: all 0.3s;
  height: fit-content;
}

.noticia-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(108,10,239,0.3);
  border-color: var(--cyan);
}

.noticia-titulo {
  font-family: 'Orbitron', sans-serif;
  color: white;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.noticia-fecha {
  color: var(--cyan);
  font-size: 0.85rem;
  margin-bottom: 15px;
  display: block;
}

.noticia-descripcion {
  color: rgba(200,216,240,0.8);
  line-height: 1.6;
  margin-bottom: 15px;
}

.noticia-enlace {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.noticia-enlace:hover {
  color: white;
  text-decoration: underline;
}

/* APOD */
.apod-container {
  text-align: center;
  margin-top: 30px;
}

.apod-container img {
  max-width: 100%;
  border-radius: 30px;
  border: 3px solid var(--nebula1);
  box-shadow: 0 0 60px rgba(108, 10, 239, 0.5);
}

.apod-container h3 {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  margin: 20px 0 10px;
  font-size: 1.5rem;
}

.apod-container p {
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  color: rgba(200, 216, 240, 0.85);
}

/* COMENTARIOS */
.comentarios-container {
  background: rgba(5,5,32,0.5);
  border-radius: 30px;
  padding: 20px;
  min-height: 300px;
}

/* PANEL DE ATAJOS DE TECLADO */
.atajos-panel {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1500;
  font-family: 'Rajdhani', sans-serif;
}

.atajos-toggle {
  background: var(--nebula1);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 20px var(--nebula1);
  transition: transform 0.3s;
  border: 1px solid var(--cyan);
}

.atajos-toggle:hover {
  transform: scale(1.05);
  background: var(--nebula2);
}

.atajos-contenido {
  background: rgba(5, 5, 32, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid var(--nebula1);
  border-radius: 20px;
  padding: 15px 25px;
  margin-top: 10px;
  color: white;
  max-width: 250px;
  display: none;
  box-shadow: 0 0 30px rgba(108, 10, 239, 0.5);
}

.atajos-contenido.mostrar {
  display: block;
}

.atajos-contenido h4 {
  font-family: 'Orbitron', sans-serif;
  color: var(--cyan);
  margin-bottom: 10px;
  text-align: center;
}

.atajos-contenido ul {
  list-style: none;
  padding: 0;
}

.atajos-contenido li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 5px;
}

.atajos-contenido kbd {
  background: #222;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  color: var(--cyan);
  border: 1px solid #555;
  margin-right: 8px;
}

/* BOTÓN FLOTANTE QR */
.qr-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1500;
  font-family: 'Rajdhani', sans-serif;
}

.qr-toggle {
  background: var(--nebula2);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 20px var(--nebula2);
  transition: transform 0.3s;
  border: 1px solid var(--cyan);
}

.qr-toggle:hover {
  transform: scale(1.05);
  background: var(--nebula1);
}

.qr-contenido {
  background: rgba(5, 5, 32, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid var(--nebula2);
  border-radius: 20px;
  padding: 20px;
  margin-top: 10px;
  color: white;
  text-align: center;
  display: none;
  box-shadow: 0 0 30px rgba(10,110,245,0.5);
}

.qr-contenido.mostrar {
  display: block;
}

.qr-contenido h4 {
  font-family: 'Orbitron', sans-serif;
  color: var(--cyan);
  margin-bottom: 15px;
}

/* FOOTER CORREGIDO (TODO CENTRADO) */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(108, 10, 239, 0.2);
  padding: 40px 20px;
  text-align: center;
  animation: footerFadeIn 1s ease;
}

@keyframes footerFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-info {
  text-align: center;
}

.footer-logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 1.8rem;
  letter-spacing: 4px;
  background: linear-gradient(90deg, var(--nebula2), var(--nebula1), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.footer-logo:hover {
  transform: scale(1.05);
  text-shadow: 0 0 30px var(--cyan);
}

.footer-lunar {
  background: rgba(108,10,239,0.15);
  padding: 20px 30px;
  border-radius: 30px;
  border: 1px solid var(--cyan);
  display: inline-block;
  min-width: 250px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-lunar:hover {
  transform: scale(1.08) rotate(1deg);
  box-shadow: 0 0 30px var(--cyan);
  border-color: var(--nebula3);
}

.footer-lunar:hover #fase-icono {
  animation: faseGiro 1s ease;
}

@keyframes faseGiro {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(15deg) scale(1.2); }
  100% { transform: rotate(0deg) scale(1); }
}

.footer-legal {
  margin-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
}

footer p {
  font-size: 0.9rem;
  color: rgba(200, 216, 240, 0.7);
  line-height: 1.6;
  margin: 5px 0;
}

footer a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ================= ANIMACIONES MEJORADAS ================= */

/* Reveal base */
.reveal {
  opacity: 0;
  transform: translateY(50px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform, opacity;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Reveal desde izquierda */
.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal desde derecha */
.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Reveal con escala */
.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Reveal con rotación */
.reveal-rotate {
  opacity: 0;
  transform: rotateY(90deg);
  transition: all 0.8s ease;
  perspective: 1000px;
}

.reveal-rotate.visible {
  opacity: 1;
  transform: rotateY(0);
}

/* Delay para animaciones secuenciales */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Hover effects con animaciones */
.planet-card, .mision-card, .constelacion-card, .curio-card, .noticia-card {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.planet-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 60px rgba(108, 10, 239, 0.4);
}

.mision-card:hover {
  transform: translateY(-12px) scale(1.02);
}

.constelacion-card:hover {
  transform: translateY(-10px) rotateX(5deg);
}

.curio-card:hover {
  transform: scale(1.03);
}

.noticia-card:hover {
  transform: translateY(-8px) scale(1.01);
}

/* Botones con animación */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* Links con animación de subrayado */
.nav-links > li > a {
  position: relative;
}

.nav-links > li > a::after {
  content: '';
  position: absolute;
  bottom: 15px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-links > li > a:hover::after {
  width: 80%;
}

/* Stat cards con animación */
.stat-card {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.05);
}

.stat-card:hover .stat-num {
  text-shadow: 0 0 20px var(--cyan);
}

/* Input animations */
.buscador-input, .calculadora-input input {
  transition: all 0.3s ease;
}

.buscador-input:focus, .calculadora-input input:focus {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(108, 10, 239, 0.5);
}

/* Share buttons */
.share-btn {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.share-btn:hover {
  transform: translateY(-5px) scale(1.15);
}

/* Loader/spinner para contenido dinámico */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(108, 10, 239, 0.3);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

/* Efecto de shimmer para cargar */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, rgba(108,10,239,0.1) 25%, rgba(108,10,239,0.2) 50%, rgba(108,10,239,0.1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ================= FIN ANIMACIONES ================= */

/* BOTONES COMPARTIR */
.share-section {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 5px 10px;
  background: rgba(108, 10, 239, 0.1);
  border-radius: 40px;
  border: 1px solid var(--nebula1);
}

.share-section span {
  color: var(--text);
  font-size: 0.9rem;
  margin-right: 5px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 1.2rem;
}

.share-btn.twitter {
  background: #1DA1F2;
}
.share-btn.facebook {
  background: #4267B2;
}
.share-btn.linkedin {
  background: #0077b5;
}

.share-btn:hover {
  transform: scale(1.2);
  box-shadow: 0 0 15px currentColor;
}

/* ===== LUNA ===== */
.luna-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 40px;
}

.luna-image {
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.3);
}

.luna-image img {
  width: 100%;
  display: block;
}

.luna-datos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.luna-stat {
  background: rgba(108, 10, 239, 0.15);
  border: 1px solid var(--cyan);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s;
}

.luna-stat:hover {
  transform: scale(1.05);
  background: rgba(108, 10, 239, 0.25);
  box-shadow: 0 0 20px var(--cyan);
}

.luna-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  display: block;
  margin-bottom: 5px;
}

.luna-label {
  font-size: 0.85rem;
  color: rgba(200, 216, 240, 0.8);
}

.luna-texto {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 30px;
  padding: 30px;
  margin-top: 30px;
  border-left: 5px solid var(--cyan);
  line-height: 1.8;
}

.luna-texto p {
  margin-bottom: 15px;
  color: rgba(200, 216, 240, 0.9);
}

/* Fases de la luna */
.fases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.fase-card {
  background: rgba(5, 5, 32, 0.7);
  border: 1px solid var(--nebula1);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s;
}

.fase-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: 0 10px 30px rgba(108, 10, 239, 0.3);
}

.fase-card img {
  width: 100%;
  max-width: 80px;
  margin: 0 auto 15px;
  filter: drop-shadow(0 0 10px var(--cyan));
}

.fase-card p {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
}

/* ===== LUNA ROJA ===== */
.luna-roja-container {
  margin-top: 30px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 40px;
  padding: 30px;
  border: 1px solid var(--nebula3);
}

.luna-roja-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin: 20px 0;
}

.luna-roja-card {
  background: rgba(5, 5, 32, 0.7);
  border-radius: 25px;
  padding: 25px;
  transition: transform 0.3s, box-shadow 0.3s;
  height: fit-content;
}

.luna-roja-card.ciencia {
  border-left: 5px solid var(--cyan);
  border-right: 1px solid var(--cyan);
}

.luna-roja-card.mitos {
  border-left: 5px solid var(--nebula3);
  border-right: 1px solid var(--nebula3);
}

.luna-roja-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(239, 10, 108, 0.3);
}

.luna-roja-card h4 {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 15px;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  padding-bottom: 10px;
}

.luna-roja-card p {
  line-height: 1.7;
  color: rgba(200, 216, 240, 0.9);
  margin-bottom: 15px;
}

.luna-roja-card ul {
  list-style-type: none;
  padding: 0;
}

.luna-roja-card li {
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
  color: rgba(200, 216, 240, 0.9);
}

.luna-roja-card li::before {
  content: "🌑";
  position: absolute;
  left: -5px;
  color: var(--nebula3);
  font-size: 0.9rem;
}

.luna-roja-dato {
  margin-top: 30px;
  padding: 20px;
  background: rgba(108, 10, 239, 0.15);
  border-radius: 30px;
  border: 2px dashed var(--cyan);
  text-align: center;
  font-style: italic;
}

.luna-roja-dato p {
  font-size: 1.1rem;
  color: #fff;
}

.luna-roja-dato strong {
  color: var(--cyan);
}

/* ===== TIPOS DE GALAXIAS (CON IMÁGENES) ===== */
.galaxy-types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin: 30px 0;
}

.type-card {
  background: rgba(108,10,239,0.1);
  border: 1px solid var(--cyan);
  border-radius: 20px;
  padding: 20px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.type-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--nebula1), var(--cyan));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.type-card:hover {
  transform: translateY(-12px) rotateX(5deg);
  background: rgba(108,10,239,0.25);
  box-shadow: 0 20px 50px rgba(0,229,255,0.4);
}

.type-card:hover::after {
  transform: scaleX(1);
}

.type-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 15px;
  border: 2px solid var(--cyan);
  margin-bottom: 15px;
  transition: all 0.4s ease;
}

.type-card:hover img {
  transform: scale(1.08);
  border-color: var(--nebula3);
  box-shadow: 0 0 20px rgba(239, 10, 108, 0.5);
}

.type-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--cyan);
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.type-card p {
  color: var(--text);
  line-height: 1.6;
}

.type-note {
  text-align: center;
  margin-top: 20px;
  font-style: italic;
  color: var(--gold);
}

/* ===== DATOS SORPRENDENTES DE LA VÍA LÁCTEA (CON IMÁGENES) ===== */
.milkyway-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.fact-item {
  background: rgba(5,5,32,0.7);
  border: 1px solid var(--nebula2);
  border-radius: 20px;
  padding: 20px;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fact-item:hover {
  transform: scale(1.02);
  border-color: var(--cyan);
}

.fact-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  margin-bottom: 15px;
  transition: transform 0.3s;
}

.fact-item:hover img {
  transform: scale(1.1);
}

.fact-item h3 {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  margin-bottom: 10px;
}

.fact-item p {
  color: var(--text);
  line-height: 1.6;
}

/* ===== GALAXIAS PRIMITIVAS (CON IMÁGENES) ===== */
.primitive-container {
  background: rgba(5,5,32,0.6);
  border-radius: 30px;
  padding: 30px;
  border: 1px solid var(--gold);
}

.primitive-container img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 20px;
  border: 2px solid var(--cyan);
  margin-bottom: 20px;
}

.primitive-highlight {
  background: rgba(108,10,239,0.15);
  border-left: 5px solid var(--cyan);
  border-radius: 15px;
  padding: 20px;
  margin-top: 20px;
}

.primitive-highlight h4 {
  font-family: 'Orbitron', sans-serif;
  color: var(--cyan);
  margin-bottom: 10px;
}

/* ===== SONIFICACIÓN (CON IMÁGENES) ===== */
.sonificacion-container {
  background: rgba(5,5,32,0.6);
  border-radius: 30px;
  padding: 30px;
  border: 1px solid var(--nebula3);
}

.sonificacion-container img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 20px;
  border: 2px solid var(--cyan);
  margin-bottom: 20px;
}

.sonificacion-tech {
  background: rgba(0,229,255,0.05);
  border-radius: 20px;
  padding: 20px;
  margin-top: 20px;
}

.sonificacion-tech h4 {
  font-family: 'Orbitron', sans-serif;
  color: var(--nebula2);
  margin-bottom: 10px;
}

/* ===== CURIOSIDADES EXTRA (CON IMÁGENES) ===== */
.extra-curiosidades-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.extra-card {
  background: rgba(108,10,239,0.1);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 20px;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.extra-card:hover {
  transform: translateY(-5px);
  background: rgba(108,10,239,0.2);
  border-color: var(--cyan);
}

.extra-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 15px;
  border: 2px solid var(--gold);
  margin-bottom: 15px;
  transition: transform 0.3s;
}

.extra-card:hover img {
  transform: scale(1.03);
}

.extra-card h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--gold);
  margin-bottom: 10px;
}

.extra-card p {
  color: var(--text);
  line-height: 1.6;
}

/* ===== MITOS Y LEYENDAS ===== */
.subsection-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.8rem;
  color: var(--cyan);
  margin: 40px 0 20px;
  text-align: center;
  text-shadow: 0 0 10px rgba(0,229,255,0.3);
}

/* Constelaciones */
.mitos-constelaciones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin: 30px 0;
}

.mito-card {
  background: rgba(5,5,32,0.7);
  border: 1px solid var(--nebula2);
  border-radius: 20px;
  padding: 20px;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mito-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: 0 15px 30px rgba(0,229,255,0.2);
}

.mito-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 15px;
  border: 2px solid var(--gold);
  margin-bottom: 15px;
  transition: transform 0.3s;
}

.mito-card:hover img {
  transform: scale(1.02);
}

.mito-card h4 {
  font-family: 'Orbitron', sans-serif;
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.mito-card p {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 10px;
}

.mito-dato {
  font-size: 0.9rem;
  color: var(--cyan);
  background: rgba(0,229,255,0.1);
  padding: 8px 12px;
  border-radius: 30px;
  width: 100%;
  text-align: center;
}

/* Eclipses */
.eclipses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.eclipse-card {
  background: rgba(108,10,239,0.1);
  border: 1px solid var(--nebula3);
  border-radius: 20px;
  padding: 20px;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eclipse-card:hover {
  transform: scale(1.02);
  border-color: var(--cyan);
  background: rgba(108,10,239,0.2);
}

.eclipse-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.eclipse-card h4 {
  font-family: 'Orbitron', sans-serif;
  color: var(--nebula3);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.eclipse-card p {
  color: var(--text);
  line-height: 1.6;
}

/* Nombres de planetas */
.planetas-nombres-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.nombre-card {
  background: rgba(5,5,32,0.6);
  border: 1px solid var(--cyan);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nombre-card:hover {
  transform: translateY(-5px);
  background: rgba(0,229,255,0.1);
  box-shadow: 0 0 20px var(--cyan);
}

.nombre-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.nombre-card h4 {
  font-family: 'Orbitron', sans-serif;
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.nombre-card p {
  font-size: 0.9rem;
  color: rgba(200,216,240,0.9);
  line-height: 1.5;
}

.mitos-nota {
  text-align: center;
  margin-top: 30px;
  font-size: 0.9rem;
  color: rgba(200,216,240,0.6);
  font-style: italic;
}

/* ===== EVENTOS 2026 ===== */
.eventos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin: 30px 0;
}

.evento-card {
  background: rgba(5,5,32,0.7);
  border: 1px solid var(--nebula2);
  border-radius: 20px;
  padding: 20px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.evento-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan);
  box-shadow: 0 15px 30px rgba(0,229,255,0.2);
}

.evento-mes {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(255,215,0,0.3);
  padding-bottom: 8px;
}

.evento-destacado {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.evento-icon {
  font-size: 2rem;
  min-width: 40px;
  text-align: center;
}

.evento-fecha {
  font-size: 0.85rem;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 4px;
}

.evento-titulo {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.evento-desc {
  font-size: 0.9rem;
  color: rgba(200,216,240,0.8);
  line-height: 1.5;
}

.eventos-nota {
  text-align: center;
  margin-top: 30px;
  font-size: 0.9rem;
  color: rgba(200,216,240,0.6);
  font-style: italic;
}

/* ===== AVISO MODO ESCRITORIO ===== */
.aviso-escritorio {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: linear-gradient(135deg, var(--nebula2), var(--nebula1));
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-family: 'Rajdhani', sans-serif;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  border-bottom: 2px solid var(--cyan);
  transform: translateY(-100%);
  animation: deslizarAviso 0.5s forwards;
}

@keyframes deslizarAviso {
  to { transform: translateY(0); }
}

.aviso-contenido {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.aviso-icono {
  font-size: 2rem;
  filter: drop-shadow(0 0 5px white);
}

.aviso-escritorio p {
  margin: 0;
  font-size: 1.1rem;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.aviso-escritorio strong {
  color: var(--gold);
  font-weight: 700;
}

.aviso-cerrar {
  background: rgba(255,255,255,0.2);
  border: 2px solid white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: bold;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
  line-height: 1;
}

.aviso-cerrar:hover {
  background: white;
  color: var(--nebula1);
  transform: scale(1.1);
}

.aviso-escritorio.oculto {
  display: none !important;
}

/* ===== RESPONSIVE PARA NUEVAS SECCIONES ===== */
@media (max-width: 768px) {
  .galaxy-types-grid,
  .milkyway-facts-grid,
  .extra-curiosidades-grid {
    grid-template-columns: 1fr;
  }
  
  .fact-item img {
    width: 60px;
    height: 60px;
  }
  
  .mitos-constelaciones-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .planetas-nombres-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 580px) {
  .mitos-constelaciones-grid,
  .planetas-nombres-grid {
    grid-template-columns: 1fr;
  }
  .subsection-title {
    font-size: 1.4rem;
  }
}

/* RESPONSIVE GENERAL */
@media (max-width: 1100px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(5,5,32,0.97);
    backdrop-filter: blur(10px);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    z-index: 999;
  }
  .nav-links.mostrar {
    display: flex;
    max-height: 500px;
  }
  .nav-links > li > a {
    height: 40px;
    line-height: 40px;
    text-align: center;
  }
  .dropdown-menu {
    position: static;
    transform: none;
    min-width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    pointer-events: all;
    box-shadow: none;
    border: none;
    background: transparent;
    transition: max-height 0.3s;
    padding: 0;
  }
  .dropdown:hover .dropdown-menu {
    max-height: 350px;
    overflow-y: auto;
  }
  .dropdown-menu a {
    padding: 8px;
    font-size: 0.75rem;
  }
  .hamburger {
    display: block;
  }
}

@media (max-width: 960px) {
  .galaxy-grid,
  .bh-layout {
    grid-template-columns: 1fr;
  }
  .planets-grid,
  .solar-facts,
  .misiones-grid,
  .glosario-grid,
  .constelaciones-grid,
  .calculadora-resultados {
    grid-template-columns: repeat(2, 1fr);
  }
  .nebula-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .curiosidades-grid {
    grid-template-columns: 1fr;
  }
  .quiz-opciones {
    grid-template-columns: 1fr;
  }
  .sec {
    padding: 60px 20px;
  }
  .noticias-grid {
    grid-template-columns: 1fr;
  }
  .clima-grid {
    grid-template-columns: 1fr;
  }
  .share-section {
    justify-content: center;
    flex-wrap: wrap;
  }
  .luna-grid {
    grid-template-columns: 1fr;
  }
  .luna-datos {
    grid-template-columns: repeat(2, 1fr);
  }
  .fases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .luna-roja-grid {
    grid-template-columns: 1fr;
  }
  .comparador-canvas-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 580px) {
  .planets-grid,
  .solar-facts,
  .misiones-grid,
  .glosario-grid,
  .constelaciones-grid,
  .calculadora-resultados {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }
  .luna-datos {
    grid-template-columns: 1fr;
  }
  .fases-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .hero-desc {
    font-size: 0.9rem;
  }
  .sec {
    padding: 40px 15px;
  }
  .planet-card .planet-desc {
    font-size: 0.75rem;
  }
  .buscador-input {
    padding: 10px 15px;
  }
  .atajos-panel {
    bottom: 10px;
    left: 10px;
  }
  .qr-panel {
    bottom: 10px;
    right: 10px;
  }
  .atajos-toggle,
  .qr-toggle {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  .atajos-contenido {
    max-width: 200px;
    padding: 10px;
  }
  .atajos-contenido li {
    font-size: 0.8rem;
  }
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
  }
  .footer-info {
    text-align: left;
  }
}

/* ===== ESTILOS PARA ANUNCIOS ===== */
.ad-container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 10px;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px dashed var(--nebula1);
  min-height: 90px; /* Evita desplazamientos mientras carga */
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-container ins {
  background: transparent;
}

/* En móviles, reducir márgenes */
@media (max-width: 768px) {
  .ad-container {
    margin: 20px 10px;
  }
}

/* COSMOBOT AI - Esquina inferior derecha, junto al QR */
#cosmobot-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 1600;
  font-family: 'Rajdhani', sans-serif;
}

#cosmobot-button {
  width: 50px;
  height: 50px;
  background: linear-gradient(145deg, #00ffff, #0066ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid white;
  animation: botPulse 2s ease-in-out infinite;
}

#cosmobot-button i {
  color: #0a0a2a;
  font-size: 24px;
}

#cosmobot-button:hover {
  transform: scale(1.15);
  box-shadow: 0 0 40px cyan;
  animation: none;
}

#cosmobot-button:hover i {
  animation: botBounce 0.5s ease infinite;
}

@keyframes botPulse {
  0%, 100% { 
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
    transform: scale(1.05);
  }
}

@keyframes botBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

#cosmobot-chat {
  position: absolute;
  bottom: 65px;
  right: 0;
  width: 300px;
  max-width: 85vw;
  background: rgba(5, 5, 20, 0.98);
  border: 1px solid rgba(0, 255, 255, 0.4);
  border-radius: 15px;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

#cosmobot-chat.mostrar {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

#cosmobot-header {
  background: rgba(5, 5, 32, 0.95);
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--cyan);
  font-weight: bold;
  font-size: 1rem;
  border-bottom: 1px solid rgba(0, 255, 255, 0.3);
  animation: headerSlide 0.4s ease;
}

@keyframes headerSlide {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#cosmobot-close {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.2s ease;
}

#cosmobot-close:hover {
  opacity: 1;
  transform: rotate(90deg);
  color: var(--nebula3);
}

#cosmobot-messages {
  height: 220px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0,0,0,0.3);
}

.bot-message, .user-message {
  max-width: 90%;
  padding: 8px 12px;
  border-radius: 12px;
  line-height: 1.4;
  font-size: 0.9rem;
  word-wrap: break-word;
  animation: messagePop 0.3s ease;
}

@keyframes messagePop {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.bot-message {
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.3);
  align-self: flex-start;
  color: #e0f0ff;
  border-bottom-left-radius: 4px;
  animation-name: messagePopLeft;
}

@keyframes messagePopLeft {
  0% { transform: translateX(-20px) scale(0.8); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

.user-message {
  background: rgba(108, 10, 239, 0.2);
  border: 1px solid rgba(150, 0, 255, 0.4);
  align-self: flex-end;
  color: white;
  border-bottom-right-radius: 4px;
  animation-name: messagePopRight;
}

@keyframes messagePopRight {
  0% { transform: translateX(20px) scale(0.8); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

#cosmobot-input-area {
  display: flex;
  padding: 10px;
  gap: 8px;
  background: rgba(5, 5, 32, 0.95);
  border-top: 1px solid rgba(0, 255, 255, 0.3);
  animation: inputSlide 0.4s ease 0.1s both;
}

@keyframes inputSlide {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#cosmobot-input {
  flex: 1;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--cyan);
  border-radius: 20px;
  padding: 8px 14px;
  color: white;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

#cosmobot-input:focus {
  border-color: var(--nebula3);
  box-shadow: 0 0 15px rgba(239, 10, 108, 0.4);
  transform: scale(1.02);
}

#cosmobot-send {
  background: var(--cyan);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: #0a0a20;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cosmobot-send:hover {
  background: var(--nebula3);
  color: white;
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 0 20px var(--nebula3);
}

#cosmobot-send:active {
  transform: scale(0.95);
}

#cosmobot-thinking {
  color: var(--cyan);
  font-style: italic;
  padding: 6px;
  text-align: center;
  background: rgba(0,0,0,0.5);
  font-size: 0.85rem;
  animation: thinkingPulse 1s ease-in-out infinite;
}

@keyframes thinkingPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

#cosmobot-thinking::after {
  content: '...';
  animation: thinkingDots 1.5s steps(4, end) infinite;
}

@keyframes thinkingDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* Scroll personalizado */
#cosmobot-messages::-webkit-scrollbar {
  width: 4px;
}
#cosmobot-messages::-webkit-scrollbar-track {
  background: rgba(0,255,255,0.1);
}
#cosmobot-messages::-webkit-scrollbar-thumb {
  background: var(--cyan);
  border-radius: 8px;
}
