/* Startup Loading and Auto-fetch Indicators */
.startup-loading, .startup-result {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  animation: slideInRight 0.3s ease;
}

.startup-result {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

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

.auto-fetch-indicator {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  border: 1px solid rgba(46, 204, 113, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Fetch Controls */
.fetch-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.fetch-btn, .cleanup-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.fetch-btn:hover, .cleanup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.fetch-btn:active, .cleanup-btn:active {
  transform: translateY(0);
}

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

.cleanup-btn {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.cleanup-btn:hover {
  box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

/* Fetch Suggestion Banner */
.fetch-suggestion {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.fetch-suggestion .fetch-btn {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.fetch-suggestion .close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.fetch-suggestion .close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Fetch Notification */
.fetch-notification {
  position: fixed;
  top: 80px;
  right: 20px;
  background: #2ecc71;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  animation: slideInRight 0.3s ease, slideOutRight 0.3s ease 2.7s forwards;
  font-weight: 600;
}

.fetch-notification:contains('❌') {
  background: #e74c3c;
}

@keyframes slideOutRight {
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Match Source Indicators */
.match-source {
  font-size: 12px;
  margin-left: 5px;
  opacity: 0.7;
}

.match-card[data-api-source="true"] {
  border-left: 3px solid #667eea;
}

.match-card[data-api-source="false"] {
  border-left: 3px solid #95a5a6;
}

/* Venue Information */
.venue-info {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
  opacity: 0.8;
}

/* No Matches State Enhancement */
.no-matches {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.02); /* Reduced from 0.05 to 0.02 for more transparency */
  border-radius: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.no-matches-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.no-matches-text {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 8px;
}

.no-matches-subtext {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

.no-matches .fetch-btn {
  margin: 10px auto;
  display: inline-flex;
}

/* Enhanced Header Layout */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
}

.main-title {
  flex: 0 0 auto;
}

.time-display {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.fetch-controls {
  flex: 0 0 auto;
}

/* Loading States */
.match-card.loading {
  opacity: 0.6;
  position: relative;
  overflow: hidden;
}

.match-card.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Status Indicator Enhancements */
.status-indicator.status-live {
  box-shadow: 0 0 10px #e74c3c;
  animation: pulse 2s infinite;
}

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

.status-indicator.status-soon {
  box-shadow: 0 0 8px #f39c12;
}

/* Mobile Responsiveness for New Elements */
@media (max-width: 768px) {
  .fetch-controls {
    flex-direction: column;
    gap: 5px;
  }
  
  .fetch-btn, .cleanup-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .fetch-suggestion {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    max-width: none;
  }
  
  .fetch-notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .header-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .time-display {
    order: 1;
  }
  
  .main-title {
    order: 2;
  }
  
  .fetch-controls {
    order: 3;
  }
}

/* API Status Indicator */
.api-status {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.4); /* Reduced from 0.8 to 0.4 for more transparency */
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 999;
}

.api-status.connected {
  border: 1px solid #2ecc71;
}

.api-status.disconnected {
  border: 1px solid #e74c3c;
}

.api-status.unknown {
  border: 1px solid #f39c12;
}

/* Enhanced Competition Badges */
.competition-badge {
  background: rgba(0, 0, 0, 0.4); /* More transparent fallback background */
  color: var(--sports-gold);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* Gradient override for modern look */
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.6) 100%);
  color: white;
}

/* Competition-specific colors - more transparent */
.competition-badge:contains('Premier League') {
  background: linear-gradient(135deg, rgba(55, 0, 60, 0.6) 0%, rgba(0, 255, 135, 0.6) 100%);
}

.competition-badge:contains('Champions League') {
  background: linear-gradient(135deg, rgba(30, 60, 114, 0.6) 0%, rgba(42, 82, 152, 0.6) 100%);
}

.competition-badge:contains('La Liga') {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.6) 0%, rgba(247, 147, 30, 0.6) 100%);
}

/* Smooth transitions for all interactive elements */
* {
  transition: all 0.2s ease;
}

button:focus {
  outline: 2px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}
