html,
body {
  height: 95vh;
  margin: 0;
  padding: 0;
}

.container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#gameCards {
  height: 80vh; /* 80% de la altura de la ventana gráfica */
  overflow: auto;
  flex-grow: 1; /* Permite que el contenedor crezca para llenar el espacio disponible */
  scrollbar-width: thin; /* Para navegadores compatibles */
  scrollbar-color: #0d81c2 #333; /* Color de la barra y la pista */
}
/* Para navegadores basados en WebKit */
#gameCards::-webkit-scrollbar {
  width: 12px;
}

#gameCards::-webkit-scrollbar-track {
  background: #333; /* Color de la pista */
}

#gameCards::-webkit-scrollbar-thumb {
  background-color: #888; /* Color de la barra */
  border-radius: 20px; /* Bordes redondeados */
  border: 3px solid #333; /* Espacio alrededor de la barra */
}

body.light-mode {
  background-color: #ffffff;
}
body.dark-mode {
  background-color: #060112;
  color: #ffffff;
}
.card.dark-mode {
  background-color: #32383e;
  color: #ffffff;
}
.card img {
  object-fit: fill;
  height: 180px; /* Ajusta la altura de la imagen */
  width: 100%;
}
@media (max-width: 768px) {
  /* Cuando la pantalla es menor o igual a 768px (tablets y móviles) */
  .card img {
    object-fit: fill;
    height: 150px; /* Ajusta la altura de la imagen */
    width: 100%;
  }
}

.card-footer {
  background-color: inherit;
  border-top: none;
}
.card.animate {
  animation: jump 0.5s ease-out;
}
@keyframes jump {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
.modal-header .progress {
  height: 20px;
  width: 100%;
}
.modal-body .loading-text {
  font-size: 1.2rem;
  text-align: center;
  margin-top: 20px;
}
.modal-content.dark-mode {
  background-color: #495057;
  color: #ffffff;
}

/*
//////////Loader
*/

.loaderPing {
  position: relative;
  height: 40px;
  width: 6px;
  color: #fff;
  animation: paddles 0.75s ease-out infinite;
}
body.light-mode .loaderPing {
  color: #000; /* Color negro para el modo oscuro */
}
.loaderPing:before {
  content: "";
  position: absolute;
  margin: 0 auto;
  left: 0;
  right: 0;
  top: 15px;
  width: 12px;
  height: 12px;
  background-color: greenyellow;
  border-radius: 50%;
  animation: ballbounce 0.6s ease-out infinite;
}

@keyframes paddles {
  0% {
    box-shadow: -25px -10px, 25px 10px;
  }

  50% {
    box-shadow: -25px 8px, 25px -10px;
  }

  100% {
    box-shadow: -25px -10px, 25px 10px;
  }
}

@keyframes ballbounce {
  0% {
    transform: translateX(-20px) scale(1, 1.2);
  }

  25% {
    transform: scale(1.2, 1);
  }

  50% {
    transform: translateX(15px) scale(1, 1.2);
  }

  75% {
    transform: scale(1.2, 1);
  }

  100% {
    transform: translateX(-20px);
  }
}
.container1 {
  --uib-size: 100px;
  --uib-color: #f0f9ff;
  --uib-speed: 2s;
  --uib-bg-opacity: 0.1;
  height: var(--uib-size);
  width: var(--uib-size);
  transform-origin: center;
  overflow: visible;
}

.car {
  fill: none;
  stroke: var(--uib-color);
  stroke-dasharray: 15, 85;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  animation: travel var(--uib-speed) linear infinite;
  will-change: stroke-dasharray, stroke-dashoffset;
  transition: stroke 1s ease;
}

.track {
  stroke: var(--uib-color);
  opacity: var(--uib-bg-opacity);
  transition: stroke 1s ease;
}

@keyframes travel {
  0% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: -100;
  }
}
/* Estilo por defecto (modo claro) */
.container1 .track {
  stroke: #000; /* Color del trazo para el modo claro */
}

.container1 .car {
  stroke: #0855a2; /* Color del trazo para el modo claro */
}

/* Estilo para el modo oscuro */
.dark-mode .container1 .track {
  stroke: #fff; /* Color del trazo para el modo oscuro */
}

