:root {
  --bg: #0d0620;
  --bg2: #1a0b3a;
  --pink: #ff3fd4;
  --cyan: #2ee6ff;
  --gold: #ffcf4d;
  --purple: #8f4dff;
  --text: #f4ecff;
  --card: rgba(38, 18, 74, 0.72);
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: "Baloo 2", system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(143, 77, 255, 0.35), transparent 60%),
    radial-gradient(900px 500px at 10% 20%, rgba(255, 63, 212, 0.22), transparent 60%),
    radial-gradient(800px 600px at 60% 100%, rgba(46, 230, 255, 0.15), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 60%, var(--bg) 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, .btn { font-family: "Bungee", "Baloo 2", cursive; font-weight: 400; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.8em 1.8em;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--cyan));
  background-size: 200% 100%;
  transition: transform 0.15s ease, background-position 0.4s ease;
}
.btn:hover { transform: scale(1.05); background-position: 100% 0; }
.btn:active { transform: scale(0.97); }
.btn-glow { box-shadow: 0 0 18px rgba(255, 63, 212, 0.55), 0 0 38px rgba(46, 230, 255, 0.25); }
.btn-big { font-size: 1.2rem; padding: 0.9em 2.2em; }

/* ---------- password gate ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(143, 77, 255, 0.3), transparent 70%),
    linear-gradient(180deg, #0a0418, #150a30);
}
.gate-card {
  width: min(420px, 100%);
  text-align: center;
  background: var(--card);
  border: 1px solid rgba(255, 63, 212, 0.35);
  border-radius: var(--radius);
  padding: 2.2rem 1.6rem;
  box-shadow: 0 0 40px rgba(143, 77, 255, 0.35), inset 0 0 30px rgba(46, 230, 255, 0.06);
  animation: floatIn 0.6s ease both;
}
.gate-glyph { font-size: 3rem; animation: pulse 2.2s ease-in-out infinite; }
.gate-title {
  font-size: 1.9rem;
  margin: 0.4rem 0;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gate-sub { opacity: 0.85; margin-bottom: 1.4rem; line-height: 1.5; }
#gate-form { display: flex; flex-direction: column; gap: 0.8rem; }
#gate-input {
  text-align: center;
  font-family: "Bungee", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  padding: 0.75em 1em;
  border-radius: 12px;
  border: 2px solid rgba(46, 230, 255, 0.4);
  background: rgba(10, 4, 24, 0.8);
  color: var(--cyan);
  outline: none;
  text-transform: uppercase;
}
#gate-input:focus { border-color: var(--pink); box-shadow: 0 0 16px rgba(255, 63, 212, 0.4); }
.gate-error { margin-top: 0.9rem; color: #ff7b9c; font-weight: 700; }
.gate-shake { animation: shake 0.4s ease; }

/* ---------- hero ---------- */
.site { max-width: 980px; margin: 0 auto; padding: 0 1rem 3rem; }

.hero { position: relative; text-align: center; padding: 3.2rem 0 2.4rem; }
.stage-lights { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.beam {
  position: absolute;
  top: -20%;
  width: 90px;
  height: 130%;
  opacity: 0.16;
  filter: blur(6px);
  transform-origin: top center;
}
.b1 { left: 8%;  background: linear-gradient(var(--pink), transparent); animation: sway 5s ease-in-out infinite; }
.b2 { left: 32%; background: linear-gradient(var(--cyan), transparent); animation: sway 6s ease-in-out -1s infinite reverse; }
.b3 { right: 30%; background: linear-gradient(var(--purple), transparent); animation: sway 5.5s ease-in-out -2s infinite; }
.b4 { right: 6%; background: linear-gradient(var(--gold), transparent); animation: sway 6.5s ease-in-out -3s infinite reverse; }

.hero-kicker {
  font-family: "Bungee", sans-serif;
  color: var(--gold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(255, 207, 77, 0.6);
}
.hero-title { display: flex; flex-direction: column; align-items: center; gap: 0.1em; margin: 0.5rem 0; line-height: 1.05; }
.hero-title > span:first-child {
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 63, 212, 0.45));
}
.hero-title-sub { font-family: "Baloo 2", sans-serif; font-weight: 700; font-size: 1.2rem; opacity: 0.85; }
.hero-four {
  font-size: clamp(3.4rem, 11vw, 5.6rem);
  color: var(--gold);
  text-shadow: 0 0 22px rgba(255, 207, 77, 0.7);
  animation: pulse 2s ease-in-out infinite;
}
.hero-theme { font-size: 1.15rem; margin-bottom: 1.6rem; opacity: 0.92; }

.hero-flyer {
  width: min(430px, 92%);
  border-radius: var(--radius);
  border: 2px solid rgba(46, 230, 255, 0.35);
  box-shadow: 0 10px 50px rgba(143, 77, 255, 0.5);
  margin-bottom: 1.8rem;
  transition: transform 0.3s ease;
}
.tilt:hover { transform: rotate(-1.5deg) scale(1.02); }

