:root {
  --red: #d61f26;
  --red-dark: #9e1218;
  --navy: #071433;
  --navy-2: #0c2156;
  --blue: #1e4db7;
  --gold: #f6c445;
  --cream: #fff6ea;
  --ink: #140c0c;
  --pink: #ff7eb6;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% -10%, #3a0c12 0%, var(--navy) 42%, #040814 100%);
  min-height: 100vh;
}

.web-bg,
.city-bg,
.web-corner,
.critters,
.party-stickers {
  pointer-events: none;
}

.web-bg,
.city-bg,
.web-corner {
  display: none;
}

.web-bg {
  position: fixed;
  inset: 0;
  opacity: 0.55;
  z-index: 0;
}

.city-bg {
  position: fixed;
  inset: auto 0 0;
  height: 160px;
  opacity: 0.28;
  z-index: 0;
}

.web-corner {
  position: fixed;
  width: 110px;
  height: 110px;
  background: url("/assets/canto-teia.svg") center / contain no-repeat;
  z-index: 2;
  opacity: 0.7;
}

.web-corner-tl { top: 0; left: 0; }
.web-corner-tr { top: 0; right: 0; transform: scaleX(-1); }
.web-corner-bl { bottom: 0; left: 0; transform: scaleY(-1); }
.web-corner-br { bottom: 0; right: 0; transform: scale(-1); }

.critters,
.party-stickers {
  display: none;
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 5;
}

.sticker {
  position: absolute;
  object-fit: cover;
  object-position: top;
  border-radius: 18px;
  border: 3px solid #fff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55);
  opacity: 0.95;
}

.sticker-spin {
  left: max(12px, calc(50% - 560px));
  top: 78px;
  bottom: auto;
  width: 88px;
  height: 112px;
  transform: rotate(-8deg);
  border-color: #ff4d4d;
}

.sticker-gwen {
  right: max(12px, calc(50% - 560px));
  left: auto;
  top: 78px;
  bottom: auto;
  width: 88px;
  height: 112px;
  transform: rotate(8deg);
  border-color: var(--pink);
}

.sticker-spidey {
  left: max(18px, calc(50% - 540px));
  right: auto;
  top: auto;
  bottom: 24px;
  width: 72px;
  height: 92px;
  transform: rotate(-4deg);
  border-color: var(--gold);
}

.hanger {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: top center;
  animation: swing 3.6s ease-in-out infinite;
}

.hanger img {
  width: 34px;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
}

.thread {
  width: 1px;
  background: rgba(255, 255, 255, 0.65);
}

.hanger-1 { left: 7%; animation-duration: 3.2s; }
.hanger-1 .thread { height: 28px; }
.hanger-2 { right: 9%; left: auto; animation-duration: 4.1s; animation-delay: -1s; }
.hanger-2 .thread { height: 40px; }

.theme-wander {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

.crawler {
  position: absolute;
  left: 0;
  top: 0;
  width: 86px;
  height: auto;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
  will-change: transform;
  z-index: 6;
  image-rendering: auto;
}

.crawler.is-stuck,
.wanderer.is-stuck {
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45)) brightness(1.08);
}

.crawler.is-escaping,
.wanderer.is-escaping {
  transition: filter 0.2s ease;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.4)) brightness(1.1);
}

.wanderer {
  position: absolute;
  left: 0;
  top: 0;
  width: 80px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.4));
  will-change: transform;
  z-index: 6;
  border-radius: 18px;
}

.wanderer.is-blink {
  animation: wanderBlink 0.35s steps(2, end) 2;
}

.wanderer-celebra {
  width: 70px;
  height: 90px;
  display: none;
  filter: none;
  border-radius: 0;
}

.wanderer-celebra.is-on {
  display: block;
}

.wanderer-celebra[hidden] {
  display: none !important;
}

.wanderer-celebra .balloon {
  position: absolute;
  width: 22px;
  height: 28px;
  border-radius: 50% 50% 45% 45%;
  bottom: 18px;
}

.wanderer-celebra .balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.55);
  transform: translateX(-50%);
}

