:root {
  --bg: #fff5f7;
  --accent: #e35d7a;
  --accent-dark: #b8395a;
  --text: #4a2c33;
  --card-shadow: 0 20px 40px rgba(179, 60, 90, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 173, 199, 0.55), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(255, 210, 235, 0.55), transparent 48%),
    radial-gradient(circle at 20% 85%, rgba(255, 197, 168, 0.35), transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(216, 180, 254, 0.3), transparent 50%),
    linear-gradient(160deg, #fff5f7 0%, #ffe9f0 45%, #fff3ea 100%);
  background-attachment: fixed;
}

.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite alternate;
}

.glow span:nth-child(1) {
  width: 280px;
  height: 280px;
  left: 5%;
  top: 10%;
  background: #ffb3c6;
  animation-duration: 22s;
}

.glow span:nth-child(2) {
  width: 220px;
  height: 220px;
  right: 8%;
  top: 25%;
  background: #ffd7ea;
  animation-duration: 26s;
  animation-delay: 2s;
}

.glow span:nth-child(3) {
  width: 260px;
  height: 260px;
  left: 20%;
  bottom: 8%;
  background: #ffcaa8;
  animation-duration: 20s;
  animation-delay: 4s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(30px, -25px) scale(1.15); }
}

/* ---------- Password gate ---------- */

#gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 20%, #ffe3ea 0%, var(--bg) 65%);
  transition: opacity 0.6s ease;
}

#gate.hidden {
  opacity: 0;
  pointer-events: none;
}

.gate-box {
  text-align: center;
  max-width: 320px;
  width: 100%;
}

.gate-hint {
  font-size: 1.4rem;
  margin-bottom: 24px;
  color: var(--accent-dark);
}

#password-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.1rem;
  border: 2px solid #f0c3cf;
  border-radius: 12px;
  outline: none;
  text-align: center;
  letter-spacing: 4px;
  background: #fff;
  color: var(--text);
}

#password-input:focus {
  border-color: var(--accent);
}

#unlock-btn {
  margin-top: 14px;
  width: 100%;
  padding: 14px 16px;
  font-size: 1.05rem;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

#unlock-btn:hover { background: var(--accent-dark); }
#unlock-btn:active { transform: scale(0.98); }

.gate-error {
  margin-top: 14px;
  color: var(--accent-dark);
  font-size: 0.9rem;
}

.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ---------- Story ---------- */

#story {
  scroll-snap-type: y proximity;
  height: 100vh;
  overflow-y: auto;
}

.scene {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 20px;
  text-align: center;
}

.scene p {
  font-size: 1.2rem;
  max-width: 480px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease 0.15s, transform 0.8s ease 0.15s;
}

.scene.visible p {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Finale ---------- */

.finale h1 {
  font-size: 2.6rem;
  color: var(--accent-dark);
  max-width: 600px;
}

.finale-subtext {
  font-size: 1.25rem !important;
  max-width: 520px !important;
}

.finale-actions {
  display: flex;
  gap: 16px;
}

#yes-btn {
  padding: 20px 48px;
  font-size: 1.4rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: background 0.2s ease, transform 0.35s ease;
  transform: scale(1);
}

#yes-btn:hover { background: var(--accent-dark); }

#no-btn {
  padding: 20px 48px;
  font-size: 1.4rem;
  border: 2px solid #f0c3cf;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: left 0.35s ease, top 0.35s ease;
}

/* ---------- Planner ---------- */

.planner {
  width: min(720px, 94vw);
  margin: 0 auto;
  padding: 60px 16px 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.planner-title {
  font-size: 2rem;
  color: var(--accent-dark);
  margin: 0 0 10px;
}

.planner-heading {
  font-size: 1.3rem;
  color: var(--accent-dark);
  margin: 26px 0 4px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  width: 100%;
}

.main-dessert-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  width: 100%;
}

.main-dessert-row .option-grid {
  flex: 1 1 340px;
}

