/* Estilo del slider */
.switch {
  position: relative;
  width: 100px;
  height: 40px;
}

.switch label {
  width: 100px;
  height: 40px;
  position: relative;
  display: block;
  background: #555555;
  border-radius: 200px;
  box-shadow: 0px 5px 15px rgba(88, 88, 88, 0.4);
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.switch label::after {
  content: "";
  width: 32px;
  height: 32px;
  position: absolute;
  top: 4px;
  left: 4px;
  background: linear-gradient(180deg, #777, #3a3a3a);
  border-radius: 50%;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
  transition: 0.3s ease-in-out;
}

.switch input {
  width: 0;
  height: 0;
  visibility: hidden;
}

.switch input:checked + label {
  background-color: #dfdfdf;
}

.switch input:checked + label::after {
  left: 95px;
  transform: translateX(-100%);
  background: linear-gradient(180deg, #ffcc89, #d8860b);
}

.switch label span {
  position: absolute;
  top: 10px;
  z-index: 10;
  font-size: 20px;
  transition: color 0.3s ease-in-out;
}

.switch label .sun {
  left: 10px;
  color: white;
}

.switch label .moon {
  right: 10px;
  color: #7e7e7e;
}

.switch input:checked + label .sun {
  color: #7e7e7e;
}

.switch input:checked + label .moon {
  color: #fff;
}

/* MODO CLARO (Light Mode) */
.iconoInterrogante {
  color: white;
}

body.lightMode {
  background: linear-gradient(135deg, #b3e5fc, #e1f5fe, #b3e5fc);
  background-size: 200% 200%;
  animation: fondoAnimado 8s infinite alternate ease-in-out;
  color: rgb(41, 41, 41);
}

body.lightMode .pantalla-inicio {
  background: linear-gradient(
    to bottom,
    rgba(228, 243, 243, 0.9),
    rgba(186, 233, 240, 0.7)
  );
  box-shadow: 0 0 20px rgba(0, 204, 255, 0.3);
}

body.lightMode .pantalla-inicio input {
  background: #fcfcfc;
  color: #333;
}

body.lightMode .pantalla-inicio input:focus {
  background: #fcfcfc;
}

body.lightMode .pantalla-inicio input:not(:focus):valid {
  background-color: #fcfcfc;
}

body.lightMode .pantalla-inicio {
  background: linear-gradient(135deg, #c2e9fb, #a1c4fd);
  animation: fondoAnimado 10s infinite alternate ease-in-out;
  box-shadow: 0 0 30px rgba(0, 170, 255, 0.5);
}

body.lightMode .info p {
  background: #eef8ff;
  color: rgb(41, 41, 41);
  border: 1px solid #474747;
}

body.lightMode .container {
  background: rgba(240, 250, 255, 0.9);
  box-shadow: 0 4px 20px rgba(0, 170, 255, 0.3);
}

body.lightMode .contenedorJuego {
  background: rgba(220, 245, 255, 0.85);
}

body.lightMode .carta {
  background: #f5a484;
}

body.lightMode .carta .front {
  background: linear-gradient(135deg, #5db0f5, #b0c4de);
}

body.lightMode .carta .back {
  background: linear-gradient(135deg, #ff7e5f, #feb47b);
}

body.lightMode .carta.flipped {
  background: #83d1f5;
}

body.lightMode .carta.pareja {
  box-shadow: 0 0 20px rgba(255, 255, 255, 1), 0 0 30px rgb(104, 240, 115);
}

body.lightMode .ranking {
  background-color: rgba(147, 212, 241, 0.9);
  box-shadow: 0 4px 20px rgba(81, 214, 247, 0.5);
  color: #222;
}

body.lightMode .ranking li {
  background-color: rgb(187, 230, 250);
}

body.lightMode #mensajeGanador {
  color: #333;
  background: rgba(233, 245, 244, 0.95);
  opacity: 1;
  box-shadow: 0 0 20px rgba(164, 255, 255, 0.3);
}

body.lightMode #mensajeGanador.ganador {
  border-color: #00ff00;
  box-shadow: 0 0 20px rgba(255, 255, 255, 1), 0 0 30px rgba(0, 255, 0, 1);
  animation: pulso 1s infinite;
}

body.lightMode #mensajeGanador.perdedor {
  border-color: #ff0000;
  box-shadow: 0 0 20px rgba(255, 255, 255, 1), 0 0 30px rgba(255, 0, 0, 1);
  animation: vibracion 0.5s infinite;
}

body.lightMode #dificultad option {
  background-color: #e7e7e7;
  color: #333;
}

body.lightMode #warningMessage {
  background: #c6efffea;
  color: #333;
}
