/* Modern Match Cards CSS */
.match-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #f0f0f0;
}

.match-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.match-card-header {
  background-color: #0a1744;
  color: white;
  padding: 12px 16px;
}

.match-card-header .date {
  font-size: 1.1rem;
  font-weight: 600;
}

.match-card-body {
  padding: 20px 16px;
}

.match-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.match-info .team {
  display: flex;
  align-items: center;
  width: 45%;
}

.match-info .home-team {
  justify-content: flex-end;
  text-align: right;
}

.match-info .away-team {
  justify-content: flex-start;
  text-align: left;
}

.match-info .team-name {
  font-weight: 600;
  font-size: 1rem;
}

.match-info .team-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin: 0 10px;
}

.match-info .team-logo-placeholder {
  width: 36px;
  height: 36px;
  margin: 0 10px;
  background-color: #f5f5f5;
  border-radius: 50%;
}

.match-info .vs-badge {
  background-color: #f5f5f5;
  color: #333;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  min-width: 60px;
  text-align: center;
}

.match-info .score {
  background-color: #f5f5f5;
  color: #333;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  min-width: 60px;
  text-align: center;
}

.match-card-footer {
  padding: 12px 16px;
  background-color: #f9f9f9;
  color: #666;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f0f0f0;
}

.match-card-footer .match-details {
  display: flex;
  flex-direction: column;
}

.match-card-footer .location,
.match-card-footer .time {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.match-card-footer .location:last-child,
.match-card-footer .time:last-child {
  margin-bottom: 0;
}

.match-card-footer .location i,
.match-card-footer .time i {
  margin-right: 6px;
  color: #888;
  width: 14px;
  text-align: center;
}

.match-details-link {
  color: #3273dc;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: rgba(50, 115, 220, 0.1);
  transition: background-color 0.2s;
}

.match-details-link:hover {
  background-color: rgba(50, 115, 220, 0.2);
  text-decoration: none;
}

.match-stage {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* Dark theme for completed matches */
.match-card.completed {
  background-color: #f9f9f9;
}

.match-card.completed .match-card-header {
  background-color: #2c3e50;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .match-info .team-name {
    font-size: 0.9rem;
  }
  
  .match-info .team-logo,
  .match-info .team-logo-placeholder {
    width: 28px;
    height: 28px;
    margin: 0 6px;
  }
  
  .match-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .match-card-footer .view-details {
    margin-top: 8px;
    align-self: flex-end;
  }
}

/* NEW MATCH CARD DESIGN */
.match-card-new {
  background-color: #0a0a61;
  border-radius: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  color: white;
  max-width: 600px; /* Make card slimmer on desktop */
  margin-left: auto;
  margin-right: auto;
}

.match-card-new:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.25);
}

/* Header section with date and matchday */
.match-card-header-new {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.match-header-info {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding-left: 10px;
}

.match-date {
  font-size: 0.9rem;
  font-weight: 500;
}

.date-separator {
  margin: 0 8px;
  color: white;
  opacity: 0.9;
}

.match-matchday {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Main content area */
.match-card-content-new {
  padding: 16px;
  display: flex;
  justify-content: space-between;
}

/* Teams container (left side, 2/3 width) */
.teams-container {
  flex: 2;
  padding-right: 15px;
}

.team-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
}

.team-row:last-child {
  margin-bottom: 0;
}

.team-logo-new {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-right: 12px;
  background-color: white;
  border-radius: 50%;
  padding: 2px;
}

.team-logo-placeholder-new {
  width: 32px;
  height: 32px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.team-name-new {
  font-weight: 600;
  font-size: 0.9rem; /* Reduced from 1rem */
  color: white;
}

/* Match details (right side, 1/3 width) */
.match-details-new {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.match-time {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #b0b0cb;
}

/* Match score styling */
.team-score {
  font-size: 0.95rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.home-score, .away-score {
  display: inline-block;
}

/* For responsive layouts */
@media (max-width: 480px) {
  .team-score {
    font-size: 0.8rem;
    padding: 1px 4px;
    margin-left: 4px;
    min-width: 16px;
    height: auto;
    line-height: 1.2;
  }
}

.match-location {
  text-align: center;
}

.location-tag {
  background-color: #222271;
  color: #b0b0cb;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  display: inline-block;
}

/* View details section */
.view-details-new {
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: right;
}

.match-details-link-new {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.15);
  transition: background-color 0.2s;
}

.match-details-link-new:hover {
  background-color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
}

/* Responsive adjustments for new design */
@media screen and (max-width: 768px) {
  .match-card-content-new {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-areas: 
      "teams details";
    gap: 10px;
  }
  
  .teams-container {
    grid-area: teams;
    padding-right: 0;
  }
  
  .team-row {
    display: flex;
    align-items: center;
  }
  
  .team-logo-new,
  .team-logo-placeholder-new {
    width: 28px;
    height: 28px;
    min-width: 28px; /* Prevent shrinking */
  }
  
  .team-name-new {
    font-size: 0.8rem; /* Smaller text on mobile */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .match-details-new {
    grid-area: details;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .match-time {
    margin-bottom: 8px;
    text-align: center;
    font-size: 1rem; /* Font size for time on mobile */
  }
  
  .match-location {
    text-align: center;
    width: 100%;
  }
  
  .location-tag {
    font-size: 0.75rem; /* Font size for location on mobile */
    width: 100%;
  }
}
