/* League Sections */
.league-section {
  margin-bottom: var(--space-8);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  overflow: hidden;
}

.league-header {
  background: var(--bg-secondary);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.league-info {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.league-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 24px;
}

.league-flag-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.league-flag-emoji {
  font-size: 24px;
  line-height: 1;
}

.league-title {
  flex: 1;
}

.league-title h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.match-count {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 400;
}

.league-matches {
  padding: var(--space-4);
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .league-matches {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-6);
  }
}

/* Match Cards */
.match-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: all 0.2s ease;
  position: relative;
}

.match-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.match-time {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
}

.match-time svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.match-status {
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: var(--space-1) var(--space-2);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.match-status.finished {
  background: rgba(34, 197, 94, 0.1);
  color: rgb(34, 197, 94);
}

/* Teams Section */
.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.home-team {
  justify-content: flex-start;
}

.away-team {
  justify-content: flex-end;
}

.team-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.team-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.team-score {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.team-score.winner {
  color: var(--primary);
}

.match-vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.vs-text {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}

.match-result {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

.match-result.home-win {
  background: rgba(34, 197, 94, 0.1);
  color: rgb(34, 197, 94);
}

.match-result.away-win {
  background: rgba(239, 68, 68, 0.1);
  color: rgb(239, 68, 68);
}

.match-result.draw {
  background: rgba(234, 179, 8, 0.1);
  color: rgb(234, 179, 8);
}

/* Prediction Info */
.prediction-info {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.prediction-main {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.prediction-market {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.prediction-pick {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary);
}

.prediction-odds {
  font-size: var(--text-sm);
  color: var(--success);
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  background: rgba(34, 197, 94, 0.1);
  border-radius: var(--radius-sm);
}

/* Confidence Section */
.confidence-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.confidence-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.confidence-label strong {
  color: var(--text-primary);
  font-weight: 600;
}

.confidence-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.confidence-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.confidence-bar.high-confidence .confidence-fill {
  background: linear-gradient(90deg, var(--primary), var(--success));
}

.confidence-bar.medium-confidence .confidence-fill {
  background: linear-gradient(90deg, var(--warning), var(--primary));
}

.confidence-bar.low-confidence .confidence-fill {
  background: linear-gradient(90deg, var(--danger), var(--warning));
}

/* Prediction Details */
.prediction-details {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.prediction-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.prediction-details summary::-webkit-details-marker {
  display: none;
}

.prediction-details summary::after {
  content: '›';
  font-size: var(--text-lg);
  transition: transform 0.2s ease;
}

.prediction-details[open] summary::after {
  transform: rotate(90deg);
}

.details-content {
  padding-top: var(--space-4);
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
}

.detail-label {
  color: var(--text-muted);
}

.detail-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* Loading States */
.matches-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12);
  color: var(--text-muted);
  text-align: center;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--space-4);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error States */
.matches-error {
  text-align: center;
  padding: var(--space-12);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.error-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
}

/* No Matches State */
.no-matches {
  text-align: center;
  padding: var(--space-12);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.no-matches-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
}

/* No Predictions Message */
.no-predictions-message {
  text-align: center;
  padding: var(--space-12);
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.no-predictions-icon {
  margin-bottom: var(--space-4);
}

.no-predictions-icon svg {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin: 0 auto;
}

.no-predictions-message h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.no-predictions-message p {
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
}

/* VIP CTA */
.vip-cta {
  margin-top: var(--space-8);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .league-header {
    padding: var(--space-3);
  }
  
  .league-matches {
    padding: var(--space-3);
  }
  
  .match-card {
    padding: var(--space-3);
  }
  
  .team-logo {
    width: 32px;
    height: 32px;
  }
  
  .team-name {
    font-size: var(--text-xs);
  }
  
  .prediction-pick {
    font-size: var(--text-base);
  }
}

/* Load More Section */
.load-more-section {
  text-align: center;
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-6);
}

.load-more-stats {
  margin-bottom: var(--space-4);
}

.load-more-stats p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.load-more-stats span {
  color: var(--text-primary);
  font-weight: 600;
}

#load-more-btn {
  min-width: 200px;
}

#load-more-btn svg {
  width: 20px;
  height: 20px;
  margin-left: var(--space-2);
  transition: transform 0.3s ease;
}

#load-more-btn:hover svg {
  transform: translateY(2px);
}

/* Loading animation for load more */
#load-more-btn.loading {
  position: relative;
  color: transparent;
}

#load-more-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .load-more-section {
    padding: var(--space-6) 0;
  }
  
  #load-more-btn {
    width: 100%;
    max-width: 300px;
  }
}