/* ── Clean Apple-like Background ─────────────────────────────────────────── */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f5f7;
  background-image: linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
  min-height: 100vh;
  color: #1d1d1f;
  text-align: center;
}

/* Faint Heart Pattern Background (non-admin pages only) */
body:not(.admin-page) {
  /* Stack the pattern on top of the gradient */
  background-image:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150"><text y="40" font-size="20" fill="rgba(255,45,85,0.07)">❤️</text></svg>'),
    linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
  background-size: 120px 120px, auto;
  animation: bg-pan 45s linear infinite;
}

/* ── Modern Invite Container ──────────────────────────────────────────────── */
.modern-invite {
  max-width: 420px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  position: relative;
}

/* ── Main Site Title ──────────────────────────────────────────────────────── */
.site-header {
  padding: 1rem 0;
  margin-bottom: 1rem;
}
.site-title {
  font-size: clamp(2.2rem, 8vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: transparent;
  background-image: linear-gradient(135deg, #ff2d55, #ff9500, #ffcc00, #ff6b9d, #af52de, #5856d6);
  -webkit-background-clip: text;
  background-clip: text;
  background-size: 300% 300%;
  animation: gradient-border-flow 8s ease-in-out infinite;
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}
@keyframes matterFloat {
  0% { transform: translateX(0px) translateY(0px) rotate(0deg); opacity: 0.7; }
  25% { transform: translateX(15px) translateY(-20px) rotate(5deg); opacity: 0.9; }
  50% { transform: translateX(-10px) translateY(-35px) rotate(-3deg); opacity: 1; }
  75% { transform: translateX(20px) translateY(-15px) rotate(8deg); opacity: 0.8; }
  100% { transform: translateX(0px) translateY(0px) rotate(0deg); opacity: 0.7; }
}
@keyframes gradient-border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes matterDrift {
  0% { transform: translateX(0px) translateY(0px) rotate(0deg) scale(1); }
  20% { transform: translateX(-25px) translateY(-10px) rotate(-15deg) scale(1.1); }
  40% { transform: translateX(30px) translateY(-25px) rotate(10deg) scale(0.9); }
  60% { transform: translateX(-15px) translateY(-40px) rotate(-8deg) scale(1.2); }
  80% { transform: translateX(25px) translateY(-20px) rotate(12deg) scale(0.8); }
  100% { transform: translateX(0px) translateY(0px) rotate(0deg) scale(1); }
}
@keyframes orbitalFloat {
  0% { transform: translateX(0px) translateY(0px) rotate(0deg); }
  25% { transform: translateX(40px) translateY(-30px) rotate(90deg); }
  50% { transform: translateX(0px) translateY(-60px) rotate(180deg); }
  75% { transform: translateX(-40px) translateY(-30px) rotate(270deg); }
  100% { transform: translateX(0px) translateY(0px) rotate(360deg); }
}
@keyframes bg-pan {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}
.fade-in {
  animation: fadeIn 0.8s ease both;
}

/* ── Floating Balloons (Far from Content) ────────────────────────────────── */

/* Only show animations on non-admin pages */
body:not(.admin-page) .party-decoration::before,
body:not(.admin-page) .party-decoration::after {
  content: '🎈';
  position: fixed;
  font-size: 2.5rem;
  pointer-events: none;
  z-index: 1;
  animation-iteration-count: infinite;
}
body:not(.admin-page) .party-decoration::before {
  top: 15%;
  left: 2%;
  animation: matterFloat 8s ease-in-out -2s;
}
body:not(.admin-page) .party-decoration::after {
  top: 65%;
  left: 1.5%;
  animation: matterDrift 12s ease-in-out -5s;
}

/* Right side balloons */
body:not(.admin-page) .modern-invite::before,
body:not(.admin-page) .modern-invite::after {
  content: '🎈';
  position: fixed;
  font-size: 2.2rem;
  animation-iteration-count: infinite;
  pointer-events: none;
  z-index: 1;
}
body:not(.admin-page) .modern-invite::before {
  top: 20%;
  right: 2%;
  animation: matterFloat 10s ease-in-out -3s;
}
body:not(.admin-page) .modern-invite::after {
  top: 75%;
  right: 1%;
  animation: orbitalFloat 15s ease-in-out -7s;
}

/* More side balloons */
body:not(.admin-page) body::before,
body:not(.admin-page) body::after {
  content: '🎈';
  position: fixed;
  font-size: 2rem;
  animation-iteration-count: infinite;
  pointer-events: none;
  z-index: 1;
}
body:not(.admin-page) body::before {
  top: 45%;
  left: 0.5%;
  animation: matterDrift 9s ease-in-out -1s;
}
body:not(.admin-page) body::after {
  top: 85%;
  right: 2.5%;
  animation: matterFloat 11s ease-in-out -6s;
}

/* Extra side balloons for full effect */
body:not(.admin-page) html::before,
body:not(.admin-page) html::after {
  content: '🎈';
  position: fixed;
  font-size: 1.8rem;
  animation-iteration-count: infinite;
  pointer-events: none;
  z-index: 1;
}
body:not(.admin-page) html::before {
  top: 30%;
  left: 1%;
  animation: orbitalFloat 14s ease-in-out -4s;
}
body:not(.admin-page) html::after {
  top: 55%;
  right: 1.5%;
  animation: matterFloat 9s ease-in-out -8s;
}

/* ── Clean Invitation Card ───────────────────────────────────────────────── */
.invitation-card {
  border-radius: 24px;
  padding: 2.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  position: relative;
  backdrop-filter: blur(20px);

  /* Colorful Apple-style animated border */
  border: 2px solid transparent;
  background-image: linear-gradient(white, white), linear-gradient(135deg, #ff2d55, #ff9500, #ffcc00, #ff6b9d, #af52de, #5856d6);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  background-size: auto, 300% 300%;
  animation: gradient-border-flow 8s ease-in-out infinite;
}

/* ── Clean Header ─────────────────────────────────────────────────────────── */
.invite-header {
  margin-bottom: 3rem;
}
.invite-subtitle {
  font-size: 0.9rem;
  color: #86868b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0 0 1rem 0;
}
.guest-name-section {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.name-container {
  position: relative;
  display: inline-block;
  min-width: 200px;
}
.editable-name {
  color: #ff2d55;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-block;
  min-height: 1.2em;
  line-height: 1.1;
  border-radius: 8px;
  padding: 2px 8px;
}
.editable-name:hover {
  background-color: rgba(255, 45, 85, 0.1);
  color: #e6003a;
}
.name-editor {
  font-size: clamp(1.8rem, 7vw, 3rem);
  font-weight: 600;
  color: #ff2d55;
  background: #ffffff;
  border: 2px solid #ff2d55;
  border-radius: 12px;
  padding: 0.5rem 1rem;
  text-align: center;
  font-family: inherit;
  display: none;
  visibility: hidden;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 220px;
  box-sizing: border-box;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(255, 45, 85, 0.1);
}
.name-editor:focus {
  outline: none;
  border-color: #ff2d55;
  box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.2);
}

/* ── Clean Event Details ──────────────────────────────────────────────────── */
.event-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 3rem 0;
}
.detail-card {
  background: #f5f5f7;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}
.detail-card:hover {
  background: #f0f0f2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.detail-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 45, 85, 0.1);
  border-radius: 12px;
}
.detail-content {
  flex: 1;
  text-align: left;
}
.detail-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}
.detail-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0.25rem 0;
}
.detail-time, .detail-address {
  font-size: 0.95rem;
  color: #86868b;
  font-weight: 400;
}

/* ── Clean RSVP Section ───────────────────────────────────────────────────── */
.rsvp-section {
  margin-top: 3rem;
}
.rsvp-section h3 {
  font-size: 1.3rem;
  color: #1d1d1f;
  margin-bottom: 2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.response-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
  font-size: 1rem;
}
.btn-icon {
  font-size: 1.2rem;
}
.btn-text {
  font-weight: 500;
}
.btn-yes {
  background: #ff2d55;
  color: white;
  box-shadow: 0 2px 8px rgba(255, 45, 85, 0.2);
}
.btn-yes:hover {
  background: #e6003a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 45, 85, 0.3);
}
.btn-no {
  background: #f5f5f7;
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.btn-no:hover {
  background: #e5e5ea;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ── Subtle Fun Message ───────────────────────────────────────────────────── */
.fun-message {
  margin-top: 3rem;
  font-size: 1rem;
  color: #86868b;
  font-weight: 400;
}
.fun-message p {
  margin: 0;
  animation: float 4s ease-in-out infinite;
}

/* ── Mobile Overrides ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .modern-invite {
    padding: 1rem 0.5rem;
  }
  .invitation-card {
    padding: 1.5rem;
    border-radius: 20px;
  }
  .event-details {
    gap: 0.8rem;
  }
  .detail-card {
    flex-direction: column;
    text-align: center;
    padding: 1.2rem;
  }
  .detail-content {
    text-align: center;
  }
  .response-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  .btn {
    width: 100%;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .invitation-card {
    margin: 0.5rem 0;
    padding: 1rem;
  }
  .guest-name-section {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
    line-height: 1.2;
  }
  .name-editor {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
    min-width: 180px;
    padding: 0.4rem 0.8rem;
  }
  .detail-card {
    padding: 1rem;
  }
  .detail-icon {
    font-size: 2rem;
  }
}

/* ── Thanks Page Styles ───────────────────────────────────────────────────── */
.thanks-page h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  margin: 2rem 0 1rem;
}
.thanks-page p {
  font-size: clamp(1rem, 4vw, 1.3rem);
  color: #86868b;
  margin-bottom: 2rem;
}
.invite-image-wrapper {
  max-width: 400px;
  margin: 0 auto;
  padding: 0 1rem;
}
.invite-image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
.invite-image:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Email & extra guests in RSVP */
input[name=email]{max-width:280px;margin:.6rem auto !important;display:block;}

/* Additional guests section */
.extra-guests{margin:1.5rem 0;text-align:center;}
.extra-label{display:block;font-size:1rem;color:#1d1d1f;font-weight:500;margin-bottom:0.8rem;}
.add-btn{
  background:#f5f5f7;
  color:#1d1d1f;
  border:1px solid #d1d1d6;
  border-radius:8px;
  padding:0.6rem 1.2rem;
  font-size:0.9rem;
  cursor:pointer;
  transition:all 0.2s ease;
  margin-top:0.5rem;
}
.add-btn:hover{
  background:#e5e5ea;
  border-color:#c7c7cc;
}
.extra-label{display:block;font-size:.9rem;color:#6e6e73;margin:.6rem 0 .2rem;text-align:center;}
#extra-list input{width:240px;display:block;margin:.4rem auto;padding:.4rem .6rem;border:1px solid #d1d1d6;border-radius:8px;font-size:.9rem;}
.add-btn{display:block;margin:.4rem auto;padding:.4rem 1rem;background:#f5f5f7;border:1px solid #d1d1d6;border-radius:8px;font-size:.9rem;cursor:pointer;transition:background .2s;}
.add-btn:hover{background:#e5e5ea;}
