/* =========================
   Variáveis e base
========================= */

:root {
  --black: #111111;
  --black-deep: #070707;
  --dark: #181818;
  --dark-soft: #222222;
  --yellow: #FFD000;
  --yellow-dark: #d7ad00;
  --white: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.72);
  --muted-strong: rgba(255, 255, 255, 0.86);
  --error: #ff5b5b;

  --shadow-dark: rgba(0, 0, 0, 0.72);
  --shadow-light: rgba(255, 255, 255, 0.045);
  --yellow-glow: rgba(255, 208, 0, 0.45);
}

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

html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 208, 0, 0.16), transparent 26%),
    radial-gradient(circle at 86% 82%, rgba(255, 208, 0, 0.10), transparent 32%),
    linear-gradient(135deg, #050505, #111111 50%, #070707);
  overflow-x: hidden;
}

button,
input {
  font-family: inherit;
}

/* =========================
   Estrutura
========================= */

.app {
  min-height: 100vh;
}

.screen {
  display: none;
  min-height: 100vh;
  padding: 34px 20px;
  align-items: center;
  justify-content: center;
}

.screen-active {
  display: flex;
  animation: fadeIn 0.48s ease forwards;
}

.container {
  width: 100%;
  max-width: 500px;
  text-align: center;
}

.register-container {
  max-width: 590px;
}

.container-wide {
  max-width: 1120px;
}

.soft-panel {
  background: linear-gradient(145deg, #191919, #0b0b0b);
  border: 1px solid rgba(255, 208, 0, 0.16);
  box-shadow:
    18px 18px 42px rgba(0, 0, 0, 0.62),
    -10px -10px 30px rgba(255, 255, 255, 0.035),
    inset 1px 1px 0 rgba(255, 255, 255, 0.045);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================
   Tela inicial premium
========================= */

.brand {
  margin-bottom: 18px;
}

.brand-pill,
.section-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--yellow);
  background: linear-gradient(145deg, #171717, #0b0b0b);
  border: 1px solid rgba(255, 208, 0, 0.24);
  box-shadow:
    7px 7px 18px rgba(0, 0, 0, 0.48),
    -5px -5px 14px rgba(255, 255, 255, 0.035);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.3px;
}

.brand h1 {
  color: var(--yellow);
  font-size: clamp(2.8rem, 9vw, 5.3rem);
  line-height: 0.9;
  letter-spacing: -3px;
  text-shadow:
    0 0 22px rgba(255, 208, 0, 0.38),
    0 0 55px rgba(255, 208, 0, 0.14);
}

.premium-hero {
  position: relative;
  margin: 22px 0;
  padding: 1px;
  border-radius: 34px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 208, 0, 0.34), transparent 35%),
    linear-gradient(315deg, rgba(255, 255, 255, 0.08), transparent 32%);
}

.premium-hero::before {
  content: "";
  position: absolute;
  inset: -70%;
  background: conic-gradient(
    from 90deg,
    transparent,
    rgba(255, 208, 0, 0.22),
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  animation: rotateGlow 8s linear infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 30px;
  border-radius: 33px;
  background:
    radial-gradient(circle at top, rgba(255, 208, 0, 0.12), transparent 34%),
    linear-gradient(145deg, #1b1b1b, #090909);
  box-shadow:
    inset 8px 8px 18px rgba(0, 0, 0, 0.48),
    inset -7px -7px 16px rgba(255, 255, 255, 0.035);
}

.hero-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  background: rgba(255, 208, 0, 0.24);
  z-index: 1;
}

.hero-light-one {
  width: 170px;
  height: 170px;
  right: -60px;
  top: -65px;
}

.hero-light-two {
  width: 130px;
  height: 130px;
  left: -55px;
  bottom: -55px;
  opacity: 0.55;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.hero-badge {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow:
    7px 7px 18px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(255, 208, 0, 0.24);
}

.hero-plane {
  display: inline-block;
  font-size: 2rem;
  animation: planeMove 2.4s ease-in-out infinite;
}

.hero-content h2 {
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1.02;
  letter-spacing: -0.8px;
  margin-bottom: 14px;
}

.hero-content p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 1rem;
}

.route-map {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
}

.route-map span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #202020, #0c0c0c);
  border: 1px solid rgba(255, 208, 0, 0.16);
  box-shadow:
    8px 8px 18px rgba(0, 0, 0, 0.42),
    -5px -5px 13px rgba(255, 255, 255, 0.035);
  font-size: 1.25rem;
  animation: floatMini 2.5s ease-in-out infinite;
}

