/* ==========================================
   CAMPANHA VSR - MINISTERIO DA SAUDE
   Tema DaisyUI v5 Customizado + Animações
   ========================================== */

/* ===== TEMA DE CORES (DARK) - DaisyUI v5 ===== */
[data-theme="dark"] {
  /* Base colors - Roxo profundo */
  --b1: 261 64% 18%;          /* base-100: Fundo principal */
  --b2: 262 45% 16%;          /* base-200: Fundo secundário */
  --b3: 261 55% 35%;          /* base-300: Fundo terciário */
  --bc: 250 20% 92%;          /* base-content: Texto */
  
  /* Primary - Verde Lima vibrante */
  --p: 76 90% 60%;
  --pc: 262 45% 16%;
  
  /* Secondary - Roxo médio */
  --s: 261 55% 35%;
  --sc: 330 70% 95%;
  
  /* Accent - Rosa/Magenta */
  --a: 340 82% 62%;
  --ac: 340 10% 97%;
  
  /* Neutral */
  --n: 268 42% 18%;
  --nc: 270 10% 92%;
  
  /* Info - Azul celeste */
  --in: 199 80% 65%;
  --inc: 199 50% 20%;
  
  /* Success - Verde esmeralda */
  --su: 151 65% 58%;
  --suc: 151 50% 25%;
  
  /* Warning - Laranja */
  --wa: 35 90% 60%;
  --wac: 35 60% 30%;
  
  /* Error - Vermelho coral */
  --er: 12 80% 58%;
  --erc: 12 10% 97%;
  
  /* Rounded corners */
  --rounded-box: 1rem;
  --rounded-btn: 0.5rem;
  --rounded-badge: 1.9rem;
  
  /* Animation */
  --animation-btn: 0.25s;
  --animation-input: 0.2s;
}

/* ===== GLOBAL STYLES ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', system-ui, sans-serif;
}

/* ===== BACKGROUND ANIMADO ===== */
.gradient-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 20%, hsl(261 55% 35% / 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, hsl(340 82% 62% / 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, hsl(76 90% 60% / 0.1) 0%, transparent 60%);
  animation: gradientShift 20s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.8;
  }
  25% {
    transform: scale(1.1) rotate(2deg);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.05) rotate(-1deg);
    opacity: 0.9;
  }
  75% {
    transform: scale(1.15) rotate(1deg);
    opacity: 0.7;
  }
}

/* Orbs Flutuantes */
.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: floatOrb 15s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: hsl(76 90% 60%);
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: hsl(340 82% 62%);
  top: 60%;
  right: 10%;
  animation-delay: -5s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: hsl(151 65% 58%);
  bottom: 20%;
  left: 30%;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -20px) scale(1.1);
  }
  50% {
    transform: translate(-20px, 30px) scale(0.95);
  }
  75% {
    transform: translate(20px, 20px) scale(1.05);
  }
}

/* ===== CURSOR GLOW (Mouse Follower) ===== */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, hsl(76 90% 60% / 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease-out;
  opacity: 0;
}

.cursor-glow.active {
  opacity: 1;
}

/* ===== ANIMAÇÕES DE ENTRADA ===== */
.animate-fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-delay-1 {
  animation: fadeInUp 0.8s ease-out 0.1s forwards;
  opacity: 0;
}

.animate-fade-in-delay-2 {
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.animate-fade-in-delay-3 {
  animation: fadeInUp 0.8s ease-out 0.3s forwards;
  opacity: 0;
}

.animate-fade-in-delay-4 {
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

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

/* Section Reveal - sempre visível */
.section-reveal {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Table Row - sempre visível */
.table-row-reveal {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* ===== HOVER EFFECTS ===== */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 20px 40px -12px hsl(0 0% 0% / 0.3),
    0 0 20px hsl(76 90% 60% / 0.1);
}

/* Stats Hover */
.stat {
  transition: all 0.3s ease-out;
}

.stat:hover {
  background: hsl(76 90% 60% / 0.1);
  border-radius: 1rem;
}

/* Badge Pulse for Primary */
.badge-primary {
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 hsl(76 90% 60% / 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px hsl(76 90% 60% / 0);
  }
}

/* ===== PROGRESS BARS ===== */
.progress {
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== CHAT BUBBLES ===== */
.chat-bubble {
  transition: all 0.3s ease-out;
}

.chat:hover .chat-bubble {
  transform: scale(1.02);
}

/* ===== RADIAL PROGRESS ===== */
.radial-progress {
  transition: all 0.5s ease-out;
}

.radial-progress:hover {
  transform: scale(1.05);
}

/* ===== AVATAR RING ANIMATION ===== */
.avatar .ring {
  transition: all 0.3s ease-out;
}

.avatar:hover .ring,
.avatar:hover > div {
  box-shadow: 0 0 20px hsl(76 90% 60% / 0.5);
}

/* ===== SCROLL INDICATOR ===== */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ===== COUNTER ANIMATION ===== */
.counter {
  display: inline-block;
}

/* ===== CHART CONTAINERS ===== */
#chart-timeline,
#chart-wordcloud {
  border-radius: 1rem;
}

/* ===== ALERT SUCCESS STYLING ===== */
.alert-success {
  border-left: 4px solid hsl(151 65% 58%);
}

/* ===== GLASSMORPHISM CARDS ===== */
.bg-base-100\/80 {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ===== TABLE STYLING ===== */
.table {
  border-radius: 1rem;
  overflow: hidden;
}

.table tr {
  transition: all 0.3s ease-out;
}

.table tr:hover {
  background: hsl(76 90% 60% / 0.05);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .floating-orb {
    filter: blur(60px);
  }
  
  .orb-1 {
    width: 200px;
    height: 200px;
  }
  
  .orb-2 {
    width: 150px;
    height: 150px;
  }
  
  .orb-3 {
    width: 180px;
    height: 180px;
  }
  
  .cursor-glow {
    display: none;
  }
}

/* ===== SELECTION STYLING ===== */
::selection {
  background: hsl(76 90% 60% / 0.3);
  color: hsl(262 45% 16%);
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: hsl(262 45% 16%);
}

::-webkit-scrollbar-thumb {
  background: hsl(261 55% 35%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(76 90% 60%);
}

/* ===== NOISE TEXTURE OVERLAY ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: 9999;
}

/* ===== LOADING STATE ===== */
.loading-skeleton {
  background: linear-gradient(
    90deg,
    hsl(262 45% 16%) 25%,
    hsl(261 64% 18%) 50%,
    hsl(262 45% 16%) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== DIVIDER STYLING ===== */
.divider {
  opacity: 0.3;
}

/* ===== FONT DISPLAY CLASS ===== */
.font-display {
  font-family: 'Outfit', system-ui, sans-serif;
}

.font-body {
  font-family: 'DM Sans', system-ui, sans-serif;
}
