:root {
  --background: hsl(216 28% 7%);
  --foreground: hsl(180 100% 95%);
  --card: hsl(216 28% 12%);
  --primary: hsl(185 100% 50%);
  --primary-foreground: hsl(216 28% 7%);
  --muted-foreground: hsl(180 20% 70%);
  --border: hsl(185 50% 20%);
  --input: hsl(216 28% 15%);

  --glow-primary: 0 0 20px hsla(185, 100%, 50%, 0.3);
  --glow-strong: 0 0 30px hsla(185, 100%, 50%, 0.5);
  --gradient-danger: linear-gradient(135deg, hsl(0, 100%, 50%), hsl(25, 100%, 50%));
  --glass-bg: hsla(216, 28%, 12%, 0.95);
  --text-shadow-glow: 0 0 8px hsla(185, 100%, 50%, 0.6);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Roboto', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ícones (SVG no estilo Lucide) */
.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-lg {
  width: 2rem;
  height: 2rem;
}

/* Página */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  background-image: url('/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.overlay {
  position: absolute;
  inset: 0;
  background: hsla(216, 28%, 7%, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding-bottom: 6rem;
}

/* Cartão do formulário */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glow-primary);
  border: 1px solid hsla(185, 50%, 20%, 0.5);
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 28rem;
  width: 100%;
  margin: 0 auto;
  animation: float 3s ease-in-out infinite;
}

.card-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.title-row h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 700;
  color: var(--foreground);
  text-shadow: var(--text-shadow-glow);
}

.card-header p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* Formulário */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1;
  font-weight: 500;
}

label .icon {
  color: var(--primary);
}

input,
select {
  width: 100%;
  height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: calc(0.5rem - 2px);
  border: 1px solid hsla(185, 50%, 20%, 0.5);
  background-color: var(--input);
  color: var(--foreground);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input::placeholder {
  color: var(--muted-foreground);
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px hsla(185, 100%, 50%, 0.2);
}

select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3c2c2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

select:has(option[value='']:checked) {
  color: var(--muted-foreground);
}

select option {
  background: var(--card);
  color: var(--foreground);
}

button[type='submit'] {
  width: 100%;
  margin-top: 1.5rem;
  min-height: 3rem;
  padding: 0.875rem 1rem;
  border: none;
  border-radius: calc(0.5rem - 2px);
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

button[type='submit']:hover:not(:disabled) {
  background: hsla(185, 100%, 50%, 0.9);
  box-shadow: var(--glow-strong);
}

button[type='submit']:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.card-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--muted-foreground);
}

/* Popup "Compra Garantida" */
.purchase-popup {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: 90%;
  max-width: 24rem;
  animation: pulse-scale 2s ease-in-out infinite;
}

.purchase-popup-inner {
  background: var(--gradient-danger);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  text-align: center;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.popup-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.popup-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.flame {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.count {
  display: inline-block;
  font-weight: 700;
  color: #fff;
  transition: all 0.15s;
}

.count.animating {
  transform: scale(1.25);
  color: #fde047;
}

/* Página 404 */
.not-found {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: hsl(216 28% 20%);
}

.not-found h1 {
  margin-bottom: 1rem;
  font-size: 2.25rem;
  font-weight: 700;
}

.not-found p {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--muted-foreground);
}

.not-found a {
  color: var(--primary);
  text-decoration: underline;
}

@media (min-width: 640px) {
  .page {
    padding: 2rem;
  }

  .card {
    padding: 2rem;
  }

  .title-row h1 {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

@media (min-width: 768px) {
  input,
  select {
    font-size: 0.875rem;
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}
