:root {
  --bg: #140816;
  --bg-soft: #28142c;
  --card: rgba(28, 10, 31, 0.78);
  --card-strong: rgba(44, 18, 42, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --text: #fff7fb;
  --muted: #f4d8e4;
  --accent: #ff6f91;
  --accent-2: #ffd166;
  --accent-3: #ffb3c6;
  --success: #b8ffcf;
  --danger: #ffd2dd;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 179, 198, 0.16), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 111, 145, 0.12), transparent 28%),
    linear-gradient(135deg, #120612 0%, #220d24 52%, #3a1432 100%);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  position: relative;
  isolation: isolate;
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.card {
  width: 100%;
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(16px);
  border-radius: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.08), transparent 36%),
    radial-gradient(circle at top right, rgba(255, 209, 102, 0.14), transparent 22%);
  pointer-events: none;
}

.login-card {
  max-width: 720px;
  padding: 3rem;
  text-align: center;
}

.story-card,
.finale-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2.4rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-2);
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  line-height: 1.06;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.lede,
.shayari,
.reveal-text p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.login-form {
  margin-top: 2rem;
  display: grid;
  gap: 0.9rem;
}

.login-form label {
  font-size: 0.95rem;
  text-align: left;
  color: var(--accent-3);
}

.input-wrap {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.2rem;
}

.input-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 1rem 1.2rem;
  font-size: 1rem;
}

.input-wrap input::placeholder {
  color: rgba(255, 247, 251, 0.6);
}

.primary-btn,
.ghost-btn,
.heart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 56px;
  padding: 0.95rem 1.4rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.primary-btn {
  color: #2a1019;
  background: linear-gradient(135deg, var(--accent-2), #ff9f80 55%, var(--accent));
  box-shadow: 0 16px 30px rgba(255, 111, 145, 0.28);
}

.ghost-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.heart-button {
  width: 170px;
  height: 150px;
  padding: 0;
  color: white;
  background:
    radial-gradient(circle at 30% 30%, #ff9fb6, transparent 38%),
    linear-gradient(135deg, #ff4d79, #ff7997 55%, #ff5e8f);
  clip-path: path("M 85 145 C 45 120 8 88 8 48 C 8 18 30 0 53 0 C 70 0 81 10 85 20 C 89 10 100 0 117 0 C 140 0 162 18 162 48 C 162 88 125 120 85 145 Z");
  box-shadow: 0 18px 34px rgba(255, 77, 121, 0.35);
}

.primary-btn:hover,
.ghost-btn:hover,
.heart-button:hover {
  transform: translateY(-2px) scale(1.01);
}

.form-message {
  min-height: 1.3rem;
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--success);
}

.mini-note {
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.mini-note span {
  color: var(--accent-2);
}

.story-copy,
.finale-copy {
  position: relative;
  z-index: 1;
}

.reveal-panel,
.finale-media {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
}

.reveal-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  padding: 1.5rem;
  place-items: center;
  background: rgba(15, 6, 18, 0.82);
  backdrop-filter: blur(14px);
}

.reveal-panel:not([hidden]) {
  display: grid;
}

.reveal-box {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 28px;
  background: var(--card-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.photo-frame {
  border-radius: 28px;
  min-height: 280px;
  object-fit: cover;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
}

.photo-frame.tall {
  min-height: 440px;
}

audio {
  width: 100%;
  filter: sepia(0.1) saturate(0.9);
}

.finale-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.close-btn {
  justify-self: start;
}

.aurora {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.38;
  z-index: -1;
  animation: drift 12s ease-in-out infinite alternate;
}

.aurora-left {
  left: -10rem;
  top: -8rem;
  background: rgba(255, 111, 145, 0.32);
}

.aurora-right {
  right: -8rem;
  bottom: -10rem;
  background: rgba(255, 209, 102, 0.24);
  animation-duration: 15s;
}

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

.falling-heart {
  position: absolute;
  top: -10vh;
  color: rgba(255, 210, 221, 0.85);
  font-size: 1.1rem;
  animation: fall linear forwards;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(2rem, 1.5rem, 0) scale(1.1);
  }
}

@keyframes fall {
  to {
    transform: translate3d(0, 115vh, 0) rotate(240deg);
    opacity: 0.1;
  }
}

@media (max-width: 900px) {
  .story-card,
  .finale-card {
    grid-template-columns: 1fr;
  }

  .login-card,
  .story-card,
  .finale-card {
    padding: 1.5rem;
  }

  .reveal-box {
    grid-template-columns: 1fr;
  }

  .heart-button {
    margin-inline: auto;
  }
}

@media (max-width: 600px) {
  .shell {
    width: min(100%, calc(100% - 1rem));
    padding: 1rem 0;
  }

  .card,
  .login-card,
  .story-card,
  .finale-card {
    border-radius: 24px;
  }

  .login-card,
  .story-card,
  .finale-card {
    padding: 1.2rem;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  h2 {
    font-size: clamp(1.2rem, 6vw, 1.6rem);
  }

  .lede,
  .shayari,
  .reveal-text p {
    font-size: 0.96rem;
    line-height: 1.7;
  }

  .heart-button {
    width: 136px;
    height: 120px;
  }

  .reveal-panel {
    padding: 0.75rem;
  }

  .reveal-box {
    max-height: 90vh;
    overflow-y: auto;
    padding: 0.85rem;
  }

  .photo-frame {
    min-height: 220px;
  }

  .photo-frame.tall {
    min-height: 300px;
  }

  .finale-actions {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .aurora {
    width: 22rem;
    height: 22rem;
  }
}

@media (max-width: 380px) {
  .login-card,
  .story-card,
  .finale-card {
    padding: 1rem;
  }

  .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  h1 {
    font-size: 1.8rem;
  }

  .heart-button {
    width: 122px;
    height: 108px;
  }
}
