/* =========================================================================
   TEMA: "SAVE THE DATE" (pôster neon)
   Paleta:
     --navy       #0b1130  (fundo do pôster)
     --navy-2     #1c2760  (fundo do pôster, centro do gradiente)
     --panel      #131c44  (caixinhas internas: badges, prazo)
     --gold       #FFC94A  (destaques, bordas neon)
     --blue-neon  #2E8FFF  (brilho azul)
     --red        #E3350D  (pokébola)
   Tipografia:
     Display -> "Anton" (condensada e forte, estilo pôster/cartaz)
     Corpo   -> "Rubik" (legível, para o formulário)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;700&family=Anton&display=swap');

:root {
  --navy: #0b1130;
  --navy-2: #1c2760;
  --panel: #131c44;
  --gold: #FFC94A;
  --gold-dk: #b3711a;
  --blue-neon: #2E8FFF;
  --red: #E3350D;
  --ink: #21201C;
  --radius-lg: 22px;
  --radius-md: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  /* Fundo de TODA a página: troque 'poster-fundo.jpg' pelo nome do seu
     arquivo (o mesmo usado dentro do cartão do topo).
     A camada escura por cima garante boa legibilidade do texto. */
  background:
    linear-gradient(rgba(6,8,24,0.7), rgba(6,8,24,0.8)),
    url('poster-fundo.jpg') center / cover no-repeat fixed;
  background-color: #050714;
  font-family: 'Rubik', sans-serif;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 64px;
  -webkit-text-size-adjust: 100%;
}

/* "fixed" trava/pisca em muitos celulares (principalmente iPhone) — no
   mobile a imagem simplesmente rola junto com a página. */
@media (max-width: 600px) {
  body {
    background-attachment: scroll;
    padding: 18px 12px 48px;
  }
}

/* ---------- CARTÃO ÚNICO: banner + formulário ---------- */

.poster {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(46, 143, 255, 0.5);
  box-shadow: 0 0 24px rgba(46, 143, 255, 0.35), 0 20px 50px rgba(0,0,0,0.5);
  overflow: hidden;
}

/* Parte de cima do cartão — cor sólida, igual à parte de baixo.
   A imagem de fundo (poster-fundo.jpg) aparece só atrás da página inteira. */
.poster-hero {
  position: relative;
  text-align: center;
  padding: 28px 22px 22px;
  background: radial-gradient(circle at 50% 0%, var(--navy-2) 0%, var(--navy) 75%);
  overflow: hidden;
}

.poster-hero::before {
  /* linhas de "raio" decorativas, puramente geométricas */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 46%, rgba(46,143,255,0.16) 48%, transparent 50%),
    linear-gradient(115deg, transparent 60%, rgba(255,201,74,0.10) 62%, transparent 64%);
  pointer-events: none;
}

/* Parte de baixo: formulário — fundo sólido, sem imagem, para ficar bem legível */
.poster-form {
  position: relative;
  text-align: center;
  padding: 22px 22px 26px;
  background: var(--navy);
  border-top: 2px dashed rgba(255,201,74,0.4);
}

.hero-savethedate {
  position: relative;
  z-index: 1;
  font-family: 'Anton', sans-serif;
  line-height: 1;
  margin-bottom: 10px;
}
.hero-savethedate span { display: block; }
.hero-savethedate span:first-child {
  font-size: 34px;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(255,255,255,0.6), 0 0 18px rgba(46,143,255,0.6);
}
.hero-thedate {
  font-size: 32px;
  color: var(--gold);
  letter-spacing: .5px;
  text-shadow: 0 0 10px rgba(255,201,74,0.8), 0 0 22px rgba(255,201,74,0.5);
}

.home-subtitle {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #dfe4ff;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 6px 0 14px;
  padding: 0 6px;
}

.hero-name {
  position: relative;
  z-index: 1;
  font-family: 'Anton', sans-serif;
  font-size: 30px;
  color: #fff;
  margin: 4px 0 2px;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(46,143,255,0.7);
}

.hero-age {
  position: relative;
  z-index: 1;
  font-family: 'Anton', sans-serif;
  font-size: 20px;
  color: var(--gold);
  margin: 0 0 18px;
  letter-spacing: 1px;
}

