/* Clean Modern Stats Page Design */
.main-content {
  padding-top:0;
  padding-bottom: 0;
}

.stats-hero {
  flex: 1;
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
}

.stats-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 1rem 0;
  padding-top: 0;
}

.stats-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #a56dff, #d100ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.stats-header p {
  font-size: 1.1rem;
  color: #ccc;
  max-width: 600px;
  margin: 0 auto 2rem auto;
  line-height: 1.6;
}

/* Update Info Section */
.update-info {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.last-update,
.next-update {
  font-size: 0.9rem;
  color: #999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.last-update span,
.next-update span {
  color: #a56dff;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.next-update.urgent span {
  color: #ffc107;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Stats Grid - 4 in a row for Full HD */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* Stat Cards */
.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

/* Stat Cards */
.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(165, 109, 255, 0.2);
  border-color: rgba(165, 109, 255, 0.3);
}

/* Special styling for clickable live channels card */
.stat-card#live-card {
  position: relative;
}

.stat-card#live-card::after {
  content: '';
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 24px;
  height: 24px;
  background: rgba(165, 109, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card#live-card:hover::after {
  opacity: 1;
}

.stat-card#live-card:hover .stat-change {
  color: #a56dff;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #a56dff, #d100ff);
  border-radius: 16px 16px 0 0;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, #a56dff, #d100ff);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 8px 20px rgba(165, 109, 255, 0.3);
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: white;
  margin-bottom: 0.5rem;
  font-family: 'Segoe UI', sans-serif;
  line-height: 1.1;
  flex-grow: 1;
}

.stat-description {
  font-size: 0.85rem;
  color: #ccc;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.stat-change {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: auto;
}

/* Color-coded status indicators */
.stat-change.positive {
  color: #ff4444;
}

.stat-change.positive .fas {
  color: #ff4444;
}

.stat-change.neutral {
  color: #4caf50;
}

.stat-change.neutral .fas {
  color: #4caf50;
}

/* Loading States */
.loading-stat {
  opacity: 0.6;
  pointer-events: none;
}

.loading-stat .stat-value {
  background: linear-gradient(90deg, #333 25%, #555 50%, #333 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Footer */
.stats-footer {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.stats-footer h3 {
  color: #a56dff;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.stats-footer p {
  color: #ccc;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.refresh-button {
  background: linear-gradient(135deg, #a56dff, #d100ff);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.refresh-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #d100ff, #9254ff);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(165, 109, 255, 0.3);
}

.refresh-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.refresh-button .fa-sync {
  transition: transform 0.3s ease;
}

.refresh-button.loading .fa-sync {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1400px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
  }
}

@media (max-width: 768px) {
  .stats-hero {
    padding: 1rem;
  }

  .stats-header h1 {
    font-size: 2.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 100%;
  }

  .stat-card {
    padding: 1.5rem;
    min-height: 180px;
  }

  .stat-value {
    font-size: 2rem;
  }

  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .update-info {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .stats-header h1 {
    font-size: 2rem;
  }

  .stat-value {
    font-size: 1.8rem;
  }

  .stat-card {
    padding: 1.2rem;
    min-height: 160px;
  }

  .update-info {
    padding: 0.8rem 1rem;
  }

  .last-update,
  .next-update {
    font-size: 0.8rem;
  }
}

/* High resolution displays - ensure 4 cards in a row */
@media (min-width: 1920px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1600px;
    gap: 2.5rem;
  }
  
  .stat-card {
    min-height: 250px;
  }
  
  .stat-value {
    font-size: 3rem;
  }
  
  .stat-icon {
    width: 70px;
    height: 70px;
    font-size: 1.7rem;
  }
}