/* matches.css - Matches page specific styles */

/* Main Container */
.matches-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section */
.matches-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(59,130,246,.10), rgba(124,58,237,.10));
  border: 1px solid rgba(59,130,246,.25);
  overflow: hidden;
}

.matches-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(59,130,246,.05) 50%, transparent 70%);
  animation: none;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.subtitle {
  font-size: 1.1rem;
  color: #cbd5e1;
  margin: 0.5rem 0 0 0;
}

/* Filter Section */
.matches-filters-card {
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(59,130,246,.15);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}

.matches-filters-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.total-matches {
  background: rgba(59,130,246,.15);
  color: #93c5fd;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(59,130,246,.3);
}

.filter-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,.1), transparent);
  transition: left 0.5s ease;
}

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

.filter-btn:hover {
  background: rgba(59,130,246,.08);
  border-color: rgba(59,130,246,.3);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59,130,246,.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, #60a5fa, #7c3aed);
  border-color: rgba(99,102,241,.5);
  color: white;
  box-shadow: 0 6px 20px rgba(99,102,241,.3);
}

.filter-btn.active:hover {
  background: linear-gradient(135deg, #3b82f6, #6d28d9);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99,102,241,.4);
}

.live-filter.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: rgba(239,68,68,.5);
  box-shadow: 0 6px 20px rgba(239,68,68,.3);
}

.live-filter.active:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 8px 24px rgba(239,68,68,.4);
}

.my-filter.active {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: rgba(16,185,129,.5);
  box-shadow: 0 6px 20px rgba(16,185,129,.3);
}

.my-filter.active:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 8px 24px rgba(16,185,129,.4);
}

.btn-text {
  font-size: 0.9rem;
}

