:root {
  --night: #130f24;
  --ink: #20172d;
  --cloud: #fff8ea;
  --gold: #ffd978;
  --sky: #89d7ff;
  --flame: #ff5c2e;
  --ember: #8f1d17;
  --soft: rgba(255, 248, 234, 0.78);
  --line: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--night);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cloud);
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 217, 120, 0.24), transparent 30%),
    linear-gradient(145deg, #dff8ff 0%, #58bce8 25%, #211936 49%, #641618 76%, #ff6c32 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.guest-shell {
  width: min(100% - 22px, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 0 24px;
  display: grid;
  align-items: center;
}

.landing-page,
.vote-page,
.after-page,
.gift-page,
.stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(19, 15, 36, 0.68);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
}

.landing-page {
  overflow: hidden;
}

.landing-visual {
  padding: 12px;
}

.split-sky {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(36, 15, 22, 0.1), transparent 48%),
    linear-gradient(100deg, #7c1818 0%, #ff6430 45%, #f9fbff 46%, #92ddff 100%);
}

.split-sky::before {
  content: "";
  position: absolute;
  left: -12%;
  bottom: -16%;
  width: 72%;
  height: 48%;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, var(--gold), var(--flame));
}

.split-sky::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -10%;
  width: 74%;
  height: 38%;
  border-radius: 48% 48% 0 0;
  background: rgba(255, 248, 234, 0.9);
  box-shadow: -90px -24px 0 rgba(255, 248, 234, 0.82);
}

.side-mark {
  position: absolute;
  z-index: 1;
  bottom: 18px;
  border-radius: 8px;
  padding: 9px 12px;
  color: #17110f;
  background: var(--cloud);
  font-weight: 900;
}

.side-hell {
  left: 16px;
}

.side-heaven {
  right: 16px;
}

.landing-copy,
.auth-panel,
.vote-page,
.after-page,
.gift-page {
  padding: 20px;
}

.date,
.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3rem, 18vw, 5.8rem);
  line-height: 0.88;
}

h2 {
  font-size: clamp(1.35rem, 7vw, 2rem);
}

.intro {
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 1.05rem;
  line-height: 1.45;
}

.auth-panel {
  display: grid;
  gap: 14px;
}

.auth-button,
.email-form button,
.after-action,
.upload-button,
.ghost-button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #211100;
  background: var(--gold);
  font-weight: 900;
  white-space: nowrap;
  text-decoration: none;
}

.google-button {
  color: var(--ink);
  background: var(--cloud);
}

.google-button span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #1f1f1f;
  background: #fff;
  font-weight: 900;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--soft);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.email-form {
  display: grid;
  gap: 12px;
}

.email-form label {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-weight: 800;
}

.email-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--cloud);
  background: rgba(0, 0, 0, 0.25);
  outline: none;
}

.guest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.ghost-button {
  min-height: 42px;
  color: var(--cloud);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line);
}

.ghost-link {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cloud);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 900;
  text-decoration: none;
}

.after-actions {
  display: grid;
  gap: 12px;
}

.after-action {
  width: 100%;
  text-align: center;
}

.after-status {
  text-align: center;
}

.after-logout {
  width: 100%;
  margin-top: 10px;
}

