/* =============================================
   GERADOR DE CONFIGS - UNITV
   Design: Dark Mode, Glassmorphism, Neon Glow
   ============================================= */

/* Variáveis */
:root {
  --primary: 258 88% 66%;          /* Roxo vibrante */
  --primary-rgb: 124, 58, 237;
  --secondary: 199 89% 48%;        /* Ciano */
  --secondary-rgb: 6, 182, 212;
  --background: 222 47% 7%;        /* Fundo escuro */
  --card: 222 47% 11%;
  --foreground: 210 40% 98%;
  --muted: 217 33% 60%;
  --border: 222 47% 20%;
  --success: 142 71% 45%;
  --error: 0 84% 60%;
  --warning: 48 96% 53%;

  --glow-primary: 0 0 40px rgba(124, 58, 237, 0.5);
  --glow-secondary: 0 0 40px rgba(6, 182, 212, 0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: hsl(222, 47%, 7%);
  color: hsl(210, 40%, 98%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* =============================================
   FUNDO E PARTÍCULAS
   ============================================= */

.bg-gradient {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.08) 0%,
    transparent 50%,
    rgba(6, 182, 212, 0.06) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.bg-radial {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(124, 58, 237, 0.08) 0%,
    transparent 50%
  );
  pointer-events: none;
  z-index: 0;
}

.particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: hsl(var(--primary));
  border-radius: 50%;
  opacity: 0.25;
  animation: float linear infinite;
}

@keyframes float {
  0% { transform: translateY(0px) scale(1); opacity: 0.25; }
  50% { transform: translateY(-15px) scale(1.2); opacity: 0.4; }
  100% { transform: translateY(0px) scale(1); opacity: 0.25; }
}

/* =============================================
   LAYOUT PRINCIPAL
   ============================================= */

.main-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.content-wrapper {
  max-width: 1100px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* =============================================
   ANIMAÇÕES DE ENTRADA
   ============================================= */

.animate-fade-in {
  animation: fadeInUp 0.7s ease forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.35s; }
.delay-4 { animation-delay: 0.5s; }
.delay-5 { animation-delay: 0.65s; }

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

/* =============================================
   BADGE SUPERIOR
   ============================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: hsl(222, 47%, 11%);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 999px;
  font-size: 0.875rem;
  color: hsl(217, 33%, 65%);
  backdrop-filter: blur(10px);
}

.badge-icon {
  width: 1rem;
  height: 1rem;
  color: hsl(var(--primary));
  flex-shrink: 0;
}

/* =============================================
   CONTADORES
   ============================================= */

.counters {
  display: flex;
  justify-content: center;
  gap: 4rem;
}

.counter-item {
  text-align: center;
}

.counter-value {
  font-size: clamp(3.5rem, 10vw, 5rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, hsl(258, 88%, 75%), hsl(199, 89%, 65%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -2px;
}

.glow-text {
  filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.5));
}

.counter-label {
  font-size: 1.1rem;
  font-weight: 500;
  color: hsl(210, 40%, 98%);
  margin-top: 0.25rem;
  letter-spacing: 0.05em;
}

/* =============================================
   DESCRIÇÃO
   ============================================= */

.description {
  font-size: 1rem;
  color: hsl(217, 33%, 65%);
  max-width: 640px;
  line-height: 1.7;
}

.description a {
  color: hsl(199, 89%, 60%);
  text-decoration: none;
  transition: color 0.2s;
}

.description a:hover {
  color: hsl(199, 89%, 75%);
  text-decoration: underline;
}

.description strong {
  color: hsl(0, 84%, 70%);
}

/* =============================================
   BOTÕES
   ============================================= */

.buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  width: 100%;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.1rem 1.8rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn:focus-visible {
  outline: 2px solid rgba(124, 58, 237, 0.8);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, hsl(258, 88%, 55%) 0%, hsl(199, 89%, 40%) 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 50px rgba(124, 58, 237, 0.55), 0 8px 32px rgba(124, 58, 237, 0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

.btn-secondary {
  background: linear-gradient(135deg, hsl(222, 47%, 16%) 0%, hsl(222, 47%, 20%) 100%);
  color: hsl(210, 40%, 90%);
  border: 1px solid rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.4), 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: rgba(6, 182, 212, 0.5);
}

.btn-ghost {
  background: transparent;
  color: hsl(217, 33%, 65%);
  border: 1px solid rgba(124, 58, 237, 0.2);
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
}

.btn-ghost:hover {
  background: rgba(124, 58, 237, 0.1);
  color: hsl(210, 40%, 90%);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover:not(:disabled) .btn-overlay {
  opacity: 1;
}

.btn-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* =============================================
   SPINNER DE LOADING
   ============================================= */

.spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* =============================================
   FEATURE CARDS
   ============================================= */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
}

.feature-card {
  background: hsl(222, 47%, 11%);
  border: 1px solid rgba(124, 58, 237, 0.1);
  border-radius: 1.25rem;
  padding: 1.75rem 1.25rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(124, 58, 237, 0.1);
}

.feature-card--highlight {
  border-color: rgba(124, 58, 237, 0.25);
  background: linear-gradient(135deg, hsl(222, 47%, 13%), hsl(222, 47%, 11%));
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.08);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(210, 40%, 95%);
  margin-bottom: 0.25rem;
}

.feature-desc {
  font-size: 0.85rem;
  color: hsl(217, 33%, 60%);
}

/* =============================================
   BOTÃO DE APOIO
   ============================================= */

.btn-support {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  border: 1.5px solid rgba(124, 58, 237, 0.4);
  border-radius: 999px;
  color: hsl(217, 33%, 75%);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
}

.btn-support:hover {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.6);
  color: hsl(210, 40%, 95%);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.2);
}