.dark-mode .container1 .car {
  stroke: #0855a2; /* Color del trazo para el modo oscuro */
}
/* From Uiverse.io by 3HugaDa3 */
.cosmic-toggle {
  position: relative;
  width: 98px;
  height: 35px;
  transform-style: preserve-3d;
  perspective: 329px;
}

.toggle {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #1a1a2e, #16213e);
  border-radius: 35px;
  transition: 0.5s;
  transform-style: preserve-3d;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5),
    inset 0 0 15px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.cosmos {
  position: absolute;
  inset: 0;
  background: radial-gradient(1px 1px at 10% 10%, #fff 100%, transparent),
    radial-gradient(1px 1px at 20% 20%, #fff 100%, transparent),
    radial-gradient(2px 2px at 30% 30%, #fff 100%, transparent),
    radial-gradient(1px 1px at 40% 40%, #fff 100%, transparent),
    radial-gradient(2px 2px at 50% 50%, #fff 100%, transparent),
    radial-gradient(1px 1px at 60% 60%, #fff 100%, transparent),
    radial-gradient(2px 2px at 70% 70%, #fff 100%, transparent),
    radial-gradient(1px 1px at 80% 80%, #fff 100%, transparent),
    radial-gradient(1px 1px at 90% 90%, #fff 100%, transparent);
  background-size: 200% 200%;
  opacity: 0.1;
  transition: 0.5s;
}

.toggle-orb {
  position: absolute;
  height: 29px;
  width: 30px;
  left: 4px;
  bottom: 4px;
  background: linear-gradient(145deg, #ff6b6b, #4ecdc4);
  border-radius: 50%;
  transition: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-style: preserve-3d;
  z-index: 2;
}

.inner-orb {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #e6e6e6);
  transition: 0.5s;
  overflow: hidden;
}

.inner-orb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(0, 0, 0, 0.1) 10deg,
    transparent 20deg
  );
  animation: patternRotate 10s linear infinite;
}

.ring {
  position: absolute;
  inset: -3px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: 0.5s;
}

.toggle:checked + .slider {
  background: linear-gradient(45deg, #16213e, #1a1a2e);
}

.toggle:checked + .slider .toggle-orb {
  transform: translateX(55px) rotate(360deg);
  background: linear-gradient(145deg, #4ecdc4, #45b7af);
}

.toggle:checked + .slider .inner-orb {
  background: linear-gradient(145deg, #45b7af, #3da89f);
  transform: scale(0.9);
}

.toggle:checked + .slider .ring {
  border-color: rgba(78, 205, 196, 0.3);
  animation: ringPulse 2s infinite;
}

.energy-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(78, 205, 196, 0.5),
    transparent
  );
  transform-origin: left;
  opacity: 0;
  transition: 0.5s;
}

.energy-line:nth-child(1) {
  top: 20%;
  transform: rotate(15deg);
}
.energy-line:nth-child(2) {
  top: 50%;
  transform: rotate(0deg);
}
.energy-line:nth-child(3) {
  top: 80%;
  transform: rotate(-15deg);
}

.toggle:checked + .slider .energy-line {
  opacity: 1;
  animation: energyFlow 2s linear infinite;
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #4ecdc4;
  border-radius: 50%;
  opacity: 0;
}

.toggle:checked + .slider .particle {
  animation: particleBurst 1s ease-out infinite;
}

.particle:nth-child(1) {
  left: 20%;
  animation-delay: 0s;
}
.particle:nth-child(2) {
  left: 40%;
  animation-delay: 0.2s;
}
.particle:nth-child(3) {
  left: 60%;
  animation-delay: 0.4s;
}
.particle:nth-child(4) {
  left: 80%;
  animation-delay: 0.6s;
}
.particle:nth-child(5) {
  left: 30%;
  animation-delay: 0.8s;
}
.particle:nth-child(6) {
  left: 70%;
  animation-delay: 1s;
}

/* Анимации */
@keyframes ringPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.6;
  }
}

@keyframes patternRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes energyFlow {
  0% {
    transform: scaleX(0) translateX(0);
    opacity: 0;
  }
  50% {
    transform: scaleX(1) translateX(50%);
    opacity: 1;
  }
  100% {
    transform: scaleX(0) translateX(100%);
    opacity: 0;
  }
}

@keyframes particleBurst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(
        calc(cos(var(--angle)) * 50px),
        calc(sin(var(--angle)) * 50px)
      )
      scale(0);
    opacity: 0;
  }
}

/* Hover эффекты */
.slider:hover .toggle-orb {
  filter: brightness(1.2);
  box-shadow: 0 0 20px rgba(78, 205, 196, 0.5), 0 0 40px rgba(78, 205, 196, 0.3);
}

.slider:hover .cosmos {
  opacity: 0.2;
  animation: cosmosPan 20s linear infinite;
}

@keyframes cosmosPan {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 200%;
  }
}

/* Активное состояние */
.toggle:active + .slider .toggle-orb {
  transform: scale(0.95);
}

/* 3D эффект при наведении */
.cosmic-toggle:hover .slider {
  transform: rotateX(10deg) rotateY(10deg);
}

.cosmic-toggle:hover .toggle-orb {
  transform: translateZ(10px);
}

/* Тень */
.toggle:checked + .slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--x) var(--y),
    rgba(78, 205, 196, 0.2),
    transparent 50%
  );
  opacity: 0;
  animation: glowFollow 2s linear infinite;
}

@keyframes glowFollow {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.5;
  }
}