.hidden-upload {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.wide-shell {
  width: min(100% - 22px, 980px);
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.photo-tile {
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.photo-link-tile {
  color: inherit;
  text-decoration: none;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  display: block;
}

.placeholder-tile {
  padding: 16px;
  display: grid;
  align-content: end;
  gap: 8px;
  background:
    linear-gradient(140deg, rgba(255, 92, 46, 0.82), rgba(32, 23, 45, 0.45)),
    linear-gradient(90deg, var(--flame), var(--sky));
}

.placeholder-tile span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.placeholder-tile strong {
  color: var(--cloud);
  font-size: 1.1rem;
  line-height: 1.25;
}

.soft-tile {
  background:
    linear-gradient(140deg, rgba(248, 253, 255, 0.86), rgba(137, 215, 255, 0.72)),
    var(--sky);
}

.soft-tile strong {
  color: var(--ink);
}

.warm-tile {
  background:
    linear-gradient(140deg, rgba(248, 253, 255, 0.9), rgba(137, 215, 255, 0.76)),
    var(--sky);
}

.warm-tile strong {
  color: var(--ink);
}

.gift-page {
  display: grid;
  gap: 18px;
  text-align: center;
}

.gift-page h1 {
  text-align: center;
}

.gift-text {
  margin: 0;
  color: var(--soft);
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  line-height: 1.45;
  text-align: center;
}

.gift-text strong {
  display: block;
  margin-top: 14px;
  color: var(--gold);
  font-size: clamp(1.45rem, 7vw, 2.1rem);
  letter-spacing: 0;
}

.email-list {
  min-height: 260px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
  color: var(--cloud);
  background: rgba(0, 0, 0, 0.25);
  font: 700 0.95rem/1.6 Arial, Helvetica, sans-serif;
  white-space: pre-wrap;
}

.email-export-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.duel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.photo-choice {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: rgba(0, 0, 0, 0.32);
}

.photo-choice img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  display: block;
}

.photo-choice span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border-radius: 8px;
  padding: 7px 10px;
  color: #17110f;
  background: var(--cloud);
  font-weight: 900;
}

.heaven-choice {
  border-color: rgba(137, 215, 255, 0.72);
}

.hell-choice {
  border-color: rgba(255, 92, 46, 0.72);
}

.meter-wrap {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.meter-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--soft);
  font-size: 0.92rem;
  font-weight: 800;
}

.meter-labels strong {
  color: var(--cloud);
}

.meter {
  height: 30px;
  overflow: hidden;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.heaven-bar,
.hell-bar {
  height: 100%;
  transition: width 260ms ease;
}

.heaven-bar {
  width: 50%;
  background: linear-gradient(90deg, #f8fdff, var(--sky));
}

.hell-bar {
  width: 50%;
  background: linear-gradient(90deg, var(--flame), var(--ember));
}

.vote-status {
  min-height: 22px;
  margin: 0;
  color: var(--soft);
  text-align: center;
}

.presentation-body {
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 217, 120, 0.25), transparent 28%),
    linear-gradient(140deg, #e9f8ff 0%, #5fbce8 26%, #24173b 50%, #5b1617 74%, #ff7b34 100%);
}

.presentation-shell {
  width: min(1180px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0;
  display: grid;
}

.stage {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.fullscreen-link {
  justify-self: center;
  text-decoration: none;
}

.presentation-launch {
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(110deg, rgba(240, 251, 255, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.28));
}

.slide-screen {
  position: relative;
  flex: 1;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  color: inherit;
  background:
    linear-gradient(110deg, rgba(240, 251, 255, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.28));
}

.slide-screen img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.42);
}

.slide-screen.has-image img {
  display: block;
}

.slide-screen.has-image .empty-slide {
  display: none;
}

.empty-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
}

.halo {
  color: var(--gold);
  font-size: 4rem;
}

.empty-slide strong {
  font-size: clamp(1.35rem, 3vw, 2.25rem);
}

.empty-slide small {
  color: var(--soft);
  font-size: 1rem;
}

.slide-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(19, 15, 36, 0.74);
  color: var(--cloud);
  font-weight: 800;
}

.fullscreen-body {
  overflow: hidden;
  background: #05040a;
}

.fullscreen-stage {
  width: 100vw;
  height: 100vh;
}

.fullscreen-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 0;
  padding: 0;
  color: var(--cloud);
  background:
    linear-gradient(110deg, rgba(137, 215, 255, 0.18), transparent 46%),
    linear-gradient(145deg, #100b1c, #381018 72%, #ff5c2e);
  cursor: pointer;
}

.google-slides-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: #05040a;
}

#mainSlide {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05040a;
}

.fullscreen-screen.has-image #mainSlide {
  display: block;
}

