:root {
  --bg: #0b0c10;
  --fg: #eaeaea;
  --muted: #b8b8b8;
  --card: #16181d;
  --accent: #4ea1ff;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
}

.wrap {
  width: min(960px, 92vw);
  margin: 0 auto;
}

.top {
  background: #111319;
  border-bottom: 1px solid #1e2230;
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.top .logout button {
  background: transparent;
  border: 1px solid #2a3245;
  color: var(--fg);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.top .logout button:hover {
  border-color: var(--accent);
}

.foot {
  border-top: 1px solid #1e2230;
}
.foot .wrap {
  padding: 18px 0;
  color: var(--muted);
}
.tiny {
  font-size: 12px;
}

/* ---------- Stage & blur ---------- */
.stage {
  position: relative;
  min-height: 100vh;
  padding: 0;
}

.center {
  position: relative;
  z-index: 2;
  /* switch from grid to flex column */
  display: flex;
  flex-direction: column;
  align-items: center; /* center horizontally */
  text-align: center;
  min-height: 100vh; /* fill viewport so we can center the buttons */
  padding: 16vh 6vw 14vh;
}

.center h1 {
  margin: 0 0 4px;
  font-size: clamp(26px, 7vw, 42px);
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  text-shadow: 0 0 12px rgba(255, 182, 193, 0.4);
}

.center .sub {
  margin: 0; /* sits directly under the h1 */
  color: var(--muted);
  font-size: clamp(14px, 4vw, 20px);
  line-height: 1.3;
  font-family: "Playfair Display", serif;
  font-style: italic;
}

.blur {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
}

/* ---------- Overlay login card ---------- */
.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 3;
}
.card {
  width: min(420px, 92vw);
  background: var(--card);
  border: 1px solid #23283a;
  border-radius: 16px;
  padding: 22px;
  display: grid;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.card h2 {
  margin: 0 0 8px 0;
  font-size: 20px;
}
.card label {
  font-size: 14px;
  color: var(--muted);
}
.card input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2a3245;
  background: #0d0f14;
  color: var(--fg);
}
.card button {
  margin-top: 6px;
  background: var(--accent);
  color: #061018;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}
.card button:hover {
  filter: brightness(1.05);
}
.card .hint {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 0;
}

/* ---------- Buttons ---------- */
.choice-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 4vw, 18px);

  position: relative;
  top: 15vh; /* move upward by x% of the viewport height */
}

.btn {
  appearance: none;
  padding: clamp(10px, 2.8vw, 14px) clamp(14px, 4.5vw, 20px);
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.08s ease, filter 0.15s ease;
  font-size: clamp(14px, 4.2vw, 18px);
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn-no {
  background: #2a0c0c;
  color: #ffd7d7;
  outline: 2px solid #7b1717;
}
.btn-yes {
  background: #0b2a12;
  color: #d7ffe1;
  outline: 2px solid #1e7b33;
  transition: transform 0.1s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-no:hover {
  filter: brightness(1.08);
}
.btn-yes:hover {
  filter: brightness(1.1);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 16px rgba(46, 204, 113, 0.5);
}

@keyframes btnPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(46, 204, 113, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

.btn-yes:active {
  transform: translateY(2px) scale(0.96);
  box-shadow: 0 0 6px rgba(46, 204, 113, 0.3) inset;
  filter: brightness(0.9);
  animation: btnPulse 0.6s ease-out;
}

.btn,
.choice-row button {
  -webkit-tap-highlight-color: transparent; /* iOS/Android */
}

/* Remove default focus ring on touch devices only */
@media (hover: none) and (pointer: coarse) {
  .btn:focus,
  .btn:active {
    box-shadow: none;
  }
}

/* ---------- Full-screen photo wall ---------- */
.photo-wall {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1; /* behind center content */
  pointer-events: none; /* never block clicks/taps */
  overflow: hidden;
}

/* Heart spots placed by JS with left/top percentages */
.photo-spot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(64px, 14vw, 110px);
  height: clamp(64px, 14vw, 110px);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a3245;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  background: #0d0f14;
}

.photo-spot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.45s ease;
}
.photo-spot img.fade-out {
  opacity: 0;
}
.photo-spot img.fade-in {
  opacity: 1;
}

/* --- Featured rotating photo (bottom center) --- */
.featured-spot {
  position: fixed;
  left: 50%;
  bottom: 6vh; /* lift from bottom a bit */
  transform: translateX(-50%);
  width: clamp(96px, 22vw, 200px);
  height: clamp(96px, 22vw, 200px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #2a3245;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  z-index: 2; /* above background photos, under overlay */
  pointer-events: none; /* never block clicks */
  background: #0d0f14;
}

.featured-spot .featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.featured-spot .featured-img.fade-out {
  opacity: 0;
}
.featured-spot .featured-img.fade-in {
  opacity: 1;
}

.hidden {
  display: none !important;
}

/* soft glow breathing */
.glow {
  animation: glowPulse 2.4s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 10px rgba(255, 170, 200, 0.55));
}
@keyframes glowPulse {
  from {
    filter: drop-shadow(0 0 6px rgba(255, 170, 200, 0.35));
  }
  to {
    filter: drop-shadow(0 0 16px rgba(255, 170, 200, 0.85));
  }
}

/* spark effect on each switch */
.spark {
  position: absolute;
  inset: -25%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 200, 220, 0.6) 35%,
    rgba(255, 180, 210, 0.35) 55%,
    transparent 70%
  );
  pointer-events: none;
  opacity: 0;
  animation: sparkPop 650ms ease-out forwards;
  mix-blend-mode: screen;
}
@keyframes sparkPop {
  0% {
    opacity: 0;
    transform: scale(0.6) rotate(0deg);
  }
  30% {
    opacity: 1;
    transform: scale(1.05) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.35) rotate(12deg);
  }
}

/* ---------- Small-screen tweaks ---------- */
@media (max-width: 480px) {
  .top .wrap {
    padding: 10px 0;
  }
  .card {
    width: min(360px, 92vw);
    padding: 18px;
  }
}
