/* ========================================
   🎨 PULSAR v10.5 - Categories CSS
   Sistema de Categorias Vivas e Inteligentes
   ======================================== */

/* ========================================
   📐 Grid Layout
   ======================================== */

.pulsar-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .pulsar-categories-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1.5rem;
  }
}

/* ========================================
   🎴 Category Cards
   ======================================== */

.pulsar-category-card {
  position: relative;
  padding: 2rem;
  border-radius: 24px;
  backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
  animation: slideInUp 0.6s ease-out both;
}

.pulsar-category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  z-index: 0;
}

.pulsar-category-card > * {
  position: relative;
  z-index: 1;
}

.pulsar-category-card:hover {
  transform: translateY(-10px) scale(1.02);
}

/* ========================================
   🎨 Card Header
   ======================================== */

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.category-icon {
  font-size: 3rem;
  filter: drop-shadow(0 4px 12px currentColor);
  animation: pulse 2s ease-in-out infinite;
}

.category-emotion-badge {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(8px);
}

/* ========================================
   📝 Card Body
   ======================================== */

.category-body {
  margin-bottom: 1.5rem;
}

.category-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.category-tagline {
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.category-description {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* ========================================
   📊 Stats
   ======================================== */

.category-stats {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-icon {
  font-size: 1.5rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================
   ⚙️ Features
   ======================================== */

.category-features {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.category-features span {
  transition: transform 0.2s;
  cursor: help;
}

.category-features span:hover {
  transform: scale(1.2);
}

/* ========================================
   🔘 Explore Button
   ======================================== */

.category-explore-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.category-explore-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.category-explore-btn:active {
  transform: translateY(0);
}

/* ========================================
   🎭 Animation Layer
   ======================================== */

.category-animation-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 24px;
  z-index: 0;
}

/* ========================================
   🌊 Sound Waves Animation
   ======================================== */

.animation-sound-waves .sound-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: soundWaveExpand 2s ease-out infinite;
}

@keyframes soundWaveExpand {
  0% {
    width: 50px;
    height: 50px;
    opacity: 1;
  }
  100% {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

/* ========================================
   ⚡ Energy Particles Animation
   ======================================== */

.animation-energy-particles .energy-particle {
  position: absolute;
  bottom: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: particleRise 3s ease-in-out infinite;
}

@keyframes particleRise {
  0% {
    bottom: 0;
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    bottom: 100%;
    opacity: 0;
    transform: translateX(calc(var(--random-x, 0) * 50px));
  }
}

/* ========================================
   💖 Heart Ascend Animation
   ======================================== */

.animation-heart-ascend .heart-particle {
  position: absolute;
  bottom: 0;
  font-size: 1.5rem;
  animation: heartFloat 3s ease-out forwards;
  pointer-events: none;
}

@keyframes heartFloat {
  0% {
    bottom: 0;
    opacity: 1;
    transform: scale(0.5) rotate(0deg);
  }
  50% {
    opacity: 0.8;
    transform: scale(1) rotate(15deg);
  }
  100% {
    bottom: 120%;
    opacity: 0;
    transform: scale(0.3) rotate(-15deg);
  }
}

/* ========================================
   💫 Neon Pulse Animation
   ======================================== */

.animation-neon-pulse .neon-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* ========================================
   🎭 Mask Morph Animation
   ======================================== */

.animation-mask-morph {
  animation: maskMorph 4s ease-in-out infinite;
}

@keyframes maskMorph {
  0%, 100% {
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  }
  50% {
    clip-path: polygon(30% 0%, 100% 20%, 90% 80%, 10% 100%, 0% 50%);
  }
}

/* ========================================
   🎈 Balloons Float Animation
   ======================================== */

.animation-balloons-float::after {
  content: '🎈🎈🎈';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  animation: balloonsRise 6s ease-in-out infinite;
}

@keyframes balloonsRise {
  0% {
    bottom: 0;
    opacity: 1;
  }
  100% {
    bottom: 100%;
    opacity: 0;
  }
}

/* ========================================
   💨 Steam Rise Animation
   ======================================== */

.animation-steam-rise::before {
  content: '';
  position: absolute;
  bottom: 20%;
  left: 50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255,255,255,0.3), transparent);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: steamRise 3s ease-out infinite;
}

@keyframes steamRise {
  0% {
    bottom: 20%;
    opacity: 0.6;
    transform: translateX(-50%) scale(0.5);
  }
  100% {
    bottom: 80%;
    opacity: 0;
    transform: translateX(-50%) scale(1.5);
  }
}

/* ========================================
   🌐 Digital Grid Animation
   ======================================== */

.animation-digital-grid {
  background-image: 
    linear-gradient(0deg, rgba(0,224,255,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,224,255,0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 20px 20px;
  }
}

/* ========================================
   🎬 Cinema Glow Animation
   ======================================== */

.animation-cinema-glow {
  box-shadow: 
    inset 0 0 80px rgba(26,35,126,0.5),
    0 0 40px rgba(26,35,126,0.3);
  animation: cinemaGlow 3s ease-in-out infinite;
}

@keyframes cinemaGlow {
  0%, 100% {
    box-shadow: 
      inset 0 0 80px rgba(26,35,126,0.3),
      0 0 40px rgba(26,35,126,0.2);
  }
  50% {
    box-shadow: 
      inset 0 0 120px rgba(26,35,126,0.6),
      0 0 60px rgba(26,35,126,0.4);
  }
}

/* ========================================
   🐾 Paws Follow Animation
   ======================================== */

.animation-paws-follow::after {
  content: '🐾';
  position: absolute;
  font-size: 1.5rem;
  animation: pawsPrint 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pawsPrint {
  0% {
    top: 0;
    left: 0;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    top: 100%;
    left: 100%;
    opacity: 0;
  }
}

/* ========================================
   🍃 Wind Parallax Animation
   ======================================== */

.animation-wind-parallax::before {
  content: '🍃';
  position: absolute;
  font-size: 2rem;
  animation: windBlow 6s ease-in-out infinite;
}

@keyframes windBlow {
  0% {
    top: 10%;
    left: -10%;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    top: 80%;
    left: 110%;
    opacity: 0;
  }
}

/* ========================================
   📚 Knowledge Float Animation
   ======================================== */

.animation-knowledge-float::after {
  content: '📚💡🎓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  opacity: 0.2;
  animation: knowledgeSpin 10s linear infinite;
}

@keyframes knowledgeSpin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ========================================
   🎯 Parallax Showcase Animation
   ======================================== */

.animation-parallax-showcase {
  background-image: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.05) 50%, transparent 60%);
  background-size: 200% 200%;
  animation: parallaxMove 4s linear infinite;
}

@keyframes parallaxMove {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 200%;
  }
}

/* ========================================
   📱 Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
  .pulsar-category-card {
    padding: 1.5rem;
  }

  .category-name {
    font-size: 1.5rem;
  }

  .category-icon {
    font-size: 2.5rem;
  }

  .category-stats {
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .stat-value {
    font-size: 1rem;
  }
}

/* ========================================
   🎨 Accessibility
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .pulsar-category-card,
  .category-animation-layer * {
    animation: none !important;
    transition: none !important;
  }
}

/* ========================================
   🌙 Dark Mode Enhancements
   ======================================== */

@media (prefers-color-scheme: dark) {
  .pulsar-category-card::before {
    background: rgba(0, 0, 0, 0.5);
  }

  .category-stats {
    background: rgba(0, 0, 0, 0.4);
  }
}
