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

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

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

.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;
}

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;
}

label {
  display: block;
  margin-top: 10px;
  font-size: 14px;
}

input, select, button {
  margin-top: 4px;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #39414e;
  background: #101419;
  color: #ffffff;
}

button {
  cursor: pointer;
  background: #0d5cab;
}

button[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;
  }
}
