:root {
  --bg-dark: #0a0c0e;
  --bg-card: #111418;
  --border: #1e2228;
  --green: #b5f033;
  --green-dim: #7aaa10;
  --green-glow: rgba(181, 240, 51, 0.18);
  --yellow: #f5d100;
  --red: #ff5470;
  --text: #e8edf2;
  --muted: #5a6370;
}

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

body {
  background: var(--bg-dark);
  color: var(--text);
  font-family: "Barlow", sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(181, 240, 51, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 240, 51, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 55% at 50% 40%,
    rgba(181, 240, 51, 0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.card-deck {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.floating-card {
  position: absolute;
  width: 38px;
  height: 54px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  opacity: 0;
  animation: floatCard 12s linear infinite;
}
.floating-card::after {
  content: attr(data-suit);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--green-dim);
  opacity: 0.5;
}
.floating-card:nth-child(1) { left: 8%; animation-delay: 0s; animation-duration: 14s; }
.floating-card:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 11s; }
.floating-card:nth-child(3) { left: 35%; animation-delay: 5s; animation-duration: 13s; }
.floating-card:nth-child(4) { left: 55%; animation-delay: 1s; animation-duration: 15s; }
.floating-card:nth-child(5) { left: 70%; animation-delay: 3.5s; animation-duration: 10s; }
.floating-card:nth-child(6) { left: 85%; animation-delay: 7s; animation-duration: 12s; }
.floating-card:nth-child(7) { left: 48%; animation-delay: 9s; animation-duration: 16s; }

@keyframes floatCard {
  0% { transform: translateY(110vh) rotate(-8deg); opacity: 0; }
  10% { opacity: 0.35; }
  90% { opacity: 0.35; }
  100% { transform: translateY(-10vh) rotate(8deg); opacity: 0; }
}

.container {
  position: relative;
  z-index: 10;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px 40px 40px;
  max-width: 520px;
  width: 92%;
  box-shadow:
    0 0 0 1px rgba(181, 240, 51, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.7),
    0 0 80px var(--green-glow);
  animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.container.centered {
  text-align: center;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), var(--yellow), var(--green), transparent);
  border-radius: 0 0 4px 4px;
}

.icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 28px;
  position: relative;
}
.icon-wrap svg {
  width: 100%;
  height: 100%;
  animation: popIn 0.5s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.4) rotate(-20deg); }
  to { opacity: 1; transform: none; }
}
.icon-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--green-dim);
  opacity: 0.4;
  animation: pulseRing 2.4s ease-out infinite;
}
.icon-ring:nth-child(2) { inset: -16px; animation-delay: 0.6s; opacity: 0.2; }
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.25); opacity: 0; }
}

.badge {
  display: inline-block;
  background: rgba(181, 240, 51, 0.08);
  border: 1px solid rgba(181, 240, 51, 0.2);
  color: var(--green);
  font-family: "Barlow", sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  animation: fadeIn 0.5s 0.55s both;
}
.badge.warn {
  background: rgba(245, 209, 0, 0.08);
  border-color: rgba(245, 209, 0, 0.2);
  color: var(--yellow);
}
.badge.danger {
  background: rgba(255, 84, 112, 0.08);
  border-color: rgba(255, 84, 112, 0.25);
  color: var(--red);
}

h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 14px;
  animation: fadeIn 0.5s 0.65s both;
}
h1 span {
  color: var(--green);
}

p.sub {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
  animation: fadeIn 0.5s 0.75s both;
}

.email-line {
  display: inline-block;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.85rem;
  margin-bottom: 20px;
  animation: fadeIn 0.5s 0.7s both;
}

.origin-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 24px;
  animation: fadeIn 0.5s 0.75s both;
}
.origin-note strong {
  color: var(--green);
  text-transform: capitalize;
}

.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 24px 0;
  animation: fadeIn 0.5s 0.8s both;
}

.categories {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  animation: fadeIn 0.5s 0.8s both;
}
.category-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.category-item:hover {
  border-color: var(--green-dim);
  background: rgba(181, 240, 51, 0.04);
}
.category-item.checked {
  border-color: var(--green-dim);
  background: rgba(181, 240, 51, 0.05);
}
.category-item input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--muted);
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  transition: border-color 0.15s, background 0.15s;
}
.category-item input[type="checkbox"]:checked {
  border-color: var(--green);
  background: var(--green);
}
.category-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 12px;
  border: solid #0a0c0e;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.category-info {
  flex: 1;
}
.category-name {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.category-desc {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.category-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.01);
}
.category-item.disabled .category-name::after {
  content: " (sempre enviado)";
  color: var(--muted);
  font-weight: 400;
  font-size: 0.75rem;
}

.hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 20px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--green-dim);
  border-radius: 4px;
  animation: fadeIn 0.5s 0.85s both;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.5s 0.9s both;
}
.btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border-radius: 10px;
  font-family: "Barlow", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  border: none;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--green);
  color: #0a0c0e;
  box-shadow: 0 0 24px rgba(181, 240, 51, 0.3);
}
.btn-primary:hover:not(:disabled) {
  background: #c8ff2a;
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(181, 240, 51, 0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--muted);
  color: var(--text);
  transform: translateY(-1px);
}

.footer-note {
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  animation: fadeIn 0.5s 1s both;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden { display: none !important; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
