:root {
  --red: #EE1515;
  --red-dark: #CC0000;
  --ink: #1F1F1F;
  --yellow: #FFCB05;
  --blue: #3B4CCA;
  --paper: #ffffff;
  --field-bg: #f4f6fb;
  --border: #d7dced;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background-color: var(--red);
  /* Subtle Poké Ball motif */
  background-image:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,0.10) 0 60px, transparent 61px),
    radial-gradient(circle at 82% 78%, rgba(255,255,255,0.08) 0 90px, transparent 91px),
    linear-gradient(160deg, var(--red) 0%, var(--red-dark) 100%);
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 16px 48px;
}

.card {
  width: 100%;
  max-width: 480px;
  background: var(--paper);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
  padding: 28px 22px 32px;
  margin-top: 12px;
}

/* ---------- Header + Poké Ball ---------- */
.header { text-align: center; }

.pokeball {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background:
    linear-gradient(to bottom, var(--red) 0 50%, #ffffff 50% 100%);
  border: 5px solid var(--ink);
  position: relative;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
  animation: bounce 2.4s ease-in-out infinite;
}
.pokeball::before {
  /* center band */
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;
  right: -5px;
  height: 7px;
  background: var(--ink);
  transform: translateY(-50%);
}
.pokeball::after {
  /* center button */
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  background: #fff;
  border: 5px solid var(--ink);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .pokeball { animation: none; }
}

h1 {
  font-family: "Press Start 2P", "Nunito", sans-serif;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--red);
  margin: 0 0 10px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.12);
}

.tagline {
  margin: 0;
  font-weight: 700;
  color: var(--blue);
}

/* ---------- Details ---------- */
.details {
  margin: 24px 0;
  background: var(--field-bg);
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 14px 18px;
}
.details ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.details li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 1.05rem;
}
.details .emoji { font-size: 1.3rem; line-height: 1; }

/* ---------- Form ---------- */
h2 {
  font-family: "Press Start 2P", "Nunito", sans-serif;
  font-size: 0.95rem;
  color: var(--blue);
  text-align: center;
  margin: 0 0 18px;
}

.field { margin-bottom: 18px; }

label, legend {
  display: block;
  font-weight: 800;
  margin-bottom: 7px;
}
.optional { font-weight: 400; color: #6b7280; }

input[type="text"],
textarea {
  width: 100%;
  font: inherit;
  padding: 13px 14px;
  min-height: 48px;
  background: var(--field-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
}
textarea { resize: vertical; min-height: 80px; }

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,76,202,0.18);
}

/* Attending toggle */
fieldset.attending {
  border: none;
  margin: 0 0 18px;
  padding: 0;
}
.toggle {
  display: flex;
  gap: 10px;
}
.toggle-option {
  flex: 1;
  margin: 0;
}
.toggle-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-option span {
  display: block;
  text-align: center;
  padding: 13px 10px;
  min-height: 48px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--field-bg);
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}
.toggle-option input:checked + span {
  background: var(--yellow);
  border-color: var(--ink);
  color: var(--ink);
}
.toggle-option input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(59,76,202,0.35);
}

/* Honeypot */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button#submitBtn {
  width: 100%;
  font: inherit;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  background: var(--red);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 15px;
  min-height: 54px;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--red-dark);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
button#submitBtn:hover { background: var(--red-dark); }
button#submitBtn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--red-dark);
}
button#submitBtn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
  box-shadow: 0 5px 0 var(--red-dark);
}

.status {
  margin: 14px 0 0;
  text-align: center;
  font-weight: 700;
  min-height: 1.4em;
}
.status.error { color: var(--red-dark); }
.status.success { color: #1a7f37; }

/* Confirmation state */
.confirmation {
  text-align: center;
  padding: 18px 6px;
}
.confirmation h2 { color: var(--red); }
.confirmation p { font-size: 1.1rem; font-weight: 700; }