.button {
  --stone-50: #fafaf9;
  --stone-800: #292524;
  --yellow-400: #0855a2;

  font-family: "Rubik", sans-serif;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  line-height: 1;
  font-size: 1rem;
  border-radius: 1rem;
  outline: 2px solid transparent;
  outline-offset: 6px;
  color: var(--stone-50);

  &:active {
    outline-color: var(--yellow-400);
  }

  &:focus-visible {
    outline-color: var(--yellow-400);
    outline-style: dashed;
  }

  &::before {
    content: "";
    position: absolute;
    z-index: 0;
    height: 180%;
    max-height: 90px;
    aspect-ratio: 1;
    margin: auto;
    background: white;
    clip-path: polygon(
      100% 50%,
      91.48% 56.57%,
      97.55% 65.45%,
      87.42% 69.07%,
      90.45% 79.39%,
      79.7% 79.7%,
      79.39% 90.45%,
      69.07% 87.42%,
      65.45% 97.55%,
      56.57% 91.48%,
      50% 100%,
      43.43% 91.48%,
      34.55% 97.55%,
      30.93% 87.42%,
      20.61% 90.45%,
      20.3% 79.7%,
      9.55% 79.39%,
      12.58% 69.07%,
      2.45% 65.45%,
      8.52% 56.57%,
      0% 50%,
      8.52% 43.43%,
      2.45% 34.55%,
      12.58% 30.93%,
      9.55% 20.61%,
      20.3% 20.3%,
      20.61% 9.55%,
      30.93% 12.58%,
      34.55% 2.45%,
      43.43% 8.52%,
      50% 0%,
      56.57% 8.52%,
      65.45% 2.45%,
      69.07% 12.58%,
      79.39% 9.55%,
      79.7% 20.3%,
      90.45% 20.61%,
      87.42% 30.93%,
      97.55% 34.55%,
      91.48% 43.43%
    );

    animation: star-rotate 6s linear infinite;
    opacity: 0.5;
  }

  body.light-mode &::before {
    background: rgb(0, 0, 0);
  }
  &:hover::before {
    opacity: 1;
  }

  & > div {
    padding: 2px;
    border-radius: 1rem;
    background-color: var(--yellow-400);
    transform: translate(-4px, -4px);
    transition: all 150ms ease;
    box-shadow: 0.5px 0.5px 0 0 var(--yellow-400), 1px 1px 0 0 var(--yellow-400),
      1.5px 1.5px 0 0 var(--yellow-400), 2px 2px 0 0 var(--yellow-400),
      2.5px 2.5px 0 0 var(--yellow-400), 3px 3px 0 0 var(--yellow-400),
      0 0 0 2px var(--stone-800), 0.5px 0.5px 0 2px var(--stone-800),
      1px 1px 0 2px var(--stone-800), 1.5px 1.5px 0 2px var(--stone-800),
      2px 2px 0 2px var(--stone-800), 2.5px 2.5px 0 2px var(--stone-800),
      3px 3px 0 2px var(--stone-800), 3.5px 3.5px 0 2px var(--stone-800),
      4px 4px 0 2px var(--stone-800), 0 0 0 4px var(--stone-50),
      0.5px 0.5px 0 4px var(--stone-50), 1px 1px 0 4px var(--stone-50),
      1.5px 1.5px 0 4px var(--stone-50), 2px 2px 0 4px var(--stone-50),
      2.5px 2.5px 0 4px var(--stone-50), 3px 3px 0 4px var(--stone-50),
      3.5px 3.5px 0 4px var(--stone-50), 4px 4px 0 4px var(--stone-50);

    .button:hover & {
      transform: translate(0, 0);
      box-shadow: 0 0 0 0 var(--yellow-400), 0 0 0 0 var(--yellow-400),
        0 0 0 0 var(--yellow-400), 0 0 0 0 var(--yellow-400),
        0 0 0 0 var(--yellow-400), 0 0 0 0 var(--yellow-400),
        0 0 0 2px var(--stone-800), 0 0 0 2px var(--stone-800),
        0 0 0 2px var(--stone-800), 0 0 0 2px var(--stone-800),
        0 0 0 2px var(--stone-800), 0 0 0 2px var(--stone-800),
        0 0 0 2px var(--stone-800), 0 0 0 2px var(--stone-800),
        0 0 0 2px var(--stone-800), 0 0 0 4px var(--stone-50),
        0 0 0 4px var(--stone-50), 0 0 0 4px var(--stone-50),
        0 0 0 4px var(--stone-50), 0 0 0 4px var(--stone-50),
        0 0 0 4px var(--stone-50), 0 0 0 4px var(--stone-50),
        0 0 0 4px var(--stone-50), 0 0 0 4px var(--stone-50);
    }

    & > div {
      position: relative;
      pointer-events: none;
      border-radius: calc(1rem - 2px);
      background-color: var(--stone-800);

      &::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 1rem;
        opacity: 0.1;
        background-image: radial-gradient(
            rgb(255 255 255 / 80%) 20%,
            transparent 20%
          ),
          radial-gradient(rgb(255 255 255 / 100%) 20%, transparent 20%);
        background-position: 0 0, 4px 4px;
        background-size: 8px 8px;
        mix-blend-mode: hard-light;
        box-shadow: inset 0 0 0 1px var(--stone-800);
        animation: dots 0.4s infinite linear;
        transition: opacity 150ms ease;
      }

      & > div {
        position: relative;
        display: flex;
        align-items: center;
        padding: 0.7rem 0.9rem;
        gap: 0.25rem;
        filter: drop-shadow(0 -1px 0 var(--stone-800));

        &:hover {
          filter: drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.1));
        }

        &:active {
          transform: translateY(2px);
        }
      }
    }
  }
}

