/*
  Love Game
  style.css
*/


/* =========================
   RESET
========================= */

* {
  box-sizing: border-box;
}


/* =========================
   BODY
========================= */

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;

  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background:
    radial-gradient(
      circle at 20% 20%,
      #ffb6c9 0%,
      transparent 35%
    ),

    radial-gradient(
      circle at 80% 80%,
      #c9b6ff 0%,
      transparent 35%
    ),

    linear-gradient(
      135deg,
      #fff0f5,
      #f4edff
    );

  overflow: hidden;
}


/* =========================
   GAME
========================= */

.game {
  width: 100%;
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;
}


/* =========================
   LEVEL CARD
========================= */

.level {
  position: relative;

  width: min(
    460px,
    calc(100vw - 40px)
  );

  min-height: 320px;

  padding: 50px 35px;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  text-align: center;

  background:
    rgba(255, 255, 255, 0.72);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border:
    1px solid
    rgba(255, 255, 255, 0.8);

  border-radius: 32px;

  box-shadow:
    0 25px 70px
    rgba(120, 70, 100, 0.18);

  /*
   * Animation lorsque la carte
   * change de position.
   */

  transition:
    left 0.35s
      cubic-bezier(
        0.2,
        0.8,
        0.2,
        1
      ),

    top 0.35s
      cubic-bezier(
        0.2,
        0.8,
        0.2,
        1
      ),

    opacity 0.4s ease,

    transform 0.4s ease;
}


/* =========================
   LEVEL NUMBER
========================= */

.level-number {
  margin-bottom: 18px;

  font-size: 13px;

  font-weight: 700;

  letter-spacing: 2px;

  text-transform: uppercase;

  color: #c05a82;
}


/* =========================
   TITLE
========================= */

h1 {
  margin: 0 0 12px;

  font-size:
    clamp(
      28px,
      7vw,
      42px
    );

  line-height: 1.1;

  color: #2d2027;
}


/* =========================
   SUBTITLE
========================= */

.subtitle {
  margin: 0 0 35px;

  font-size: 16px;

  color: #806d75;
}


/* =========================
   BUTTON CONTAINER
========================= */

.buttons {
  display: flex;

  gap: 16px;

  justify-content: center;

  align-items: center;
}


/* =========================
   BUTTON BASE
========================= */

button {
  border: none;

  border-radius: 999px;

  padding:
    14px 28px;

  font-family: inherit;

  font-size: 16px;

  font-weight: 700;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}


/* =========================
   YES BUTTON
========================= */

.yes {
  color: white;

  background:
    linear-gradient(
      135deg,
      #ff4f81,
      #e93670
    );

  box-shadow:
    0 10px 25px
    rgba(233, 54, 112, 0.3);
}


.yes:hover {
  transform: scale(1.08);

  box-shadow:
    0 14px 30px
    rgba(233, 54, 112, 0.4);
}


/* =========================
   NO BUTTON
========================= */

.no {
  color: #5e4b53;

  background: #f2e9ed;

  box-shadow:
    0 5px 15px
    rgba(100, 70, 80, 0.08);
}


.no:hover {
  transform: scale(1.03);
}


/* =========================
   QUESTION
========================= */

.question {
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}


.question.hidden {
  opacity: 0;

  transform:
    scale(0.8);

  pointer-events: none;
}


/* =========================
   SUCCESS
========================= */

.success {
  position: absolute;

  opacity: 0;

  transform:
    scale(0.8);

  pointer-events: none;

  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}


.success.visible {
  opacity: 1;

  transform:
    scale(1);

  pointer-events: auto;
}


/* =========================
   HEART
========================= */

.heart {
  margin-bottom: 15px;

  font-size: 70px;

  animation:
    heartbeat 1.2s infinite;
}


@keyframes heartbeat {

  0%,
  100% {
    transform:
      scale(1);
  }

  50% {
    transform:
      scale(1.18);
  }

}


/* =========================
   MOBILE
========================= */

@media (max-width: 500px) {

  .game {
    padding: 16px;
  }


  .level {
    width:
      calc(100vw - 32px);

    min-height: 350px;

    padding:
      40px 24px;
  }


  .buttons {
    width: 100%;
  }


  button {
    flex: 1;

    padding:
      14px 20px;
  }

}
