.home {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding: 32px 28px 42px;
  background: linear-gradient(180deg, #fffaf0 0%, #fff4dc 100%);
}

/* Capas de fondo */
.home__pattern,
.home__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
}

.home__pattern--confetti {
  z-index: 1;
  background-image: url("../assets/img/decoracion/confeti.png");
  background-repeat: repeat;
  background-size: 190px auto;
  background-position: 0 0;
  opacity: 0.09;
}

/* Puntos más suaves para que no saturen */
.home__pattern--dots {
  z-index: 1;
  background-image: url("../assets/img/decoracion/puntos-decorativos.png");
  background-repeat: repeat;
  background-size: 170px auto;
  background-position: 18px 20px;
  opacity: 0.18;
}

/* Partículas móviles suaves */
.home__particles {
  z-index: 1;
  background-image:
    radial-gradient(circle, rgba(255, 103, 154, 0.11) 2px, transparent 3px),
    radial-gradient(circle, rgba(84, 199, 122, 0.11) 2px, transparent 3px),
    radial-gradient(circle, rgba(74, 169, 255, 0.11) 2px, transparent 3px),
    radial-gradient(circle, rgba(250, 195, 57, 0.1) 2px, transparent 3px);
  background-size: 135px 135px, 165px 165px, 185px 185px, 210px 210px;
  background-position: 0 0, 50px 70px, 100px 20px, 30px 110px;
  animation: moveParticles 14s linear infinite;
}

@keyframes moveParticles {
  from {
    background-position: 0 0, 50px 70px, 100px 20px, 30px 110px;
  }

  to {
    background-position: 135px 135px, 215px 235px, 285px 205px, 240px 320px;
  }
}

/* Decoraciones */
.home__cloud,
.home__blob,
.home__star,
.home__shape {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.home__cloud--one {
  width: 145px;
  top: 22px;
  left: 28px;
  opacity: 0.95;
}

.home__cloud--two {
  width: 125px;
  top: 52px;
  right: 30px;
  opacity: 0.92;
}

.home__blob--green {
  width: 220px;
  left: -80px;
  bottom: 0;
  opacity: 0.85;
}

.home__blob--yellow {
  width: 220px;
  right: -70px;
  bottom: 0;
  opacity: 0.82;
}

/* Se ocultan los círculos grandes detrás de los personajes */
.home__shape {
  display: none;
}

/* Estrellitas decorativas, pocas */
.home__star--one {
  width: 42px;
  top: 245px;
  left: 42px;
  opacity: 0.85;
  transform: rotate(-8deg);
}

.home__star--two {
  width: 34px;
  bottom: 68px;
  left: 18px;
  opacity: 0.78;
  transform: rotate(10deg);
}

.home__star--three {
  width: 40px;
  top: 290px;
  right: 42px;
  opacity: 0.84;
  transform: rotate(12deg);
}

.home__star--four {
  width: 38px;
  bottom: 78px;
  right: 310px;
  opacity: 0.8;
  transform: rotate(-10deg);
}

/* Hero */
.home__hero {
  position: relative;
  z-index: 3;
  max-width: 1320px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  align-items: center;
  gap: 20px;
}

.home__character {
  width: 240px;
  filter: drop-shadow(0 16px 18px rgba(80, 60, 40, 0.18));
}

.home__character--left {
  justify-self: end;
}

.home__character--right {
  justify-self: start;
}

/* Caja limpia detrás del título para que no se mezclen puntos */
.home__intro {
  position: relative;
  text-align: center;
  padding: 24px 26px;
  border-radius: 34px;
  background: radial-gradient(
    circle at center,
    rgba(255, 250, 240, 0.98) 0%,
    rgba(255, 250, 240, 0.92) 52%,
    rgba(255, 250, 240, 0.62) 74%,
    rgba(255, 250, 240, 0) 100%
  );
}

.home__badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 10px 22px;
  border-radius: 999px;
  background: #ffffff;
  color: #2d78f5;
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(90, 70, 40, 0.1);
}

