:root {
  --ink: #f4f7ff;
  --muted: #9eb0d6;
  --navy: #0b1020;
  --panel: rgba(14, 22, 46, 0.92);
  --gold: #f7e14d;
  --gold-deep: #d6b21a;
  --cyan: #3cefff;
  --purple: #7a5cff;
  --orange: #ff8a3d;
  --green: #3dff8a;
  --danger: #ff5a6a;
  --shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Exo 2", sans-serif;
  color: var(--ink);
  background: var(--navy);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
.honoree,
.eyebrow,
button,
.age {
  font-family: "Russo One", sans-serif;
}

.arena {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 120%, #1b3b7a 0%, transparent 42%),
    radial-gradient(circle at 80% 10%, rgba(122, 92, 255, 0.45), transparent 30%),
    linear-gradient(180deg, #142047 0%, #070b16 55%, #05101f 100%);
}

.storm {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 50% 50%, transparent 34%, rgba(90, 70, 255, 0.18) 48%, rgba(8, 12, 28, 0.88) 72%);
  animation: pulse 8s ease-in-out infinite;
}

.grid-floor {
  position: absolute;
  inset: 40% 0 0;
  background-image:
    linear-gradient(rgba(60, 239, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 239, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: perspective(400px) rotateX(58deg);
  transform-origin: top;
}

.glow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(40px);
}

.glow-a {
  background: rgba(247, 225, 77, 0.22);
  top: -80px;
  left: -40px;
}

.glow-b {
  background: rgba(60, 239, 255, 0.18);
  right: -60px;
  bottom: 10%;
}

.shell,
.admin-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  padding: 24px 28px 48px;
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(7, 11, 22, 0.94);
  border-bottom: 2px solid rgba(247, 225, 77, 0.45);
}

.brand {
  color: var(--gold);
  text-decoration: none;
  font-family: "Russo One", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
}

.site-header nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.site-header nav a:hover {
  color: var(--gold);
}

.kit-banner {
  position: relative;
  z-index: 8;
  margin: 0;
  padding: 14px 18px 16px;
  background: transparent;
  border-bottom: 2px solid var(--gold);
  text-align: center;
  font-family: "Russo One", sans-serif;
  text-transform: uppercase;
  font-size: clamp(1.05rem, 3.6vw, 1.7rem);
  line-height: 1.28;
  letter-spacing: 0.03em;
  color: var(--ink);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.kit-banner em {
  font-style: normal;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(247, 225, 77, 0.5);
}

.kit-banner span {
  display: block;
  margin-top: 8px;
  color: var(--cyan);
  font-size: 0.82em;
  letter-spacing: 0.08em;
}

.kit-banner .kit-venue {
  color: var(--muted);
  font-size: 0.58em;
  letter-spacing: 0.06em;
  text-shadow: none;
}

.site-footer {
  position: relative;
  z-index: 8;
  margin-top: auto;
  padding: 28px 20px 36px;
  background: rgba(7, 11, 22, 0.96);
  border-top: 2px solid rgba(247, 225, 77, 0.35);
  text-align: center;
  color: var(--muted);
}

.site-footer p {
  margin: 6px 0;
  font-weight: 500;
}

.whatsapp {
  display: inline-block;
  margin: 12px 0 8px;
  color: #25d366;
  font-weight: 800;
  text-decoration: none;
}

.map-card {
  margin-top: 28px;
}

.map-card h2 {
  margin: 8px 0 10px;
  text-transform: uppercase;
}

.map-wrap {
  position: relative;
  margin: 14px 0 0;
  height: 340px;
  border: 2px solid rgba(247, 225, 77, 0.45);
  overflow: hidden;
  background: #0b1328;
}

.map-wrap iframe,
.map-canvas {
  width: 100%;
  height: 100%;
  border: 0;
}

.party-marker {
  width: 22px;
  height: 22px;
  background: #ff3b4e;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.leaflet-container {
  background: #d8e0ea;
  font-family: "Exo 2", sans-serif;
}

.map-pin {
  margin: 0 0 8px;
  padding: 10px 12px;
  background: rgba(11, 16, 32, 0.94);
  border: 1px solid var(--gold);
  border-top: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.invite-stage {
  position: relative;
  padding-top: 52%;
}

.pointer-photo {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 6;
  display: block;
  width: 112%;
  max-width: none;
  transform: translateX(-50%);
  pointer-events: none;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.55));
}

.compact-stage {
  padding-top: 49%;
}

.compact-stage .pointer-photo {
  width: 104%;
}

.invite-stage > .card {
  clip-path: none;
  border: 4px solid var(--gold);
  box-shadow:
    0 0 0 6px #0b1020,
    0 0 32px rgba(247, 225, 77, 0.28),
    var(--shadow);
  padding-top: 44px;
}

.frame-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  z-index: 4;
  pointer-events: none;
  border: 3px solid #ffe56a;
}

