/* Custom Tailwind Extensions and Animations - Green Gym Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #22c55e;
  --secondary: #16a34a;
  --accent: #84cc16;
}

body {
  font-family: 'Inter', sans-serif;
}

/* Enhanced animations */
@keyframes float {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg); 
    opacity: 0.7;
  }
  50% { 
    transform: translateY(-20px) rotate(2deg); 
    opacity: 1;
  }
}

/* Fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Gradient background animation */
.bg-300\% {
  background-size: 300% 300%;
}

/* Card glow effects */
.card-glow {
  filter: blur(20px);
  opacity: 0.4;
}

/* Mode selector enhancements */
.mode-btn {
  position: relative;
  backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-btn:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(34, 197, 94, 0.15);
}

/* Active mode button with green theme */
.mode-btn.active {
  border-color: var(--primary);
  background: linear-gradient(to bottom right, rgba(34, 197, 94, 0.1), rgba(132, 204, 22, 0.1));
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

/* Filter button active state with green theme */
.filter-btn.active {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  color: #000;
  font-weight: 700;
  text-shadow: none;
}

.filter-btn:not(.active) {
  background: rgba(51, 65, 85, 0.5);
  color: rgb(156, 163, 175);
  transition: all 0.3s ease;
}

.filter-btn:not(.active):hover {
  background: rgba(34, 197, 94, 0.1);
  color: var(--primary);
  border-color: rgba(34, 197, 94, 0.3);
}

/* Loading button state */
.action-btn {
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 800;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.action-btn:hover::before {
  left: 100%;
}

.action-btn.loading .btn-content {
  display: none;
}

.action-btn.loading .btn-loading {
  display: flex !important;
}

/* Status card variants with green theme */
.status-card.success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.status-card.success .status-icon {
  background: rgba(34, 197, 94, 0.2);
  color: var(--primary);
  font-size: 1.5rem;
  width: 2rem;
  height: 2rem;
}

.status-card.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.status-card.error .status-icon {
  background: rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
  font-size: 1.5rem;
  width: 2rem;
  height: 2rem;
}

.status-card.warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.status-card.warning .status-icon {
  background: rgba(245, 158, 11, 0.2);
  color: rgb(245, 158, 11);
  font-size: 1.5rem;
  width: 2rem;
  height: 2rem;
}

/* Channel status icon size control */
.channel-status-large svg,
.channel-status-large .status-icon {
  width: 3rem !important;
  height: 3rem !important;
  font-size: 2rem !important;
}

#channelStatusIcon svg {
  width: 3rem !important;
  height: 3rem !important;
}

/* Channel item styling with green theme */
.channel-item {
  @apply flex items-center justify-between p-4 bg-slate-800/40 border border-slate-700/50 rounded-lg transition-all duration-300;
}

.channel-item:hover {
  @apply border-primary/50 bg-slate-700/30;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.channel-item.live {
  @apply border-l-4;
  border-left-color: var(--primary);
}

.channel-item.dead {
  @apply border-l-4 border-l-red-500;
}

/* Category badge with green theme */
.category-badge {
  @apply px-4 py-2 border border-slate-600 rounded-lg text-sm font-medium transition-all duration-300 cursor-pointer;
  background: rgba(51, 65, 85, 0.5);
  color: rgb(156, 163, 175);
}

.category-badge:hover {
  background: rgba(34, 197, 94, 0.1);
  color: var(--primary);
  border-color: rgba(34, 197, 94, 0.3);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Checkmark animation */
@keyframes checkmark {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.checkmark-check {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: checkmark 0.6s ease-out 0.3s forwards;
}

/* Responsive adjustments with enhanced mobile experience */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.1;
  }
  
  .feature-card .corner-badge {
    font-size: 3rem;
  }
  
  .mode-selector {
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .mode-btn {
    padding: 1.5rem 1rem;
    min-height: 120px;
  }
  
  .action-btn {
    font-size: 1rem;
    padding: 1rem 1.5rem;
    min-height: 56px;
  }
  
  .converter-card {
    margin: 0 1rem;
  }
}

/* Enhanced mobile touch targets */
@media (max-width: 480px) {
  .filter-btn {
    min-height: 44px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .summary-card {
    padding: 1rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
}

/* Additional enhancements */
.summary-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(34, 197, 94, 0.15);
}

.feature-card {
  transition: all 0.3s ease;
  position: relative;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(34, 197, 94, 0.15);
}

/* Progress bar styling */
.progress-fill-animated {
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
  background-size: 200% 100%;
  animation: gradient-shift 2s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Live percentage bars */
.live-bar {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.dead-bar {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}
