/* Standard CSS - No Tailwind Directives for CDN compatibility */

/* Utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

/* Bounce Subtle for Sticky CTA */
@keyframes bounce-subtle {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.animate-bounce-subtle {
  animation: bounce-subtle 2s infinite ease-in-out;
}

/* Custom Fonts */
.font-inter {
  font-family: 'Inter', sans-serif;
}

.font-source {
  font-family: 'Georgia', serif;
  font-style: italic;
}

/* Logo Glitch Effect */
.glitch-logo {
  position: relative;
  color: #000;
}

.dark .glitch-logo {
  color: #fff;
}

.glitch-logo::before,
.glitch-logo::after {
  content: "ZenFeed";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  opacity: 0.8;
  /* Slow animation by default */
  animation: glitch-anim-1 3s infinite linear alternate-reverse;
}

.glitch-logo::after {
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-logo:hover::before {
  left: 2px;
  text-shadow: -1px 0 #ff00c1;
  clip-path: inset(44% 0 61% 0);
  /* Fast animation on hover */
  animation: glitch-anim-1 0.4s infinite linear alternate-reverse;
}

.glitch-logo:hover::after {
  left: -2px;
  text-shadow: -1px 0 #00fff9;
  clip-path: inset(50% 0 30% 0);
  animation: glitch-anim-2 0.4s infinite linear alternate-reverse;
}

/* Glitch Z for Modal Button */
/* Glitch Z for Modal Button */
.glitch-z {
  display: inline-block;
  position: relative;
  font-weight: 900;
  font-size: 1.5rem;
}

.glitch-z::before,
.glitch-z::after {
  content: "Z";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  opacity: 1;
  /* FAST animation DEFAULT - matches what was on hover */
  text-shadow: -1px 0 #ff00c1;
  clip-path: inset(44% 0 61% 0);
  animation: glitch-anim-1 0.3s infinite linear alternate-reverse;
}

.glitch-z::after {
  text-shadow: -1px 0 #00fff9;
  clip-path: inset(50% 0 30% 0);
  animation: glitch-anim-2 0.3s infinite linear alternate-reverse;
}

/* Hover slightly alters slice for variety, but keeps speed/intensity */
.glitch-z:hover::before {
  text-shadow: -2px 0 #ff00c1;
  clip-path: inset(20% 0 50% 0);
}

.glitch-z:hover::after {
  text-shadow: -2px 0 #00fff9;
  clip-path: inset(60% 0 10% 0);
}

/* Border Cycle Animation */
@keyframes border-pulse {
  0% {
    border-color: #3b82f6;
    box-shadow: 0 0 5px #3b82f6;
    color: #3b82f6;
  }

  /* blue-500 */
  33% {
    border-color: #8b5cf6;
    box-shadow: 0 0 5px #8b5cf6;
    color: #8b5cf6;
  }

  /* violet-500 */
  66% {
    border-color: #06b6d4;
    box-shadow: 0 0 5px #06b6d4;
    color: #06b6d4;
  }

  /* cyan-500 */
  100% {
    border-color: #3b82f6;
    box-shadow: 0 0 5px #3b82f6;
    color: #3b82f6;
  }
}

.btn-home-animated {
  background: transparent !important;
  border: 2px solid #3b82f6 !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5), inset 0 0 5px rgba(59, 130, 246, 0.3);
  animation: border-pulse 2s infinite linear;
}

/* Ensure the Z text takes the animated color */
.btn-home-animated .glitch-z {
  color: inherit !important;
}

@keyframes glitch-anim-1 {
  0% {
    clip-path: inset(20% 0 80% 0);
  }

  20% {
    clip-path: inset(60% 0 10% 0);
  }

  40% {
    clip-path: inset(40% 0 50% 0);
  }

  60% {
    clip-path: inset(80% 0 5% 0);
  }

  80% {
    clip-path: inset(10% 0 70% 0);
  }

  100% {
    clip-path: inset(30% 0 20% 0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip-path: inset(10% 0 60% 0);
  }

  20% {
    clip-path: inset(30% 0 10% 0);
  }

  40% {
    clip-path: inset(70% 0 20% 0);
  }

  60% {
    clip-path: inset(20% 0 40% 0);
  }

  80% {
    clip-path: inset(50% 0 80% 0);
  }

  100% {
    clip-path: inset(80% 0 5% 0);
  }

  100% {
    clip-path: inset(80% 0 5% 0);
  }
}

/* Intro Flash Animation for Share Buttons */
@keyframes intro-flash {
  0% {
    opacity: 0;
    transform: scale(0.9);
    filter: brightness(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(1.5);
  }

  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
}

/* Base class for invisible start */
.opacity-0-start {
  opacity: 0;
  animation-fill-mode: forwards;
  /* Retain final state */
}

.intro-flash-1 {
  animation: intro-flash 1.5s ease-in-out forwards;
  animation-delay: 0.5s;
}

.intro-flash-2 {
  animation: intro-flash 1.5s ease-in-out forwards;
  animation-delay: 0.7s;
}

.intro-flash-3 {
  animation: intro-flash 1.5s ease-in-out forwards;
  animation-delay: 0.9s;
}

/* Tab Buttons - Unified Design */
.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
  color: #6b7280;
  /* gray-500 */
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hover State (Inactive) */
.tab-btn:hover {
  color: #111827;
  /* gray-900 */
  background-color: #f3f4f6;
  /* gray-100 */
}

.dark .tab-btn {
  color: #9ca3af;
  /* gray-400 */
}

.dark .tab-btn:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

/* --- ACTIVE STATES --- */

/* LOCAL (Blue) */
.tab-btn[data-tab="local"].active {
  color: #2563eb;
  /* blue-600 */
  background-color: #eff6ff;
  /* blue-50 */
  border-color: #bfdbfe;
  /* blue-200 */
}

.dark .tab-btn[data-tab="local"].active {
  color: #60a5fa;
  /* blue-400 */
  background-color: rgba(30, 58, 138, 0.3);
  /* blue-900/30 */
  border-color: rgba(30, 64, 175, 0.4);
}

/* GLOBAL (Red) */
.tab-btn[data-tab="global"].active {
  color: #ef4444;
  /* red-500 */
  background-color: #fef2f2;
  /* red-50 */
  border-color: #fecaca;
  /* red-200 */
}

.dark .tab-btn[data-tab="global"].active {
  color: #f87171;
  /* red-400 */
  background-color: rgba(127, 29, 29, 0.3);
  /* red-900/30 */
  border-color: rgba(185, 28, 28, 0.4);
}

/* SHOP (Orange) */
.tab-btn[data-tab="shop"].active {
  color: #ea580c;
  /* orange-600 */
  background-color: #fff7ed;
  /* orange-50 */
  border-color: #fed7aa;
  /* orange-200 */
}

.dark .tab-btn[data-tab="shop"].active {
  color: #fb923c;
  /* orange-400 */
  background-color: rgba(124, 45, 18, 0.3);
  /* orange-900/30 */
  border-color: rgba(154, 52, 18, 0.4);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #4b5563;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Transitions */
.fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(10px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Arrow Animation */
/* Arrow Animation - Color should be set by utility classes */
@keyframes slideRight {
  0% {
    transform: translateX(0);
    opacity: 0.5;
  }

  50% {
    transform: translateX(4px);
    opacity: 1;
  }

  100% {
    transform: translateX(0);
    opacity: 0.5;
  }
}

.arrow-anim {
  display: inline-block;
  /* color removed to allow text-{color} utilities to work */
  margin-right: 0.5rem;
  font-weight: bold;
  animation: slideRight 1.5s infinite ease-in-out;
}

/* Base Pulse Blue (Default) */
@keyframes border-pulse {
  0% {
    border-color: #3b82f6;
    box-shadow: 0 0 5px #3b82f6;
    color: #3b82f6;
  }

  33% {
    border-color: #8b5cf6;
    box-shadow: 0 0 5px #8b5cf6;
    color: #8b5cf6;
  }

  66% {
    border-color: #06b6d4;
    box-shadow: 0 0 5px #06b6d4;
    color: #06b6d4;
  }

  100% {
    border-color: #3b82f6;
    box-shadow: 0 0 5px #3b82f6;
    color: #3b82f6;
  }
}

.btn-home-animated {
  background: transparent !important;
  border: 2px solid #3b82f6 !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5), inset 0 0 5px rgba(59, 130, 246, 0.3);
  animation: border-pulse 2s infinite linear;
}

/* Red Theme Pulse (Global) */
@keyframes border-pulse-red {
  0% {
    border-color: #ef4444;
    box-shadow: 0 0 5px #ef4444;
    color: #ef4444;
  }

  50% {
    border-color: #b91c1c;
    box-shadow: 0 0 10px #b91c1c;
    color: #b91c1c;
  }

  100% {
    border-color: #ef4444;
    box-shadow: 0 0 5px #ef4444;
    color: #ef4444;
  }
}

.btn-home-animated.red-theme {
  border-color: #ef4444 !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5), inset 0 0 5px rgba(239, 68, 68, 0.3);
  animation: border-pulse-red 2s infinite linear;
}

/* Orange Theme Pulse (Shop) */
@keyframes border-pulse-orange {
  0% {
    border-color: #f97316;
    box-shadow: 0 0 5px #f97316;
    color: #f97316;
  }

  50% {
    border-color: #c2410c;
    box-shadow: 0 0 10px #c2410c;
    color: #c2410c;
  }

  100% {
    border-color: #f97316;
    box-shadow: 0 0 5px #f97316;
    color: #f97316;
  }
}

.btn-home-animated.orange-theme {
  border-color: #f97316 !important;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.5), inset 0 0 5px rgba(249, 115, 22, 0.3);
  animation: border-pulse-orange 2s infinite linear;
}

.btn-home-animated .glitch-z {
  color: inherit !important;
}

/* Hover Glow Effects - Adjusted for better contrast */
.hover-glow-blue:hover {
  text-shadow: 0 0 15px rgba(37, 99, 235, 0.8);
  /* blue-600 stronger */
}

.hover-glow-red:hover {
  text-shadow: 0 0 15px rgba(220, 38, 38, 0.8);
  /* red-600 stronger */
}

.hover-glow-orange:hover {
  text-shadow: 0 0 15px rgba(234, 88, 12, 0.8);
  /* orange-600 stronger */
}

/* New Glow Text Utilities for Sub-links */
.glow-text-blue:hover {
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.glow-text-red:hover {
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.glow-text-orange:hover {
  text-shadow: 0 0 8px rgba(249, 115, 22, 0.6);
}

/* Intro Flash for Action Buttons */
@keyframes attention-flash {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
  }

  20% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }

  /* Aparece */
  80% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }

  /* Fica um pouco */
  100% {
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
  }

  /* Some para esperar o hover */
}

.intro-flash {
  animation: attention-flash 2.5s ease-in-out forwards;
  /* Forwards garante que termina em opacity 0, assumindo o comportamento de hover depois */
}

/* Garante que o hover sempre force opacity 1, vencendo a animação */
.group:hover .intro-flash {
  animation: none;
  /* Para a animação se passar o mouse rápido */
  opacity: 1 !important;
  transform: translateY(-50%) scale(1) !important;
}

/* Animação de entrada em cascata (Slide Down + Fade) */
@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-down {
  animation: slideDownFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  /* Começa invisível */
}

/* SAVED (Purple) */
.tab-btn[data-tab="saved"].active {
  color: #9333ea; /* purple-600 */
  background-color: #f3e8ff; /* purple-50 */
  border-color: #d8b4fe; /* purple-200 */
}
.dark .tab-btn[data-tab="saved"].active {
  color: #c084fc; /* purple-400 */
  background-color: rgba(147, 51, 234, 0.3); /* purple-900/30 */
  border-color: rgba(168, 85, 247, 0.4);
}
/* Animação de Remoção Suave */
.card-exit-anim {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.95);
    margin: 0;
    padding: 0;
    height: 0;
    overflow: hidden;
    border: none;
}