.badges-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.badge-box {
  background: var(--panel);
  border: 1.5px solid var(--gold);
  border-radius: 10px;
  padding: 12px 6px;
  box-shadow: 0 0 10px rgba(255,201,74,0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.badge-box strong {
  font-family: 'Rubik', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.badge-box span {
  font-size: 10.5px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
}

.deadline-banner {
  position: relative;
  z-index: 1;
  background: var(--panel);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 0 14px rgba(255,201,74,0.3);
}
.deadline-banner span:not(.pokeball-icon) {
  font-family: 'Rubik', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.6;
}
.deadline-banner strong {
  color: var(--gold);
  font-size: 16px;
}

.note-box {
  position: relative;
  z-index: 1;
  border: 1.5px solid rgba(255,201,74,0.6);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #dfe4ff;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 6px;
  white-space: pre-line;
}

.form-heading {
  position: relative;
  z-index: 1;
  font-family: 'Anton', sans-serif;
  font-size: 22px;
  color: #fff;
  letter-spacing: .5px;
  margin: 0 0 6px;
  text-shadow: 0 0 8px rgba(46,143,255,0.5);
}

.event-location {
  position: relative;
  z-index: 1;
  font-size: 13.5px;
  color: #cfd6ff;
  margin: 0 0 16px;
  line-height: 1.55;
}
.event-location b { color: var(--gold); }

label {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold);
  margin: 12px 0 4px;
  text-align: left;
}

input[type="email"],
input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 2px solid var(--navy-2);
  font-family: 'Rubik', sans-serif;
  font-size: 16px; /* 16px+ evita zoom automático ao focar em campos no iOS */
  background: #fff;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
input:focus {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}

.guest-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 2px solid var(--navy-2);
  border-radius: var(--radius-md);
  padding: 12px 14px 14px;
  margin-top: 14px;
  text-align: left;
}

.guest-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.guest-tag {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 10.5px;
  color: var(--blue-neon);
  letter-spacing: .5px;
}

.remove-guest {
  background: none;
  border: none;
  color: var(--red);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}
.remove-guest:hover { color: #b9280a; }

.guest-type-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.badge-adulto { background: #DCE8FF; color: var(--blue-neon); }
.badge-jovem { background: #E4FFD6; color: #3C9A3C; }
.badge-crianca { background: #FFE9C2; color: var(--gold-dk); }

.add-guest-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: var(--blue-neon);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .15s ease;
  box-shadow: 0 0 14px rgba(46,143,255,0.45);
}
.add-guest-btn:hover { transform: translateY(-1px); }

.pokeball-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--red) 0 48%, #fff 52% 100%);
  border: 2px solid var(--ink);
  position: relative;
  flex-shrink: 0;
}
.pokeball-icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.submit-btn {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 22px;
  padding: 16px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--gold), #e6ac00);
  color: var(--navy);
  font-family: 'Anton', sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  box-shadow: 0 6px 0 #a67900, 0 8px 20px rgba(255,201,74,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .1s ease, box-shadow .1s ease;
}
.submit-btn:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #a67900;
}
.submit-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.pokeball-big {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--red) 0 48%, #fff 52% 100%);
  border: 2px solid var(--ink);
  position: relative;
  flex-shrink: 0;
}
.pokeball-big::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.status-msg {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  display: none;
  text-align: left;
}
.status-msg.ok { display: block; background: #DFF5DC; color: #2c6b1f; border: 2px solid #2c6b1f; }
.status-msg.err { display: block; background: #FFDDDD; color: #a12b2b; border: 2px solid #a12b2b; }
.status-msg.loading { display: block; background: #FFF3D0; color: #7a5b00; border: 2px solid #b3711a; }

.footer-note {
  position: relative;
  z-index: 1;
  text-align: center;
  color: rgba(255,255,255,0.65);
  font-size: 11.5px;
  margin-top: 18px;
}
.footer-note a { color: #fff; }

/* ---------- ADMIN / PAINEL ---------- */

.admin-wrap {
  width: 100%;
  max-width: 760px;
}

.admin-title {
  font-family: 'Anton', sans-serif;
  color: #fff;
  font-size: 26px;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(46,143,255,0.6);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--panel);
  border: 2px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  text-align: center;
  box-shadow: 0 0 12px rgba(255,201,74,0.25);
}
.stat-num {
  font-family: 'Anton', sans-serif;
  font-size: 30px;
  color: var(--gold);
}
.stat-label {
  font-size: 12px;
  margin-top: 6px;
  color: #cfd6ff;
  font-weight: 500;
}

.table-wrap {
  background: var(--panel);
  border: 2px solid rgba(46,143,255,0.5);
  border-radius: var(--radius-md);
  padding: 8px;
  overflow-x: auto;
  box-shadow: 0 0 18px rgba(46,143,255,0.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #fff;
}
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
th {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gold);
}

.login-box {
  max-width: 360px;
  margin: 60px auto;
  background: var(--panel);
  border: 2px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  color: #fff;
  box-shadow: 0 0 18px rgba(255,201,74,0.25);
}
.login-box input {
  margin-top: 10px;
}
.login-box button {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: var(--blue-neon);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 480px) {
  .top-nav { margin-bottom: 10px; }
  .cross-link { font-size: 11px; padding: 6px 10px; }
  .back-link { font-size: 12px; }
  body { padding: 14px 10px 40px; }

  .poster-hero { padding: 20px 14px 18px; }
  .poster-form { padding: 18px 14px 22px; }
  .hero-savethedate span:first-child { font-size: 26px; }
  .hero-thedate { font-size: 23px; }
  .hero-name { font-size: 22px; }
  .hero-age { font-size: 15px; margin-bottom: 14px; }
  .badge-box { padding: 9px 4px; }
  .badge-box strong { font-size: 11.5px; }
  .badge-box span { font-size: 9px; }
  .deadline-banner { padding: 9px 10px; gap: 8px; }
  .deadline-banner span:not(.pokeball-icon) { font-size: 11px; }
  .deadline-banner strong { font-size: 14px; }
  .note-box { font-size: 11.5px; padding: 10px 12px; }

  .form-heading { font-size: 18px; }
  .event-location { font-size: 12.5px; }

  label { font-size: 12px; }

  .guest-card { padding: 10px 12px 12px; }
  .guest-tag { font-size: 9px; }

  .add-guest-btn { font-size: 13px; padding: 13px; }
  .submit-btn { font-size: 13px; padding: 15px; }

  .stats-row { grid-template-columns: 1fr 1fr; }
  .admin-title { font-size: 20px; }
}

@media (max-width: 340px) {
  .hero-savethedate span:first-child { font-size: 21px; }
  .hero-thedate { font-size: 19px; }
  .hero-name { font-size: 19px; }
  .badges-row { grid-template-columns: 1fr 1fr; }
}

/* ---------- PÁGINA INICIAL: botões de opção ---------- */

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 480px;
  width: 100%;
  margin-bottom: 14px;
  gap: 10px;
}

.back-link {
  display: inline-block;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.back-link:hover { color: #fff; }

.cross-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1.5px solid var(--gold);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(255,201,74,0.25);
  white-space: nowrap;
}
.cross-link:hover { background: #1a2657; }

.home-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}

.cta-link {
  text-decoration: none;
  margin-top: 0 !important;
}

.cta-gift {
  background: var(--blue-neon);
}

/* ---------- PÁGINA DE PRESENTES ---------- */

.pix-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 2px solid var(--navy-2);
  border-radius: 10px;
  padding: 10px 14px;
}
.pix-box--btn-only {
  justify-content: center;
  padding: 14px 0;
  background: transparent;
  border: none;
}
.pix-box--btn-only .copy-btn {
  padding: 14px 28px;
  font-size: 15px;
}
.pix-box span {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  word-break: break-all;
}

.copy-btn {
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.copy-btn:hover { background: #e6ac00; }

.pix-copied {
  display: none;
  text-align: center;
  color: #9BE38A;
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 8px;
}

.pix-manual-wrap {
  margin-top: 10px;
  text-align: center;
}
.pix-manual-note {
  font-size: 12px;
  color: #dfe4ff;
  font-style: italic;
  margin-bottom: 6px;
}
.pix-manual-key {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--gold);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}

.pix-qr-img {
  display: block;
  margin: 14px auto 0;
  width: 280px;
  height: 280px;
  max-width: 90vw;
  object-fit: contain;
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 0 14px rgba(255,201,74,0.3);
}

@media (max-width: 480px) {
  .pix-qr-img { width: 260px; height: 260px; }
}

/* ---------- ALERTA: PRAZO DE CONFIRMAÇÃO ENCERRADO ---------- */

.rsvp-closed-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 20, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.rsvp-closed-box,
.rsvp-closed-inline {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 2px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 0 24px rgba(255, 201, 74, 0.35);
}

.rsvp-closed-inline {
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.rsvp-closed-box h3,
.rsvp-closed-inline h3 {
  font-family: 'Anton', sans-serif;
  color: #fff;
  font-size: 19px;
  letter-spacing: .5px;
  margin: 0 0 10px;
  text-shadow: 0 0 8px rgba(46, 143, 255, 0.5);
}

.rsvp-closed-box p,
.rsvp-closed-inline p {
  color: #dfe4ff;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 10px;
}

.rsvp-closed-contact {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 201, 74, 0.5);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px !important;
  color: #fff !important;
  line-height: 1.7 !important;
}

.rsvp-closed-close {
  margin-top: 12px;
  padding: 10px 24px;
  border: none;
  border-radius: 10px;
  background: var(--blue-neon);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(46, 143, 255, 0.45);
}
.rsvp-closed-close:hover { transform: translateY(-1px); }

/* ---------- BOTÃO FLUTUANTE DE MÚSICA ---------- */

.music-toggle {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--panel);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(255,201,74,0.35), 0 6px 16px rgba(0,0,0,0.4);
  z-index: 50;
}
.music-toggle:hover { background: #1a2657; }

@media (max-width: 480px) {
  .music-toggle { width: 42px; height: 42px; font-size: 17px; bottom: 14px; right: 14px; }
}
