:root {
  --bs-body-font-family: "Inter", system-ui, sans-serif;
  --brand-blue: #0057a4;
  --brand-yellow: #ffd23f;
  --brand-blue-rgb: 0, 87, 164;
}

/* === ESTILOS GENERALES === */
.text-brand-blue {
  color: var(--brand-blue) !important;
}
.text-brand-yellow {
  color: var(--brand-yellow) !important;
}
.bg-brand-blue {
  background-color: var(--brand-blue) !important;
}
.bg-brand-yellow {
  background-color: var(--brand-yellow) !important;
  color: #000;
}

/* Fondo con canvas de red */
#network-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  transition: background 0.5s ease;
}
[data-bs-theme="dark"] #network-canvas {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Efecto vidrio */
.glass-effect {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Nav pills lateral */
.nav-pills .nav-link {
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 500;
  margin-bottom: 8px;
}
.nav-pills .nav-link.active {
  background-color: var(--brand-blue) !important;
  box-shadow: 0 4px 15px rgba(var(--brand-blue-rgb), 0.3);
  color: #fff !important;
}

/* Cards */
.card {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-scale:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Tabs para series, etc. */
.nav-tabs {
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}
.nav-tabs .nav-link {
  border: none;
  opacity: 0.6;
  font-weight: 600;
  padding: 1rem 1.5rem;
  position: relative;
}
.nav-tabs .nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--brand-blue);
  transition: width 0.3s ease;
}
.nav-tabs .nav-link.active {
  opacity: 1;
  color: var(--brand-blue) !important;
}
.nav-tabs .nav-link.active::after {
  width: 100%;
}

/* Botón flotante de tema */
.theme-toggle-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1060;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}
.theme-toggle-btn:hover {
  transform: scale(1.1) rotate(15deg);
}

/* Animaciones */
.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}

/* Scroller horizontal de tarjetas (videos recomendados, etc.) */
.scrolling-wrapper {
  overflow-x: auto;
  padding: 10px 5px 25px 5px;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
}
.scrolling-card {
  display: inline-block;
  width: 80%;
  white-space: normal;
  vertical-align: top;
  margin-right: 20px;
  transition: transform 0.3s ease;
}
.scrolling-card:hover {
  transform: scale(1.03);
}
@media (min-width: 768px) {
  .scrolling-card {
    width: 40%;
  }
}
@media (min-width: 992px) {
  .scrolling-card {
    width: 28%;
  }
}

/* === ESTILOS DEL MÓDULO DE TEST === */
.grid-nums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  gap: 0.5rem;
}
.mini-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
}
.mini-legend .answered {
  background: var(--bs-primary);
}
.mini-legend .marked {
  background: var(--bs-warning);
}
.mini-legend .pending {
  background: var(--bs-secondary);
}

.option {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.option:hover {
  background-color: var(--bs-tertiary-bg);
}
.option.active {
  background: color-mix(in oklab, var(--brand-blue) 10%, transparent);
  border-color: var(--brand-blue) !important;
}
.option.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand-blue);
  border-top-left-radius: inherit;
  border-bottom-left-radius: inherit;
}

/* Resultados del test */
.rez-score {
  font-weight: 900;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  color: var(--brand-blue);
}
.rez-sub {
  color: var(--bs-secondary-color);
  font-weight: 500;
  font-size: 1.1rem;
}
.answer-card {
  border-left: 5px solid transparent;
}
.answer-card.correct {
  border-left-color: var(--bs-success);
  background-color: rgba(var(--bs-success-rgb), 0.05);
}
.answer-card.incorrect {
  border-left-color: var(--bs-danger);
  background-color: rgba(var(--bs-danger-rgb), 0.05);
}
.rez-correct {
  font-weight: 700;
}

/* Botón IA VIP */
.btn-ia-vip {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  color: var(--bs-body-color);
  transition: all 0.2s ease;
}
.btn-ia-vip:hover {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
  transform: scale(1.1);
}

/* Tarjeta VIP animada */
.vip-activo-card .pulsate-star {
  animation: pulsate 1.5s infinite ease-in-out;
}
@keyframes pulsate {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}

/* Radios con estilo list-group-item */
.form-check-label.list-group-item {
  cursor: pointer;
}
.form-check-label.list-group-item:hover {
  background-color: var(--bs-tertiary-bg);
}
/* --- Estilos del Botón Súper Cargado --- */
.btn-super-cta {
  position: relative;
  background: linear-gradient(
    45deg,
    #ffc107,
    #ff9800
  ); /* Gradiente Warning mejorado */
  border: none;
  color: #000; /* Texto oscuro para contraste con fondo amarillo */
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 15px 40px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1;
}

/* Efecto al pasar el mouse (Hover) */
.btn-super-cta:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 152, 0, 0.6);
  color: #000;
}

/* Brillo interno animado */
.btn-super-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  transition: 0.5s;
  z-index: -1;
}

.btn-super-cta:hover::before {
  left: 100%;
}

/* --- Animación de las Estrellas (bi-stars) --- */

/* Contenedor de iconos para alineación */
.icon-container {
  display: inline-block;
  position: relative;
}

/* Animación para el icono izquierdo */
.star-left {
  animation: float-stars 2s infinite ease-in-out alternate;
  font-size: 1.2rem;
  margin-right: 8px;
  display: inline-block;
  /* Forzamos un color oscuro o rojizo para que se vea sobre el amarillo, 
               o usamos text-white con sombra si el fondo fuera oscuro. 
               Aquí usamos un naranja oscuro para mantener el tono "warning" pero visible. */
  color: #b71c1c;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Animación para el icono derecho */
.star-right {
  animation: spin-pulse 3s infinite linear;
  font-size: 1.4rem;
  margin-left: 8px;
  display: inline-block;
  color: #b71c1c;
}

/* Keyframes: Flotar suavemente */
@keyframes float-stars {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-3px) scale(1.2);
  }
}

/* Keyframes: Girar y pulsar */
@keyframes spin-pulse {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.3);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* Partículas extra (destellos) en el fondo del botón */
.btn-super-cta .sparkle {
  position: absolute;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #fff 10%, transparent 60%);
  opacity: 0;
  animation: sparkle-anim 2s infinite;
}
.btn-super-cta .sparkle:nth-child(1) {
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}
.btn-super-cta .sparkle:nth-child(2) {
  bottom: 10%;
  right: 20%;
  animation-delay: 1s;
}

@keyframes sparkle-anim {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}
