html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #E1022E;
}

.background {
  height: 100%;
  background-image:
    repeating-radial-gradient(
      circle at 50% 58%,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0) 7.5vmin,
      rgba(255, 255, 255, 0.11) 7.8vmin,
      rgba(255, 255, 255, 0) 8.1vmin
    ),
    linear-gradient(180deg, #F0813A 0%, #EE7139 20%, #E73F34 40%, #E4152F 60%, #E1022E 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0px;
  font-family: "Krub-Regular", sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

#container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 6vh 6vw 4vh;
  box-sizing: border-box;
  gap: 3vh;
}

@font-face {
  font-family: "Krub-Regular";
  src: url("../fonts/Krub-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Krub-Bold";
  src: url("../fonts/Krub-Bold.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins-Light";
  src: url("../fonts/Poppins-Light.woff2") format("woff2");
  font-weight: 300;
}

@font-face {
  font-family: "Poppins-ExtraBold";
  src: url("../fonts/Poppins-ExtraBold.woff2") format("woff2");
  font-weight: 800;
}

span {
  font-family: "Krub-Regular", sans-serif;
}

/* Encabezado "JUEGO DE MEMORIA" */
.intro-heading {
  width: 100%;
  flex: 0 0 auto;
  text-align: center;
  color: #ffffff;
  z-index: 5;
  margin-top: 3vh;
}

.intro-heading-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3vw;
  margin-bottom: 0.5vh;
}

.divider {
  flex: 1 1 auto;
  max-width: 18vw;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
}

.intro-heading-sub {
  font-family: "Poppins-Light", sans-serif;
  font-weight: 300;
  font-size: clamp(21px, 3.6vh, 30px);
  letter-spacing: 4px;
  white-space: nowrap;
}

.intro-heading-main {
  margin: 0;
  font-family: "Poppins-ExtraBold", sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 18.5vw, 96px);
  letter-spacing: 0px;
  line-height: 1;
  white-space: nowrap;
}

/* Tarjeta central con efecto de tarjetas apiladas */
.intro-card-stack {
  position: relative;
  width: min(92vw, 480px);
  flex: 0 0 auto;
}

.intro-card-stack::before,
.intro-card-stack::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffffff;
  border-radius: 28px;
}

.intro-card-stack::before {
  transform: rotate(-4deg) translate(-1.5%, 3%);
  opacity: 0.55;
}

.intro-card-stack::after {
  transform: rotate(3deg) translate(1.5%, 1.5%);
  opacity: 0.8;
}

.intro-card {
  position: relative;
  background: #ffffff;
  border-radius: 28px;
  padding: 4.5vh 6vw 4vh;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
  z-index: 2;
}

.intro-card-text {
  margin: 0 0 3.5vh;
  color: #2b2b2b;
  font-family: "Krub-Regular", sans-serif;
  font-size: clamp(15px, 2.3vh, 19px);
  line-height: 1.4;
}

.intro-card-text strong {
  font-family: "Krub-Bold", sans-serif;
}

.tiempo-box {
  position: relative;
  border: 2px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, #F0813A 0%, #E4152F 100%) border-box;
  border-radius: 20px;
  padding: 2.6vh 3vw 2.2vh;
  margin: 1.6vh 0 2.8vh;
}

.tiempo-label-row {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2vw;
  background: #ffffff;
  padding: 0 2.5vw;
  white-space: nowrap;
}

.divider-tiempo {
  background: linear-gradient(90deg, #F0813A 0%, #E4152F 100%);
  height: 2px;
  max-width: 9vw;
}

.tiempo-label {
  font-family: "Krub-Bold", sans-serif;
  color: #E4152F;
  font-size: clamp(15px, 2.2vh, 19px);
  white-space: nowrap;
}

.tiempo-opciones {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2vw;
}

.tiempo-btn {
  flex: 1 1 0;
  border: 2px solid transparent;
  background:
    linear-gradient(#fdf1ec, #fdf1ec) padding-box,
    linear-gradient(90deg, #F0813A 0%, #E4152F 100%) border-box;
  color: #2b2b2b;
  border-radius: 30px;
  padding: 1.4vh 0;
  font-family: "Krub-Bold", sans-serif;
  font-size: clamp(14px, 2vh, 17px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tiempo-btn.active {
  background: linear-gradient(90deg, #F0813A 0%, #E4152F 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(228, 21, 47, 0.35);
}

.comenzar-btn {
  width: 88%;
  margin: 1vh auto 0;
  display: block;
  background: #1c1c1c;
  color: #ffffff;
  border: none;
  border-radius: 40px;
  padding: 2vh 0;
  font-family: "Krub-Bold", sans-serif;
  font-size: clamp(17px, 2.6vh, 22px);
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.comenzar-btn:hover {
  transform: translateY(-2px);
}

.comenzar-btn:active {
  transform: translateY(0);
}

/* Logo Altadis en el pie de página */
.intro-footer {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 5;
}

.altadis-logo {
  width: min(42vw, 200px);
  height: auto;
}

/* Estilos para el mensaje al girar la pantalla */
.girar-pantalla {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 1.5em;
  font-family: "Krub-Bold", sans-serif;
  padding: 20px;
  border-radius: 10px;
  z-index: 100;
  max-width: 80vw;
}

/* Pensado para uso vertical: el aviso de girar pantalla solo debe aparecer
   en tablets/celulares táctiles apoyados en horizontal, nunca en laptop/PC
   (que son naturalmente "horizontales" y no se pueden girar) */
@media screen and (orientation: landscape) and (hover: none) and (pointer: coarse) {
  .girar-pantalla {
    display: flex;
  }

  .background {
    pointer-events: none;
    filter: blur(50px);
  }
}

/* Laptop / PC en horizontal: mismo diseño reescalado en "vh" */
@media screen and (orientation: landscape) and (hover: hover) and (pointer: fine) {
  #container {
    padding: 3vh 4vw;
    gap: 2vh;
  }

  .intro-heading-main {
    font-size: clamp(40px, 9vh, 66px);
  }

  .intro-card-stack {
    width: min(50vw, 460px);
  }

  .intro-card {
    padding: 3vh 4vw 3vh;
  }

  .altadis-logo {
    width: clamp(130px, 16vh, 175px);
  }
}
