@font-face {
  font-family: "Minecraft";
  src: url("/static/assets/font.ttf") format("truetype");
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Minecraft", monospace;
}

body {
  height: 100vh;
  overflow: hidden;
  background: black;
}

/* VIDEO BACKGROUND */
.video-container {
  position: fixed;
  inset: 0;
  z-index: -5;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
  transition: opacity 2.5s ease-in-out;
  filter: brightness(0.8) contrast(1.05) saturate(1.2);
}

.bg-video.active {
  opacity: 1;
}

/* DARK OVERLAY */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: -4;
}

/* MENU */
.menu {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  color: white;
  text-align: center;
  z-index: 10;

  user-select: none;
  -webkit-user-select: none;
}

.title {
  font-size: clamp(28px, 4vw, 60px);
  margin-bottom: 25px;
  text-shadow: 0px 4px 20px rgba(0,0,0,0.8);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.buttons {
  position: relative;
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  z-index: 30;
}

/* BUTTONS */
.btn {
  --scale: 1;
  transform: scale(var(--scale));
  font-size: clamp(18px, 2.5vw, 30px);
  padding: 15px 35px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  position: relative;
}

.btn:hover {
  transform: scale(calc(var(--scale) * 1.1));
  filter: brightness(1.15);
}

.yes {
  background: #ff3b7b;
  color: white;
  box-shadow: 0px 0px 25px rgba(255, 59, 123, 0.6);
  z-index: 5;
}

.no {
  background: #444;
  color: white;
  box-shadow: 0px 0px 15px rgba(0,0,0,0.6);
  position: relative;
}

/* hint not clickable */
.hint {
  margin-top: 20px;
  opacity: 0.8;
  font-size: 14px;
  pointer-events: none;
  user-select: none;
}

/* RESULT */
.result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  font-size: clamp(26px, 4vw, 70px);
  color: white;
  text-shadow: 0px 4px 25px rgba(0,0,0,0.85);

  z-index: 10;

  user-select: none;
  -webkit-user-select: none;
}

.result.active {
  pointer-events: auto;
}

.hidden {
  display: none;
}

/* HEARTS */
#hearts {
  position: absolute;
  inset: 0;
  pointer-events: none; /* чтобы клики на детей работали */
  overflow: hidden;
  z-index:20;
}


.heart {
  position: absolute;
  top: -50px;
  font-size: 22px;
  opacity: 1;
  will-change: top, opacity, transform;
  pointer-events: auto;

  animation-name: fall, spin;
  animation-timing-function: linear, linear;
  animation-fill-mode: forwards, forwards;
  animation-duration: 5s, 5s;

  user-select: none;
  -webkit-user-select: none;
}

@keyframes fall {
  0% { top: -50px; opacity: 1; }
  100% { top: 110vh; opacity: 0; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* MOBILE */
@media (max-width: 600px) {
  .buttons {
    flex-direction: column;
    width: 80%;
  }

  .btn {
    width: 100%;
  }

  .no {
    width: auto;
  }
}

.popup {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);

  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.popup.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.popup-box {
  background: rgba(30, 30, 30, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 30px 40px;
  text-align: center;

  box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.6);

  animation: popupShow 0.5s ease forwards;
  transform: scale(1);
  opacity: 1;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.popup.hidden .popup-box {
  transform: scale(0.8);
  opacity: 0;
}

.popup-title {
  font-size: 26px;
  margin-bottom: 20px;
  color: white;
  text-shadow: 0px 0px 15px rgba(255, 105, 180, 0.6);
}

.popup-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}

@keyframes popupShow {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.flash {
  position: fixed;
  inset: 0;
  background: white;
  z-index: 9999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.flash.show {
  opacity: 1;
}

@keyframes explode {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  70% {
    transform: translate(var(--dx), var(--dy)) scale(0.9);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(0.6);
    opacity: 0;
  }
}

.particle {
  position: fixed;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 10000;
  animation: explode var(--duration) ease-out forwards;
  filter: drop-shadow(0 0 5px var(--color)) saturate(150%) brightness(120%);
}

.relationship-menu {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 400px;
  max-width: 90%;
  padding: 12px 25px;
  background: rgba(255, 105, 180, 0.3);
  border: 2px solid rgba(255, 59, 123, 0.6);
  border-radius: 30px;
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 0 0 15px rgba(0,0,0,0.6);
  box-shadow: 0 4px 25px rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  z-index: 10;
  opacity: 0;
  transform: translate(-50%, -20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.relationship-menu.show {
  opacity: 1;
  transform: translateX(-50%);
}

.menu-left, .menu-right {
  font-size: 24px;
  animation: float 1.5s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

.menu-center {
  flex: 1;
  text-align: center;
}