.fullscreen-screen.has-image .empty-slide {
  display: none;
}

.fullscreen-vote-bar {
  position: absolute;
  z-index: 4;
  left: 6px;
  right: 6px;
  bottom: 16px;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  background: rgba(19, 15, 36, 0.78);
  color: var(--cloud);
  font-weight: 900;
}

.fullscreen-side-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.fullscreen-meter {
  min-width: 0;
  margin: 0;
}

.secret-scene {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  overflow: hidden;
  pointer-events: none;
  color: var(--cloud);
  background: #05040a;
}

.secret-scene.is-active {
  display: block;
}

.secret-hell,
.secret-heaven {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
}

.secret-scene.is-hell .secret-hell,
.secret-scene.is-heaven .secret-heaven {
  display: block;
}

.secret-hell {
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 217, 120, 0.2), transparent 24%),
    linear-gradient(180deg, #110715 0%, #2c0b14 42%, #6e1712 100%);
}

.styx-sky {
  position: absolute;
  inset: 0 0 42%;
  background:
    linear-gradient(180deg, rgba(20, 15, 35, 0.3), rgba(0, 0, 0, 0.66)),
    repeating-linear-gradient(110deg, rgba(255, 92, 46, 0.18) 0 20px, transparent 20px 80px);
  animation: styxSky 5s linear forwards;
}

.styx-river {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -8%;
  height: 55%;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 217, 120, 0.4), transparent 48%),
    repeating-linear-gradient(166deg, #180919 0 18px, #441117 18px 36px, #ff5c2e 36px 40px);
  transform: skewY(-4deg);
  animation: riverDrift 5s linear forwards;
}

.styx-boat {
  position: absolute;
  left: 50%;
  bottom: 27%;
  width: min(34vw, 430px);
  height: min(13vw, 145px);
  transform: translateX(-50%) scale(0.42);
  border-radius: 0 0 48% 48%;
  background: linear-gradient(180deg, #3a1610, #080405);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.55);
  animation: boatToCamera 5s ease-in-out forwards;
}

.styx-boat::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: -22%;
  height: 60%;
  border-radius: 50% 50% 0 0;
  background: rgba(255, 217, 120, 0.28);
}

.styx-boat span {
  position: absolute;
  left: 48%;
  top: -56%;
  width: 10%;
  height: 72%;
  border-radius: 999px 999px 0 0;
  background: #0b0607;
  box-shadow: 28px 24px 0 -12px rgba(255, 217, 120, 0.45);
}

.secret-hell strong,
.secret-heaven strong {
  position: absolute;
  left: 50%;
  bottom: 11%;
  transform: translateX(-50%);
  font-size: clamp(1.4rem, 4vw, 3rem);
  text-align: center;
  opacity: 0;
  animation: secretText 5s ease forwards;
}

.secret-heaven {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.92), transparent 16%),
    linear-gradient(180deg, #ffffff 0%, #b9ecff 38%, #89d7ff 100%);
}

.heaven-path {
  position: absolute;
  left: 50%;
  bottom: -12%;
  width: 50%;
  height: 88%;
  transform: translateX(-50%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  background:
    repeating-linear-gradient(180deg, rgba(255, 217, 120, 0.35) 0 20px, rgba(255, 255, 255, 0.78) 20px 46px);
  animation: heavenWalk 5s ease-in-out forwards;
}

.heaven-gate {
  position: absolute;
  left: 50%;
  top: 16%;
  width: min(58vw, 620px);
  height: min(44vw, 430px);
  transform: translateX(-50%) scale(0.82);
  border: 9px solid rgba(255, 217, 120, 0.95);
  border-bottom: 0;
  border-radius: 48% 48% 0 0;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.78);
  animation: gateApproach 5s ease forwards;
}

.heaven-gate span {
  position: absolute;
  top: 2%;
  bottom: 0;
  width: 50%;
  background: linear-gradient(180deg, rgba(255, 248, 234, 0.94), rgba(137, 215, 255, 0.48));
  border: 3px solid rgba(255, 217, 120, 0.75);
  transform-origin: center left;
  animation: gateOpenLeft 5s ease forwards;
}