.route-map span:nth-child(3) {
  animation-delay: 0.2s;
}

.route-map span:nth-child(5) {
  animation-delay: 0.4s;
}

.route-map span:nth-child(7) {
  animation-delay: 0.6s;
}

.route-map i {
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--yellow), transparent);
  animation: routePulse 1.8s ease-in-out infinite;
}

.subtitle {
  margin: 16px 0 20px;
  color: var(--muted);
  font-size: 1rem;
}

@keyframes rotateGlow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes planeMove {
  0%, 100% {
    transform: translateX(0) translateY(0) rotate(-8deg);
  }

  50% {
    transform: translateX(7px) translateY(-7px) rotate(8deg);
  }
}

@keyframes floatMini {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes routePulse {
  0%, 100% {
    opacity: 0.35;
    transform: scaleX(0.78);
  }

  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* =========================
   Formulário
========================= */

.form {
  padding: 27px;
  border-radius: 28px;
}

.input-group {
  text-align: left;
  margin-bottom: 18px;
}

.input-group label,
.settings-panel label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted-strong);
  font-weight: 800;
  font-size: 0.92rem;
}

.input-group input,
.settings-panel input {
  width: 100%;
  height: 54px;
  padding: 0 17px;
  border: 1px solid rgba(255, 208, 0, 0.10);
  border-radius: 17px;
  background: #101010;
  color: var(--white);
  font-size: 1rem;
  outline: none;
  box-shadow:
    inset 7px 7px 16px rgba(0, 0, 0, 0.62),
    inset -5px -5px 13px rgba(255, 255, 255, 0.035);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.input-group input::placeholder,
.settings-panel input::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.input-group input:focus,
.settings-panel input:focus {
  border-color: rgba(255, 208, 0, 0.55);
  box-shadow:
    inset 7px 7px 16px rgba(0, 0, 0, 0.62),
    inset -5px -5px 13px rgba(255, 255, 255, 0.04),
    0 0 0 4px rgba(255, 208, 0, 0.10),
    0 0 26px rgba(255, 208, 0, 0.15);
  transform: translateY(-1px);
}

.error-message,
.settings-error {
  display: block;
  min-height: 19px;
  margin-top: 7px;
  color: var(--error);
  font-size: 0.82rem;
}

/* =========================
   Botões
========================= */

.btn {
  width: 100%;
  min-height: 56px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 950;
  letter-spacing: 1px;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--black);
  background: linear-gradient(145deg, #ffe15c, var(--yellow-dark));
  box-shadow:
    10px 10px 24px rgba(0, 0, 0, 0.48),
    -6px -6px 16px rgba(255, 255, 255, 0.035),
    0 0 28px rgba(255, 208, 0, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow:
    12px 12px 28px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(255, 208, 0, 0.45);
}

.btn-secondary {
  max-width: 320px;
  margin-top: 28px;
  color: var(--black);
  background: linear-gradient(145deg, #ffe15c, var(--yellow-dark));
}

/* =========================
   Tela dos países
========================= */

.step-header {
  margin-bottom: 30px;
}

.step-header h2 {
  color: var(--yellow);
  font-size: clamp(1.9rem, 5vw, 3.1rem);
  margin-bottom: 12px;
  text-shadow:
    0 0 18px rgba(255, 208, 0, 0.38),
    0 0 45px rgba(255, 208, 0, 0.12);
}

.step-header p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.step-header strong {
  color: var(--white);
  font-size: 0.94rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* =========================
   Cards flip
========================= */

.flip-card {
  position: relative;
  height: 246px;
  border: none;
  background: transparent;
  cursor: pointer;
  perspective: 1200px;
  padding: 0;
}

.flip-card.disabled {
  pointer-events: none;
  opacity: 0.34;
  filter: grayscale(0.7);
  transform: scale(0.96);
  transition: all 0.3s ease;
}

.flip-card.selected {
  opacity: 1;
  filter: none;
  transform: scale(1.04);
  z-index: 5;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition:
    transform 0.95s cubic-bezier(0.2, 0.85, 0.25, 1),
    filter 0.3s ease;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
  filter: drop-shadow(0 0 28px rgba(255, 208, 0, 0.55));
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  backface-visibility: hidden;
  overflow: hidden;
}

.flip-card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  color: var(--black);
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.45), transparent 28%),
    linear-gradient(145deg, #ffe368, #d9ae00);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    14px 14px 32px rgba(0, 0, 0, 0.52),
    -8px -8px 22px rgba(255, 255, 255, 0.045),
    inset 2px 2px 5px rgba(255, 255, 255, 0.22),
    inset -6px -6px 14px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.flip-card:hover .flip-card-front {
  transform: translateY(-7px);
  box-shadow:
    18px 18px 38px rgba(0, 0, 0, 0.62),
    0 0 42px rgba(255, 208, 0, 0.46);
}

.flip-card-front::after {
  content: "";
  position: absolute;
  inset: -65%;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 255, 255, 0.46),
    transparent 62%
  );
  transform: translateX(-92%) rotate(18deg);
  transition: transform 0.7s ease;
}

.flip-card:hover .flip-card-front::after {
  transform: translateX(92%) rotate(18deg);
}

.card-flag {
  font-size: 4.6rem;
  margin-bottom: 15px;
  animation: flagFloat 2.4s ease-in-out infinite;
}

.card-country {
  position: relative;
  z-index: 2;
  font-size: 1.22rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 9px;
}

.card-hint {
  position: relative;
  z-index: 2;
  font-size: 0.84rem;
  font-weight: 850;
  opacity: 0.75;
}

.flip-card-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 23px;
  color: var(--white);
  background:
    radial-gradient(circle at top, rgba(255, 208, 0, 0.20), transparent 42%),
    linear-gradient(145deg, #1e1e1e, #070707);
  border: 1px solid rgba(255, 208, 0, 0.38);
  transform: rotateY(180deg);
  box-shadow:
    16px 16px 38px rgba(0, 0, 0, 0.62),
    -7px -7px 18px rgba(255, 255, 255, 0.035),
    inset 8px 8px 22px rgba(0, 0, 0, 0.38),
    inset -6px -6px 18px rgba(255, 255, 255, 0.025);
}

.prize-icon {
  font-size: 3.1rem;
  margin-bottom: 12px;
  animation: prizePulse 1.15s ease-in-out infinite;
}

.prize-label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.prize-text {
  color: var(--yellow);
  font-size: 1.12rem;
  font-weight: 950;
  line-height: 1.35;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 208, 0, 0.35);
}