.frame-corner.tl {
  top: -3px;
  left: -3px;
  border-right: 0;
  border-bottom: 0;
}

.frame-corner.tr {
  top: -3px;
  right: -3px;
  border-left: 0;
  border-bottom: 0;
}

.frame-corner.bl {
  bottom: -3px;
  left: -3px;
  border-right: 0;
  border-top: 0;
}

.frame-corner.br {
  bottom: -3px;
  right: -3px;
  border-left: 0;
  border-top: 0;
}

.corner-photo {
  position: absolute;
  z-index: 2;
  width: 38%;
  pointer-events: none;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.45));
}

.corner-left {
  left: -26%;
  bottom: 6%;
  top: auto;
}

.corner-right {
  right: -26%;
  bottom: 2%;
  top: auto;
}

.card {
  position: relative;
  z-index: 3;
  overflow: visible;
  background: var(--panel);
  padding: 34px 24px 28px;
  box-shadow: var(--shadow);
  border: 2px solid rgba(247, 225, 77, 0.85);
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
  backdrop-filter: blur(10px);
}

.rarity {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--orange), var(--gold), var(--cyan));
}

.rarity.victory {
  background: linear-gradient(90deg, var(--gold), #fff3a0, var(--gold));
}

.eyebrow {
  margin: 8px 0 0;
  color: var(--cyan);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.honoree {
  margin: 6px 0 0;
  font-size: clamp(2.1rem, 8vw, 3.8rem);
  line-height: 0.95;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(247, 225, 77, 0.35);
  text-transform: uppercase;
}

.age {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.22em;
  margin: 10px 0 12px;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: clamp(1.2rem, 4vw, 1.85rem);
  text-shadow: 0 0 18px rgba(60, 239, 255, 0.4);
}

.age-num {
  font-size: 2.35em;
  line-height: 0.8;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(247, 225, 77, 0.5);
}

.venue-box {
  margin: 0 0 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(60, 239, 255, 0.2);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.venue-box span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.venue-box strong {
  display: block;
  margin-top: 2px;
  font-family: "Teko", sans-serif;
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0.02em;
  text-shadow: none;
  font-weight: 600;
}

#map-venue-line {
  margin-bottom: 4px;
  color: var(--ink);
}

.hero-frame {
  margin: 0 auto 22px;
  width: min(280px, 70%);
  padding: 8px;
  background: linear-gradient(180deg, var(--gold), var(--orange));
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.hero-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.hero-frame.compact {
  width: min(160px, 46%);
  margin-bottom: 16px;
}

.photo-gallery {
  margin: 22px 0 8px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.loot-photo {
  padding: 0;
  background: #0b1328;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  border: 1px solid rgba(247, 225, 77, 0.45);
}

.loot-photo img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 18, 0.88);
  padding: 24px;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox img {
  max-width: min(920px, 100%);
  max-height: 80vh;
  object-fit: contain;
  border: 3px solid var(--gold);
}

.lightbox #lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.drop-zone {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 28px 16px;
  border: 2px dashed rgba(247, 225, 77, 0.55);
  background: rgba(247, 225, 77, 0.06);
  text-align: center;
  cursor: pointer;
}

.drop-zone input {
  display: none;
}

.hero-check {
  display: flex;
  gap: 10px;
  align-items: center;
  text-transform: none;
  font-size: 0.95rem;
}

.hero-check input {
  width: auto;
}

.admin-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.admin-photo {
  background: rgba(255, 255, 255, 0.04);
  padding: 8px;
}

.admin-photo img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.admin-photo .photo-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.admin-photo button {
  flex: 1;
  padding: 8px 6px;
  font-size: 0.75rem;
}

.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 18px;
}

.details div {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 14px;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  border: 1px solid rgba(60, 239, 255, 0.2);
}

.details .wide {
  grid-column: 1 / -1;
}

.details span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.details strong {
  font-family: "Teko", sans-serif;
  font-size: 1.45rem;
}

.note,
.lead {
  color: var(--muted);
  line-height: 1.5;
}

.code-box,
#rsvp-form,
.add-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

label {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}

input {
  width: 100%;
  border: 2px solid rgba(247, 225, 77, 0.45);
  background: #0b1328;
  color: #fff;
  border-radius: 0;
  padding: 14px 16px;
  font: inherit;
  font-size: 1.1rem;
}

#code,
#admin-code {
  text-align: center;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  font-family: "Russo One", sans-serif;
  font-size: 1.7rem;
  color: var(--gold);
}

