:root {
  --sky-deep: #05060f;
  --sky-mid: #10132b;
  --accent-pink: #ff8fd6;
  --accent-purple: #b48cff;
  --text-warm: #f5eefc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: radial-gradient(ellipse at top, var(--sky-mid), var(--sky-deep) 70%);
  color: var(--text-warm);
  font-family: Georgia, "Times New Roman", serif;
  overflow-x: hidden;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  text-align: center;
}

.screen.active { display: flex; }

.photo-stack {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.intro-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) saturate(1.05);
}

.photo-a { animation: crossfadeA 9s infinite; }
.photo-b { animation: crossfadeB 9s infinite; }

@keyframes crossfadeA {
  0%, 45% { opacity: 1; }
  50%, 95% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes crossfadeB {
  0%, 45% { opacity: 0; }
  50%, 95% { opacity: 1; }
  100% { opacity: 0; }
}

.tap-hint {
  position: relative;
  z-index: 2;
  margin-top: auto;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.letter {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  font-size: 1.15rem;
  line-height: 1.6;
}

.letter-line {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.letter-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.ghost-btn {
  background: none;
  border: 1px solid var(--accent-purple);
  color: var(--text-warm);
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  align-self: center;
  margin-top: 0.5rem;
}

.invite-question {
  font-size: 1.4rem;
  max-width: 32rem;
  margin-bottom: 2.5rem;
}

.invite-buttons {
  position: relative;
  width: 100%;
  max-width: 26rem;
  height: 10rem;
}

.btn {
  position: absolute;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
}

.btn-yes {
  left: 50%;
  top: 60%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: #1a0f22;
  font-weight: bold;
}

.btn-no {
  left: 50%;
  top: 20%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: 1px solid rgba(245, 238, 252, 0.6);
  color: var(--text-warm);
  transition: left 0.25s ease, top 0.25s ease;
}

.step-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  max-width: 32rem;
}

.step-subtitle {
  font-size: 1rem;
  opacity: 0.75;
  margin-bottom: 1.75rem;
}

.calendar-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(245, 238, 252, 0.12);
  border-radius: 1.25rem;
  padding: 1.25rem;
  width: 100%;
  max-width: 22rem;
  margin: 1.5rem 0 1.75rem;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  font-size: 1.05rem;
}

.cal-nav {
  background: none;
  border: 1px solid rgba(245, 238, 252, 0.3);
  color: var(--text-warm);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.1rem;
  font-family: inherit;
  cursor: pointer;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  text-align: center;
}

.calendar-weekdays span {
  font-size: 0.8rem;
  opacity: 0.6;
  padding: 0.25rem 0;
}

.cal-day {
  aspect-ratio: 1;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-warm);
  border-radius: 0.6rem;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.cal-day:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.cal-day-empty {
  background: transparent;
  cursor: default;
}

.cal-day-past {
  opacity: 0.25;
  cursor: not-allowed;
}

.cal-day-selected {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
  color: #1a0f22;
  font-weight: bold;
}

.ghost-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.movie-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
  max-width: 20rem;
  margin-bottom: 1.75rem;
}

@media (min-width: 480px) {
  .movie-grid { grid-template-columns: repeat(2, 1fr); max-width: 34rem; }
}

@media (min-width: 900px) {
  .movie-grid { grid-template-columns: repeat(3, 1fr); max-width: 54rem; }
}

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(245, 238, 252, 0.12);
  border-radius: 1rem;
  padding: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-warm);
  text-align: left;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card.reveal {
  opacity: 1;
  transform: translateY(0);
}

.movie-card:hover {
  border-color: rgba(180, 140, 255, 0.5);
}

.movie-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0.6rem;
  margin-bottom: 0.6rem;
}

.movie-title {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.movie-meta {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-bottom: 0.15rem;
}

.movie-pick-btn {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--accent-purple);
  border-radius: 999px;
  font-size: 0.85rem;
  align-self: flex-start;
}

.movie-selected-badge {
  display: none;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--accent-pink);
  font-weight: bold;
}

.movie-card-selected {
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 2px var(--accent-pink);
}

.movie-card-selected .movie-pick-btn { display: none; }
.movie-card-selected .movie-selected-badge { display: block; }

.movie-grid-has-selection .movie-card:not(.movie-card-selected) {
  opacity: 0.4;
}

.falling-hearts {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.falling-hearts span {
  position: absolute;
  top: -10%;
  font-size: 1.4rem;
  animation: fall linear forwards;
}

@keyframes fall {
  to { transform: translateY(120vh) rotate(25deg); opacity: 0.2; }
}

.final-message {
  position: relative;
  z-index: 2;
  font-size: 1.3rem;
  line-height: 1.6;
}