.plus-sign {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-dark);
  flex: 0 0 auto;
}

.dessert-addon {
  width: 96px;
  flex: 0 0 auto;
  padding: 8px;
}

.dessert-addon .food-card-name {
  font-size: 0.72rem;
  line-height: 1.2;
}

.dessert-addon .price {
  font-size: 0.68rem;
}

.food-card {
  border: 3px solid transparent;
  background: #fff;
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.food-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
}

.food-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.food-card .price {
  font-size: 0.85rem;
  color: var(--accent-dark);
}

.food-card:hover { transform: translateY(-4px); }

.food-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(227, 93, 122, 0.25), var(--card-shadow);
}

.drink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  width: 100%;
}

.drink-card {
  border: 2px solid #f0c3cf;
  background: #fff;
  border-radius: 14px;
  padding: 14px 10px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.drink-card .price {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--accent-dark);
}

.drink-card:hover { border-color: var(--accent); }

.drink-card.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.drink-card.selected .price { color: #fff; }

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  width: 100%;
}

.movie-card {
  border: 2px solid #f0c3cf;
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.movie-title { font-weight: 600; }

.movie-card:hover { border-color: var(--accent); }

.movie-card.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.trailer-link {
  font-size: 0.8rem;
  color: var(--accent-dark);
  text-decoration: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 3px 10px;
}

.trailer-link:hover { text-decoration: underline; }

.movie-card.selected .trailer-link {
  color: #fff;
}

.slider-block {
  width: 100%;
  max-width: 420px;
  margin-top: 18px;
  text-align: left;
}

.slider-heading {
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.slider-value { font-weight: 700; }

.heart-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #f0c3cf);
  outline: none;
}

.heart-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 28px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 29'><path d='M23.6 0c-3 0-5.6 1.5-7.6 4.4C14 1.5 11.4 0 8.4 0 3.8 0 0 3.8 0 8.6c0 8.6 10 14.8 16 20.4 6-5.6 16-11.8 16-20.4C32 3.8 28.2 0 23.6 0z' fill='%23e35d7a'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  cursor: pointer;
  border: none;
}

.heart-slider::-moz-range-thumb {
  width: 30px;
  height: 28px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 29'><path d='M23.6 0c-3 0-5.6 1.5-7.6 4.4C14 1.5 11.4 0 8.4 0 3.8 0 0 3.8 0 8.6c0 8.6 10 14.8 16 20.4 6-5.6 16-11.8 16-20.4C32 3.8 28.2 0 23.6 0z' fill='%23e35d7a'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  border: none;
  cursor: pointer;
}

.heart-slider::-moz-range-track {
  background: linear-gradient(90deg, var(--accent), #f0c3cf);
  height: 8px;
  border-radius: 4px;
}

.submit-btn {
  margin-top: 32px;
  padding: 18px 42px;
  font-size: 1.3rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: background 0.2s ease, transform 0.1s ease;
}

.submit-btn:hover { background: var(--accent-dark); }
.submit-btn:active { transform: scale(0.97); }

/* ---------- Summary ---------- */

.summary-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: var(--card-shadow);
  text-align: left;
  max-width: 420px;
  width: 100%;
}

.summary-card p {
  font-size: 1.05rem;
  margin: 8px 0;
}

.summary-card hr {
  border: none;
  border-top: 1px dashed #f0c3cf;
  margin: 16px 0;
}

.summary-total {
  font-size: 1.3rem !important;
  font-weight: 700;
  color: var(--accent-dark);
  text-align: center;
}

/* ---------- Admin ---------- */

.admin-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
}

.admin-view h1 {
  color: var(--accent-dark);
  font-size: 1.8rem;
  max-width: 500px;
}

.hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.heart {
  position: absolute;
  top: -10vh;
  font-size: 1.8rem;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(115vh) rotate(360deg);
    opacity: 0.9;
  }
}
