:root {
  --bg: #4b207a;
  --header: #35155a;
  --accent: #f27a1a;
  --text: #f5f0eb;
  --muted: #e4d4f5;
  --wa: #25d366;
  --wa-dark: #128c7e;
}

body[data-concurso="altares"] {
  --bg: #4b207a;
  --header: #35155a;
}

body[data-concurso="catrinas"] {
  --bg: #c728a4;
  --header: #8e1574;
}

body[data-concurso="kids"] {
  --bg: #6b4fa8;
  --header: #4a3578;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  transition: background-color 0.35s ease;
}

/* —— Mobile first —— */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0.5rem;
  background: var(--header);
  border-bottom: 2px solid var(--accent);
  transition: background-color 0.35s ease;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

nav a {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

nav a.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

main {
  height: 100%;
  padding-top: 9.5rem;
  padding-bottom: 5.5rem;
}

.poster {
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
}

.poster img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.register-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 55%, transparent);
  pointer-events: none;
}

.btn-register {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: min(100%, 280px);
  padding: 0.9rem 1.4rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #3ce77a 0%, var(--wa) 45%, var(--wa-dark) 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow:
    0 0 8px rgba(37, 211, 102, 0.85),
    0 0 22px rgba(37, 211, 102, 0.55),
    0 0 42px rgba(37, 211, 102, 0.35),
    0 4px 14px rgba(0, 0, 0, 0.35);
  animation: glow-pulse 1.8s ease-in-out infinite;
}

.btn-register:active {
  transform: scale(0.98);
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(37, 211, 102, 0.85),
      0 0 22px rgba(37, 211, 102, 0.55),
      0 0 42px rgba(37, 211, 102, 0.35),
      0 4px 14px rgba(0, 0, 0, 0.35);
  }
  50% {
    box-shadow:
      0 0 14px rgba(37, 211, 102, 1),
      0 0 32px rgba(37, 211, 102, 0.75),
      0 0 60px rgba(37, 211, 102, 0.5),
      0 4px 14px rgba(0, 0, 0, 0.35);
  }
}

/* Tablet+ */
@media (min-width: 640px) {
  header {
    padding: 0.65rem 1rem;
  }

  nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  nav a {
    width: auto;
    flex: 1 1 auto;
    max-width: 280px;
    font-size: 0.85rem;
    padding: 0.6rem 0.85rem;
  }

  main {
    padding-top: 4.25rem;
    padding-bottom: 5.75rem;
  }

  .poster img {
    max-width: 720px;
  }
}

@media (min-width: 900px) {
  .poster img {
    max-width: 820px;
  }
}
