﻿:root {
  --bg: #fffaf5;
  --text: #3f2f3a;
  --card: rgba(255, 245, 248, 0.88);
  --yes: #f06292;
  --yes-hover: #ec407a;
  --no: #fce4ec;
  --no-hover: #f8bbd0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.bg-layer {
  position: fixed;
  inset: -6%;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  filter: blur(7px) brightness(0.7);
  transform: scale(1.08);
  transition: opacity 0.35s ease;
}

.bg-layer.forest {
  background-image: url("./assets/go-out.png");
}

.bg-layer.game {
  background-image: url("./assets/it-takes-two.png");
}

body.bg-forest .bg-layer.forest {
  opacity: 0.92;
}

body.bg-game .bg-layer.game {
  opacity: 0.92;
}

body.bg-both .bg-layer.forest {
  opacity: 0.92;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 56%, transparent 76%);
  mask-image: linear-gradient(to right, #000 0%, #000 56%, transparent 76%);
}

body.bg-both .bg-layer.game {
  opacity: 0.92;
  -webkit-mask-image: linear-gradient(to left, #000 0%, #000 56%, transparent 76%);
  mask-image: linear-gradient(to left, #000 0%, #000 56%, transparent 76%);
}

.ribbon-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

.ribbon {
  position: absolute;
  top: -12vh;
  width: 7px;
  height: 28px;
  border-radius: 999px;
  opacity: 0;
  animation: ribbon-fall 1.8s linear forwards;
}

@keyframes ribbon-fall {
  0% {
    transform: translate(var(--drift-start), 0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translate(var(--drift-end), 120vh) rotate(var(--spin));
    opacity: 0.95;
  }
}

.card {
  width: min(92vw, 760px);
  min-height: 300px;
  background: var(--card);
  border-radius: 24px;
  border: 1px solid #f5c9d7;
  box-shadow: 0 18px 45px rgba(224, 120, 156, 0.2);
  backdrop-filter: blur(2px);
  padding: 38px 26px;
  text-align: center;
  position: relative;
  z-index: 5;
}

h1,
h2 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

p {
  margin: 14px 0 0;
  color: #8e6d7f;
}

.actions {
  margin-top: 30px;
  height: 110px;
  position: relative;
}

.btn {
  border: 0;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 700;
  padding: 12px 30px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.14s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn:active {
  transform: scale(0.96);
}

.yes,
.no {
  position: absolute;
}

.yes {
  background: var(--yes);
  color: #fffafc;
  left: 32%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.yes:hover {
  background: var(--yes-hover);
}

.no {
  background: var(--no);
  color: #7a4058;
  left: 68%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.no:hover {
  background: var(--no-hover);
}

.scene-options {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.scene-option {
  background: #f06292;
  color: #fffafc;
  min-width: 180px;
}

.scene-option:hover {
  background: #ec407a;
}

.invite-form {
  margin: 20px auto 0;
  width: min(100%, 460px);
  text-align: left;
  display: grid;
  gap: 10px;
}

.invite-form label {
  font-weight: 600;
  color: #6d4b5c;
}

.invite-form input,
.invite-form textarea {
  width: 100%;
  border: 1px solid #f2b9cc;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: #4a2f3d;
  background: #fffdfd;
}

.invite-form input:focus,
.invite-form textarea:focus {
  outline: 2px solid #f8bbd0;
  border-color: #f06292;
}

.submit-btn {
  justify-self: center;
  margin-top: 4px;
}

.error {
  margin: -2px 0 0;
  color: #e11d48;
  font-weight: 700;
}

.tip {
  margin-top: 4px;
  color: #7a4058;
}

.hidden {
  display: none;
}

@media (max-width: 520px) {
  .card {
    padding: 26px 18px;
  }

  .btn {
    font-size: 18px;
    padding: 10px 24px;
  }

  .yes {
    left: 34%;
  }

  .no {
    left: 66%;
  }

  .scene-option {
    min-width: 100%;
  }
}