@keyframes star-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes dots {
  0% {
    background-position: 0 0, 4px 4px;
  }
  100% {
    background-position: 8px 0, 12px 4px;
  }
}

@media (prefers-color-scheme: dark) {
  .button {
    &:active,
    &:focus-visible {
      outline-color: var(--yellow-400);
    }
  }
}
.search-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(to right, #5c5c5c, #f5f5f5);
  padding: 30px;
  border-radius: 15px;
  transition: background 0.3s ease;
  perspective: 1000px;
}

.label {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
  transition: transform 0.3s ease, font-size 0.3s ease, color 0.3s ease,
    text-shadow 0.3s ease;
}

.search-input {
  position: relative;
  width: 230px;
  height: 40px;
  padding: 12px;
  border: 2px solid #ccc;
  border-radius: 8px;
  background: linear-gradient(to right, #d9d9d9, #f8f8f8);
  font-size: 16px;
  color: #555;
  outline: none;
  transition: box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, transform 0.3s ease;
  transform-style: preserve-3d;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 5px rgba(0, 0, 0, 0.2) inset; /* Improved box-shadow for a realistic feel */
}

.search-input:focus,
.search-input:not(:placeholder-shown) {
  border-color: #4caf50;
  background: linear-gradient(to right, #c2f0c2, #f0f0f0);
  transform: rotateX(20deg);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 10px rgba(0, 0, 0, 0.2) inset; /* Improved box-shadow on focus */
}

.search-input:focus + .label,
.search-input:not(:placeholder-shown) + .label {
  transform: translateY(-120%) scale(0.8);
  font-size: 12px;
  color: #4caf50;
  text-shadow: 0 0 5px rgba(76, 175, 80, 0.6);
}

.search-input:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1), 0 0 10px rgba(0, 0, 0, 0.2) inset; /* Improved box-shadow on hover */
  background: linear-gradient(to right, #e6e6e6, #f9f9f9);
  border-color: #999;
}

.clear-button {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  color: #999;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.clear-button:hover {
  color: #4caf50;
  transform: scale(1.1);
}

.search-input:not(:focus):not(:placeholder-shown) + .clear-button {
  opacity: 1;
}

.shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-input:focus + .shine {
  opacity: 1;
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease, filter 0.3s ease;
  border-radius: 50%;
}

.search-input:focus + .search-icon {
  color: #4caf50;
  transform: translateY(-50%) scale(1.1);
  filter: drop-shadow(0 0 5px rgba(76, 175, 80, 0.6));
}

@keyframes inputPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.search-input:focus {
  animation: inputPulse 0.5s ease;
}

/* Fondo oscuro con efectos brillantes */
.cyber-modal {
  background: linear-gradient(135deg, #0a0f1b, #1b2537);
  border: 2px solid #0ff;
  border-radius: 10px;
  box-shadow: 0 0 10px #0ff, 0 0 30px #00f, inset 0 0 5px #0ff;
  padding: 20px;
  color: #0ff;
  position: relative;
  overflow: hidden;
}

.cyber-card {
  background: linear-gradient(135deg, #0a0f1b, #1b2537);
  border: 2px solid #0ff;
  border-radius: 10px;
  box-shadow: 0 0 10px #0ff, 0 0 10px #00f, inset 0 0 5px #0ff;
  padding: 20px;
  color: #0ff;
  position: relative;
  overflow: hidden;
}

/* Bordes con efecto neón */
.cyber-modal::before,
.cyber-modal::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, transparent, #0ff, #00f, transparent);
  top: 0;
  left: 0;
  animation: glow-border 2s infinite linear;
}
.cyber-card::before,
.cyber-card::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, transparent, #0ff, #00f, transparent);
  top: 0;
  left: 0;
  animation: glow-border 2s infinite linear;
}
.cyber-modal::after {
  top: auto;
  bottom: 0;
}
.cyber-card::after {
  top: auto;
  bottom: 0;
}

/* Animación del borde */
@keyframes glow-border {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Brillo en los botones */
.cyber-modal .btn-primary {
  background-color: #0ff;
  border-color: #00f;
  color: #000;
  box-shadow: 0 0 10px #0ff, 0 0 20px #00f;
}

.cyber-modal .btn-primary:hover {
  background-color: #00f;
  border-color: #0ff;
  box-shadow: 0 0 15px #0ff, 0 0 25px #00f;
}
.cyber-card .btn-primary {
  background-color: #0ff;
  border-color: #00f;
  color: #000;
  box-shadow: 0 0 10px #0ff, 0 0 20px #00f;
}

.cyber-card .btn-primary:hover {
  background-color: #00f;
  border-color: #0ff;
  box-shadow: 0 0 15px #0ff, 0 0 25px #00f;
}
/* Barra de carga con efecto de escaneo */
.progress-bar {
  box-shadow: 0 0 5px #0ff, 0 0 10px #00f;
}

/* Texto animado */
.loading-text {
  font-size: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
  animation: pulse 1.5s infinite alternate;
}

/* Efecto de pulso */
@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}
.cyber-card {
  min-height: 210px; /* Altura en pantallas grandes */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (max-width: 768px) {
  /* Cuando la pantalla es menor o igual a 768px (tablets y móviles) */
  .cyber-card {
    min-height: 100px; /* Reducir altura en dispositivos móviles */
  }
}