.back-country {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.flip-card.selected::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 36px;
  background: radial-gradient(circle, rgba(255, 208, 0, 0.58), transparent 68%);
  opacity: 0;
  animation: selectedGlow 1s ease forwards;
  z-index: -1;
}

@keyframes flagFloat {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-9px) rotate(2deg);
  }
}

@keyframes prizePulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(255, 208, 0, 0));
  }

  50% {
    transform: scale(1.13);
    filter: drop-shadow(0 0 18px rgba(255, 208, 0, 0.85));
  }
}

@keyframes selectedGlow {
  0% {
    opacity: 0;
    transform: scale(0.86);
  }

  45% {
    opacity: 1;
    transform: scale(1.08);
  }

  100% {
    opacity: 0.36;
    transform: scale(1);
  }
}

/* =========================
   Resultado
========================= */

.result-container {
  max-width: 640px;
}

.result-card {
  padding: 38px 26px;
  border-radius: 32px;
}

.confetti {
  font-size: 3.2rem;
  margin-bottom: 12px;
  animation: pulse 1.2s ease infinite;
}

#resultTitle {
  color: var(--yellow);
  font-size: clamp(1.8rem, 6vw, 3rem);
  margin-bottom: 24px;
  text-shadow:
    0 0 18px rgba(255, 208, 0, 0.42),
    0 0 45px rgba(255, 208, 0, 0.16);
}