.btn-count {
  background: rgba(255,255,255,.15);
  color: white;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.filter-btn.active .btn-count {
  background: rgba(255,255,255,.25);
}

.live-dot {
  color: #ef4444;
  font-size: 0.6rem;
  animation: pulse 2s infinite;
}

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

/* Matches Grid */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Match Card */
.match-card {
  background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.match-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.match-card:hover {
  background: linear-gradient(135deg, rgba(59,130,246,.06), rgba(124,58,237,.06));
  border-color: rgba(59,130,246,.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59,130,246,.15);
  text-decoration: none;
  color: inherit;
}

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

.live-match {
  border-color: rgba(239,68,68,.3);
  box-shadow: 0 4px 16px rgba(239,68,68,.1);
}

.live-match:hover {
  background: linear-gradient(135deg, rgba(239,68,68,.06), rgba(220,38,38,.06));
  border-color: rgba(239,68,68,.4);
  box-shadow: 0 12px 32px rgba(239,68,68,.2);
}

.completed-match {
  border-color: rgba(16,185,129,.2);
}

.completed-match:hover {
  background: linear-gradient(135deg, rgba(16,185,129,.04), rgba(5,150,105,.04));
  border-color: rgba(16,185,129,.3);
  box-shadow: 0 12px 32px rgba(16,185,129,.1);
}

/* Match Header */
.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(239,68,68,.3);
}

.live-indicator .live-dot {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.tournament-badge {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(251,191,36,.15);
  color: #fbbf24;
  padding: 0.2rem 0.6rem;
  border-radius: 15px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid rgba(251,191,36,.3);
}

.match-type-badge {
  background: rgba(124,58,237,.15);
  color: #a855f7;
  padding: 0.2rem 0.6rem;
  border-radius: 15px;
  font-size: 0.65rem;
  font-weight: 700;
  border: 1px solid rgba(124,58,237,.3);
}

/* Match Teams */
.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.75rem;
  flex: 1;
}

.team {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.team-right {
  flex-direction: row-reverse;
}

.team-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.team-right .team-info {
  flex-direction: row-reverse;
  text-align: right;
}

.team-logo,
.team-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(59,130,246,.3);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.team-logo img,
.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-placeholder,
.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: white;
}

.logo-placeholder.team1,
.avatar-placeholder.player1 {
  background: linear-gradient(135deg, #60a5fa, #7c3aed);
}

.logo-placeholder.team2,
.avatar-placeholder.player2 {
  background: linear-gradient(135deg, #7c3aed, #60a5fa);
}

.team-details {
  min-width: 0;
  flex: 1;
}

.team-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.2rem 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-label {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}

.team.winner .team-name {
  color: #10b981;
}

.team.winner .team-logo,
.team.winner .team-avatar {
  border-color: rgba(16,185,129,.5);
  box-shadow: 0 0 16px rgba(16,185,129,.3);
}

.team-score {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 1.25rem;
  padding: 0.4rem;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  min-width: 45px;
  text-align: center;
}

.winning-score {
  color: #10b981;
  background: rgba(16,185,129,.1);
  border-color: rgba(16,185,129,.3);
  box-shadow: 0 0 16px rgba(16,185,129,.2);
}

.losing-score {
  color: #ef4444;
  background: rgba(239,68,68,.1);
  border-color: rgba(239,68,68,.3);
}

/* VS Section */
.vs-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.vs-circle {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #60a5fa, #7c3aed);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(99,102,241,.3);
  position: relative;
}

.vs-circle::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #60a5fa, #7c3aed);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.3;
  animation: pulse 3s infinite;
}

.vs-text {
  color: white;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.best-of {
  background: rgba(124,58,237,.15);
  color: #a855f7;
  padding: 0.2rem 0.4rem;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  border: 1px solid rgba(124,58,237,.3);
}

/* Match Footer */
.match-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
  flex-shrink: 0;
}

.match-info {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #94a3b8;
  font-size: 0.8rem;
}

.info-item i {
  color: #60a5fa;
  width: 12px;
  text-align: center;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-live {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 2px 12px rgba(239,68,68,.3);
}

.status-completed {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 2px 12px rgba(16,185,129,.3);
}

.status-scheduled,
.status-pending {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: white;
  box-shadow: 0 2px 12px rgba(59,130,246,.3);
}

/* Empty State */
.matches-empty-state {
  background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 4rem 2rem;
  text-align: center;
  margin: 2rem 0;
}

.empty-icon {
  font-size: 4rem;
  color: #475569;
  margin-bottom: 1.5rem;
}

.empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #cbd5e1;
  margin: 0 0 1rem 0;
}

.empty-description {
  font-size: 1rem;
  color: #94a3b8;
  margin: 0 0 2rem 0;
  line-height: 1.6;
}

/* Navigation */
.matches-navigation {
  text-align: center;
  margin-top: 3rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.back-button:hover {
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .matches-page-container {
    padding: 0 1.5rem;
  }
  
  .matches-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
  }
  
  .filter-buttons {
    gap: 0.75rem;
  }
  
  .filter-btn {
    padding: 0.6rem 1rem;
  }
}

@media (max-width: 768px) {
  .matches-page-container {
    padding: 0 1rem;
  }
  
  .matches-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .match-card {
    padding: 1rem;
    height: 200px;
    max-height: 200px;
  }
  
  .matches-filters-card .card-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .filter-buttons {
    justify-content: center;
    gap: 0.5rem;
  }
  
  .filter-btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding: 0.75rem 0.5rem;
  }
  
  .btn-text {
    display: none;
  }
  
  .filter-btn i {
    margin: 0;
  }
  
  .match-teams {
    flex-direction: column;
    gap: 1rem;
  }
  
  .team {
    width: 100%;
    justify-content: center;
  }
  
  .team-right {
    flex-direction: row;
  }
  
  .team-right .team-info {
    flex-direction: row;
    text-align: left;
  }
  
  .vs-section {
    order: -1;
    margin-bottom: 0.5rem;
  }
  
  .match-footer {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .match-info {
    justify-content: center;
  }
  
  .team-score {
    font-size: 1.25rem;
    padding: 0.4rem;
    min-width: 40px;
  }
}

@media (max-width: 576px) {
  .matches-page-container {
    padding: 0 0.75rem;
  }
  
  .matches-hero {
    padding: 1.5rem 1rem;
    margin: 1rem auto 1.5rem;
  }
  
  .matches-hero .title {
    font-size: 1.75rem;
  }
  
  .matches-filters-card {
    padding: 1rem;
  }
  
  .filter-btn {
    padding: 0.6rem 0.4rem;
    font-size: 0.8rem;
  }
  
  .btn-count {
    font-size: 0.7rem;
    padding: 1px 6px;
  }
  
  .team-logo,
  .team-avatar {
    width: 40px;
    height: 40px;
  }
  
  .team-name {
    font-size: 1rem;
  }
  
  .vs-circle {
    width: 40px;
    height: 40px;
  }
  
  .vs-text {
    font-size: 0.7rem;
  }
  
  .match-card {
    padding: 0.75rem;
    height: 180px;
    max-height: 180px;
  }
  
  .empty-icon {
    font-size: 3rem;
  }
  
  .empty-title {
    font-size: 1.25rem;
  }
  
  .matches-empty-state {
    padding: 2rem 1rem;
  }
}

/* Map Stats Section */
.match-maps-section {
  background: rgba(255,255,255,.03);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1rem;
  margin-top: 1rem;
}

.maps-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #93c5fd;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.maps-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.map-result {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.map-result:hover {
  background: rgba(255,255,255,.04);
  border-color: rgba(59,130,246,.2);
}

.map-number {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
}

.map-name {
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.875rem;
}

.map-score {
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.map-score .score-win {
  color: #10b981;
}

.map-score .score-loss {
  color: #64748b;
}
