:root {
  --ink: #f9f7ff;
  --muted: #cfc7e8;
  --panel: rgba(20, 7, 57, 0.78);
  --panel-solid: #170938;
  --line: rgba(255, 255, 255, 0.16);
  --pink: #ff4bd1;
  --pink-light: #ffb5ef;
  --violet: #914dff;
  --cyan: #62e7ff;
  --blue: #253ccc;
  --danger: #ff6b8d;
  --shadow: 0 24px 80px rgba(4, 0, 26, 0.45);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #0c0425;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 0%, rgba(255, 75, 209, 0.35), transparent 34%),
    radial-gradient(circle at 10% 50%, rgba(98, 231, 255, 0.16), transparent 34%),
    linear-gradient(145deg, #0d0429 0%, #22064e 48%, #091648 100%);
}
.stars {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background-image:
    radial-gradient(circle, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,255,255,.8) 0 1px, transparent 1.5px);
  background-position: 0 0, 38px 51px;
  background-size: 85px 85px, 127px 127px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .5; }
.orb-one { width: 30rem; height: 30rem; background: #fa26bd; top: -12rem; right: -8rem; }
.orb-two { width: 24rem; height: 24rem; background: #5542ff; bottom: 10%; left: -10rem; }
.orb-three { width: 18rem; height: 18rem; background: #21cbff; bottom: -6rem; right: 18%; }

.shell { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.site-header {
  width: min(1240px, calc(100% - 32px));
  min-height: 74px;
  margin: 14px auto 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 4, 37, .64);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 12px;
  z-index: 20;
  box-shadow: 0 12px 35px rgba(0,0,0,.18);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 850;
  letter-spacing: .02em;
}
.brand-star { color: var(--pink-light); filter: drop-shadow(0 0 10px var(--pink)); font-size: 1.4rem; }
.header-rsvp {
  text-decoration: none;
  font-weight: 800;
  padding: 10px 17px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  box-shadow: 0 10px 28px rgba(255, 75, 209, .3);
}

.hero {
  min-height: calc(100vh - 100px);
  padding: 64px 0 74px;
  display: grid;
  grid-template-columns: minmax(330px, .86fr) minmax(420px, 1.14fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
}
.invite-frame {
  padding: 8px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,75,209,.65), rgba(98,231,255,.65));
  box-shadow: var(--shadow), 0 0 70px rgba(255,75,209,.2);
  transform: rotate(-1.4deg);
}
.invite-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 21px;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--pink-light);
  text-transform: uppercase;
  letter-spacing: .19em;
  font-size: .78rem;
  font-weight: 900;
}
.hero h1, .rsvp-copy h2, .login-card h1, .dashboard-heading h1 {
  margin: 0;
  line-height: .94;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero h1 {
  font-size: clamp(3.25rem, 7vw, 6.6rem);
  text-transform: uppercase;
}
.hero h1 span {
  display: inline-block;
  color: transparent;
  background: linear-gradient(110deg, #fff 5%, var(--pink-light) 38%, var(--pink) 63%, var(--cyan));
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 0 24px rgba(255,75,209,.25));
}
.hero-intro { max-width: 610px; margin: 26px 0 0; color: var(--muted); font-size: 1.12rem; }
.detail-grid { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.detail-card {
  min-height: 92px;
  padding: 17px;
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
}
.detail-card.wide { grid-column: 1 / -1; }
.detail-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; color: #210637; background: linear-gradient(135deg, var(--pink-light), var(--cyan)); font-size: 1.4rem; font-weight: 900; }
.detail-card small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: .67rem; }
.detail-card strong { display: block; margin-top: 4px; line-height: 1.25; }
.hero-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  min-height: 48px;
  padding: 0 21px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
.button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.button:active { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.button.primary { color: white; background: linear-gradient(135deg, var(--pink), var(--violet)); box-shadow: 0 14px 34px rgba(255,75,209,.28); }
.button.ghost { color: var(--ink); border: 1px solid var(--line); background: rgba(255,255,255,.07); }
.button.small { min-height: 39px; padding: 0 14px; border-radius: 11px; font-size: .88rem; }
.button.danger-outline { color: #ffc1cf; border: 1px solid rgba(255,107,141,.55); background: rgba(255,107,141,.08); }

.rsvp-section {
  padding: 110px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(9,4,34,.42));
}
.rsvp-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 7vw, 96px); align-items: start; }
.rsvp-copy { position: sticky; top: 120px; }
.rsvp-copy h2 { font-size: clamp(2.7rem, 5vw, 5rem); }
.rsvp-copy > p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; max-width: 520px; }
.mini-note { margin-top: 28px; padding: 18px; display: flex; gap: 13px; border-radius: 18px; border: 1px solid rgba(98,231,255,.28); background: rgba(98,231,255,.07); }
.mini-note span { color: var(--cyan); font-size: 1.35rem; }
.mini-note p { margin: 0; }
.form-card, .login-card {
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.field { display: grid; gap: 8px; }
.field + .field { margin-top: 20px; }
.field label, .field-label { margin: 0; color: var(--ink); font-weight: 800; }
.field label span { color: var(--muted); font-weight: 500; }
input, select, textarea {
  width: 100%;
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 13px;
  background: rgba(255,255,255,.075);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input, select { min-height: 52px; padding: 0 15px; }
textarea { padding: 13px 15px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a69abb; }
input:focus, select:focus, textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,75,209,.13); background: rgba(255,255,255,.095); }
select option { color: #1a0a31; }
.guest-heading { margin: 27px 0 13px; display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.guest-heading span { color: var(--muted); font-size: .86rem; }
.guest-list { display: grid; gap: 10px; }
.guest-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) 124px 38px; gap: 9px; align-items: center; }
.guest-number { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--violet)); font-weight: 900; }
.guest-row .field { min-width: 0; }
.remove-guest { width: 36px; height: 36px; border: 1px solid rgba(255,107,141,.4); border-radius: 10px; color: #ffc1cf; background: rgba(255,107,141,.08); font-size: 1.45rem; line-height: 1; cursor: pointer; }
.party-tally { margin: 18px 0 22px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 12px 22px; border-radius: 15px; background: rgba(145,77,255,.12); border: 1px solid rgba(145,77,255,.28); color: var(--muted); }
.party-tally strong { color: white; }
.form-message { min-height: 24px; margin: 14px 0 8px; color: var(--cyan); font-weight: 700; }
.form-message.error, .admin-message.error { color: #ff9ab1; }
.submit-button { width: 100%; }
.success-panel { text-align: center; padding: 30px 10px; }
.success-star { margin: 0 auto 18px; width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%; font-size: 2.7rem; color: #210637; background: linear-gradient(135deg, var(--pink-light), var(--cyan)); box-shadow: 0 0 50px rgba(255,75,209,.28); }
.success-panel h3 { margin: 0; font-size: 2rem; }
.success-panel p { color: var(--muted); }
footer { padding: 30px 18px 45px; text-align: center; color: var(--muted); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* Admin */
.admin-body { background: #0c0425; }
.admin-main { padding: 65px 0 100px; }
.admin-actions { display: flex; gap: 8px; }
.login-card { width: min(520px, 100%); margin: 8vh auto 0; }
.login-card h1, .dashboard-heading h1 { font-size: clamp(3rem, 6vw, 5.5rem); }
.login-card > p:not(.eyebrow) { color: var(--muted); }
.dashboard-heading { margin-bottom: 28px; display: flex; justify-content: space-between; align-items: end; }
.dashboard-heading p:last-child { color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { min-height: 142px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.06); box-shadow: 0 18px 50px rgba(0,0,0,.14); }
.stat-card span { color: var(--muted); font-weight: 750; }
.stat-card strong { font-size: 3.1rem; line-height: 1; }
.stat-card.featured { background: linear-gradient(145deg, rgba(255,75,209,.28), rgba(145,77,255,.25)); border-color: rgba(255,181,239,.35); }
.admin-message { min-height: 27px; margin: 18px 0 4px; font-weight: 700; }
.rsvp-admin-list { display: grid; gap: 15px; }
.rsvp-admin-card { padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: rgba(20,7,57,.72); box-shadow: 0 16px 45px rgba(0,0,0,.15); }
.rsvp-admin-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.rsvp-admin-top h2 { margin: 0; font-size: 1.3rem; }
.rsvp-admin-top p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.rsvp-card-actions { display: flex; align-items: center; gap: 9px; }
.rsvp-total-pill, .guest-chip { display: inline-flex; align-items: center; border-radius: 999px; font-weight: 800; }
.rsvp-total-pill { padding: 7px 11px; background: rgba(98,231,255,.1); border: 1px solid rgba(98,231,255,.25); color: #bcf5ff; font-size: .82rem; white-space: nowrap; }
.delete-rsvp { padding: 7px 10px; color: #ffc1cf; border: 1px solid rgba(255,107,141,.35); border-radius: 10px; background: rgba(255,107,141,.08); cursor: pointer; font-weight: 750; }
.guest-chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.guest-chip { padding: 8px 11px; font-size: .83rem; text-transform: capitalize; }
.guest-chip.adult { background: rgba(145,77,255,.15); border: 1px solid rgba(145,77,255,.33); }
.guest-chip.child { background: rgba(255,75,209,.14); border: 1px solid rgba(255,75,209,.32); }
.rsvp-note { margin-top: 15px; padding: 13px 14px; border-radius: 13px; color: var(--muted); background: rgba(255,255,255,.05); white-space: pre-wrap; }
.empty-state { padding: 70px 20px; text-align: center; border: 1px dashed rgba(255,255,255,.23); border-radius: 24px; color: var(--muted); }
.empty-state span { display: block; font-size: 3rem; color: var(--pink-light); }
.empty-state h2 { color: white; }

@media (max-width: 930px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .invite-frame { width: min(560px, 92%); margin: 0 auto; transform: rotate(0); }
  .hero-copy { text-align: center; }
  .hero-intro { margin-inline: auto; }
  .detail-card { text-align: left; }
  .hero-actions { justify-content: center; }
  .rsvp-layout { grid-template-columns: 1fr; }
  .rsvp-copy { position: static; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
  .shell { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 62px; margin-top: 8px; top: 7px; }
  .brand { font-size: .9rem; }
  .header-rsvp { padding: 8px 13px; font-size: .85rem; }
  .hero { padding: 34px 0 54px; gap: 38px; }
  .hero h1 { font-size: clamp(2.65rem, 15vw, 4.5rem); }
  .hero-intro { font-size: 1rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-card.wide { grid-column: auto; }
  .hero-actions { display: grid; }
  .rsvp-section { padding: 74px 0; }
  .form-card, .login-card { padding: 20px 16px; border-radius: 22px; }
  .guest-heading { align-items: flex-end; }
  .guest-row { grid-template-columns: 32px minmax(0, 1fr) 95px 34px; gap: 6px; }
  input, select { padding-inline: 10px; }
  .guest-number { width: 29px; height: 29px; }
  .admin-header { border-radius: 22px; align-items: flex-start; padding-block: 12px; }
  .admin-actions { flex-wrap: wrap; justify-content: flex-end; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 116px; padding: 16px; }
  .stat-card strong { font-size: 2.4rem; }
  .rsvp-admin-top { flex-direction: column; }
  .rsvp-card-actions { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
