
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #0b0d10;
  color: #f5f7fa;
}


a {
  color: #9fd0ff;
  text-decoration-color: rgba(159, 208, 255, 0.72);
  text-underline-offset: 2px;
}

a:visited {
  color: #b7ddff;
  text-decoration-color: rgba(183, 221, 255, 0.74);
}

a:hover,
a:focus-visible {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

a:active {
  color: #ffe29a;
  text-decoration-color: #ffe29a;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
}

.top-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.top-nav a {
  color: #b8dcff;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.top-nav a:visited {
  color: #c6d2ff;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: #ffffff;
  border-color: #7fb6ff;
}

.top-nav a:active {
  color: #ffe7a8;
  border-color: #ffe7a8;
}

.nav-auth {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.build-version {
  margin-left: 8px;
  font-size: 11px;
  line-height: 1;
  color: #9db1ca;
  border: 1px solid #31445d;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(16, 27, 40, 0.65);
}

.nav-auth[data-auth-state="loading"] {
  visibility: hidden;
}

.nav-auth[data-auth-state="logged-out"] [data-auth-logout],
.nav-auth[data-auth-state="logged-out"] [data-auth-name] {
  display: none !important;
}

.nav-auth[data-auth-state="logged-in"] [data-auth-login] {
  display: none !important;
}

.auth-btn {
  margin-top: 0;
  width: auto;
  border-radius: 999px;
  border: 1px solid #6eaef8;
  background: #0d5cab;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
}

.auth-btn.auth-btn-secondary {
  background: transparent;
  border-color: #8ba0b8;
}

.auth-btn.auth-icon-btn {
  min-width: 30px;
  padding: 5px 8px;
  font-size: 14px;
  line-height: 1;
}

.auth-user {
  font-size: 13px;
  font-weight: 700;
  color: #dbeaff;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

td a {
  color: #89c7ff;
  text-decoration: underline;
  text-decoration-color: rgba(137, 199, 255, 0.62);
  text-underline-offset: 2px;
  font-weight: 600;
}

td a:visited {
  color: #b8a9ff;
  text-decoration-color: rgba(184, 169, 255, 0.7);
}

td a:hover,
td a:focus-visible {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

td a:active {
  color: #ffd67a;
  text-decoration-color: #ffd67a;
}

.panel {
  border: 1px solid #2a2f38;
  border-radius: 12px;
  padding: 16px;
  background: #12161c;
}

.table-wrap {
  overflow-x: auto;
}

.search-control {
  margin: 14px 0 12px;
}

.search-summary {
  margin: 8px 0 0;
  font-size: 13px;
  color: #b6bfcc;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #2a2f38;
  text-align: left;
}

.form-shell {
  display: grid;
  gap: 12px;
}

.form-submit {
  justify-self: start;
}

button:not(.btn) {
  cursor: pointer;
  background: #0d5cab;
}

button:not(.btn)[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.inline-actions {
  display: flex;
  gap: 8px;
}

.status {
  color: #ffcf70;
  margin: 8px 0 16px;
}

#player-card {
  max-width: 320px;
}

.player-detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(280px, 1fr);
  align-items: start;
  gap: 28px;
}

.player-stats-panel {
  width: 100%;
}

.player-stats-card {
  border: 1px solid #2f3d50;
  border-radius: 16px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(87, 150, 255, 0.12), transparent 34%),
    linear-gradient(180deg, #131b25, #0f141d 65%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.detail-title,
.detail-subtitle {
  margin: 0;
  color: #f4f8ff;
}

.detail-title {
  font-size: 22px;
}

.detail-subtitle {
  margin-top: 18px;
  font-size: 16px;
  color: #d8e9ff;
}

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

.detail-item {
  border: 1px solid #34455d;
  background: rgba(11, 18, 28, 0.86);
  border-radius: 10px;
  padding: 10px 12px;
}

.detail-label {
  display: block;
  color: #9eb6d3;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.detail-value {
  margin-top: 4px;
  display: block;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
}

.detail-stats-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-stat-item {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #455469;
  background: rgba(13, 20, 30, 0.8);
}

.detail-stat-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.detail-stat-short {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 1px;
}

.detail-stat-value {
  font-size: 21px;
  font-weight: 900;
}

.detail-stat-full {
  margin-top: 4px;
  display: block;
  color: #eff6ff;
  font-size: 13px;
  font-weight: 600;
}

.detail-stat-item.stat-high {
  border-color: #2e8f4f;
  background: linear-gradient(180deg, rgba(9, 55, 29, 0.95), rgba(6, 35, 19, 0.95));
  color: #70ff9b;
}

.detail-stat-item.stat-mid {
  border-color: #a88415;
  background: linear-gradient(180deg, rgba(74, 60, 15, 0.95), rgba(52, 40, 8, 0.95));
  color: #ffd460;
}

.detail-stat-item.stat-low {
  border-color: #a63a3a;
  background: linear-gradient(180deg, rgba(68, 22, 22, 0.95), rgba(47, 13, 13, 0.95));
  color: #ff8787;
}

.detail-stat-item.stat-neutral {
  color: #dfe9f6;
}

.teams-page {
  max-width: 1320px;
}

.team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.team-link-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #3a4352;
  background: #111924;
  color: #d6ebff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.team-link-chip:hover,
.team-link-chip:focus-visible {
  border-color: #7fb6ff;
  color: #ffffff;
}

.teams-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.team-section {
  border: 1px solid color-mix(in srgb, var(--team-primary) 52%, #3a4352);
  border-radius: 14px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--team-primary) 16%, transparent), transparent 34%),
    radial-gradient(circle at bottom left, color-mix(in srgb, var(--team-secondary) 18%, transparent), transparent 36%),
    linear-gradient(180deg, color-mix(in srgb, var(--team-secondary) 62%, #0f1219), #0b0f15 80%);
}

.team-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--team-primary) 30%, #30394a);
  margin-bottom: 18px;
}

.team-section-header h2 {
  margin: 0;
  color: var(--team-heading);
}

.team-section-header p {
  margin: 0;
  font-size: 14px;
  color: color-mix(in srgb, var(--team-meta) 86%, #c7d0dc);
}

.team-player-card-link {
  text-decoration: none;
}

.team-player-card-link:focus-visible .player-card,
.team-player-card-link:hover .player-card {
  transform: translateY(-4px);
  transition: transform 0.2s ease;
}

@media (max-width: 900px) {
  .player-detail-layout {
    grid-template-columns: 1fr;
  }

  .player-stats-card {
    padding: 14px;
  }

  .detail-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .detail-stats-grid {
    grid-template-columns: 1fr;
  }
}

.hero-panel p {
  max-width: 900px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
}

.section-link {
  color: #9fd0ff;
  text-decoration: none;
  font-weight: 600;
}

.tournament-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.tournament-card {
  border: 1px solid #2a3d56;
  border-radius: 10px;
  padding: 12px;
  background: rgba(9, 18, 30, 0.8);
}

.tournament-card h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.tournament-card p {
  margin: 0;
  color: #c8d5e6;
  font-size: 14px;
}

.summary-page h1,
.summary-page h2,
.summary-page h3 {
  color: #f4f8ff;
}

.summary-page h2 {
  margin-top: 24px;
  margin-bottom: 10px;
}

.summary-page h3 {
  margin-top: 16px;
  margin-bottom: 8px;
}

.summary-links {
  margin: 0;
  padding-left: 20px;
}

.summary-links li {
  margin: 6px 0;
}

.summary-light {
  background: #f4f7fb;
  color: #1a2a3a;
}

.summary-light .panel {
  background: #ffffff;
  border-color: #d9e3ef;
  box-shadow: 0 2px 10px rgba(10, 40, 80, 0.06);
}

.summary-light .summary-page h1,
.summary-light .summary-page h2,
.summary-light .summary-page h3,
.summary-light .summary-page p,
.summary-light .summary-page li,
.summary-light .summary-page td,
.summary-light .summary-page th {
  color: #1a2a3a;
}

.summary-light .top-nav a {
  color: #195aa7;
}

.summary-light .top-nav a:visited {
  color: #2d6cb4;
}

.summary-light .top-nav a:hover,
.summary-light .top-nav a:focus-visible {
  color: #0c3e78;
  border-color: #0c3e78;
}

.summary-light .summary-links a,
.summary-light .summary-page a {
  color: #145da6;
}

.summary-light .summary-links a:visited,
.summary-light .summary-page a:visited {
  color: #2b6bab;
}

.summary-light .summary-page table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid #d5dfeb;
  border-radius: 10px;
  overflow: hidden;
}

.summary-light .summary-page th,
.summary-light .summary-page td {
  padding: 9px 8px;
  border-bottom: 1px solid #e1e8f0;
  text-align: center;
  font-size: 0.92rem;
}

.summary-light .summary-page thead th {
  background: #167de8;
  color: #ffffff;
  border-bottom-color: #167de8;
}

.summary-light .summary-page tbody tr:nth-child(odd) td {
  background: #f8fbff;
}

.summary-light .summary-page tbody tr:hover td {
  background: #eef5ff;
}

.summary-light .summary-page tbody tr:last-child td {
  border-bottom: none;
}

.summary-light .summary-page td:first-child,
.summary-light .summary-page th:first-child {
  border-left: none;
}

.summary-light .summary-page td:last-child,
.summary-light .summary-page th:last-child {
  border-right: none;
}

.summary-light .summary-page td .team-chip {
  min-width: 110px;
  text-align: center;
  font-size: 0.92rem;
}

.summary-light .summary-page .tournament-history-table th,
.summary-light .summary-page .tournament-history-table td {
  font-size: 0.82rem;
  padding: 7px 6px;
}

.summary-light .summary-page .tournament-history-table td .team-chip {
  min-width: 96px;
  font-size: 0.82rem;
  padding: 2px 8px;
}

.summary-pitches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.summary-pitch-column {
  border: 1px solid #d7e2ee;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff;
}

.summary-pitch-column h3 {
  margin-top: 0;
}

.summary-pitch-table .vs-col {
  width: 36px;
  font-weight: 700;
  color: #5c6f83;
}

.summary-pitch-table .team-chip {
  min-width: 104px;
}

.summary-pitch-table th,
.summary-pitch-table td {
  font-size: 0.88rem;
}

@media (max-width: 1200px) {
  .summary-light .summary-page th,
  .summary-light .summary-page td {
    font-size: 0.86rem;
    padding: 8px 6px;
  }

  .summary-light .summary-page td .team-chip,
  .summary-pitch-table .team-chip {
    min-width: 96px;
    padding: 3px 8px;
    font-size: 0.84rem;
  }
}

@media (max-width: 900px) {
  .summary-pitches {
    grid-template-columns: 1fr;
  }
}

.team-chip {
  display: inline-block;
  border-radius: 8px;
  padding: 3px 10px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.team-chip--white { background: #ece9df; color: #1f1f1f !important; }
.team-chip--blue { background: #1f8ed6; color: #f5fbff !important; }
.team-chip--sky { background: #69b8f0; color: #0f2538 !important; }
.team-chip--yellow { background: #d4a017; color: #1f1605 !important; }
.team-chip--black { background: #111111; color: #f4f4f4 !important; }
.team-chip--red { background: #ef3b33; color: #fff4f2 !important; }
.team-chip--green { background: #0d6b2f; color: #f2fff5 !important; }
.team-chip--orange { background: #f58220; color: #2b1404 !important; }

.home-list-page {
  max-width: 980px;
}

.home-section {
  margin: 20px 0 34px;
}

.home-section h1,
.home-section h2 {
  margin-bottom: 12px;
}

.home-bpl-logo {
  display: block;
  width: min(320px, 100%);
  height: auto;
  margin: 0 0 16px;
}

.tournament-list-view {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tournament-list-view li {
  padding: 16px 0;
  border-bottom: 1px solid #dbe5f0;
}

.tournament-list-view h3 {
  margin: 0 0 8px;
}

.tournament-list-view p {
  margin: 4px 0;
}
