/* Player Page Styles */
:root {
  --player-main-color: #FF5722;
  --player-secondary-color: #FF7043;
  --player-third-color: #ffefd5;
  --player-fourth-color: rgba(255, 112, 67, 0.12);
  --main-color: #FF5722;
  --secondary-color: #FF7043;
  --third-color: #FF7043;
  --fourth-color: rgba(255, 112, 67, 0.12);
  --player-gray: #D0CCD0;
  --player-green: #61FF7E;
  --player-red: #ff6161;
  --player-green-standings: #61ff7e66;
  --player-red-standings: #ff61616e;
  --player-white: #FBFCFF;
}

.cp-player-header {
  width: 100%;
  background: white;
  padding: 0;
}

.container-central {
  width: 100%;
  display: block;
  margin: 0;
}

.cp-player-basic-data {
  width: 100%;
}

.player-widget {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
  border: none;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

.player-jersey-number {
  flex: 0 0 clamp(120px, 15vw, 180px);
  min-height: 140px;
  background-color: var(--player-main-color);
  color: var(--player-third-color);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 700;
  font-size: clamp(36px, 6vw, 52px);
  padding: 32px 18px;
  text-shadow: 1px 0 0 currentColor;
  border-radius: 8px;
}

.player-image {
  flex: 0 0 110px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-image img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--player-white);
  object-fit: cover;
}

.player-basic-data {
  width: 210px;
}

.player-name-team {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0px;
  flex-wrap: wrap;
}

.player-name-team h1 {
  text-shadow: 1px 0 0 currentColor;
  font-size: clamp(21px, 3vw, 26px);
  margin: 0;
  color: #1b1b1b;
}

.player-name-separator {
  color: #ccc;
  font-weight: 300;
  margin: 0 6px;
}

.player-team-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0px 0px;
  flex-wrap: wrap;
}

.player-team-logo-header {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 3px;
}

.player-team-link-header {
  color: #826e5e;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.player-team-jersey-number {
  color: #826e5e;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.player-team-link-header:hover {
  color: #483c32;
  text-decoration: underline;
}

.player-team-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

.player-team-logo-placeholder {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.player-position {
  color: #1b1b1b;
  margin: -4px 0 3px 0;
  font-size: 14px;
}

.player-basic-data p {
  color: #1b1b1b;
  margin: -2px 0 2px;
}

.player-basic-data h1 {
  text-shadow: 1px 0 0 currentColor;
  font-size: 23px;
  margin: 10px 0px 0px;
}

.player-info-section {
  flex: 1 1 260px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 10px;
}

.player-detail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-color: #f7f4ee;
  padding: 6px 10px;
  border-radius: 10px;
  text-align: left;
  min-width: 70px;
  font-size: 12px;
  margin: 0px;
}

.player-detail-key {
  text-shadow: none;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #666;
}

.player-detail-value {
  color: #1b1b1b;
  text-shadow: none;
  font-size: 12px;
  font-weight: 700;
}

.player-stats {
  flex: 1 1 280px;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: stretch;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
}

.player-stats-title {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000000;
  font-weight: 700;
  margin: 0;
  margin-bottom: 10px;
}

.player-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
}

.player-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.player-stat-key {
  font-size: 13px;
  text-align: center;
  color: #444;
}

.player-stat-value {
  text-align: center;
  background-color: var(--player-third-color);
  padding: 8px 10px;
  text-shadow: 1px 0 0 currentColor;
  border-radius: 5px;
  width: 100%;
  display: block;
  font-weight: 700;
}


@media (max-width: 1100px) {
  .player-jersey-number {
    flex-basis: clamp(110px, 18vw, 160px);
    padding: 24px 16px;
  }

  .player-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  }
}

@media (max-width: 980px) {
  .player-widget {
    gap: 12px;
  }

  .player-jersey-number {
    flex: 0 0 140px;
    min-height: 120px;
    padding: 20px 14px;
  }

  .player-image {
    flex: 0 0 90px;
  }

  .player-image img {
    width: 80px;
    height: 80px;
  }

  .player-info-section,
  .player-stats {
    min-width: 0;
  }

  .player-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  }

  .player-detail {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .player-widget {
    align-items: flex-start;
  }

  .player-info-section {
    flex-basis: 100%;
  }
}

@media (max-width: 768px) {
  .player-widget {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .player-jersey-number {
    width: 100%;
    justify-content: center;
    text-align: center;
    margin-bottom: 4px;
    border-radius: 8px;
    padding: 18px;
  }

  .player-image {
    margin: 0 auto;
  }

  .player-name-team,
  .player-team-header,
  .player-position {
    justify-content: center;
    text-align: center;
  }

  table.matches-table td {
    color: black;
  }

  .player-info-section,
  .player-stats,
  .player-details {
    width: 100%;
    float: none;
  }

  .player-details {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .player-stats {
    flex: 0 0 auto;
    padding: 8px 10px;
  }

  .player-stats-title {
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .player-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .player-stat-key {
    font-size: 11px;
  }

  .player-stat-value {
    font-size: 12px;
    padding: 6px 6px;
  }
}

@media (max-width: 520px) {
  .player-jersey-number {
    font-size: clamp(30px, 9vw, 40px);
  }

  .player-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .player-stat-value {
    padding: 5px 6px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .player-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
}
