* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #000;
  overflow-x: hidden;
  font-family: "Cormorant Garamond", "Palatino Linotype", "Times New Roman", serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.video-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  background: #000;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 0;
  overflow: hidden;
}

.content-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  gap: 24px;
}

.hero {
  position: absolute;
  left: 0;
  right: 0;
  top: 40%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 24px;
  transition: top 2.2s ease, transform 2.2s ease;
}

.hero.hero-raised {
  top: 18%;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(20px, 3vh, 32px) clamp(24px, 4vw, 40px);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  transition: height 0.55s ease;
}

.hero-line {
  margin: 0;
  max-width: min(92vw, 980px);
  white-space: pre-line;
  font-family: "Great Vibes", "Cormorant Garamond", Georgia, cursive;
  font-size: clamp(28px, 5.2vw, 58px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: 0.02em;
  text-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(6px) scale(0.995);
  filter: blur(3px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease,
    filter 0.9s ease,
    letter-spacing 0.9s ease;
}

.hero-line.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  letter-spacing: 0.018em;
}

.hero-line.is-hidden {
  opacity: 0;
  transform: translateY(-6px) scale(1.01);
  filter: blur(6px);
  letter-spacing: 0.045em;
}

.bottom-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 0;
  margin-top: auto;
}

.countdown-wrap {
  text-align: center;
  color: #fff;
}

.countdown-label {
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 10px;
}

.countdown {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.countdown-item {
  min-width: 74px;
  padding: 12px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.countdown-number {
  display: block;
  font-size: clamp(22px, 5vw, 34px);
  line-height: 1;
  margin-bottom: 6px;
}

.countdown-text {
  display: block;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.85;
}

.rsvp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  text-decoration: none;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rsvp-btn:active {
  transform: scale(0.98);
}

.music-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  cursor: pointer;
  display: none;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.start-screen {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(2px);
  transition: opacity 0.6s ease;
}

.start-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.start-btn {
  width: 120px;
  height: 120px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, background 0.25s ease;
}

.start-btn:active {
  transform: scale(0.96);
}

.start-label {
  position: absolute;
  margin-top: 150px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Confirm page: full-screen image background */
.img-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #000;
}

.confirm-page .content-inner--center {
  justify-content: center;
  min-height: 100vh;
}

.page-card {
  padding: clamp(24px, 4vw, 40px);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  max-width: min(92vw, 480px);
  width: 100%;
}

.page-title {
  margin: 0 0 20px;
  font-family: "Great Vibes", "Cormorant Garamond", Georgia, cursive;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 500;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.guest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  gap: 12px;
}

.guest-item.selected {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

.guest-name {
  font-size: 17px;
  flex: 1;
  text-align: left;
}

.guest-confirm-btn {
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  border: none;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.guest-confirm-btn:hover {
  background: #fff;
}

.guest-confirm-btn:active {
  transform: scale(0.98);
}

.guest-confirm-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.confirm-loading,
.confirm-error {
  text-align: center;
  padding: 24px;
  opacity: 0.9;
}

.confirm-error {
  color: #ffb3b3;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.back-link:hover {
  opacity: 0.8;
}

@media (max-width: 640px) {
  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content {
    padding: 16px 20px;
  }

  .content-inner {
    min-height: 100vh;
  }

  .countdown {
    gap: 8px;
  }

  .countdown-item {
    min-width: 66px;
    padding: 10px 8px;
  }

  .rsvp-btn {
    width: 100%;
    max-width: 320px;
  }

  .bottom-info {
    padding-bottom: 96px;
  }

  .music-btn {
    top: 12px;
    right: 12px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .countdown-label {
    font-size: 12px;
  }

  .hero-line {
    font-size: clamp(24px, 6.8vw, 42px);
    line-height: 1.18;
  }

  .guest-item {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .guest-name {
    text-align: center;
  }
}
