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

:root {
  --primary: #8b5cf6;
  --primary-light: #a78bfa;
  --primary-dark: #7c3aed;
  --secondary: #06b6d4;
  --success: #10b981;
  --success-light: #34d399;
  --error: #ef4444;
  --warning: #f59e0b;
  --bg-dark: #0a0a0f;
  --bg-card: rgba(15, 15, 25, 0.8);
  --bg-card-hover: rgba(25, 25, 40, 0.9);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: rgba(139, 92, 246, 0.2);
  --border-light: rgba(255, 255, 255, 0.1);
  --glow: rgba(139, 92, 246, 0.5);
  --glow-cyan: rgba(6, 182, 212, 0.5);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 20s infinite ease-in-out;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, var(--primary) 0%, #ec4899 100%);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, var(--secondary) 0%, #3b82f6 100%);
  bottom: -150px;
  right: -150px;
  animation-delay: -7s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

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

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--glow);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.logo-text .accent {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 500;
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* Main */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 20px 0 10px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--primary-light);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease-out;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

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

/* Converter Card */
.converter-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid var(--border);
  padding: 32px;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.card-glow {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, var(--primary) 0%, transparent 50%, var(--secondary) 100%);
  border-radius: 25px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.converter-card:hover .card-glow {
  opacity: 0.3;
}

/* Progress Steps */
.progress-container {
  margin-bottom: 32px;
}

.progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.steps {
  display: flex;
  justify-content: space-between;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.step.active {
  opacity: 1;
}

.step.completed {
  opacity: 1;
}

.step.completed .step-icon {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.step.active .step-icon {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary);
  box-shadow: 0 4px 20px var(--glow);
}

.step-icon svg {
  width: 20px;
  height: 20px;
}

.step span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.step.active span {
  color: var(--text);
}

/* Input Section */
.input-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 20px;
  color: var(--text-dim);
  pointer-events: none;
  transition: color 0.3s ease;
}

.input-icon svg {
  width: 20px;
  height: 20px;
}

.input-group input {
  width: 100%;
  padding: 18px 50px 18px 54px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
}

.input-group input::placeholder {
  color: var(--text-dim);
}

.input-group input:focus {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.05);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.input-group input:focus + .input-icon,
.input-group:focus-within .input-icon {
  color: var(--primary);
}

.clear-btn {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.clear-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.clear-btn svg {
  width: 18px;
  height: 18px;
}

.clear-btn.hidden {
  display: none;
}

/* Convert Button */
.convert-btn {
  padding: 18px 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.convert-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 ease;
}

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

.convert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--glow);
}

.convert-btn:active {
  transform: translateY(0);
}

.convert-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-content svg {
  width: 20px;
  height: 20px;
}

.btn-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

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

.convert-btn.loading .btn-loading {
  display: flex;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Warning Banner */
.warning-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
}

.warning-banner.hidden {
  display: none;
}

.warning-banner svg {
  width: 20px;
  height: 20px;
  color: var(--warning);
  flex-shrink: 0;
}

.warning-banner span {
  font-size: 0.9rem;
  color: var(--warning);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Status Container */
.status-container {
  margin-top: 20px;
}

.status-container.hidden {
  display: none;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  animation: fadeIn 0.3s ease;
}

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

.status-card.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.status-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-card.error .status-icon {
  background: rgba(239, 68, 68, 0.2);
}

.status-card.success .status-icon {
  background: rgba(16, 185, 129, 0.2);
}

.status-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.status-message {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Download Section */
.download-section {
  text-align: center;
  padding: 32px 20px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  margin-top: 20px;
  animation: fadeIn 0.5s ease;
}

.download-section.hidden {
  display: none;
}

.success-animation {
  margin-bottom: 20px;
}

.checkmark-circle {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  color: var(--success);
  animation: scaleIn 0.5s ease;
}

.checkmark-circle svg {
  width: 100%;
  height: 100%;
}

.checkmark-circle circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-circle path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
  100% { stroke-dashoffset: 0; }
}

@keyframes scaleIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.download-section h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--success);
}

.download-section p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

.download-btn svg {
  width: 20px;
  height: 20px;
}

.secondary-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.2s ease;
}

.secondary-btn:hover {
  color: var(--text);
}

/* Features Section */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
  transform: translateY(-4px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  color: var(--primary-light);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Formats Section */
.formats {
  text-align: center;
  padding: 20px 0;
}

.formats h4 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.format-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.format-tag {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.format-tag:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--border);
  color: var(--text);
}

/* Footer */
footer {
  padding: 32px 0 20px;
  text-align: center;
}