.result-label {
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 8px;
}

#resultCountry {
  font-size: 1.45rem;
  margin-bottom: 22px;
}

.prize {
  color: var(--yellow);
  font-size: clamp(1.35rem, 5vw, 2rem);
  margin-bottom: 22px;
  text-transform: uppercase;
}

.result-message {
  color: var(--muted);
  line-height: 1.6;
}

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

  50% {
    transform: scale(1.12);
  }
}

/* =========================
   Configurações
========================= */

.settings-button {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  border: 1px solid rgba(255, 208, 0, 0.25);
  background: linear-gradient(145deg, #191919, #090909);
  color: var(--yellow);
  cursor: pointer;
  z-index: 1000;
  box-shadow:
    8px 8px 20px rgba(0, 0, 0, 0.55),
    -5px -5px 14px rgba(255, 255, 255, 0.035);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.settings-button:hover {
  transform: rotate(22deg) scale(1.07);
  box-shadow:
    10px 10px 24px rgba(0, 0, 0, 0.64),
    0 0 22px rgba(255, 208, 0, 0.28);
}

.settings-modal[hidden] {
  display: none;
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(9px);
}

.settings-panel {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: 28px;
  border-radius: 28px;
  animation: modalIn 0.25s ease forwards;
}

.settings-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #101010;
  color: var(--white);
  cursor: pointer;
  font-size: 1.45rem;
  box-shadow:
    inset 5px 5px 11px rgba(0, 0, 0, 0.58),
    inset -4px -4px 10px rgba(255, 255, 255, 0.035);
}

.settings-panel h2 {
  color: var(--yellow);
  margin-bottom: 9px;
}

.settings-description,
.settings-note {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.settings-action {
  margin-top: 14px;
}

.lead-counter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 17px;
  border-radius: 18px;
  background: #101010;
  border: 1px solid rgba(255, 208, 0, 0.12);
  box-shadow:
    inset 7px 7px 16px rgba(0, 0, 0, 0.55),
    inset -5px -5px 13px rgba(255, 255, 255, 0.03);
}

.lead-counter span {
  color: var(--muted);
}

.lead-counter strong {
  color: var(--yellow);
  font-size: 1.5rem;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================
   Fireworks
========================= */

.fireworks-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  z-index: 999;
  transition: opacity 0.25s ease;
}

.fireworks-canvas.active {
  opacity: 1;
}

/* =========================
   Responsivo
========================= */

@media (max-width: 980px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .flip-card {
    height: 226px;
  }
}

@media (max-width: 560px) {
  .screen {
    padding: 24px 16px;
  }

  .hero-content,
  .form,
  .settings-panel {
    padding: 23px;
  }

  .brand h1 {
    letter-spacing: -1.6px;
  }

  .route-map {
    gap: 6px;
  }

  .route-map span {
    width: 37px;
    height: 37px;
    font-size: 1.12rem;
  }

  .route-map i {
    width: 20px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .flip-card {
    height: 214px;
  }

  .card-flag {
    font-size: 4rem;
  }
}