.heart-icon {
  color: hsl(258, 88%, 75%);
  font-size: 1.1rem;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-radius: 0.875rem;
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 380px;
  pointer-events: all;
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  backdrop-filter: blur(16px);
  border: 1px solid transparent;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(120px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(120px) scale(0.9); }
}

.toast-success {
  background: rgba(6, 78, 59, 0.9);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

.toast-error {
  background: rgba(127, 29, 29, 0.9);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

.toast-info {
  background: rgba(30, 58, 138, 0.9);
  border-color: rgba(96, 165, 250, 0.3);
  color: #93c5fd;
}

.toast-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* =============================================
   MODAL
   ============================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  backdrop-filter: blur(6px);
  padding: 1rem;
}

.modal {
  background: hsl(222, 47%, 11%);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  animation: modalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(124, 58, 237, 0.15);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: hsl(217, 33%, 65%);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.375rem;
  transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
  color: hsl(210, 40%, 98%);
  background: rgba(255, 255, 255, 0.08);
}

.modal-desc {
  color: hsl(217, 33%, 65%);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-buttons {
  display: flex;
  flex-direction: column; /* Empilha os botões para dar mais espaço */
  gap: 0.75rem;
  width: 100%;
}

.modal-buttons .btn {
  width: 100%;
  white-space: normal; /* Permite quebra de linha se necessário */
  padding: 1rem 1.5rem;
}

/* =============================================
   RESPONSIVIDADE
   ============================================= */

@media (max-width: 640px) {
  .counters {
    gap: 2.5rem;
  }

  .counter-value {
    font-size: 3rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .buttons-container {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .toast {
    max-width: calc(100vw - 2rem);
  }

  .toast-container {
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .content-wrapper {
    gap: 2rem;
  }

  .modal {
    padding: 1.5rem;
  }
}

/* =============================================
   SCROLLBAR PERSONALIZADA
   ============================================= */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: hsl(222, 47%, 7%);
}

::-webkit-scrollbar-thumb {
  background: hsl(258, 88%, 55%);
  border-radius: 999px;
}

/* =============================================
   SELEÇÃO DE TEXTO
   ============================================= */

::selection {
  background: rgba(124, 58, 237, 0.35);
  color: hsl(210, 40%, 98%);
}
