body {
  background: linear-gradient(-45deg, #e8f5e9, #fdf2f8, #e8f5e9, #fce7f3);
  background-size: 400% 400%;
  animation: gradientMovement 12s ease infinite;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #334155;
}

@keyframes gradientMovement {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.fw-black { font-weight: 900; }

@media (min-width: 992px) {
  .navbar-capsule {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 260px;
    height: calc(100vh - 40px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 2rem 1.5rem !important;
    border-radius: 30px;
    margin-top: 0;
    overflow-y: auto;
    z-index: 1030;
    background: #ffffff !important;
    border: 3px solid #fbcfe8 !important;
    box-shadow: 0 12px 30px rgba(244, 114, 182, 0.2) !important;
  }
  
  .navbar-capsule .navbar-brand {
    margin-bottom: 2rem;
    width: 100%;
    text-align: center;
    border-bottom: 2px dashed #fbcfe8;
    padding-bottom: 1rem;
  }

  .navbar-capsule .navbar-collapse {
    width: 100%;
  }

  .navbar-capsule .navbar-nav {
    flex-direction: column !important;
    width: 100%;
    gap: 15px !important;
  }

  .navbar-capsule .nav-link {
    width: 100%;
    padding: 0.8rem 1.2rem !important;
    border-radius: 15px;
    color: #475569 !important;
    transition: all 0.2s ease;
  }

  .navbar-capsule .nav-link:hover {
    background-color: #fce7f3 !important;
    color: #db2777 !important;
    transform: translateX(5px);
  }

  main.container {
    margin-left: 300px !important;
    max-width: calc(100% - 330px) !important;
  }
  
  footer {
    margin-left: 300px !important;
  }
}

@media (max-width: 991.98px) {
  .navbar-capsule {
    background: #ffffff !important;
    border: 2px solid #fbcfe8;
    box-shadow: 0 8px 20px rgba(244, 114, 182, 0.15);
  }
}

@media (max-width: 991.98px) {
  .navbar-capsule {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(15px);
    border-radius: 30px;
    margin-top: 15px;
    border: 2px solid #fbcfe8;
    box-shadow: 0 8px 20px rgba(244, 114, 182, 0.1);
  }
}

.titulazo-kawaii {
  display: inline-block;
  animation: entradaMochi 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate;
}

@keyframes entradaMochi {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.03) translateY(-8px); }
}

.bento-box {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 3px solid #fbcfe8;
  border-radius: 30px;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(244, 114, 182, 0.08);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bento-box:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: #f472b6;
  box-shadow: 0 15px 30px rgba(244, 114, 182, 0.15);
}

.bento-verde {
  border-color: #a7f3d0;
  box-shadow: 0 10px 25px rgba(52, 211, 153, 0.08);
}

.bento-verde:hover {
  border-color: #34d399;
  box-shadow: 0 15px 30px rgba(52, 211, 153, 0.15);
}

.carousel-kawaii {
  border-radius: 30px;
  overflow: hidden;
  border: 4px solid #ffffff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
}

.carousel-inner {
  background: linear-gradient(135deg, #fbcfe8 0%, #a7f3d0 100%);
}

.tabla-apunte-rosa {
  border: 3px solid #fbcfe8;
  border-radius: 20px;
  overflow: hidden;
  background: white;
}

.tabla-apunte-rosa thead {
  background: #fce7f3;
  color: #db2777;
}

.tabla-apunte-rosa tbody tr:nth-child(even) {
  background: #fff5f9;
}

.tabla-apunte-verde {
  border: 3px solid #a7f3d0;
  border-radius: 20px;
  overflow: hidden;
  background: white;
}

.tabla-apunte-verde thead {
  background: #d1fae5;
  color: #065f46;
}

.tabla-apunte-verde tbody tr:nth-child(even) {
  background: #f0fdf4;
}

.badge-var {
  font-family: monospace;
  background: #fce7f3;
  color: #db2777;
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: bold;
}

.badge-var-verde {
  background: #e8f5e9;
  color: #15803d;
}

.pildora-paso {
  background: #ec4899;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(236,72,153,0.3);
}

.video-card {
  border-radius: 24px;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  overflow: hidden;
}

.operacion-bloque {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
  gap: 8px;
}

.operacion-factor {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}

.factor-arriba {
  border-bottom: 2px solid #db2777;
  padding-bottom: 2px;
  width: 100%;
  text-align: center;
}

.factor-abajo {
  padding-top: 2px;
  width: 100%;
  text-align: center;
}

.cancelada {
  text-decoration: line-through;
  color: #ef4444;
  font-weight: 800;
}

.btn-bibliografia {
  width: 100%;
  text-align: left;
  background: #1e293b;
  color: #f472b6;
  border: none;
  padding: 1rem 1.5rem;
  font-weight: 900;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.btn-bibliografia:hover, .btn-bibliografia:not(.collapsed) {
  background: #0f172a;
  color: #f472b6;
}

.btn-bibliografia:focus {
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.4);
}

footer {
  background: #475569;
  color: white;
  border-top: 5px solid #f472b6;
  border-radius: 40px 40px 0 0;
  padding: 2rem 0;
  margin-top: 3rem;
}

.pregunta-contenedor .border-bottom.border-dashed {
  border-bottom-style: dashed !important;
  border-color: #fbcfe8 !important;
}

.opcion-radio {
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 4px;
  transition: background 0.2s ease;
}

.resultado {
  display: none;
}

.respuestas-grupo .correcta.marcada {
  background-color: #d1fae5 !important;
  color: #065f46 !important;
  font-weight: bold;
}

.respuestas-grupo .incorrecta.marcada {
  background-color: #fee2e2 !important;
  color: #991b1b !important;
}