/* ---------- sections ---------- */
.section { padding: 2.6rem 0; text-align: center; }
.section-title {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  margin-bottom: 0.8rem;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-sub { opacity: 0.88; margin-bottom: 1.4rem; }

/* ---------- countdown ---------- */
.countdown { display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap; }
.count-box {
  background: var(--card);
  border: 1px solid rgba(143, 77, 255, 0.4);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  min-width: 86px;
  box-shadow: 0 0 22px rgba(143, 77, 255, 0.25);
}
.count-box span {
  display: block;
  font-family: "Bungee", sans-serif;
  font-size: 2rem;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(46, 230, 255, 0.6);
}
.count-box label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.75; }

/* ---------- detail cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.card {
  background: var(--card);
  border: 1px solid rgba(255, 63, 212, 0.25);
  border-radius: var(--radius);
  padding: 1.6rem 1.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(255, 63, 212, 0.25); }
.card-icon { font-size: 2.2rem; margin-bottom: 0.5rem; }
.card h3 { color: var(--gold); margin-bottom: 0.5rem; font-size: 1.1rem; }
.card p { line-height: 1.55; opacity: 0.92; }
.card-link { display: inline-block; margin-top: 0.7rem; color: var(--cyan); font-weight: 700; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* ---------- mini game ---------- */
.game-hud {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  margin-bottom: 0.9rem;
  font-weight: 700;
}
.game-hud strong { color: var(--gold); }
.game-arena {
  position: relative;
  height: 300px;
  max-width: 640px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 2px dashed rgba(46, 230, 255, 0.35);
  background: rgba(10, 4, 24, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: manipulation;
}
.demon {
  position: absolute;
  border: none;
  background: none;
  font-size: 2.4rem;
  cursor: pointer;
  animation: popIn 0.18s ease both;
  transition: transform 0.1s ease;
  line-height: 1;
  padding: 0.2em;
}
.demon:hover { transform: scale(1.15); }
.demon-zap { animation: zap 0.3s ease both; pointer-events: none; }
.game-msg { margin-top: 0.9rem; font-weight: 700; color: var(--gold); min-height: 1.4em; }

/* ---------- RSVP ---------- */
.rsvp-form {
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
  background: var(--card);
  border: 1px solid rgba(46, 230, 255, 0.3);
  border-radius: var(--radius);
  padding: 1.8rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: 0 0 36px rgba(46, 230, 255, 0.14);
}
.hp { position: absolute; left: -9999px; }
.field { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 700; }
.field span { font-size: 0.95rem; }
.field input, .field textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.7em 0.9em;
  border-radius: 12px;
  border: 2px solid rgba(143, 77, 255, 0.4);
  background: rgba(10, 4, 24, 0.7);
  color: var(--text);
  outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 12px rgba(46, 230, 255, 0.3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.attend-field { border: none; }
.attend-field legend { font-weight: 700; margin-bottom: 0.5rem; }
.attend-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.attend-option input { position: absolute; opacity: 0; }
.attend-option span {
  display: block;
  text-align: center;
  padding: 0.75em 0.5em;
  border-radius: 12px;
  border: 2px solid rgba(143, 77, 255, 0.4);
  background: rgba(10, 4, 24, 0.7);
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 700;
}
.attend-option input:checked + span {
  border-color: var(--pink);
  background: linear-gradient(90deg, rgba(255, 63, 212, 0.25), rgba(46, 230, 255, 0.2));
  box-shadow: 0 0 14px rgba(255, 63, 212, 0.35);
}
.attend-option input:focus-visible + span { outline: 2px solid var(--cyan); }

.rsvp-success {
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid rgba(255, 207, 77, 0.45);
  border-radius: var(--radius);
  padding: 2.2rem 1.4rem;
  box-shadow: 0 0 36px rgba(255, 207, 77, 0.2);
  animation: floatIn 0.5s ease both;
}
.rsvp-success-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.rsvp-success h3 { color: var(--gold); margin-bottom: 0.5rem; }

/* ---------- footer ---------- */
.footer { text-align: center; padding: 2.5rem 0 1rem; opacity: 0.75; }
.footer-small { font-size: 0.8rem; margin-top: 0.4rem; opacity: 0.8; }

/* ---------- confetti canvas ---------- */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

/* ---------- sparkles ---------- */
.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 90;
  font-size: 0.9rem;
  animation: sparkleFade 0.8s ease-out forwards;
}

/* ---------- animations ---------- */
@keyframes floatIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-9px); } 40%,80% { transform: translateX(9px); } }
@keyframes sway { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes zap { to { transform: scale(2); opacity: 0; filter: hue-rotate(90deg); } }
@keyframes sparkleFade { from { opacity: 1; transform: scale(1) translateY(0); } to { opacity: 0; transform: scale(0.3) translateY(-22px); } }

@media (max-width: 520px) {
  .count-box { min-width: 70px; padding: 0.8rem 0.9rem; }
  .count-box span { font-size: 1.5rem; }
  .attend-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