.home__title {
  margin: 0 0 16px;
  font-size: clamp(3.3rem, 6vw, 5.6rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -2px;
}

.home__title-part {
  display: inline-block;
}

.home__title-part--blue {
  color: #2d83f2;
}

.home__title-part--orange {
  color: #f7a92d;
}

.home__title-part--green {
  color: #4dbb47;
}

.home__subtitle {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.5;
  color: #2d3850;
  font-weight: 500;
}

/* Sección de juegos */
.games-section {
  position: relative;
  z-index: 3;
  max-width: 1510px;
  margin: 0 auto;
}

/* Caja limpia detrás del texto "Elige un juego" */
.games-section__header {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 24px;
  padding: 18px 42px;
  text-align: center;
  border-radius: 32px;
  background: radial-gradient(
    circle at center,
    rgba(255, 250, 240, 0.98) 0%,
    rgba(255, 250, 240, 0.9) 58%,
    rgba(255, 250, 240, 0.45) 82%,
    rgba(255, 250, 240, 0) 100%
  );
}

.games-section__title {
  margin: 0 0 8px;
  font-size: 2.35rem;
  color: #18324a;
  font-weight: 900;
}

.games-section__title span {
  color: #2871eb;
}

.games-section__text {
  margin: 0;
  color: #5c6472;
  font-size: 1.08rem;
}

/* Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(235px, 1fr));
  gap: 22px;
  align-items: stretch;
}

/* Tarjetas */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 415px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 26px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 28px rgba(83, 67, 45, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 32px rgba(83, 67, 45, 0.18);
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  z-index: 2;
}

.game-card--azul::before {
  background: #3b9cff;
}

.game-card--morado::before {
  background: #a66af5;
}

.game-card--verde::before {
  background: #63c551;
}

.game-card--amarillo::before {
  background: #ffbc39;
}

.game-card--rosado::before {
  background: #ff79aa;
}

.game-card__image-box {
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 248, 231, 0.92);
  padding: 16px 16px 10px;
  border-bottom: 1px solid rgba(232, 221, 200, 0.8);
}

.game-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Placeholder para juegos bloqueados */
.game-card__placeholder {
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 248, 231, 0.62);
  border-bottom: 1px solid rgba(232, 221, 200, 0.8);
}

.game-card__placeholder-circle {
  width: 118px;
  height: 118px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 226, 170, 0.3);
}

.game-card--rosado .game-card__placeholder-circle {
  background: rgba(255, 190, 215, 0.35);
}

.game-card__placeholder-icon {
  font-size: 2.8rem;
  color: #f4b428;
  line-height: 1;
}

.game-card--rosado .game-card__placeholder-icon {
  color: #ff79aa;
}

.game-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 20px;
}

.game-card__tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 800;
  color: #ffffff;
}

.game-card--azul .game-card__tag {
  background: #3b9cff;
}

.game-card--morado .game-card__tag {
  background: #a66af5;
}

.game-card--verde .game-card__tag {
  background: #63c551;
}

.game-card--amarillo .game-card__tag {
  background: #ffbc39;
}

.game-card--rosado .game-card__tag {
  background: #ff79aa;
}

.game-card__title {
  margin: 0 0 10px;
  font-size: 1.14rem;
  line-height: 1.2;
  color: #1f2d3d;
  font-weight: 900;
}

.game-card__description {
  margin: 0 0 18px;
  font-size: 0.98rem;
  line-height: 1.42;
  color: #5d6671;
  flex: 1;
}

.game-card__button {
  width: 100%;
  margin-top: auto;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.game-card__button:hover:not(:disabled) {
  transform: scale(1.02);
  filter: brightness(1.03);
}

.game-card--azul .game-card__button {
  background: #3b9cff;
}

.game-card--morado .game-card__button {
  background: #a66af5;
}

.game-card--verde .game-card__button {
  background: #63c551;
}

.game-card--amarillo .game-card__button {
  background: #ffbc39;
}

.game-card--rosado .game-card__button {
  background: #ff79aa;
}

.game-card__button:disabled {
  background: #d6d0c5;
  cursor: not-allowed;
}

.game-card--locked {
  background: rgba(255, 255, 255, 0.88);
}

/* Footer PUCE */
.home__footer {
  width: 100%;
  padding: 40px 20px;
  margin-top: 40px;
  background: transparent;
  border-top: none;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.home__footer-content {
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.home__footer-logo {
  max-width: 250px;
  height: auto;
  object-fit: contain;
}

.home__footer-text p {
  margin: 4px 0;
  color: #475569;
  font-size: 1.1rem;
  font-weight: bold;
}

.home__footer-link {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 24px;
  background: #004d99;
  color: white;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 4px 0 #003366;
}

.home__footer-link:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #003366;
  background: #003d7a;
}

@media (min-width: 768px) {
  .home__footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .home__footer-logo {
    max-width: 200px;
  }
  .home__footer-text {
    flex: 1;
    margin: 0 30px;
  }
  .home__footer-link {
    margin-top: 0;
  }
}