:root {
  --primary-color: #00274D;
  --secondary-color: #005DAA;
  --accent-color: #F7E909;
  --text-color: white;
  --card-background: rgba(255, 255, 255, 0.1);
  --card-hover-background: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@view-transition{
  navigation: auto;
}

body {
  font-family: 'Oswald', sans-serif;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header */
header {
  background: rgba(0, 0, 0, 0.1);
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

header nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

header nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1em;
  position: relative;
  transition: color 0.3s ease;
  padding-bottom: 5px;
}

header nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--accent-color);
  transition: width 0.3s ease, left 0.3s ease;
}

header nav ul li a:hover {
  color: var(--accent-color);
}

header nav ul li a:hover::after {
  width: 100%;
  left: 0;
}

/* Main Content */
main {
  flex: 1;
  width: 100%;
  margin: 0 auto;
  padding: 30px 15px;
  background: rgba(0, 0, 0, 0.1);
  text-align: center;
}

h1,
h2 {
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

h1 {
  font-size: 3.5em;
}

h2 {
  font-size: 2.5em;
}

.match-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* Individual Match Card Styling */
.match-card {
  background: var(--card-background);
  border-radius: 15px;
  padding: 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 100%;
}

.match-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  background: var(--card-hover-background);
}

.match-date {
  font-size: 1.2em;
  color: var(--text-color);
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
}

.teams {
  display: grid;
  /* Usamos grid para un control más preciso */
  grid-template-columns: 1fr auto 1fr;
  /* Dos columnas flexibles y una central fija */
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
  margin-bottom: 10px;
  gap: 10px;
  /* Espaciado entre los elementos */
}

.team {
  text-align: center;
  /* Equipo izquierdo alineado a la derecha */
  white-space: nowrap;
  /* Evita saltos de línea para nombres largos */
}

.score {
  text-align: center;
  /* Marcador centrado */
  font-weight: bold;
  font-size: 2em;
  white-space: nowrap;
}


/* Match Status Section */
.match-status {
  font-size: 1.1em;
  color: var(--text-color);
  margin-top: 10px;
}

/* Link Section */
.match-link {
  margin-top: 10px;
}

.match-link a {
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
}

.match-link a:hover {
  text-decoration: underline;
}

.player-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

.player {
  background: var(--card-background);
  border-radius: 15px;
  padding: 20px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  white-space: nowrap;
  position: relative;
  /* Added to enable absolute positioning of badge */
}

.captain-badge {
  position: absolute;
  /* Changed to absolute for top-left positioning */
  top: 10px;
  left: 10px;
  width: 30px;
  /* Adjust the size of the badge */
  height: 30px;
  /* Adjust the size of the badge */
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 1em;
  font-family: 'Roboto', sans-serif;
  background-color: var(--card-background);
  border: 1px solid #ddd;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.standings-table thead tr {
  color: white;
}

.standings-table th,
.standings-table td {
  padding: 10px;
  border: 1px solid #ddd;
}

.standings-table tbody tr:nth-child(even) {
  background-color: var(--card-hover-background);
}

.standings-table tbody tr:hover {
  background-color: #ddd;
  color: #00274D;
}
.team-link {
  display: flex;
  align-items: center;
  text-decoration: underline;
  color: white;
}

.team-link:hover {
  color: var(--primary-color);
}

.team-logo {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 50%;
  border: 1px solid #ccc;
}

.green-position {
  background-color: #4caf4fa2;
  /* Green color */
  color: white;
  /* White text for contrast */
}

.red-position {
  background-color: #f4433695;
  /* Red color */
  color: white;
  /* White text for contrast */
}

/* Equipo Tecnico - Tarjetas */
.staff-list {
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: repeat(min-content, minmax(200px, 1fr));
  gap: 20px;
  justify-content: center;
  margin-bottom: 30px;

}

.staff-card {
  background: var(--card-background);
  border-radius: 15px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.staff-card:hover {
  background: var(--card-hover-background);
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.staff-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  margin-bottom: 10px;
}

/* Plantilla y Equipo Técnico juntas */
.staff-list .staff-card {
  grid-column: span 1;
  /* Cada tarjeta ocupa la mitad del espacio de las tarjetas de la plantilla */
}

.player-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  /* Ajuste para plantilla */
  gap: 20px;
}

.info-card ol {
  text-align: center;
  list-style: outside;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.match:hover,
.player:hover {
  background: var(--card-hover-background);
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.match p a {
  text-decoration: none;
  color: var(--primary-color);
}

.player-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.player:hover .player-photo {
  transform: scale(1.05);
}

/* Hero Section */
.hero-section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-section h1 {
  font-size: 5em;
  margin-bottom: 20px;
}

.hero-section img {
  max-width: 200px;
  margin-bottom: 20px;
}

.hero-section img:hover {
  transform: scale(1.1);
  transition: transform 0.3s ease;

}

.timer {
  text-align: center;
  font-size: 1.5em;
  color: var(--accent-color);
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 10px;
  max-width: 500px;
  margin: 20px auto;
}

/* Media Section */
.media-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  width: fit-content;
  margin: 20px auto;
  padding: 20px;
  background-color: var(--card-background);
  border-radius: 10px;
}

audio,
video {
  width: 50%;
  border-radius: 10px;
}

/* Footer */
footer {
  background: rgba(0, 0, 0, 0.1);
  padding: 20px 0;
  text-align: center;
}

footer a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
}

/* scrollbar color and size */
::-webkit-scrollbar {
  width: 10px;
  background-color: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 5px;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--primary-color);
  border-radius: 15px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  color: var(--text-color);
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.modal-photo {
  width: 150px;
  height: 150px;
  min-width: 150px;
  min-height: 150px;
  border-radius: 50%;
  margin-bottom: 15px;
  object-fit: cover;
  border: 3px solid white;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  color: var(--text-color);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: transform 0.2s ease;
}

.close:hover {
  transform: scale(1.2);
  color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  header nav ul {
    align-items: center;
    gap: 15px;
  }

  h1 {
    font-size: 2.5em;
  }

  h2 {
    font-size: 2em;
  }

  .match-list,
  .player-list {
    grid-template-columns: 1fr;
  }

  .hero-section h1 {
    font-size: 3em;
  }

  audio,
  video {
    width: 100%;
  }

  .staff-card {
    max-width: 100px;
    font-size: 10px;
    /* Cada tarjeta ocupa la mitad del espacio de las tarjetas de la plantilla */
  }

  .staff-photo {
    width: 70px;
    height: 70px;
  }

  .score {
    font-size: 20px;
  }

  .teams {
    font-size: 15px;
  }

  .team {
    white-space: wrap;
  }

        /* Ocultar todas las columnas excepto la posición (#), equipo y puntos (PTS) */
        .standings-table td:nth-child(n+3):not(:last-child),
        .standings-table th:nth-child(n+3):not(:last-child) {
          display: none;
        }
}