:root {
  --bg: #0c0c0e;
  --surface: #18181b;
  --surface-hover: #212124;
  --border: #2a2a2e;
  --text: #f2f2f2;
  --text-muted: #96969c;
  --accent: #2f6fed;
  --accent-soft: #5b8cff;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

#rede-neural {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

header {
  text-align: center;
  margin-bottom: 48px;
  animation: riseIn 0.5s ease both;
}

header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

header h1 span {
  color: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  z-index: 0;
  display: block;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  opacity: 0;
  animation: riseIn 0.5s ease both;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 14px 14px 0 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

/* Halo futurista: brilho circular atrás do card, respirando devagar */
.card::after {
  content: "";
  position: absolute;
  inset: -14%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 111, 237, 0.28), transparent 70%);
  filter: blur(20px);
  opacity: 0.3;
  animation: glowPulse 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.2; transform: scale(0.92); }
  50% { opacity: 0.5; transform: scale(1.04); }
}

.card:nth-child(1) { animation-delay: 0.08s; }
.card:nth-child(2) { animation-delay: 0.16s; }
.card:nth-child(3) { animation-delay: 0.24s; }
.card:nth-child(4) { animation-delay: 0.32s; }

.card:nth-child(1)::after { animation-delay: 0s; }
.card:nth-child(2)::after { animation-delay: 0.6s; }
.card:nth-child(3)::after { animation-delay: 1.2s; }
.card:nth-child(4)::after { animation-delay: 1.8s; }

.card:hover {
  background: var(--surface-hover);
  border-color: #3a3a3f;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -12px rgba(47, 111, 237, 0.35);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover::after {
  opacity: 0.75;
  animation-play-state: paused;
}

.card-face {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.card:hover .card-face {
  opacity: 1;
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-soft);
  margin-bottom: 10px;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}