button {
  font-weight: 400;
  border: 0;
  border-radius: 0;
  padding: 14px 18px;
  background: var(--gold);
  color: #14120a;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

button:hover {
  filter: brightness(1.08);
}

.ghost,
.text-btn {
  background: transparent;
  color: var(--muted);
  clip-path: none;
}

.decline-btn {
  margin-top: 6px;
  color: #ff3b4e;
  font-size: 1.28rem;
  letter-spacing: 0.05em;
  text-shadow: 0 0 16px rgba(255, 59, 78, 0.7);
  border: 2px solid #ff3b4e;
}

.start-btn {
  width: 100%;
  margin-top: 8px;
  padding: 18px 22px;
  font-size: 1.55rem;
  letter-spacing: 0.06em;
  background: #ffe566;
  box-shadow: 0 0 28px rgba(247, 225, 77, 0.55);
}

.edit-squad-btn {
  width: 100%;
  margin-top: 8px;
  color: var(--gold);
  font-size: 1.28rem;
  letter-spacing: 0.06em;
  text-shadow: 0 0 16px rgba(247, 225, 77, 0.75);
  border: 2px solid var(--gold);
}

.text-btn {
  margin-top: 10px;
  width: 100%;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Russo One", sans-serif;
}

.counters {
  display: grid;
  gap: 12px;
}

.counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  padding: 14px 16px;
  border: 1px solid rgba(247, 225, 77, 0.25);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stepper button {
  width: 42px;
  height: 42px;
  padding: 0;
  background: #10192f;
  color: var(--gold);
  border: 1px solid var(--gold);
  clip-path: none;
}

.stepper strong {
  min-width: 24px;
  text-align: center;
  font-size: 1.8rem;
  font-family: "Teko", sans-serif;
}

.error {
  color: var(--danger);
  margin: 0;
}

.thanks .summary {
  margin: 18px 0;
  padding: 16px;
  background: rgba(61, 255, 138, 0.12);
  border: 1px solid rgba(61, 255, 138, 0.4);
  font-weight: 800;
  text-transform: uppercase;
}

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

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat {
  background: var(--panel);
  padding: 14px;
  border: 1px solid rgba(247, 225, 77, 0.35);
  box-shadow: var(--shadow);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stat strong {
  font-family: "Teko", sans-serif;
  font-size: 2rem;
  color: var(--gold);
}

.add-grid {
  display: grid;
  gap: 12px;
}

.table-card {
  margin-top: 16px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.code-pill,
.status {
  display: inline-block;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 0.85rem;
}

.code-pill {
  background: rgba(247, 225, 77, 0.16);
  color: var(--gold);
  letter-spacing: 0.12em;
}

.status.yes {
  background: rgba(61, 255, 138, 0.16);
  color: var(--green);
}
.status.no {
  background: rgba(255, 90, 106, 0.16);
  color: var(--danger);
}
.status.wait {
  background: rgba(247, 225, 77, 0.12);
  color: var(--gold);
}

.delete-btn {
  background: var(--danger);
  color: #fff;
  padding: 8px 12px;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@media (max-width: 719px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .pointer-photo {
    width: 118%;
  }

  .invite-stage {
    padding-top: 56%;
  }

  .corner-photo {
    width: 40%;
  }

  .corner-left {
    left: -20%;
    bottom: 10%;
  }

  .corner-right {
    right: -20%;
    bottom: 6%;
  }
}

@media (min-width: 720px) {
  .card {
    padding: 46px 42px 36px;
  }

  .invite-stage {
    padding-top: 50%;
  }

  .pointer-photo {
    width: 112%;
  }

  .invite-stage > .card {
    padding-top: 52px;
  }

  .stats,
  .add-grid,
  .gallery-grid,
  .admin-photos {
    grid-template-columns: repeat(4, 1fr);
  }

  .add-grid button {
    align-self: end;
  }
}