footer p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.footer-links {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 16px;
  }
  
  header {
    flex-direction: column;
    gap: 16px;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .converter-card {
    padding: 24px 16px;
  }
  
  .step span {
    font-size: 0.75rem;
  }
  
  .step-icon {
    width: 40px;
    height: 40px;
  }
  
  .step-icon svg {
    width: 16px;
    height: 16px;
  }
  
  .input-group input {
    padding: 16px 44px 16px 48px;
    font-size: 0.95rem;
  }
  
  .convert-btn {
    width: 100%;
    padding: 16px;
  }
  
  .features {
    gap: 16px;
  }
  
  .feature-card {
    padding: 20px;
  }
  
  .mode-selector {
    gap: 8px;
  }
  
  .mode-btn {
    padding: 10px 14px;
    font-size: 0.8rem;
    gap: 6px;
  }
  
  .mode-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* Mode Selector */
.mode-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.mode-btn svg {
  width: 20px;
  height: 20px;
}

.mode-btn:hover {
  border-color: var(--primary);
  color: var(--text);
}

.mode-btn.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(6, 182, 212, 0.1) 100%);
  border-color: var(--primary);
  color: var(--text);
}

/* Action Button */
.action-btn {
  padding: 18px 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.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 ease;
}

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

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--glow);
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.action-btn .btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.action-btn .btn-content svg {
  width: 20px;
  height: 20px;
}

.action-btn .btn-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

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

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

/* Analysis Progress */
.analysis-progress {
  margin-top: 20px;
  padding: 16px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
}

.analysis-progress.hidden {
  display: none;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.progress-bar-full {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill-animated {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Analysis Results */
.analysis-results {
  animation: fadeInUp 0.5s ease;
}

.analysis-results.hidden {
  display: none;
}

/* Summary Grid */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.summary-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.summary-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-icon svg {
  width: 24px;
  height: 24px;
}

.summary-icon.total {
  background: rgba(139, 92, 246, 0.2);
  color: var(--primary-light);
}

.summary-icon.live {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.summary-icon.dead {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

.summary-icon.groups {
  background: rgba(6, 182, 212, 0.2);
  color: var(--secondary);
}

.summary-data {
  display: flex;
  flex-direction: column;
}

.summary-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.summary-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Live Percentage */
.live-percentage-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.live-percentage-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 500;
}

.live-percentage-header span:last-child {
  color: var(--success);
  font-weight: 700;
}

.live-percentage-bar {
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
}

.live-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--success) 0%, var(--success-light) 100%);
  transition: width 0.5s ease;
}

.dead-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--error) 0%, #f87171 100%);
  transition: width 0.5s ease;
}

.live-percentage-legend {
  display: flex;
  gap: 20px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.live-percentage-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.live { background: var(--success); }
.dot.dead { background: var(--error); }
.dot.unchecked { background: var(--text-dim); }

/* Categories Section */
.categories-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.categories-section h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.categories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text);
  transition: all 0.2s ease;
}

.category-tag:hover {
  background: rgba(139, 92, 246, 0.2);
}

.category-tag .count {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Channels Section */
.channels-section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.channels-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.channels-header h3 {
  font-size: 1.1rem;
}

.channels-header h3 span {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.9rem;
}

.channel-filters {
  display: flex;
  gap: 8px;
}

.filter-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--text);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.channels-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.channels-list::-webkit-scrollbar {
  width: 6px;
}

.channels-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.channels-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.channel-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

.channel-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.channel-status.live {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.channel-status.dead {
  background: var(--error);
}

.channel-status.unchecked {
  background: var(--text-dim);
}

.channel-info {
  flex: 1;
  min-width: 0;
}

.channel-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-response {
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.channel-response.fast { color: var(--success); }
.channel-response.medium { color: var(--warning); }
.channel-response.slow { color: var(--error); }

.show-more-container {
  margin-top: 16px;
  text-align: center;
}

.show-more-container.hidden {
  display: none;
}

/* Result Actions */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* Single Channel Results */
.channel-results {
  animation: fadeInUp 0.5s ease;
}

.channel-results.hidden {
  display: none;
}

.channel-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.channel-status-large {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.5s ease;
}

.channel-status-large svg {
  width: 40px;
  height: 40px;
}

.channel-status-large.live {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.channel-status-large.dead {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
}

.channel-result-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.channel-result-card h3.live {
  color: var(--success);
}

.channel-result-card h3.dead {
  color: var(--error);
}

.channel-url-display {
  color: var(--text-muted);
  font-size: 0.85rem;
  word-break: break-all;
  margin-bottom: 24px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.channel-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.channel-detail-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.detail-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.detail-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.detail-value.live {
  color: var(--success);
}

.detail-value.dead {
  color: var(--error);
}

.detail-value.fast {
  color: var(--success);
}

.detail-value.medium {
  color: var(--warning);
}

.detail-value.slow {
  color: var(--error);
}

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