.heaven-gate span:first-child {
  left: 0;
  transform-origin: left center;
}

.heaven-gate span:last-child {
  right: 0;
  transform-origin: right center;
  animation-name: gateOpenRight;
}

.saint-peter {
  position: absolute;
  left: 50%;
  top: 24%;
  width: 58px;
  height: 150px;
  transform: translateX(-50%);
  border-radius: 999px 999px 20px 20px;
  background: linear-gradient(180deg, #fff8ea, #ffd978);
  opacity: 0;
  animation: peterAppear 5s ease forwards;
}

.saint-peter::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -34px;
  width: 42px;
  height: 42px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fff8ea;
}

.saint-peter::after {
  content: "";
  position: absolute;
  right: -36px;
  top: 34px;
  width: 42px;
  height: 76px;
  border-right: 6px solid #ffd978;
  border-top: 6px solid #ffd978;
  border-radius: 50%;
}

.secret-scene img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05040a;
  opacity: 0;
  animation: revealSecretPhoto 5s ease forwards;
}

@keyframes styxSky {
  from { transform: scale(1); filter: brightness(0.8); }
  to { transform: scale(1.18); filter: brightness(1.1); }
}

@keyframes riverDrift {
  from { background-position: 0 0; }
  to { background-position: 260px 180px; }
}

@keyframes boatToCamera {
  0% { transform: translateX(-50%) translateY(40px) scale(0.25); opacity: 0.35; }
  38% { transform: translateX(-50%) translateY(0) scale(0.75); opacity: 1; }
  76% { transform: translateX(-50%) translateY(54px) scale(1.85); opacity: 1; }
  100% { transform: translateX(-50%) translateY(110px) scale(2.7); opacity: 0; }
}

@keyframes secretText {
  10%, 62% { opacity: 1; }
  82%, 100% { opacity: 0; }
}

@keyframes heavenWalk {
  from { transform: translateX(-50%) translateY(160px) scale(1.6); }
  to { transform: translateX(-50%) translateY(-80px) scale(0.84); }
}

@keyframes gateApproach {
  0% { transform: translateX(-50%) scale(0.48); opacity: 0.45; }
  55% { transform: translateX(-50%) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) scale(1.4); opacity: 0; }
}

@keyframes gateOpenLeft {
  0%, 56% { transform: rotateY(0deg); }
  100% { transform: rotateY(-78deg); }
}

@keyframes gateOpenRight {
  0%, 56% { transform: rotateY(0deg); }
  100% { transform: rotateY(78deg); }
}

@keyframes peterAppear {
  12%, 58% { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.7); }
}

@keyframes revealSecretPhoto {
  0%, 78% { opacity: 0; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 430px) {
  .guest-shell {
    width: min(100% - 14px, 560px);
    align-items: start;
    padding-top: 7px;
  }

  .landing-copy,
  .auth-panel,
  .vote-page,
  .after-page,
  .gift-page {
    padding: 16px;
  }

  .split-sky {
    min-height: 240px;
  }

  .guest-header {
    align-items: stretch;
    flex-direction: column;
  }

  .ghost-button {
    width: 100%;
  }

  .ghost-link {
    width: 100%;
  }

  .duel {
    grid-template-columns: 1fr;
  }

  .photo-choice,
  .photo-choice img {
    min-height: 180px;
  }

  .photo-gallery {
    grid-template-columns: 1fr;
  }

  .photo-tile,
  .photo-tile img {
    min-height: 230px;
  }
}

@media (max-width: 780px) {
  .presentation-shell {
    width: min(100% - 18px, 1180px);
    padding: 9px 0;
  }

  .stage {
    padding: 14px;
  }

  .stage-top {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-button {
    width: 100%;
  }

  .slide-screen {
    min-height: 360px;
  }
}