.wanderer-celebra .b1 {
  left: 8px;
  background: linear-gradient(180deg, #e8b86d, #c45c4a);
  transform: rotate(-8deg);
}

.wanderer-celebra .b2 {
  left: 26px;
  bottom: 28px;
  width: 26px;
  height: 32px;
  background: linear-gradient(180deg, #7eb6d4, #2f5d73);
}

.wanderer-celebra .b3 {
  left: 44px;
  background: linear-gradient(180deg, #d4a0a8, #9a3f32);
  transform: rotate(10deg);
}

@keyframes wanderBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes swing {
  0%, 100% { transform: rotate(-9deg); }
  50% { transform: rotate(9deg); }
}

.lock, .app {
  position: relative;
  z-index: 2;
}

.hidden {
  display: none !important;
}

.lock {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lock-card {
  width: min(460px, 100%);
  background: linear-gradient(180deg, rgba(26, 42, 108, 0.92) 0%, rgba(11, 22, 63, 0.96) 100%);
  border: 4px solid var(--gold);
  border-radius: 28px;
  padding: 24px 28px 28px;
  box-shadow: var(--shadow), inset 0 0 0 3px var(--red);
  text-align: center;
}

.theme-mascot {
  display: none;
}

.lock-team img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 #000;
}

.lock-team .star {
  width: 56px;
  height: 56px;
  border-color: var(--gold);
}

.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
  margin: 0 0 6px;
}

.lock-card h1 {
  font-family: "Bangers", cursive;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  letter-spacing: 0.04em;
  margin: 0;
  color: #fff;
  text-shadow: 3px 4px 0 var(--red), 5px 6px 0 #000;
}

.hero h1 {
  font-family: "Bangers", cursive;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 0.95;
  color: #fff;
  text-shadow: 3px 4px 0 var(--red), 5px 6px 0 #000;
}

.lock-copy, .hint {
  color: rgba(255, 246, 234, 0.82);
  line-height: 1.4;
  margin: 8px 0 0;
}

.lock-card form {
  display: grid;
  gap: 10px;
  text-align: left;
  margin-top: 18px;
}

.pin-field {
  position: relative;
  display: grid;
}

.pin-field input {
  padding-right: 48px;
}

.pin-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: 6px 8px;
  opacity: 0.75;
}

.pin-toggle:hover {
  opacity: 1;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  font-size: 0.92rem;
}

input, button {
  font: inherit;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="search"] {
  width: 100%;
  border: 3px solid #1a2f78;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(214, 31, 38, 0.25);
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.btn-red {
  background: linear-gradient(#f03a40, var(--red));
  color: #fff;
}

.btn-blue {
  background: linear-gradient(#3b6cff, var(--blue));
  color: #fff;
}

.btn-gold {
  background: linear-gradient(#ffe082, var(--gold));
  color: #3a2200;
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  box-shadow: none;
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.btn-green {
  background: linear-gradient(#49d078, #1f9a4d);
  color: #fff;
}

.btn-tiny {
  padding: 8px 12px;
  font-size: 0.85rem;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
}

.hero {
  padding: 16px 16px 10px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(214, 31, 38, 0.42), transparent 78%);
}

.badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2px;
}

.mini-hero {
  width: 36px;
  height: 36px;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 2px 2px 0 #000;
}

.badge {
  display: inline-block;
  background: var(--gold);
  color: #3a2200;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}

.meta {
  margin: 4px 0 10px;
  font-size: 0.98rem;
}

.meta .age {
  font-family: "Bangers", cursive;
  font-size: 1.35rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.hero-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.public-url {
  margin: 8px auto 0;
  max-width: 640px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 12px;
  padding: 8px 10px;
  word-break: break-all;
  font-size: 0.85rem;
}

.wrap {
  width: min(920px, calc(100% - 24px));
  margin: 0 auto 28px;
  display: grid;
  gap: 12px;
}

.stats-block {
  display: grid;
  gap: 6px;
}

.stats-label {
  margin: 0;
  font-family: "Bangers", cursive;
  letter-spacing: 0.06em;
  font-size: 1.15rem;
  text-shadow: 2px 2px 0 #000;
}

.stats-label.confirmed {
  color: #7dffb0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stats article {
  background: rgba(12, 33, 86, 0.78);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 8px 8px 10px;
  text-align: center;
}

.stats span {
  display: block;
  font-family: "Bangers", cursive;
  font-size: 1.65rem;
}

.stats small {
  color: rgba(255, 246, 234, 0.75);
}

.stats .accent {
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  border-color: #ffd36a;
}

.stats .accent.green {
  background: linear-gradient(180deg, #2f9e5f, #1b6b3d);
  border-color: #9dffc2;
}

.stats-confirmed article {
  border-color: rgba(125, 255, 176, 0.22);
}

.panel {
  background: rgba(7, 20, 51, 0.82);
  border: 3px solid rgba(246, 196, 69, 0.55);
  border-radius: 20px;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow);
  position: relative;
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 54px;
  height: 54px;
  background: url("/assets/canto-teia.svg") center / contain no-repeat;
  opacity: 0.35;
  pointer-events: none;
}

.panel::before { top: 8px; left: 8px; }
.panel::after { top: 8px; right: 8px; transform: scaleX(-1); }

.panel h2 {
  font-family: "Bangers", cursive;
  letter-spacing: 0.05em;
  margin: 0 0 4px;
  font-size: 1.45rem;
}

.fields {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.7fr;
  gap: 12px;
}

.hint {
  margin: 0 0 10px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.list-head input {
  max-width: 240px;
}

.guest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.guest-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background:
    linear-gradient(90deg, #132968, #0e1d4a);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-left: 8px solid var(--red);
  border-radius: 16px;
  padding: 12px 14px;
  position: relative;
}

.guest-card::before {
  content: "";
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: url("/assets/aranha-fofa.png") center / contain no-repeat;
}

.guest-card > div:not(.actions) {
  flex: 1;
  text-align: left;
}

.guest-card strong {
  font-size: 1.08rem;
}

.guest-card .kids {
  color: var(--gold);
  font-weight: 800;
}

.guest-card .status {
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 800;
}

.guest-card .status.ok {
  color: #7dffb0;
}

.guest-card .status.no {
  color: #ffb4b4;
}

.guest-card .status.wait {
  color: rgba(255, 246, 234, 0.55);
}

.guest-card .actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.empty {
  text-align: center;
  color: rgba(255, 246, 234, 0.7);
}

.error {
  color: #ffb4b4;
  margin: 8px 0 0;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--gold);
  color: #3a2200;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 999px;
  z-index: 20;
  box-shadow: var(--shadow);
}

.confirm-page .confirm-wrap {
  position: relative;
  z-index: 2;
  width: min(520px, calc(100% - 24px));
  margin: 28px auto 48px;
}

.confirm-card {
  text-align: center;
}

.confirm-card h1 {
  font-family: "Bangers", cursive;
  font-size: clamp(2.2rem, 8vw, 3.4rem);
  letter-spacing: 0.04em;
  margin: 6px 0 0;
  text-shadow: 3px 4px 0 var(--red), 5px 6px 0 #000;
}

.confirm-hello {
  font-weight: 800;
  font-size: 1.05rem;
  margin: 14px 0 6px;
}

.confirm-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
  font-weight: 800;
}

.confirm-choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.confirm-fields {
  margin-top: 14px;
  grid-template-columns: 1fr 1fr;
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: rgba(255, 246, 234, 0.72);
  font-weight: 600;
}

.confirm-spider {
  font-size: 2rem;
  margin: 16px 0 0;
}

@media (max-width: 1180px) {
  .sticker-spin,
  .sticker-gwen,
  .sticker-spidey {
    display: none;
  }
}

@media (max-width: 720px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .fields,
  .list-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .guest-card {
    flex-wrap: wrap;
  }

  .guest-card .actions {
    width: 100%;
    justify-content: flex-end;
  }

  .list-head input {
    max-width: none;
  }

  .web-corner-bl,
  .web-corner-br {
    display: none;
  }

  .crawler,
  .wanderer {
    width: 58px;
  }

  .wanderer-celebra {
    width: 56px;
    height: 72px;
  }
}
