:root {
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-display: "Cinzel", Georgia, serif;
  --bg-0: #090d14;
  --bg-1: #0f1520;
  --bg-2: #141e2c;
  --bg-3: #1a273a;
  --line: #2a384d;
  --line-strong: #3e5271;
  --text-0: #edf3fb;
  --text-1: #c3cde0;
  --text-2: #92a2bb;
  --accent: #4e74b6;
  --accent-soft: #7895ca;
  --good: #31c081;
  --warn: #d4a15a;
  --bad: #d97d7d;
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
  --motion-fast: 180ms;
  --motion-mid: 280ms;
  --motion-slow: 560ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  color: var(--text-0);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% -8%, rgba(84, 121, 179, 0.2) 0%, transparent 32%),
    radial-gradient(circle at 88% -18%, rgba(64, 102, 168, 0.16) 0%, transparent 28%),
    repeating-linear-gradient(
      125deg,
      rgba(255, 255, 255, 0.012) 0,
      rgba(255, 255, 255, 0.012) 2px,
      transparent 2px,
      transparent 22px
    ),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 65%);
}

body::before {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 22%, rgba(84, 120, 185, 0.16) 0%, transparent 34%),
    radial-gradient(circle at 84% 16%, rgba(67, 102, 168, 0.13) 0%, transparent 30%),
    radial-gradient(circle at 56% 88%, rgba(83, 116, 176, 0.12) 0%, transparent 34%);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 12, 18, 0.9);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.86rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  border: 1px solid #4f6588;
  color: #eaf1ff;
  background: linear-gradient(145deg, #1c2f4b 0%, #101d2f 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.brand-mark-icon {
  width: 1.16rem;
  height: 1.16rem;
  color: #eaf3ff;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--bg-2);
  color: var(--text-0);
  padding: 0.34rem 0.7rem;
  font: inherit;
  font-weight: 700;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.34rem;
}

.site-nav a {
  padding: 0.42rem 0.72rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  color: var(--text-1);
  font-weight: 600;
  transition:
    transform var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    color var(--motion-fast) ease;
}

.nav-link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.site-nav a:hover {
  border-color: #344763;
  background: #141f31;
  color: var(--text-0);
  transform: translateY(-1px);
}

.site-nav a:hover .nav-icon,
.site-nav a.active .nav-icon {
  color: #ddebff;
  transform: translateY(-0.5px) scale(1.05);
}

.site-nav a.active {
  border-color: #4a6695;
  background: linear-gradient(180deg, #1a2a42 0%, #142033 100%);
  color: #eff5ff;
  box-shadow: 0 0 0 1px rgba(78, 116, 182, 0.3);
}

.top-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.global-search {
  position: relative;
  width: min(330px, 74vw);
}

.global-search-input {
  width: 100%;
  border-radius: 0.58rem;
  border: 1px solid #33445e;
  background: #101827;
  color: var(--text-0);
  font: inherit;
  padding: 0.52rem 0.72rem 0.52rem 2rem;
}

.global-search-input::placeholder {
  color: #8393ad;
}

.global-search-input:focus {
  outline: none;
  border-color: #5778ae;
  box-shadow: 0 0 0 1px rgba(87, 120, 174, 0.25);
}

.search-results {
  display: block;
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  border: 1px solid #34445f;
  border-radius: 0.7rem;
  background: #0f1623;
  box-shadow: var(--shadow);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.search-results.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.search-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #222f44;
  background: #111a29;
  color: var(--text-0);
  font: inherit;
  text-align: left;
  padding: 0.56rem 0.68rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.search-item:last-child {
  border-bottom: 0;
}

.search-item:hover {
  background: #19263a;
  transform: translateY(-1px);
}

.search-kind {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #7fb0ff;
  border: 1px solid #355279;
  border-radius: 999px;
  padding: 0.09rem 0.42rem;
}

.search-kind-icon {
  width: 0.72rem;
  height: 0.72rem;
  color: #8eb8ef;
}

.search-title {
  font-weight: 700;
}

.search-meta {
  color: var(--text-2);
  font-size: 0.84rem;
}

.search-empty {
  color: var(--text-2);
  padding: 0.7rem;
  font-size: 0.92rem;
}

.search-field-icon {
  position: absolute;
  left: 0.62rem;
  top: 50%;
  transform: translateY(-50%);
  color: #87a4d0;
  width: 0.92rem;
  height: 0.92rem;
  pointer-events: none;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #182336 0%, #111925 58%, #0f1621 100%);
  box-shadow: var(--shadow);
  padding: 1.15rem;
  margin-bottom: 0.95rem;
  animation: sectionReveal var(--motion-slow) cubic-bezier(0.21, 1, 0.28, 1) 70ms both;
}

.page-hero::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(91, 124, 182, 0.26) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: clamp(1.7rem, 4.8vw, 2.55rem);
}

.hero-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.page-hero p {
  margin: 0.5rem 0 0;
  color: var(--text-1);
  max-width: 84ch;
}

.status-line {
  margin-top: 0.78rem;
  border-radius: 0.58rem;
  border: 1px solid #364a66;
  background: #101827;
  color: #c6d2e8;
  padding: 0.5rem 0.65rem;
  font-size: 0.93rem;
  opacity: 0.58;
  transition:
    opacity var(--motion-mid) ease,
    border-color var(--motion-mid) ease,
    box-shadow var(--motion-mid) ease;
}

.status-line.visible {
  opacity: 1;
  border-color: #4d668d;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.status-line.error {
  border-color: #72464f;
  background: #26191d;
  color: #f7c4c4;
  opacity: 1;
}

.section {
  margin: 0 0 0.95rem;
}

.section h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  font-size: 1.24rem;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 0.92rem;
  background: linear-gradient(180deg, #151f2f 0%, #111a27 100%);
  box-shadow: var(--shadow);
  padding: 0.92rem;
  transition:
    transform var(--motion-mid) ease,
    border-color var(--motion-mid) ease,
    box-shadow var(--motion-mid) ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #446087;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.grid {
  display: grid;
  gap: 0.75rem;
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi {
  border: 1px solid #32445f;
  border-radius: 0.75rem;
  padding: 0.74rem;
  background: linear-gradient(170deg, #19263a 0%, #111a28 100%);
  transition:
    transform var(--motion-mid) ease,
    border-color var(--motion-mid) ease,
    box-shadow var(--motion-mid) ease;
}

.kpi:hover {
  transform: translateY(-2px);
  border-color: #4a6692;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

.kpi-label {
  color: var(--text-2);
  font-size: 0.84rem;
}

.kpi-value {
  margin-top: 0.12rem;
  font-size: 1.52rem;
  font-weight: 800;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.58rem;
  margin-bottom: 0.7rem;
}

.controls label {
  color: var(--text-1);
  font-weight: 600;
}

.controls input,
.controls select,
.controls button,
.controls .button-link {
  border: 1px solid #364a68;
  border-radius: 0.54rem;
  background: #0f1724;
  color: var(--text-0);
  padding: 0.5rem 0.68rem;
  font: inherit;
}

.controls input::placeholder {
  color: #8194b2;
}

.controls button,
.controls .button-link {
  cursor: pointer;
  font-weight: 700;
  transition:
    transform var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.controls button:hover,
.controls .button-link:hover {
  background: #182436;
  transform: translateY(-1px);
  border-color: #48648f;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid #364a68;
  border-radius: 0.54rem;
  background: #0f1724;
  color: var(--text-0);
  padding: 0.42rem 0.62rem;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.button-link:hover {
  background: #182436;
  border-color: #48648f;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.tab-btn {
  border: 1px solid #3a4f6f;
  border-radius: 0.5rem;
  background: #0f1724;
  color: #adc1df;
  padding: 0.44rem 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    color var(--motion-fast) ease;
}

.tab-btn.active {
  border-color: #5b79ac;
  color: #f0f5ff;
  background: linear-gradient(180deg, #1c2b43 0%, #142033 100%);
  box-shadow: 0 0 0 1px rgba(91, 121, 172, 0.28);
}

.tab-btn:hover {
  background: #172436;
  transform: translateY(-1px);
}

.tab-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.page-subnav {
  width: 100%;
}

.page-subnav .tab-btn {
  text-decoration: none;
}

.tournaments-controls {
  justify-content: space-between;
}

.tournaments-type-tabs {
  margin-left: auto;
}

.tournament-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.tournament-name-label {
  font-weight: 700;
}

.tournament-series-tag {
  border-color: #5f3c64;
  background: #322136;
  color: #f2d8f5;
  font-weight: 700;
}

.tournament-status {
  letter-spacing: 0.04em;
  font-weight: 800;
  font-size: 0.74rem;
}

.tournament-date-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tournament-date-cell.active {
  color: #84e2b7;
}

.tournament-date-cell.completed {
  color: #c2cee1;
}

.tournament-date-cell.upcoming {
  color: #efca8d;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
}

.transfers-footer {
  margin-top: 0.68rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.58rem;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.pager-btn {
  border: 1px solid #33465f;
  border-radius: 0.46rem;
  background: #0f1724;
  color: #d7e5ff;
  min-width: 2rem;
  padding: 0.34rem 0.54rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease;
}

.pager-btn:hover:not(:disabled) {
  background: #19263a;
  transform: translateY(-1px);
}

.pager-btn.active {
  border-color: #5877ab;
  background: linear-gradient(180deg, #21334f 0%, #16263c 100%);
}

.pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  text-align: left;
  padding: 0.56rem 0.64rem;
  border-bottom: 1px solid #253347;
}

td a.player-link {
  color: #dfe9ff;
}

td a.player-link:hover {
  color: #8eb7ff;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #132033;
  color: #cfe0ff;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover {
  color: #ffffff;
}

th.active-sort {
  color: #8eb7ff;
}

tr:nth-child(odd) td {
  background: #0f1724;
}

tr:nth-child(even) td {
  background: #131c2c;
}

tbody tr:hover td {
  background: #18263b;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #3d5170;
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  background: #19263a;
  color: #d7e4ff;
  font-size: 0.8rem;
}

.badge.good {
  border-color: #2f6d56;
  background: #163227;
  color: #9ee1be;
}

.badge.warn {
  border-color: #6d5634;
  background: #332717;
  color: #f1cb97;
}

.badge.bad {
  border-color: #724141;
  background: #351f22;
  color: #f2b5b5;
}

.list {
  display: grid;
  gap: 0.55rem;
}

.list-item {
  border: 1px solid #30415c;
  border-radius: 0.74rem;
  background: linear-gradient(170deg, #172234 0%, #101926 100%);
  padding: 0.62rem 0.68rem;
  transition:
    transform var(--motion-mid) ease,
    border-color var(--motion-mid) ease,
    box-shadow var(--motion-mid) ease;
}

.list-item:hover {
  transform: translateY(-2px);
  border-color: #466491;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.34);
}

.player-link {
  color: #eaf1ff;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px dotted transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.player-link:hover {
  color: #99bdff;
  border-color: #6d95d8;
}

.lineup-row {
  display: flex;
  align-items: center;
  gap: 0.58rem;
}

.lineup-pos {
  min-width: 2.45rem;
  text-align: center;
  padding: 0.2rem 0.42rem;
  border-radius: 0.38rem;
  border: 1px solid #355077;
  background: #10243d;
  color: #b5ccf3;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.lineup-player {
  font-weight: 700;
}

.timeline-item {
  display: grid;
  gap: 0.2rem;
}

.timeline-meta {
  color: #93b2de;
  font-size: 0.83rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-details {
  color: #d8e6ff;
  font-size: 0.92rem;
  line-height: 1.35;
}

.timeline-player {
  font-size: 0.92rem;
}

.match-select-btn {
  cursor: pointer;
  transition:
    transform var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

button.match-select-btn {
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
}

button.match-select-btn,
article.match-select-btn,
div.match-select-btn {
  border: 1px solid #30415c;
  background: linear-gradient(170deg, #172234 0%, #101926 100%);
  padding: 0.62rem 0.68rem;
  border-radius: 0.74rem;
}

.match-select-btn:hover {
  border-color: #466490;
  background: linear-gradient(170deg, #1d2a3f 0%, #132033 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32);
}

.list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.45rem;
}

.list-title {
  font-weight: 700;
}

.list-meta {
  color: var(--text-2);
  font-size: 0.88rem;
}

.match-card {
  display: grid;
  gap: 0.56rem;
}

a.match-card {
  color: inherit;
  text-decoration: none;
}

.match-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.match-center {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}

.match-team-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
  min-width: 0;
}

.match-team-wrap.away {
  justify-self: end;
}

.match-team-badge {
  width: 1.42rem;
  height: 1.42rem;
  border-radius: 0.28rem;
  border: 1px solid #38506f;
  background: #0f1a29;
  display: grid;
  place-items: center;
  font-size: 0.64rem;
  font-weight: 800;
  color: #dbe9ff;
  overflow: hidden;
}

.match-team-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-team {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-center .match-team:last-child {
  text-align: right;
}

.match-score {
  font-size: 1.2rem;
  font-weight: 800;
  color: #edf5ff;
  letter-spacing: 0.04em;
}

.live-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.live-detail-hint {
  border-color: rgba(83, 211, 167, 0.34);
  background: rgba(20, 84, 68, 0.26);
  color: #b8f6df;
  font-size: 0.7rem;
  white-space: nowrap;
  transition:
    transform var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease;
}

.match-card.match-select-btn:hover .live-detail-hint {
  border-color: rgba(103, 231, 188, 0.72);
  background: rgba(30, 126, 98, 0.36);
  transform: translateX(2px);
}

.match-type-badge.friendly {
  border-color: rgba(103, 231, 188, 0.34);
  background: rgba(24, 96, 80, 0.3);
  color: #baf8df;
}

.match-type-badge.league {
  border-color: rgba(104, 150, 219, 0.38);
  background: rgba(31, 64, 115, 0.34);
  color: #bdd7ff;
}

.empty {
  border: 1px dashed #3a4e6c;
  border-radius: 0.7rem;
  background: #101926;
  color: var(--text-1);
  padding: 0.8rem;
}

.rating-bars {
  display: grid;
  gap: 0.86rem;
  border: 1px solid #334661;
  border-radius: 0.9rem;
  padding: 0.86rem;
  background:
    radial-gradient(circle at 18% 0%, rgba(99, 139, 199, 0.24), transparent 36%),
    radial-gradient(circle at 86% 12%, rgba(61, 210, 169, 0.12), transparent 34%),
    linear-gradient(180deg, #0f1724 0%, #0a111c 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 18px 42px rgba(0, 0, 0, 0.18);
}

.rating-lab-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.rating-lab-stat {
  border: 1px solid rgba(117, 156, 211, 0.32);
  border-radius: 0.64rem;
  background:
    linear-gradient(135deg, rgba(24, 45, 73, 0.96), rgba(12, 20, 32, 0.96));
  padding: 0.58rem 0.64rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  animation: statCardIn 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--stat-delay, 0ms);
}

.rating-lab-stat strong {
  display: block;
  color: #f1f7ff;
  font-size: clamp(1rem, 1.4vw, 1.42rem);
  line-height: 1;
}

.rating-lab-stat span {
  display: block;
  margin-top: 0.22rem;
  color: #9fb5d5;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rating-band-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.62rem;
}

.rating-band-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(124, 161, 214, 0.26);
  border-radius: 0.72rem;
  padding: 0.68rem;
  background:
    linear-gradient(135deg, rgba(16, 30, 49, 0.92), rgba(10, 16, 27, 0.94));
  animation: statCardIn 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--stat-delay, 0ms);
}

.rating-band-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -56% 12%;
  height: 5.2rem;
  border-radius: 999px;
  opacity: 0.2;
  filter: blur(12px);
}

.rating-band-card.premier::after {
  background: #f1c766;
}

.rating-band-card.overlap::after {
  background: #78a9ee;
}

.rating-band-card.challenge::after {
  background: #78a9ee;
}

.rating-band-card.beginner::after {
  background: #4ed3a7;
}

.rating-band-card.premier {
  border-color: rgba(241, 199, 102, 0.42);
}

.rating-band-card.overlap {
  border-color: rgba(120, 169, 238, 0.42);
}

.rating-band-card.challenge {
  border-color: rgba(89, 139, 205, 0.4);
}

.rating-band-card.beginner {
  border-color: rgba(78, 211, 167, 0.38);
}

.rating-band-card span,
.rating-band-card em {
  display: block;
  position: relative;
  z-index: 1;
  color: #9fb5d5;
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rating-band-card strong {
  display: block;
  position: relative;
  z-index: 1;
  margin: 0.16rem 0;
  color: #f3f8ff;
  font-size: clamp(1.2rem, 2vw, 1.72rem);
  line-height: 1;
}

.rating-range-rail {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border: 1px solid rgba(59, 82, 116, 0.72);
  border-radius: 0.68rem;
  padding: 0.72rem 0.72rem 1.35rem;
  background:
    linear-gradient(90deg, rgba(86, 132, 190, 0.3), rgba(84, 213, 170, 0.32)),
    linear-gradient(180deg, #0c1522 0%, #09111c 100%);
  background-size: 100% 3px, auto;
  background-repeat: no-repeat;
  background-position: left calc(100% - 0.64rem), center;
}

.rating-range-rail span {
  border: 1px solid rgba(129, 164, 214, 0.24);
  border-radius: 999px;
  background: rgba(11, 20, 33, 0.76);
  color: #d7e7ff;
  padding: 0.28rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.rating-rail-marker {
  position: absolute;
  bottom: 0.34rem;
  width: 2px;
  height: 0.92rem;
  background: #86b3ff;
  transform: translateX(-50%);
  animation: markerDrop 640ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.rating-rail-marker.median {
  background: #58d3a3;
}

.rating-rail-marker::after {
  content: attr(data-label);
  position: absolute;
  bottom: 1.08rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #bfd5f7;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rating-histogram {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.66rem;
  align-items: stretch;
  min-height: 210px;
}

.rating-single-graph {
  min-height: clamp(280px, 36vw, 430px);
  padding: 0.35rem 0.1rem 0.1rem;
}

.rating-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0.82rem 0 1.8rem;
  color: #87a0c7;
  font-size: 0.72rem;
  font-weight: 800;
}

.rating-lab-strip {
  display: grid;
  align-items: end;
  gap: clamp(0.22rem, 0.8vw, 0.52rem);
  grid-template-columns: repeat(22, minmax(0, 1fr));
  border: 1px solid rgba(59, 82, 116, 0.72);
  border-radius: 0.68rem;
  padding: 0.9rem 0.8rem 0.72rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(88, 130, 190, 0.22), transparent 48%),
    linear-gradient(rgba(146, 178, 222, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(146, 178, 222, 0.038) 1px, transparent 1px),
    linear-gradient(180deg, #0d1623 0%, #0a111c 100%);
  background-size: auto, 100% 20%, 4.54% 100%, auto;
  overflow: visible;
}

.rating-bucket {
  position: relative;
  display: flex;
  align-items: end;
  height: 100%;
  min-width: 0;
}

.rating-bar-wrap {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.rating-bar-count,
.rating-bar-range {
  display: block;
  color: #8fa8cf;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: center;
  white-space: nowrap;
}

.rating-bar-range {
  color: #6f89af;
  transform: rotate(-25deg);
  transform-origin: center;
  margin-top: 0.12rem;
}

.rating-bar {
  width: 100%;
  border-radius: 0.38rem 0.38rem 0.08rem 0.08rem;
  background: linear-gradient(180deg, #90b8ed 0%, #5d83bf 55%, #294b7c 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 1.2rem rgba(88, 130, 190, 0.13);
  transform-origin: bottom;
  animation: ratingRise 780ms cubic-bezier(0.21, 1, 0.28, 1) both;
  animation-delay: var(--bar-delay, 0ms);
  min-height: 0.35rem;
  transition:
    filter var(--motion-fast) ease,
    transform var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.rating-bar.premier {
  background: linear-gradient(180deg, #ffe5a6 0%, #f1c766 48%, #947335 100%);
  box-shadow: 0 0 1.5rem rgba(241, 199, 102, 0.2);
}

.rating-bar.overlap {
  background: linear-gradient(180deg, #cae0ff 0%, #7eb1f7 52%, #3764a2 100%);
}

.rating-bar.challenge {
  background: linear-gradient(180deg, #a6c7f7 0%, #5b8bcd 54%, #294d80 100%);
}

.rating-bar.beginner {
  background: linear-gradient(180deg, #baf8e2 0%, #4ed3a7 52%, #1e7a66 100%);
}

.rating-bar.all {
  background: linear-gradient(180deg, #a8b5c8 0%, #71839f 56%, #3b4a61 100%);
}

.rating-bar:hover {
  filter: brightness(1.16) saturate(1.16);
  transform: translateY(-3px) scaleX(1.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 0 1.4rem rgba(139, 180, 239, 0.32);
}

.rating-hover-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(var(--bar-height, 0%) + 0.7rem);
  z-index: 4;
  width: max-content;
  max-width: 13rem;
  border: 1px solid rgba(164, 198, 246, 0.46);
  border-radius: 0.58rem;
  background: rgba(8, 14, 23, 0.96);
  color: #f3f8ff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  padding: 0.44rem 0.56rem;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  transform: translate(-50%, 0.45rem) scale(0.96);
  transition:
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) ease;
}

.rating-bucket:hover .rating-hover-tooltip,
.rating-bucket:focus-within .rating-hover-tooltip {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.rating-lab-insight {
  border: 1px solid rgba(91, 130, 185, 0.38);
  border-radius: 0.72rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(71, 176, 151, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(16, 28, 46, 0.9), rgba(10, 17, 29, 0.92));
  color: #d9e8ff;
  padding: 0.72rem 0.82rem;
  font-weight: 700;
  line-height: 1.55;
  animation: statCardIn 620ms cubic-bezier(0.22, 1, 0.36, 1) 480ms both;
}

.metric-note {
  margin-top: 0.55rem;
  border: 1px solid #32445f;
  border-radius: 0.62rem;
  background: #101927;
  color: var(--text-1);
  padding: 0.48rem 0.62rem;
  font-size: 0.92rem;
}

.team-tile {
  --tile-hue: 210;
  border-radius: 0.84rem;
  border: 1px solid rgba(153, 182, 229, 0.22);
  background: linear-gradient(
    165deg,
    hsl(var(--tile-hue) 58% 36%) 0%,
    hsl(calc(var(--tile-hue) + 26) 52% 15%) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  padding: 0.7rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.62rem;
  align-items: center;
  background-size: 140% 140%;
  animation: tileFlow 16s ease-in-out infinite alternate;
  transition:
    transform var(--motion-mid) ease,
    border-color var(--motion-mid) ease,
    box-shadow var(--motion-mid) ease;
}

.team-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(176, 202, 242, 0.5);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36);
}

.team-emblem {
  width: 2.34rem;
  height: 2.34rem;
  border-radius: 0.62rem;
  background: rgba(9, 13, 20, 0.55);
  border: 1px solid rgba(209, 224, 248, 0.3);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.team-emblem-img {
  width: 1.8rem;
  height: 1.8rem;
  object-fit: contain;
}

.team-info {
  min-width: 0;
}

.team-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-meta {
  color: rgba(233, 242, 255, 0.78);
  font-size: 0.83rem;
}

.team-score {
  margin-top: 0.14rem;
  font-size: 1.08rem;
  font-weight: 800;
}

.team-row-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.team-row-badge {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.38rem;
  border: 1px solid #3e5677;
  background: #122037;
  color: #eaf3ff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  overflow: hidden;
}

.team-row-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.transfer-team {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.transfer-player {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.transfer-player-badge {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.44rem;
  border: 1px solid #3c5375;
  background:
    radial-gradient(circle at 30% 20%, rgba(142, 180, 238, 0.32), transparent 42%),
    #13233a;
  color: #deebff;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  overflow: hidden;
}

.transfer-player-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.transfer-team-badge {
  width: 1.42rem;
  height: 1.42rem;
  border-radius: 0.38rem;
  border: 1px solid #395172;
  object-fit: contain;
  background: #0f1a2a;
}

.transfer-team-badge.fallback {
  display: grid;
  place-items: center;
  color: #dbe9ff;
  font-size: 0.64rem;
  font-weight: 800;
}

.transfer-free-agent {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(145, 165, 195, 0.28);
  background: rgba(145, 165, 195, 0.08);
  color: #adc1de;
  padding: 0.08rem 0.42rem;
  font-size: 0.82rem;
}

.transfer-row {
  position: relative;
}

.transfer-row td:first-child {
  border-left: 3px solid transparent;
}

.transfer-row.is-join td:first-child {
  border-left-color: #5fd6a7;
}

.transfer-row.is-exit td:first-child {
  border-left-color: #e69c5d;
}

.transfer-row:hover {
  background: rgba(31, 52, 82, 0.48);
}

.transfer-movement-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border-radius: 999px;
  border: 1px solid rgba(119, 158, 214, 0.34);
  background: rgba(19, 34, 54, 0.9);
  color: #dbeaff;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  animation: transferBadgeIn 420ms ease both;
}

.transfer-movement-badge.join {
  border-color: rgba(95, 214, 167, 0.42);
  color: #baf5df;
}

.transfer-movement-badge.exit {
  border-color: rgba(230, 156, 93, 0.42);
  color: #ffd8b4;
}

.transfer-mini-icon {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  color: currentColor;
  flex: 0 0 auto;
}

.transfer-mini-icon svg {
  width: 100%;
  height: 100%;
}

.transfer-date {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  color: #a9bfdf;
  white-space: nowrap;
}

.live-badge {
  animation: livePulse 1.8s ease-in-out infinite;
}

.player-rank-card {
  position: relative;
  overflow: hidden;
  border-color: #3a5171;
  background: linear-gradient(175deg, #17263a 0%, #111c2b 100%);
}

.player-rank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(156, 191, 245, 0.1) 38%,
    transparent 72%
  );
  transform: translateX(-130%);
  transition: transform 700ms ease;
  pointer-events: none;
}

.player-rank-card:hover::after {
  transform: translateX(130%);
}

.player-rank-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
}

.player-rank-left {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
}

.player-rank-order {
  min-width: 2.05rem;
  border-radius: 999px;
  border: 1px solid #4a668f;
  background: #17273d;
  color: #d8e8ff;
  padding: 0.1rem 0.46rem;
  font-weight: 800;
  font-size: 0.77rem;
  letter-spacing: 0.04em;
}

.player-rank-link {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 20rem;
}

.player-rank-meta {
  margin-top: 0.42rem;
}

.player-rating-badge {
  border-color: #607fae;
  background: #20334f;
  color: #f0f6ff;
  font-weight: 800;
}

.rating-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  border: 1px solid rgba(116, 154, 210, 0.4);
  border-radius: 999px;
  background: rgba(22, 36, 57, 0.82);
  color: #eff6ff;
  padding: 0.22rem 0.52rem;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.rating-tier-badge::before {
  content: "";
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 999px;
  background: #7ca4de;
  box-shadow: 0 0 0.7rem currentColor;
}

.rating-tier-badge.premier {
  border-color: rgba(241, 199, 102, 0.58);
  color: #ffe3a1;
}

.rating-tier-badge.premier::before {
  background: #f1c766;
}

.rating-tier-badge.overlap {
  border-color: rgba(126, 177, 247, 0.55);
  color: #cde2ff;
}

.rating-tier-badge.overlap::before {
  background: #7eb1f7;
}

.rating-tier-badge.challenge {
  border-color: rgba(91, 139, 205, 0.5);
  color: #abc9f6;
}

.rating-tier-badge.challenge::before {
  background: #5b8bcd;
}

.rating-tier-badge.beginner {
  border-color: rgba(78, 211, 167, 0.48);
  color: #b8f6df;
}

.rating-tier-badge.beginner::before {
  background: #4ed3a7;
}

.rating-tier-badge.all {
  border-color: rgba(120, 140, 166, 0.42);
  color: #b9c7db;
}

.rating-tier-badge.all::before {
  background: #7d8da5;
}

.rating-entity-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  min-width: 0;
}

.rating-entity-cell .leaderboard-entity-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
}

.rating-team-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.rating-team-chip-badge {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(142, 180, 238, 0.36);
  background: rgba(15, 28, 48, 0.86);
  color: #dbeafe;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 900;
}

.rating-team-chip-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rating-team-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.team-chip-badge {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 0.34rem;
  border: 1px solid #476289;
  background: #112239;
  color: #dbeaff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.68rem;
  overflow: hidden;
}

.team-chip-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.team-chip-label {
  color: #c2d4ef;
  font-size: 0.88rem;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

.top-team-logo-card {
  --tile-hue: 212;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.68rem;
  align-items: center;
  border-color: rgba(153, 182, 229, 0.24);
  background:
    radial-gradient(circle at 86% 16%, rgba(176, 204, 247, 0.2) 0%, transparent 40%),
    linear-gradient(
      160deg,
      hsl(var(--tile-hue) 56% 27%) 0%,
      hsl(calc(var(--tile-hue) + 22) 54% 16%) 100%
    );
  background-size: 160% 160%;
  animation: tileFlow 12s ease-in-out infinite alternate;
}

.top-team-logo-card.is-clickable {
  cursor: pointer;
}

.top-team-logo-card.is-clickable:hover {
  border-color: rgba(196, 217, 250, 0.56);
}

.top-team-logo-card.is-clickable:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(148, 186, 246, 0.58),
    0 18px 32px rgba(0, 0, 0, 0.34);
}

.top-team-logo-head {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
}

.top-team-order {
  min-width: 2.2rem;
  text-align: center;
  border-radius: 999px;
  border: 1px solid rgba(216, 230, 255, 0.4);
  background: rgba(12, 20, 32, 0.46);
  color: #eef5ff;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  font-weight: 800;
  padding: 0.08rem 0.4rem;
}

.top-team-emblem {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(215, 228, 248, 0.34);
  background: rgba(9, 14, 22, 0.55);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  overflow: hidden;
}

.top-team-emblem img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.top-team-logo-body {
  min-width: 0;
}

.top-team-logo-name {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-team-logo-meta {
  margin-top: 0.06rem;
  color: rgba(235, 243, 255, 0.8);
  font-size: 0.82rem;
}

.top-team-rating {
  margin-top: 0.34rem;
  border-color: rgba(211, 226, 250, 0.5);
  background: rgba(17, 30, 48, 0.6);
  color: #f1f7ff;
  font-weight: 800;
}

.team-row-clickable,
.team-tile-clickable {
  cursor: pointer;
}

.team-row-clickable td {
  transition: background-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.team-row-clickable.selected td {
  background: linear-gradient(180deg, #1c2b42 0%, #162234 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(113, 153, 216, 0.34);
}

.team-tile-clickable.selected {
  border-color: rgba(202, 221, 249, 0.68);
  box-shadow:
    0 20px 36px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(137, 173, 231, 0.48);
}

.team-detail-panel {
  border: 1px solid #2f435f;
  border-radius: 0.82rem;
  background: linear-gradient(178deg, #0f1a2a 0%, #0b121d 100%);
  padding: 0.76rem;
}

.team-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.team-detail-title {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
}

.team-detail-badge {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.66rem;
  border: 1px solid #4d678d;
  background: #122338;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.94rem;
  overflow: hidden;
}

.team-detail-badge img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.team-detail-name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: 0.04em;
}

.team-detail-meta {
  color: var(--text-1);
  font-size: 0.86rem;
}

.team-detail-metrics {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.52rem;
}

.team-detail-metric {
  border: 1px solid #314862;
  border-radius: 0.62rem;
  background: linear-gradient(180deg, #152133 0%, #101927 100%);
  padding: 0.44rem 0.5rem;
  display: grid;
  gap: 0.2rem;
}

.team-detail-metric-label {
  color: var(--text-2);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.team-detail-metric-value {
  font-weight: 800;
  color: #e9f2ff;
  font-size: 0.96rem;
}

.team-detail-form {
  border: 1px solid #334961;
  border-radius: 0.62rem;
  background: linear-gradient(180deg, #142136 0%, #111b2a 100%);
  padding: 0.44rem 0.5rem;
  display: grid;
  gap: 0.32rem;
}

.team-detail-form-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.table-form-pills {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.2rem;
  align-items: center;
}

.table-form-pills .form-pill {
  width: 1.2rem;
  height: 1.2rem;
  font-size: 0.66rem;
}

.form-pill {
  width: 1.34rem;
  height: 1.34rem;
  border-radius: 0.34rem;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #f3f8ff;
}

.form-pill.w {
  background: #1f6a4e;
  border: 1px solid #3e9472;
}

.form-pill.d {
  background: #5f6422;
  border: 1px solid #8f9650;
}

.form-pill.l {
  background: #6d3030;
  border: 1px solid #985151;
}

.team-detail-subtitle {
  margin: 0.86rem 0 0.5rem;
  font-size: 0.98rem;
}

.team-roster-item .list-meta {
  margin-top: 0.26rem;
}

.match-history-card {
  border-color: #355070;
  background:
    radial-gradient(circle at 88% 20%, rgba(138, 179, 244, 0.16) 0%, transparent 44%),
    linear-gradient(170deg, #17263a 0%, #0f1827 100%);
}

.match-history-card .match-score {
  font-size: 1.32rem;
}

/* ── Legacy timeline (kept for old call sites) ─────────────────────────── */
.timeline-goal-event {
  border-color: #1e3254;
  background: linear-gradient(180deg, rgba(14,24,40,0.95) 0%, rgba(10,18,30,0.97) 100%);
  padding: 0.55rem 0.75rem;
  gap: 0.28rem;
}

.timeline-goal-head { display: none; }
.goal-ball-icon { display: none; }
.timeline-minute { display: none; }
.timeline-goal-support { display: none; }
.timeline-goal-support.solo { display: none; }

/* ── New timeline layout ─────────────────────────────────────────────────── */
.tl-row {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  min-height: 1.8rem;
}

.tl-minute {
  min-width: 2.4rem;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 800;
  color: #7a9ccb;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.tl-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.tl-icon-goal { color: #f4d070; }
.tl-icon-miss { color: #e06060; }
.tl-icon-save { color: #56b3a8; }

.tl-card {
  width: 0.75rem;
  height: 1rem;
  border-radius: 2px;
  flex-shrink: 0;
}
.tl-card-yellow { background: #f4d012; box-shadow: 0 1px 4px rgba(244,208,18,0.4); }
.tl-card-red    { background: #e04040; box-shadow: 0 1px 4px rgba(224,64,64,0.4); }

.tl-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.42rem;
  border-radius: 0.32rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.tl-badge-goal    { background: #1e3318; color: #6fcf6f; border-color: #2e5428; }
.tl-badge-yellow  { background: #2d2608; color: #f4d070; border-color: #4a3e10; }
.tl-badge-red     { background: #2d0f0f; color: #e07070; border-color: #4a1818; }
.tl-badge-save    { background: #0e2828; color: #56c8be; border-color: #1a4040; }
.tl-badge-default { background: #121e30; color: #8ab0d8; border-color: #1e3254; }

.tl-scorer {
  font-size: 0.92rem;
  font-weight: 700;
  color: #dde8ff;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-scorer:hover { color: #99ccff; text-decoration: underline; }

.tl-side-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2c3f5c;
  border: 1.5px solid #3c5478;
  flex-shrink: 0;
  margin-left: auto;
}
.tl-side-home { background: #2255a8; border-color: #3370cc; }
.tl-side-away { background: #a82222; border-color: #cc3333; }

.tl-support {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding-left: calc(2.4rem + 0.48rem + 1rem + 0.48rem);
  font-size: 0.82rem;
  color: #7a9ccb;
  font-style: italic;
}
.tl-support-label { color: #6088b0; }
.tl-support-name  { color: #a8c4e8; font-weight: 600; text-decoration: none; font-style: normal; }
.tl-support-name:hover { color: #d0e4ff; text-decoration: underline; }
.tl-support-side  { color: #4a6888; }

/* Goal row accent */
.tl-ev-goal  { border-left: 3px solid #3a7a3a; }
.tl-ev-yellow { border-left: 3px solid #8a7010; }
.tl-ev-red    { border-left: 3px solid #8a2020; }
.tl-ev-save   { border-left: 3px solid #1a6a60; }

/* ── Match Detail Hero ───────────────────────────────────────────────────── */
.match-detail-hero-title {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  text-align: center;
}

.match-hero-side {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.match-hero-side-home { flex-direction: row; }
.match-hero-side-away { flex-direction: row-reverse; }

.match-hero-badge {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}
.match-hero-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.match-hero-name {
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 700;
  color: #dde8ff;
  white-space: nowrap;
}

.match-hero-score {
  font-family: var(--font-display, "Cinzel", serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: 0 0.4rem;
  text-shadow: 0 2px 16px rgba(120,160,255,0.3);
}

.page-footer {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--text-2);
  padding: 1rem 0;
  animation: sectionReveal var(--motion-slow) cubic-bezier(0.21, 1, 0.28, 1) 260ms both;
}

.page-footer a {
  color: #d4e1f8;
}

.footer-link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.footer-icon {
  width: 0.82rem;
  height: 0.82rem;
  color: #95afd7;
}

.page-footer span {
  margin: 0 0.42rem;
}

.ui-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  flex: 0 0 auto;
  color: #9cb6de;
  transition: color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.ui-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.nav-icon {
  color: #89a6d3;
}

.hero-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #d5e6ff;
}

.section-icon {
  width: 1.03rem;
  height: 1.03rem;
  color: #9db5da;
}

.btn-icon {
  width: 0.98rem;
  height: 0.98rem;
  color: #c8dbfb;
}

.page > .section {
  opacity: 0;
  animation: sectionReveal var(--motion-slow) cubic-bezier(0.21, 1, 0.28, 1) both;
}

.page > .section:nth-of-type(1) {
  animation-delay: 110ms;
}

.page > .section:nth-of-type(2) {
  animation-delay: 170ms;
}

.page > .section:nth-of-type(3) {
  animation-delay: 230ms;
}

.page > .section:nth-of-type(4) {
  animation-delay: 290ms;
}

.page > .section:nth-of-type(5) {
  animation-delay: 350ms;
}

.page > .section:nth-of-type(6) {
  animation-delay: 410ms;
}

.list-item,
.kpi,
.table-wrap tbody tr {
  opacity: 0;
  animation: itemReveal var(--motion-slow) ease both;
}

/* team-tile: combine tileFlow (bg sweep) + itemReveal (entry fade) so neither kills the other */
.team-tile {
  opacity: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  animation: tileFlow 16s ease-in-out infinite alternate, itemReveal var(--motion-slow) ease both;
}

/* Sweep shimmer on hover — mirrors the home-page top-team-logo-card behaviour */
.team-tile::after {
  content: "";
  position: absolute;
  top: -70%;
  left: -52%;
  z-index: 1;
  pointer-events: none;
  width: 50%;
  height: 230%;
  opacity: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.07) 25%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.07) 75%,
    transparent 100%
  );
  transform: rotate(25deg) translateX(-190%);
  transition: opacity 0.22s ease, transform 1.05s cubic-bezier(0.19, 1, 0.22, 1);
}

.team-tile > * {
  position: relative;
  z-index: 2;
}

.team-tile:hover::after,
.team-tile:focus-visible::after {
  opacity: 1;
  transform: rotate(25deg) translateX(430%);
}

.list-item:nth-child(1),
.team-tile:nth-child(1),
.table-wrap tbody tr:nth-child(1) {
  animation-delay: 35ms;
}

.list-item:nth-child(2),
.team-tile:nth-child(2),
.table-wrap tbody tr:nth-child(2) {
  animation-delay: 60ms;
}

.list-item:nth-child(3),
.team-tile:nth-child(3),
.table-wrap tbody tr:nth-child(3) {
  animation-delay: 85ms;
}

.list-item:nth-child(4),
.team-tile:nth-child(4),
.table-wrap tbody tr:nth-child(4) {
  animation-delay: 110ms;
}

.list-item:nth-child(5),
.team-tile:nth-child(5),
.table-wrap tbody tr:nth-child(5) {
  animation-delay: 135ms;
}

.list-item:nth-child(6),
.team-tile:nth-child(6),
.table-wrap tbody tr:nth-child(6) {
  animation-delay: 160ms;
}

.list-item:nth-child(7),
.team-tile:nth-child(7),
.table-wrap tbody tr:nth-child(7) {
  animation-delay: 185ms;
}

.list-item:nth-child(8),
.team-tile:nth-child(8),
.table-wrap tbody tr:nth-child(8) {
  animation-delay: 210ms;
}

.list-item:nth-child(9),
.team-tile:nth-child(9),
.table-wrap tbody tr:nth-child(9) {
  animation-delay: 235ms;
}

.list-item:nth-child(10),
.team-tile:nth-child(10),
.table-wrap tbody tr:nth-child(10) {
  animation-delay: 260ms;
}

.list-item:nth-child(11),
.team-tile:nth-child(11),
.table-wrap tbody tr:nth-child(11) {
  animation-delay: 285ms;
}

.list-item:nth-child(12),
.team-tile:nth-child(12),
.table-wrap tbody tr:nth-child(12) {
  animation-delay: 310ms;
}

@keyframes auroraDrift {
  0% {
    transform: translate3d(-1.5%, -1%, 0) scale(1.01);
  }
  100% {
    transform: translate3d(1.5%, 1%, 0) scale(1.04);
  }
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(49, 192, 129, 0.38);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(49, 192, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(49, 192, 129, 0);
  }
}

@keyframes ratingRise {
  0% {
    opacity: 0.35;
    transform: scaleY(0.25);
  }
  100% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes tileFlow {
  0% {
    background-position: 15% 35%;
  }
  100% {
    background-position: 85% 65%;
  }
}

@keyframes sectionReveal {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
    filter: saturate(0.82);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1);
  }
}

@keyframes itemReveal {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes statCardIn {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes transferBadgeIn {
  0% {
    opacity: 0;
    transform: translateX(-4px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes markerDrop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-7px) scaleY(0.2);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body::before {
    display: none;
  }

  .page-hero,
  .page > .section,
  .page-footer,
  .list-item,
  .team-tile,
  .kpi,
  .table-wrap tbody tr {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 980px) {
  .rating-lab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rating-band-panel {
    grid-template-columns: 1fr;
  }

  .rating-histogram {
    grid-template-columns: 2.4rem 1fr;
  }

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

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

  .top-tools {
    width: 100%;
    margin-left: 0;
  }

  .global-search {
    width: 100%;
  }
}

@media (max-width: 780px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    border-top: 1px solid #2c3951;
    padding-top: 0.6rem;
    order: 5;
  }

  .site-nav.open {
    display: flex;
  }

  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .tournaments-controls {
    justify-content: flex-start;
  }

  .tournaments-type-tabs {
    margin-left: 0;
  }

  .team-detail-metrics {
    grid-template-columns: 1fr;
  }

  .rating-lab-grid {
    grid-template-columns: 1fr;
  }

  .rating-histogram {
    overflow-x: auto;
  }

  .rating-lab-strip {
    grid-template-columns: repeat(22, minmax(2.2rem, 1fr));
    min-width: 54rem;
  }

  .match-center {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .match-center .match-team:last-child {
    text-align: left;
  }

  .page {
    padding: 0.75rem;
  }
}


/* ═══ Hub User Nav (topbar login/avatar) ═══ */
.hub-user-nav{display:flex;align-items:center;gap:.5rem;margin-right:.75rem;flex-shrink:0}
.hub-login-link{color:#5865F2;font-weight:600;font-size:.85rem;text-decoration:none;padding:.35rem .9rem;border:1px solid #5865F2;border-radius:6px;transition:all .15s}
.hub-login-link:hover{background:#5865F2;color:#fff}
.hub-avatar{width:24px;height:24px;border-radius:50%;vertical-align:middle;margin-right:.25rem}
.hub-username{font-size:.82rem;color:var(--c-text,#ccc);margin-right:.5rem}
.hub-nav-a{font-size:.78rem;color:var(--c-text-muted,#888);text-decoration:none;margin-right:.4rem;transition:color .15s}
.hub-nav-a:hover{color:var(--c-text,#ccc)}
.hub-logout{opacity:.6}
.hub-logout:hover{opacity:1}

/* ═══ Fixed leaderboard rows with icons and stable ID profile links ═══ */
.player-link.is-disabled,
.leaderboard-name.is-disabled {
  color: #dbe9ff;
  cursor: default;
  text-decoration: none;
}

.leaderboard-row {
  border-color: rgba(122, 154, 202, 0.34);
  background: linear-gradient(180deg, rgba(22, 35, 54, 0.88), rgba(13, 23, 37, 0.92));
}

.leaderboard-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.leaderboard-row-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.62rem;
}

.leaderboard-rank {
  min-width: 2rem;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  color: #ddecff;
}

.leaderboard-entity-icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(142, 180, 238, 0.42);
  background: #17263d;
  color: #e9f3ff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
  overflow: hidden;
  flex: 0 0 auto;
}

.leaderboard-entity-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leaderboard-name {
  max-width: min(30rem, 58vw);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 800;
}

.leaderboard-value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32rem;
  white-space: nowrap;
  color: #edf6ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.leaderboard-value strong {
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.leaderboard-value span {
  color: #7f9bc7;
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.leaderboard-row-meta {
  margin-left: 4.8rem;
  margin-top: 0.3rem;
  color: #93accf;
  font-size: 0.78rem;
}

@media (max-width: 720px) {
  .leaderboard-row-main { align-items: flex-start; }
  .leaderboard-row-left { gap: 0.45rem; }
  .leaderboard-row-meta { margin-left: 0; }
  .leaderboard-name { max-width: 42vw; }
}

/* Public player profile Hub merge */
.player-hub-card{grid-column:1/-1;border:1px solid rgba(126,163,220,.26);background:linear-gradient(135deg,rgba(20,42,76,.86),rgba(8,17,31,.78));border-radius:22px;padding:1rem;display:flex;gap:1rem;align-items:center;box-shadow:0 20px 50px rgba(0,0,0,.18);animation:fadeSlide .32s ease both}.player-hub-avatar{width:68px;height:68px;border-radius:18px;object-fit:cover;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.05)}.player-hub-card strong{display:block;font-size:1.2rem;color:#fff}.player-hub-card p{margin:.25rem 0 0;color:#a9bbd7}.player-hub-bio{grid-column:1/-1;border:1px dashed rgba(126,163,220,.28);border-radius:16px;padding:.9rem 1rem;color:#dce8fa;background:rgba(5,14,28,.35)}.tier-pill{display:inline-flex;align-items:center;gap:.35rem;border:1px solid rgba(255,255,255,.16);border-radius:999px;padding:.22rem .62rem;background:rgba(255,255,255,.06);font-weight:800}.tier-pill.gold{color:#ffd66b}.tier-pill.silver{color:#dce6f5}.tier-pill.bronze{color:#d99a62}.tier-pill.diamond{color:#9be7ff}.tier-pill.unranked{color:#aab8cc}@keyframes fadeSlide{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}


/* Public player profile: Hub color is an overall accent, not just name text */
body.player-hub-themed .page-hero,
body.player-hub-themed .panel,
body.player-hub-themed .card,
body.player-hub-themed .data-table,
body.player-hub-themed .list-item {
  border-color: color-mix(in srgb, var(--player-hub-accent, var(--accent)) 48%, var(--line));
}
body.player-hub-themed .page-hero::after {
  background: radial-gradient(circle, color-mix(in srgb, var(--player-hub-accent, var(--accent)) 32%, transparent) 0%, transparent 70%);
}
body.player-hub-themed .tab.active,
body.player-hub-themed .button-link,
body.player-hub-themed .search-button {
  border-color: color-mix(in srgb, var(--player-hub-accent, var(--accent)) 58%, #ffffff22);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--player-hub-accent, var(--accent)) 22%, transparent);
}
.player-hub-card{
  border-color: color-mix(in srgb, var(--player-hub-accent, var(--accent)) 55%, rgba(126,163,220,.26));
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--player-hub-accent, var(--accent)) 20%, transparent), transparent 42%),
    linear-gradient(135deg,rgba(20,42,76,.86),rgba(8,17,31,.78));
}
.player-hub-bio{
  border-color: color-mix(in srgb, var(--player-hub-accent, var(--accent)) 46%, rgba(126,163,220,.28));
}

/* Public profile Hub customization: use Hub color as overall accent, not just text */
.player-hub-bio-top{margin:.9rem 0 1rem;max-width:780px;border-style:solid;background:linear-gradient(135deg,rgba(9,22,42,.72),rgba(12,31,52,.58));box-shadow:0 18px 46px rgba(0,0,0,.18)}
body.player-hub-themed .page-hero{background:radial-gradient(circle at top right,color-mix(in srgb,var(--player-hub-accent,var(--accent)) 24%,transparent),transparent 44%),linear-gradient(145deg,rgba(15,29,52,.94),rgba(11,22,40,.88));box-shadow:0 24px 80px color-mix(in srgb,var(--player-hub-accent,var(--accent)) 14%,transparent),0 20px 60px rgba(0,0,0,.24)}
body.player-hub-themed .kpi,
body.player-hub-themed .section.card{box-shadow:0 16px 52px color-mix(in srgb,var(--player-hub-accent,var(--accent)) 10%,transparent)}
body.player-hub-themed .tier-pill.gold{background:linear-gradient(135deg,rgba(255,212,94,.18),rgba(255,255,255,.04));border-color:rgba(255,212,94,.35)}


/* Player dashboard speed + enhanced public profile layout */
body[data-page="players"] .table-wrap {
  contain: content;
}
body[data-page="players"] tbody tr,
body[data-page="player-profile"] .section.card,
body[data-page="player-profile"] .kpi,
body[data-page="player-profile"] .list-item {
  animation: profileRise .42s cubic-bezier(.2, .9, .2, 1) both;
}
body[data-page="player-profile"] .section.card:nth-of-type(2) { animation-delay: .04s; }
body[data-page="player-profile"] .section.card:nth-of-type(3) { animation-delay: .08s; }
body[data-page="player-profile"] .section.card:nth-of-type(4) { animation-delay: .12s; }

.player-profile-title {
  display: flex;
  align-items: center;
  gap: .9rem;
  line-height: 1;
}
.player-profile-title-copy {
  display: inline-flex;
  flex-direction: column;
  gap: .35rem;
}
.player-profile-title-line {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.player-profile-title-supporter {
  font-size: .92rem;
  line-height: 1;
  padding: .38rem .72rem;
  margin-left: .55rem;
}
.player-profile-title-avatar {
  width: clamp(54px, 7vw, 84px);
  height: clamp(54px, 7vw, 84px);
  border-radius: 24px;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--player-hub-accent, var(--accent)) 55%, rgba(255,255,255,.22));
  box-shadow: 0 18px 42px color-mix(in srgb, var(--player-hub-accent, var(--accent)) 18%, transparent), 0 0 0 7px rgba(255,255,255,.035);
  background: rgba(255,255,255,.06);
  animation: avatarPop .5s cubic-bezier(.18,1.25,.3,1) both;
}
.player-profile-title-name {
  display: inline-block;
  background: linear-gradient(90deg, #fff, color-mix(in srgb, var(--player-hub-accent, var(--accent)) 38%, #dce8ff));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.player-profile-title-team-badge,
.player-profile-team-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.player-profile-title-team-badge img,
.player-profile-team-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player-profile-team-inline {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
}
.player-profile-transfer-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
}
.player-profile-row-title {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
.player-profile-row-icon {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--player-hub-accent, var(--accent)) 36%, rgba(255,255,255,.16));
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--player-hub-accent, var(--accent)) 22%, rgba(255,255,255,.08)), rgba(255,255,255,.03));
  color: #f4d67a;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.player-profile-row-icon svg,
.kpi-inline-icon svg,
.player-profile-transfer-arrow-icon svg {
  width: 1rem;
  height: 1rem;
}
.player-profile-transfer-line .player-profile-team-inline {
  color: #d8e6ff;
}
.player-profile-transfer-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.035);
  color: var(--text-2);
  animation: profilePulse 2.2s ease-in-out infinite;
}
.player-profile-transfer-arrow-icon {
  width: 1rem;
  height: 1rem;
}
.player-profile-trophy-row,
.transfer-profile-row {
  position: relative;
  overflow: hidden;
}
.player-profile-trophy-row::before,
.transfer-profile-row::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--player-hub-accent, var(--accent)) 45%, rgba(255,255,255,.28)), transparent);
  opacity: .6;
}
.player-profile-trophy-head {
  align-items: center;
}
.player-profile-trophies-kpi .kpi-label {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.kpi-inline-icon {
  width: 1rem;
  height: 1rem;
  color: #f4d67a;
}
.player-profile-meta-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.profile-meta-card {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--player-hub-accent, var(--accent)) 32%, #314563);
  border-radius: 18px;
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--player-hub-accent, var(--accent)) 18%, transparent), transparent 40%), linear-gradient(160deg, rgba(25,38,58,.86), rgba(10,18,30,.86));
  padding: .95rem;
  min-height: 82px;
  animation: fadeSlide .38s ease both;
}
.profile-meta-card::after,
.kpi::after {
  content: "";
  position: absolute;
  inset: -80% auto auto -45%;
  width: 50%;
  height: 230%;
  transform: rotate(25deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.13), transparent);
  opacity: 0;
  transition: transform .55s ease, opacity .35s ease;
}
.profile-meta-card:hover::after,
.kpi:hover::after {
  opacity: 1;
  transform: translateX(380%) rotate(25deg);
}
.profile-meta-card span {
  display:block;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
  margin-bottom: .28rem;
}
.profile-meta-card strong {
  display:block;
  color: #eef5ff;
  font-size: clamp(1rem, 2.3vw, 1.35rem);
}
.button-link.compact {
  display: inline-flex;
  padding: .25rem .55rem;
  border-radius: 999px;
}
body[data-page="player-profile"] .kpi {
  position: relative;
  overflow: hidden;
}
body[data-page="player-profile"] .grid.four {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}
@keyframes profileRise {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes avatarPop {
  from { opacity: 0; transform: translateY(8px) scale(.78) rotate(-4deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes profilePulse {
  0%, 100% { transform: translateX(0); box-shadow: 0 0 0 rgba(255,255,255,0); }
  50% { transform: translateX(2px); box-shadow: 0 0 18px color-mix(in srgb, var(--player-hub-accent, var(--accent)) 24%, transparent); }
}
@media (max-width: 820px) {
  .player-profile-meta-grid { grid-template-columns: 1fr; }
  body[data-page="player-profile"] .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .player-profile-title { align-items: flex-start; flex-direction: column; }
  body[data-page="player-profile"] .grid.four { grid-template-columns: 1fr; }
}

/* Player profile official stats layout */
.section-muted {
  margin-top: -0.35rem;
  color: var(--muted, #a7adbd);
  font-size: 0.95rem;
}
.section-subtitle {
  margin: 1.35rem 0 .7rem;
  color: var(--text-1);
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.player-colosseum-stats-card {
  position: relative;
  overflow: hidden;
}
.player-colosseum-kpi .kpi-value {
  color: color-mix(in srgb, var(--player-hub-accent, var(--accent, #23c7c9)) 70%, #eef5ff);
}
.player-colosseum-match {
  border-color: color-mix(in srgb, var(--player-hub-accent, var(--accent, #23c7c9)) 34%, rgba(126,163,220,.22));
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--player-hub-accent, var(--accent, #23c7c9)) 14%, transparent), transparent 36%),
    linear-gradient(145deg, rgba(15,29,52,.94), rgba(9,18,32,.96));
}
.player-colosseum-match-meta {
  color: var(--muted, #9fb0c8);
  font-size: .9rem;
}
.result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  padding: .14rem .42rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.result-win { color: #b9ffd6; background: rgba(34, 197, 94, .16); border: 1px solid rgba(34, 197, 94, .32); }
.result-draw { color: #f4f8ff; background: rgba(148, 163, 184, .14); border: 1px solid rgba(203, 213, 225, .28); }
.result-loss { color: #ffc7c7; background: rgba(239, 68, 68, .16); border: 1px solid rgba(239, 68, 68, .34); }
.profile-stat-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.profile-stat-group {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--player-hub-accent, var(--accent, #d6b15f)) 26%, rgba(255,255,255,0.1));
  border-radius: 22px;
  padding: 1rem;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--player-hub-accent, var(--accent, #d6b15f)) 18%, transparent), transparent 36%),
    rgba(255,255,255,0.045);
  box-shadow: 0 18px 48px rgba(0,0,0,0.22);
  animation: profileCardIn 0.48s ease both;
}
.profile-stat-group::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,0.11) 42%, transparent 66%);
  transform: translateX(-125%);
  transition: transform 0.65s ease;
  pointer-events: none;
}
.profile-stat-group:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--player-hub-accent, var(--accent, #d6b15f)) 55%, rgba(255,255,255,0.18));
}
.profile-stat-group:hover::after {
  transform: translateX(125%);
}
.profile-stat-group h3 {
  margin: 0 0 0.8rem;
  font-family: var(--display-font, inherit);
  letter-spacing: 0.03em;
}
.profile-stat-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.48rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.profile-stat-line span {
  color: var(--muted, #a7adbd);
}
.profile-stat-line strong {
  color: var(--text, #f5f5f7);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
@keyframes profileCardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Player profile fix: make Hub customization obvious even when browser color-mix support is partial */
.player-hub-card-bio {
  margin-top: .45rem !important;
  color: #edf6ff !important;
  font-style: italic;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.player-hub-themed .page-hero,
body.player-hub-themed .section.card,
body.player-hub-themed .profile-stat-group,
body.player-hub-themed .kpi,
body.player-hub-themed .player-hub-card {
  border-color: var(--player-hub-accent, var(--accent)) !important;
}
body.player-hub-themed .player-profile-title-avatar,
body.player-hub-themed .player-hub-avatar {
  box-shadow: 0 0 0 3px var(--player-hub-accent, var(--accent)), 0 18px 42px rgba(0,0,0,.34) !important;
}
body.player-hub-themed .player-hub-bio-top {
  border-color: var(--player-hub-accent, var(--accent)) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.26), inset 0 0 0 1px color-mix(in srgb, var(--player-hub-accent, var(--accent)) 20%, transparent);
}

/* PLAYER PROFILE ICON + CORE METRICS REPAIR */
body[data-page="player-profile"] .ui-icon,
body[data-page="player-profile"] .player-profile-row-icon,
body[data-page="player-profile"] .kpi-inline-icon,
body[data-page="player-profile"] .player-profile-transfer-arrow-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 1rem !important;
  height: 1rem !important;
  line-height: 1 !important;
  vertical-align: -0.125em !important;
}

body[data-page="player-profile"] .ui-icon svg,
body[data-page="player-profile"] .player-profile-row-icon svg,
body[data-page="player-profile"] .kpi-inline-icon svg,
body[data-page="player-profile"] .player-profile-transfer-arrow-icon svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

body[data-page="player-profile"] .player-profile-title {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
}

body[data-page="player-profile"] .player-profile-title-avatar {
  flex: 0 0 auto !important;
  width: clamp(64px, 7vw, 92px) !important;
  height: clamp(64px, 7vw, 92px) !important;
  object-fit: cover !important;
  object-position: center !important;
}

body[data-page="player-profile"] .player-profile-title-copy {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

body[data-page="player-profile"] .player-profile-title-line {
  display: inline-flex !important;
  align-items: center !important;
  gap: .75rem !important;
  flex-wrap: wrap !important;
  line-height: 1.05 !important;
}

body[data-page="player-profile"] .player-profile-title-name {
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
}

body[data-page="player-profile"] .player-profile-title-team-badge,
body[data-page="player-profile"] .player-profile-team-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 1.85rem !important;
  height: 1.85rem !important;
  padding: 2px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  transform: none !important;
  vertical-align: middle !important;
}

body[data-page="player-profile"] .player-profile-title-team-badge img,
body[data-page="player-profile"] .player-profile-team-badge img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}

body[data-page="player-profile"] .player-profile-title-supporter,
body[data-page="player-profile"] .tier-pill.player-profile-title-supporter {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  margin-left: 1.15rem !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="player-profile"] .player-profile-row-title,
body[data-page="player-profile"] .player-profile-trophy-head,
body[data-page="player-profile"] .transfer-profile-row .list-head {
  display: flex !important;
  align-items: center !important;
  gap: .55rem !important;
}

body[data-page="player-profile"] #player-profile-kpis {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 0 !important;
}

body[data-page="player-profile"] #player-profile-kpis .kpi {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-height: 92px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body[data-page="player-profile"] #player-profile-kpis .kpi-label,
body[data-page="player-profile"] #player-profile-kpis .kpi-value {
  position: relative !important;
  z-index: 1 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body[data-page="player-profile"] #player-profile-kpis .kpi-value {
  min-height: 1.45em !important;
  font-variant-numeric: tabular-nums !important;
}

@media (max-width: 520px) {
  body[data-page="player-profile"] .player-profile-title {
    align-items: flex-start !important;
  }
  body[data-page="player-profile"] .player-profile-title-supporter,
  body[data-page="player-profile"] .tier-pill.player-profile-title-supporter {
    margin-left: 0 !important;
  }
}

/* PLAYER PROFILE ICON FINAL ALIGNMENT PATCH */
/* Normalize all public player profile icon/circle rows.
   This fixes trophy/transfer icons sitting too high/low or drifting from the text baseline. */

body[data-page="player-profile"] .section.card > h2,
body[data-page="player-profile"] .card > h2,
body[data-page="player-profile"] h2 {
  display: flex !important;
  align-items: center !important;
  gap: .55rem !important;
  line-height: 1.15 !important;
}

body[data-page="player-profile"] .section.card > h2 .ui-icon,
body[data-page="player-profile"] .card > h2 .ui-icon,
body[data-page="player-profile"] h2 .ui-icon {
  width: 1.05rem !important;
  height: 1.05rem !important;
  min-width: 1.05rem !important;
  transform: none !important;
  margin: 0 !important;
  line-height: 1 !important;
}

body[data-page="player-profile"] .kpi {
  display: grid !important;
  align-content: center !important;
  gap: .35rem !important;
  min-height: 92px !important;
}

body[data-page="player-profile"] .kpi-label {
  display: flex !important;
  align-items: center !important;
  gap: .55rem !important;
  line-height: 1.15 !important;
  min-height: 1.25rem !important;
}

body[data-page="player-profile"] .kpi-label .ui-icon,
body[data-page="player-profile"] .kpi .ui-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 1rem !important;
  height: 1rem !important;
  min-width: 1rem !important;
  margin: 0 !important;
  transform: none !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}

body[data-page="player-profile"] .kpi-label .ui-icon svg,
body[data-page="player-profile"] .kpi .ui-icon svg {
  width: 1rem !important;
  height: 1rem !important;
  display: block !important;
}

body[data-page="player-profile"] .kpi-value {
  line-height: 1.1 !important;
  margin: 0 !important;
}

/* Trophy rows */
body[data-page="player-profile"] .trophy-card,
body[data-page="player-profile"] .trophy-row,
body[data-page="player-profile"] .trophies-list .list-item,
body[data-page="player-profile"] #player-trophies .list-item,
body[data-page="player-profile"] #profile-trophies .list-item {
  display: flex !important;
  align-items: center !important;
  gap: .85rem !important;
  min-height: 4rem !important;
  padding-top: .82rem !important;
  padding-bottom: .82rem !important;
}

body[data-page="player-profile"] .trophy-card-icon,
body[data-page="player-profile"] .trophy-icon,
body[data-page="player-profile"] .trophies-list .list-item > .ui-icon,
body[data-page="player-profile"] #player-trophies .list-item > .ui-icon,
body[data-page="player-profile"] #profile-trophies .list-item > .ui-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2.35rem !important;
  height: 2.35rem !important;
  min-width: 2.35rem !important;
  flex: 0 0 2.35rem !important;
  margin: 0 !important;
  line-height: 1 !important;
  transform: none !important;
  vertical-align: middle !important;
  align-self: center !important;
}

body[data-page="player-profile"] .trophy-card-icon svg,
body[data-page="player-profile"] .trophy-icon svg,
body[data-page="player-profile"] .trophies-list .list-item > .ui-icon svg,
body[data-page="player-profile"] #player-trophies .list-item > .ui-icon svg,
body[data-page="player-profile"] #profile-trophies .list-item > .ui-icon svg {
  width: 1.05rem !important;
  height: 1.05rem !important;
  display: block !important;
}

body[data-page="player-profile"] .trophy-card-body {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

body[data-page="player-profile"] .trophy-card-body strong {
  line-height: 1.2 !important;
}

body[data-page="player-profile"] .trophy-card-body span {
  line-height: 1.2 !important;
  margin-left: auto !important;
  white-space: nowrap !important;
}

/* Transfer rows */
body[data-page="player-profile"] .player-profile-transfer-line,
body[data-page="player-profile"] .transfer-profile-row,
body[data-page="player-profile"] .recent-transfer-row,
body[data-page="player-profile"] #player-transfers .list-item,
body[data-page="player-profile"] #profile-transfers .list-item {
  display: flex !important;
  align-items: center !important;
  gap: .8rem !important;
}

body[data-page="player-profile"] .player-profile-transfer-line .ui-icon,
body[data-page="player-profile"] .transfer-profile-row .ui-icon,
body[data-page="player-profile"] .recent-transfer-row .ui-icon,
body[data-page="player-profile"] #player-transfers .list-item .ui-icon,
body[data-page="player-profile"] #profile-transfers .list-item .ui-icon,
body[data-page="player-profile"] .transfer-profile-row .team-chip-badge,
body[data-page="player-profile"] .recent-transfer-row .team-chip-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  flex: 0 0 2rem !important;
  margin: 0 !important;
  line-height: 1 !important;
  transform: none !important;
  vertical-align: middle !important;
  align-self: center !important;
}

body[data-page="player-profile"] .transfer-profile-row .team-chip-badge img,
body[data-page="player-profile"] .recent-transfer-row .team-chip-badge img {
  display: block !important;
  width: 1.55rem !important;
  height: 1.55rem !important;
  object-fit: contain !important;
  object-position: center !important;
}

body[data-page="player-profile"] .player-profile-transfer-arrow,
body[data-page="player-profile"] .transfer-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  flex: 0 0 2rem !important;
  margin: 0 .25rem !important;
  transform: none !important;
  align-self: center !important;
}

body[data-page="player-profile"] .player-profile-transfer-arrow svg,
body[data-page="player-profile"] .transfer-arrow svg {
  display: block !important;
  width: 1rem !important;
  height: 1rem !important;
}

/* General SVG/icon baseline in player profile. */
body[data-page="player-profile"] span[class*="icon"],
body[data-page="player-profile"] .ui-icon {
  line-height: 1 !important;
}

body[data-page="player-profile"] span[class*="icon"] svg,
body[data-page="player-profile"] .ui-icon svg {
  display: block !important;
  margin: 0 auto !important;
}

/* Keep avatar and team badge aligned with the name line. */
body[data-page="player-profile"] .player-profile-title-line {
  display: flex !important;
  align-items: center !important;
  gap: .85rem !important;
}

body[data-page="player-profile"] .player-profile-title-team-badge,
body[data-page="player-profile"] .player-profile-team-badge {
  position: static !important;
  transform: none !important;
  align-self: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* PLAYER PROFILE TRANSFER ICON WHITE CIRCLES */
/* Recent Transfers icons restored to clean white circular old-style icons. */
body[data-page="player-profile"] .recent-transfer-row .ui-icon,
body[data-page="player-profile"] .transfer-profile-row .ui-icon,
body[data-page="player-profile"] #player-transfers .list-item .ui-icon,
body[data-page="player-profile"] #profile-transfers .list-item .ui-icon,
body[data-page="player-profile"] .player-profile-transfer-line .ui-icon,
body[data-page="player-profile"] .transfer-icon,
body[data-page="player-profile"] .player-profile-transfer-arrow,
body[data-page="player-profile"] .transfer-arrow {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  flex: 0 0 2rem !important;
  margin: 0 .25rem !important;
  border-radius: 999px !important;
  color: #eef5ff !important;
  border: 1px solid rgba(150, 177, 221, .24) !important;
  background:
    radial-gradient(circle at 35% 24%, rgba(255,255,255,.10), transparent 58%),
    linear-gradient(160deg, rgba(31, 43, 64, .95), rgba(13, 22, 36, .95)) !important;
  box-shadow:
    0 10px 26px rgba(0,0,0,.24),
    inset 0 0 0 1px rgba(255,255,255,.035) !important;
  line-height: 1 !important;
  transform: none !important;
  vertical-align: middle !important;
  align-self: center !important;
}

body[data-page="player-profile"] .recent-transfer-row .ui-icon svg,
body[data-page="player-profile"] .transfer-profile-row .ui-icon svg,
body[data-page="player-profile"] #player-transfers .list-item .ui-icon svg,
body[data-page="player-profile"] #profile-transfers .list-item .ui-icon svg,
body[data-page="player-profile"] .player-profile-transfer-line .ui-icon svg,
body[data-page="player-profile"] .transfer-icon svg,
body[data-page="player-profile"] .player-profile-transfer-arrow svg,
body[data-page="player-profile"] .transfer-arrow svg {
  display: block !important;
  width: 1rem !important;
  height: 1rem !important;
  color: #eef5ff !important;
  stroke: currentColor !important;
  fill: none !important;
}

body[data-page="player-profile"] .recent-transfer-row:hover .ui-icon,
body[data-page="player-profile"] .transfer-profile-row:hover .ui-icon,
body[data-page="player-profile"] #player-transfers .list-item:hover .ui-icon,
body[data-page="player-profile"] #profile-transfers .list-item:hover .ui-icon,
body[data-page="player-profile"] .player-profile-transfer-line:hover .ui-icon,
body[data-page="player-profile"] .recent-transfer-row:hover .player-profile-transfer-arrow,
body[data-page="player-profile"] .transfer-profile-row:hover .player-profile-transfer-arrow,
body[data-page="player-profile"] .recent-transfer-row:hover .transfer-arrow,
body[data-page="player-profile"] .transfer-profile-row:hover .transfer-arrow {
  color: #ffffff !important;
  border-color: rgba(190, 213, 250, .38) !important;
  box-shadow:
    0 12px 30px rgba(0,0,0,.28),
    0 0 18px rgba(190, 213, 250, .10),
    inset 0 0 0 1px rgba(255,255,255,.055) !important;
}

body[data-page="player-profile"] .player-profile-row-icon {
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  flex: 0 0 2rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
}

body[data-page="player-profile"] .player-profile-row-icon svg {
  width: 1rem !important;
  height: 1rem !important;
}

body[data-page="player-profile"] .player-profile-trophy-head .player-profile-row-title,
body[data-page="player-profile"] .transfer-profile-row .player-profile-row-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: .65rem !important;
}

body[data-page="player-profile"] #player-profile-kpis,
body[data-page="player-profile"] #player-profile-kpis .kpi:nth-child(-n+3) {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Final profile/team polish */
body[data-page="player-profile"] #player-profile-kpis .kpi {
  align-items: flex-start !important;
  text-align: left !important;
  padding-left: 1.05rem !important;
}

body[data-page="player-profile"] #player-profile-kpis .kpi-label,
body[data-page="player-profile"] #player-profile-kpis .kpi-value {
  justify-content: flex-start !important;
  text-align: left !important;
  width: 100% !important;
}

body[data-page="player-profile"] #player-profile-kpis .kpi,
body[data-page="player-profile"] #player-profile-kpis .kpi:nth-child(-n+3) {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
  text-align: left !important;
  min-height: 92px !important;
  padding: 1rem 1.2rem !important;
}

body[data-page="player-profile"] #player-profile-kpis .kpi-label,
body[data-page="player-profile"] #player-profile-kpis .kpi-value {
  align-self: flex-start !important;
  justify-content: flex-start !important;
  text-align: left !important;
  width: auto !important;
  min-height: 0 !important;
  margin-left: 0 !important;
}

body[data-page="player-profile"] #player-profile-kpis .kpi-value {
  margin-top: .35rem !important;
}

body[data-page="team-profile"] .team-hero-card,
body[data-page="team-profile"] .team-wdl-section,
body[data-page="team-profile"] .team-tabs-card,
body[data-page="team-profile"] #team-tab-statistics .section.card,
body[data-page="team-profile"] #team-tab-results .section.card,
body[data-page="team-profile"] #team-tab-squad .section.card {
  border-color: color-mix(in srgb, var(--accent, #23c7c9) 72%, transparent) !important;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--accent, #23c7c9) 18%, transparent), transparent 38%),
    linear-gradient(145deg, rgba(15, 29, 52, .96), rgba(8, 18, 32, .97)) !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .28), 0 0 0 1px color-mix(in srgb, var(--accent, #23c7c9) 18%, transparent) !important;
}

body[data-page="team-profile"] .team-stat-card,
body[data-page="team-profile"] .team-leaderboard-card,
body[data-page="team-profile"] .team-roster-item,
body[data-page="team-profile"] .match-history-card {
  border-color: color-mix(in srgb, var(--accent, #23c7c9) 46%, transparent) !important;
  background: linear-gradient(160deg, rgba(17, 32, 54, .96), rgba(10, 22, 38, .96)) !important;
}

body[data-page="team-profile"] .team-tab-btn.active,
body[data-page="team-profile"] .team-leaderboard-title,
body[data-page="team-profile"] .team-stat-value {
  color: var(--accent-2, #2bd6d0) !important;
}

body[data-page="team-profile"] .team-stat-value.green { color: #22c55e !important; }
body[data-page="team-profile"] .team-stat-value.white { color: #f4f8ff !important; }
body[data-page="team-profile"] .team-stat-value.red { color: #ef4444 !important; }
body[data-page="team-profile"] .team-stat-value.dark-green { color: #15803d !important; }
body[data-page="team-profile"] .team-stat-value.team-accent {
  color: var(--team-stat-accent, var(--accent-2)) !important;
  display: inline-flex;
  align-items: center;
  gap: .42rem;
}

body[data-page="team-profile"] .team-stat-value-icon {
  width: 1rem;
  height: 1rem;
  color: var(--team-stat-accent, var(--accent-2));
}

body[data-page="team-profile"] .team-loading-state {
  border-color: color-mix(in srgb, var(--accent, #23c7c9) 45%, transparent);
  color: var(--text-2);
}

/* HUB ADMIN BUTTON STRICT VISIBILITY */
.hub-admin-link,
#hub-admin-link,
[data-hub-admin] {
  display: none !important;
}

body.hub-is-admin .hub-admin-link,
body.hub-is-admin #hub-admin-link,
body.hub-is-admin [data-hub-admin] {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ADMIN TOKEN STATUS + DELETE LOG */
.hub-token-actions {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}
.hub-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.65rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .01em;
  border: 1px solid rgba(139, 174, 232, .28);
  background: rgba(12, 22, 38, .7);
  white-space: nowrap;
}
.hub-status-active {
  color: #45e28d;
  border-color: rgba(69, 226, 141, .34);
  background: rgba(33, 112, 76, .14);
}
.hub-status-inactive {
  color: #ffc46b;
  border-color: rgba(255, 196, 107, .36);
  background: rgba(130, 84, 28, .16);
}
.hub-status-deleted {
  color: #ff8f9a;
  border-color: rgba(255, 143, 154, .38);
  background: rgba(135, 44, 56, .18);
}
.hub-status-available {
  color: #9fb5d3;
  border-color: rgba(159, 181, 211, .28);
}
.hub-token-delete-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 124, 139, .4);
  background: rgba(132, 38, 54, .2);
  color: #ff9aa6;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.hub-token-delete-x:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 155, 166, .68);
  background: rgba(155, 52, 64, .34);
  color: #fff;
}

/* EXTENDED HUB PUBLIC PROFILE CUSTOMIZATION */
body[data-page="player-profile"].player-hub-themed .page-hero {
  border-color: var(--player-hub-accent, var(--accent)) !important;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--player-hub-accent, #6d7cff) 26%, transparent), transparent 32%),
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--player-hub-secondary, #8b5cf6) 26%, transparent), transparent 38%),
    linear-gradient(135deg, rgba(14, 28, 49, .96), rgba(18, 12, 36, .94)) !important;
}

body[data-page="player-profile"].player-banner-aurora .page-hero {
  background:
    radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--player-hub-accent, #6d7cff) 34%, transparent), transparent 35%),
    radial-gradient(circle at 84% 22%, color-mix(in srgb, #22c55e 24%, transparent), transparent 36%),
    linear-gradient(135deg, #101d32, #181332) !important;
}
body[data-page="player-profile"].player-banner-sunset .page-hero {
  background:
    radial-gradient(circle at 12% 10%, color-mix(in srgb, #f97316 28%, transparent), transparent 32%),
    radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--player-hub-secondary, #ec4899) 34%, transparent), transparent 38%),
    linear-gradient(135deg, #151f2f, #261227) !important;
}
body[data-page="player-profile"].player-banner-ocean .page-hero {
  background:
    radial-gradient(circle at 10% 12%, color-mix(in srgb, #38bdf8 30%, transparent), transparent 34%),
    radial-gradient(circle at 90% 18%, color-mix(in srgb, #0ea5e9 24%, transparent), transparent 38%),
    linear-gradient(135deg, #0b1e32, #0b1828) !important;
}
body[data-page="player-profile"].player-banner-ember .page-hero {
  background:
    radial-gradient(circle at 12% 12%, color-mix(in srgb, #f43f5e 26%, transparent), transparent 32%),
    radial-gradient(circle at 86% 18%, color-mix(in srgb, #f59e0b 26%, transparent), transparent 38%),
    linear-gradient(135deg, #191827, #291414) !important;
}
body[data-page="player-profile"].player-banner-royal .page-hero {
  background:
    radial-gradient(circle at 12% 12%, color-mix(in srgb, #a855f7 28%, transparent), transparent 32%),
    radial-gradient(circle at 86% 18%, color-mix(in srgb, #3b82f6 28%, transparent), transparent 38%),
    linear-gradient(135deg, #121a34, #211436) !important;
}

.player-hub-custom-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: .85rem 0 1rem;
}

.player-hub-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  min-height: 2.15rem;
  padding: .35rem .72rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--player-hub-accent, var(--accent, #6d7cff)) 46%, rgba(255,255,255,.14));
  background:
    radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--player-hub-secondary, #8b5cf6) 18%, transparent), transparent 54%),
    rgba(8, 17, 31, .58);
  color: #edf6ff;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  animation: hubChipIn .36s ease both;
}

.player-hub-meta-chip[role="link"] {
  cursor: pointer;
}
.player-hub-meta-chip[role="link"]:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--player-hub-accent, var(--accent, #6d7cff)) 68%, rgba(255,255,255,.2));
}

.player-hub-meta-label {
  color: var(--text-2, #9fb5d3);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.player-hub-meta-chip strong {
  font-size: .9rem;
  color: #f5f9ff;
}

.player-hub-meta-chip.country strong {
  letter-spacing: .01em;
}

.player-hub-meta-icon {
  width: .95rem !important;
  height: .95rem !important;
  color: var(--player-hub-accent, var(--accent, #6d7cff)) !important;
}

@keyframes hubChipIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.player-hub-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
  opacity: .82;
}

.player-hub-particles::before,
.player-hub-particles::after {
  content: "";
  position: absolute;
  inset: -10%;
  background-repeat: repeat;
  animation: hubParticlesDrift 14s linear infinite;
}

.player-hub-particles.is-stars::before {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.42) 0 1px, transparent 1.5px),
    radial-gradient(circle, color-mix(in srgb, var(--player-hub-accent, #6d7cff) 55%, white) 0 1px, transparent 1.5px);
  background-size: 42px 42px, 76px 76px;
}
.player-hub-particles.is-embers::before {
  background-image: radial-gradient(circle, rgba(249, 115, 22, .55) 0 2px, transparent 3px);
  background-size: 58px 58px;
  animation-duration: 9s;
}
.player-hub-particles.is-snow::before {
  background-image: radial-gradient(circle, rgba(255,255,255,.48) 0 2px, transparent 3px);
  background-size: 54px 54px;
  animation-duration: 18s;
}
.player-hub-particles.is-bubbles::before {
  background-image: radial-gradient(circle, rgba(125, 211, 252, .18) 0 6px, transparent 7px);
  background-size: 72px 72px;
  animation-duration: 16s;
}
.player-hub-particles.is-matrix::before {
  background-image: linear-gradient(180deg, rgba(34,197,94,.0), rgba(34,197,94,.24), rgba(34,197,94,0));
  background-size: 12px 88px;
  opacity: .45;
  animation-duration: 7s;
}

@keyframes hubParticlesDrift {
  from { transform: translate3d(0, -4%, 0); }
  to { transform: translate3d(-4%, 8%, 0); }
}

body[data-page="player-profile"].player-font-classic .page-hero,
body[data-page="player-profile"].player-font-classic .section.card {
  font-family: Georgia, "Times New Roman", serif;
}
body[data-page="player-profile"].player-font-modern .page-hero,
body[data-page="player-profile"].player-font-modern .section.card {
  font-family: Inter, Manrope, "Segoe UI", sans-serif;
}
body[data-page="player-profile"].player-font-mono .page-hero,
body[data-page="player-profile"].player-font-mono .section.card {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
body[data-page="player-profile"].player-font-display .player-profile-title-name,
body[data-page="player-profile"].player-font-display .section.card h2 {
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Trophies section layout: no Hub player card, trophy-focused cards */
body[data-page="player-profile"] #player-profile-extra .player-hub-card {
  display: none !important;
}
body[data-page="player-profile"] #player-profile-trophies.player-profile-trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: .75rem;
}
body[data-page="player-profile"] .player-profile-trophy-card {
  position: relative;
  overflow: hidden;
  min-height: 4.25rem;
  border-radius: 18px !important;
  border-color: color-mix(in srgb, var(--player-hub-accent, var(--accent, #6d7cff)) 40%, rgba(255,255,255,.12)) !important;
  background:
    radial-gradient(circle at 12% 20%, color-mix(in srgb, var(--player-hub-accent, #6d7cff) 17%, transparent), transparent 48%),
    linear-gradient(160deg, rgba(20,32,51,.94), rgba(9,17,29,.94)) !important;
  animation: trophyCardIn .42s ease both;
}
body[data-page="player-profile"] .player-profile-trophy-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,.10) 42%, transparent 66%);
  transform: translateX(-125%);
  transition: transform .65s ease;
  pointer-events: none;
}
body[data-page="player-profile"] .player-profile-trophy-card:hover {
  transform: translateY(-3px);
}
body[data-page="player-profile"] .player-profile-trophy-card:hover::after {
  transform: translateX(125%);
}
body[data-page="player-profile"] .player-profile-trophy-card .player-profile-row-icon {
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  border-radius: 999px;
  padding: .45rem;
  border: 1px solid rgba(255, 212, 94, .35);
  background: rgba(255, 212, 94, .10);
  color: #ffe08a !important;
}

@keyframes trophyCardIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* TROPHY LAYOUT + HUB SEARCH FIX */
body[data-page="player-profile"] #player-profile-extra {
  display: grid !important;
  grid-template-columns: minmax(220px, 320px) 1fr !important;
  gap: .9rem !important;
  align-items: stretch !important;
}

body[data-page="player-profile"] #player-profile-extra .player-profile-trophies-kpi {
  grid-column: 1 !important;
  width: 100% !important;
  min-height: 116px !important;
  margin: 0 !important;
}

body[data-page="player-profile"] #player-profile-extra .player-hub-card {
  display: none !important;
}

body[data-page="player-profile"] #player-profile-trophies.player-profile-trophy-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: .75rem !important;
  width: 100% !important;
}

body[data-page="player-profile"] #player-profile-extra + #player-profile-trophies,
body[data-page="player-profile"] #player-profile-trophies {
  margin-top: .85rem !important;
}

body[data-page="player-profile"] .player-profile-trophy-card {
  min-width: 0 !important;
}

body[data-page="player-profile"] .player-profile-trophy-card .list-head,
body[data-page="player-profile"] .player-profile-trophy-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: .8rem !important;
  width: 100% !important;
}

body[data-page="player-profile"] .player-profile-trophy-card .player-profile-row-title {
  min-width: 0 !important;
}

body[data-page="player-profile"] .player-profile-trophy-card strong {
  display: block !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  line-height: 1.2 !important;
}

body[data-page="player-profile"] .player-profile-trophy-card .list-meta {
  white-space: nowrap !important;
  text-align: right !important;
  color: var(--text-2, #9fb5d3) !important;
}

@media (max-width: 900px) {
  body[data-page="player-profile"] #player-profile-extra {
    grid-template-columns: 1fr !important;
  }
}

/* COUNTRY FLAG ONLY CHIP */
body[data-page="player-profile"] .player-hub-meta-chip.country.flag-only {
  width: 2.45rem;
  min-width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  justify-content: center;
  border-radius: 999px;
  cursor: help;
}

body[data-page="player-profile"] .player-hub-meta-chip.country.flag-only .player-hub-meta-label {
  display: none !important;
}

body[data-page="player-profile"] .player-hub-meta-chip.country.flag-only strong {
  font-size: 1.32rem;
  line-height: 1;
  letter-spacing: 0;
}

/* COUNTRY FLAG IMAGE CHIP */
body[data-page="player-profile"] .player-hub-meta-chip.country.flag-only.flag-img {
  width: 2.55rem;
  min-width: 2.55rem;
  height: 2.55rem;
  padding: 0;
  justify-content: center;
  border-radius: 999px;
  cursor: help;
  overflow: hidden;
}

body[data-page="player-profile"] .player-hub-country-flag-img {
  display: block !important;
  width: 1.9rem !important;
  height: 1.35rem !important;
  object-fit: cover !important;
  border-radius: .22rem !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

body[data-page="player-profile"] .player-hub-meta-chip.country.flag-only.flag-img .player-hub-meta-label,
body[data-page="player-profile"] .player-hub-meta-chip.country.flag-only.flag-img strong {
  display: none !important;
}

/* PLAYER PROFILE TITLE FALLBACK FIX */
body[data-page="player-profile"] .player-profile-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}
body[data-page="player-profile"] .player-profile-title-copy {
  min-width: 0;
}
body[data-page="player-profile"] .player-profile-title-line {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

/* PLAYER PROFILE SAFE RECOVERY */
body[data-page="player-profile"] .player-profile-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}
body[data-page="player-profile"] .player-profile-title-copy {
  min-width: 0;
}
body[data-page="player-profile"] .player-profile-title-line {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

/* Home motion cleanup: no diagonal aurora beam, but keep card reveal animations alive. */
body[data-page="home"]::before,
body[data-page="home"] .page-hero::before,
body[data-page="home"] .page-hero::after {
  content: none !important;
  display: none !important;
  background: none !important;
  animation: none !important;
}
body[data-page="home"] {
  background:
    repeating-linear-gradient(125deg, rgba(255,255,255,.012) 0, rgba(255,255,255,.012) 2px, transparent 2px, transparent 22px),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 65%) !important;
}
@media (prefers-reduced-motion: no-preference) {
  body[data-page="home"] .page-hero,
  body[data-page="home"] .kpi,
  body[data-page="home"] .section.card,
  body[data-page="home"] article.card,
  body[data-page="home"] .list-item,
  body[data-page="home"] .team-logo-card,
  body[data-page="home"] .match-card {
    animation: colosseumFadeUp .48s cubic-bezier(.19, 1, .22, 1) both !important;
    will-change: transform, opacity;
  }
  body[data-page="home"] .kpi:nth-child(1) { animation-delay: 40ms !important; }
  body[data-page="home"] .kpi:nth-child(2) { animation-delay: 80ms !important; }
  body[data-page="home"] .kpi:nth-child(3) { animation-delay: 120ms !important; }
  body[data-page="home"] .kpi:nth-child(4) { animation-delay: 160ms !important; }
}


/* Final home animation + artifact fix: no diagonal beam, clean fade cards. */
@keyframes colosseumHomeFade {
  from { opacity: 0; filter: blur(2px); }
  to { opacity: 1; filter: blur(0); }
}
body[data-page="home"]::before,
body[data-page="home"]::after,
body[data-page="home"] .page-hero::before,
body[data-page="home"] .page-hero::after,
body[data-page="home"] .section::before,
body[data-page="home"] .section::after,
body[data-page="home"] .kpi::before,
body[data-page="home"] .kpi::after {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  background: none !important;
  animation: none !important;
}
body[data-page="home"] .page-hero {
  background: radial-gradient(circle at 50% 0%, rgba(78,116,182,.12), transparent 48%), rgba(16,25,38,.96) !important;
}
body[data-page="home"] .kpi,
body[data-page="home"] .section.card,
body[data-page="home"] article.card,
body[data-page="home"] .list-item,
body[data-page="home"] .team-logo-card,
body[data-page="home"] .match-card {
  background-image: none !important;
}
@media (prefers-reduced-motion: no-preference) {
  body[data-page="home"] .page-hero,
  body[data-page="home"] .kpi,
  body[data-page="home"] .section.card,
  body[data-page="home"] article.card,
  body[data-page="home"] .list-item,
  body[data-page="home"] .team-logo-card,
  body[data-page="home"] .match-card {
    animation-name: colosseumHomeFade !important;
    animation-duration: .42s !important;
    animation-timing-function: ease !important;
    animation-fill-mode: both !important;
  }
  body[data-page="home"] .page-hero { animation-delay: 20ms !important; }
  body[data-page="home"] .kpi:nth-child(1) { animation-delay: 60ms !important; }
  body[data-page="home"] .kpi:nth-child(2) { animation-delay: 105ms !important; }
  body[data-page="home"] .kpi:nth-child(3) { animation-delay: 150ms !important; }
  body[data-page="home"] .kpi:nth-child(4) { animation-delay: 195ms !important; }
}

/* Home Top Rated Teams: restore Teams-page color treatment + clean sweep animation only for homepage team cards. */
body[data-page="home"] .top-team-logo-card {
  --tile-hue: 212;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: rgba(153, 182, 229, 0.24) !important;
  background-image:
    radial-gradient(circle at 86% 16%, rgba(176, 204, 247, 0.20) 0%, transparent 40%),
    linear-gradient(
      165deg,
      hsl(var(--tile-hue) 58% 36%) 0%,
      hsl(calc(var(--tile-hue) + 26) 52% 15%) 100%
    ) !important;
  background-size: 140% 140% !important;
  animation: tileFlow 16s ease-in-out infinite alternate, colosseumHomeFade .42s ease both !important;
  transition: transform var(--motion-mid) ease, border-color var(--motion-mid) ease, box-shadow var(--motion-mid) ease !important;
}

body[data-page="home"] .top-team-logo-card > * {
  position: relative;
  z-index: 2;
}

body[data-page="home"] .top-team-logo-card::before {
  content: "" !important;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,.13), transparent 30%),
    linear-gradient(115deg, rgba(255,255,255,.08), transparent 42%);
  opacity: .55 !important;
  display: block !important;
}

body[data-page="home"] .top-team-logo-card::after {
  content: "" !important;
  position: absolute;
  top: -70%;
  left: -52%;
  z-index: 1;
  pointer-events: none;
  display: block !important;
  width: 50%;
  height: 230%;
  opacity: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.08) 25%, rgba(255,255,255,.16) 50%, rgba(255,255,255,.08) 75%, transparent 100%) !important;
  transform: rotate(25deg) translateX(-190%);
  transition: opacity .22s ease, transform 1.05s cubic-bezier(.19, 1, .22, 1);
}

body[data-page="home"] .top-team-logo-card:hover,
body[data-page="home"] .top-team-logo-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(196, 217, 250, 0.56) !important;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(255,255,255,.08) !important;
}

body[data-page="home"] .top-team-logo-card:hover::after,
body[data-page="home"] .top-team-logo-card:focus-visible::after {
  opacity: 1;
  transform: rotate(25deg) translateX(430%);
}

body[data-page="home"] .top-team-emblem {
  background: rgba(9, 14, 22, 0.58) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .top-team-logo-card {
    animation: none !important;
  }
  body[data-page="home"] .top-team-logo-card::after {
    opacity: 0 !important;
    transform: rotate(25deg) translateX(-180%) !important;
  }
  .team-tile {
    animation: none !important;
    opacity: 1 !important;
  }
  .team-tile::after {
    opacity: 0 !important;
  }
}

/* ── Left Sidebar Navigation ───────────────────────────────────────────────── */

.sidebar-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--bg-2);
  color: var(--text-0);
  cursor: pointer;
  padding: 0.42rem;
  flex-shrink: 0;
  transition: background-color var(--motion-fast) ease, border-color var(--motion-fast) ease;
}

.sidebar-toggle:hover {
  background: var(--bg-3);
  border-color: var(--line-strong);
}

.sidebar-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--motion-mid) ease, opacity var(--motion-fast) ease;
}

.sidebar-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.sidebar-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.sidebar-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.sidebar-backdrop.visible {
  display: block;
  animation: fadeIn var(--motion-fast) ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Sidebar panel */
.site-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 80;
  width: 270px;
  max-width: 88vw;
  background: rgba(9, 13, 20, 0.97);
  border-right: 1px solid var(--line-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.45);
}

.site-sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.8rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.sidebar-header-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-2);
}

.sidebar-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 0.44rem;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.sidebar-close-btn:hover {
  background: var(--bg-2);
  color: var(--text-0);
}

.sidebar-section-label {
  padding: 0.82rem 1rem 0.3rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  opacity: 0.7;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.4rem 0.6rem 1rem;
  flex: 1;
}

.sidebar-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.58rem 0.78rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  color: var(--text-1);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition:
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    transform var(--motion-fast) ease;
}

.sidebar-nav a:hover {
  background: #141f31;
  border-color: #344763;
  color: var(--text-0);
  transform: translateX(3px);
}

.sidebar-nav a.active {
  background: linear-gradient(135deg, #1a2a42 0%, #122035 100%);
  border-color: #4a6695;
  color: #eff5ff;
  box-shadow: 0 0 0 1px rgba(78, 116, 182, 0.28);
}

.sidebar-nav a .nav-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar-nav a:hover .nav-icon,
.sidebar-nav a.active .nav-icon {
  opacity: 1;
  color: #ddebff;
}

/* When sidebar is open, shift page content on large screens */
@media (min-width: 900px) {
  body.sidebar-open .page {
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}


/* ── Mobile menu button hidden now (sidebar replaces it) ─────────────────── */
@media (max-width: 780px) {
  .menu-toggle {
    display: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   Colosseum Teams Page
   ══════════════════════════════════════════════════════════════════════════ */

.col-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
  padding: 0.6rem 0;
}

.col-team-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #131d2e 0%, #0f1825 100%);
  text-decoration: none;
  color: var(--text-0);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  animation: colTeamIn 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transition:
    transform var(--motion-mid) ease,
    border-color var(--motion-mid) ease,
    box-shadow var(--motion-mid) ease;
}

.col-team-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.06) 50%, transparent 70%);
  transform: rotate(20deg) translateX(-120%);
  transition: transform 0.65s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
  z-index: 0;
}

.col-team-card:hover {
  transform: translateY(-3px) scale(1.012);
  border-color: #4a6898;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(78, 116, 182, 0.22);
}

.col-team-card:hover::after {
  transform: rotate(20deg) translateX(200%);
}

.col-team-card > * {
  position: relative;
  z-index: 1;
}

.col-team-badge-wrap {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(215, 228, 248, 0.2);
  background: rgba(9, 13, 20, 0.6);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform var(--motion-mid) ease;
}

.col-team-card:hover .col-team-badge-wrap {
  transform: scale(1.06);
}

.col-team-badge-img {
  width: 2.6rem;
  height: 2.6rem;
  object-fit: contain;
}

.col-team-badge-initials {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-1);
}

.col-team-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.col-team-name {
  font-weight: 800;
  font-size: 0.97rem;
  color: var(--text-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--motion-fast) ease;
}

.col-team-card:hover .col-team-name {
  color: #c6dbff;
}

.col-team-meta {
  font-size: 0.76rem;
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-team-members {
  font-size: 0.72rem;
  color: var(--accent-soft);
  font-weight: 600;
  margin-top: 0.1rem;
}

.col-teams-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-2);
  font-size: 0.95rem;
}

@keyframes colTeamIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   Enhanced Site-Wide Animations
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Button press micro-interaction ───────────────────────────────────────── */
button:not(.sidebar-toggle):not(.sidebar-close-btn):not(.menu-toggle):active {
  transform: scale(0.96);
}

.tab-btn {
  transition:
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    transform var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.tab-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.tab-btn:active {
  transform: translateY(0) scale(0.97);
}

/* ── Input focus glow ─────────────────────────────────────────────────────── */
input[type="text"]:focus,
input[type="search"]:focus,
select:focus {
  outline: none;
  border-color: var(--accent-soft) !important;
  box-shadow: 0 0 0 3px rgba(120, 149, 202, 0.18), 0 0 12px rgba(78, 116, 182, 0.14);
  transition:
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

/* ── Card shimmer hover glow ─────────────────────────────────────────────── */
.card {
  transition:
    transform var(--motion-mid) ease,
    border-color var(--motion-mid) ease,
    box-shadow var(--motion-mid) ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #3e5a80;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(78, 116, 182, 0.15);
}

/* ── KPI / stat card enhanced hover ─────────────────────────────────────── */
.kpi {
  transition:
    transform var(--motion-mid) ease,
    border-color var(--motion-mid) ease,
    box-shadow var(--motion-mid) ease,
    background var(--motion-mid) ease;
}

.kpi:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: #4a6898;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(78, 116, 182, 0.22);
}

/* ── Sidebar link stagger on open ────────────────────────────────────────── */
.site-sidebar.open .sidebar-nav a {
  animation: sidebarLinkIn 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.site-sidebar.open .sidebar-nav a:nth-child(1)  { animation-delay: 40ms; }
.site-sidebar.open .sidebar-nav a:nth-child(2)  { animation-delay: 70ms; }
.site-sidebar.open .sidebar-nav a:nth-child(3)  { animation-delay: 100ms; }
.site-sidebar.open .sidebar-nav a:nth-child(4)  { animation-delay: 130ms; }
.site-sidebar.open .sidebar-nav a:nth-child(5)  { animation-delay: 160ms; }
.site-sidebar.open .sidebar-nav a:nth-child(6)  { animation-delay: 190ms; }
.site-sidebar.open .sidebar-nav a:nth-child(7)  { animation-delay: 220ms; }
.site-sidebar.open .sidebar-nav a:nth-child(8)  { animation-delay: 250ms; }
.site-sidebar.open .sidebar-nav a:nth-child(9)  { animation-delay: 280ms; }
.site-sidebar.open .sidebar-nav a:nth-child(10) { animation-delay: 310ms; }
.site-sidebar.open .sidebar-nav a:nth-child(11) { animation-delay: 340ms; }
.site-sidebar.open .sidebar-nav a:nth-child(12) { animation-delay: 370ms; }

@keyframes sidebarLinkIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Hero section shimmer pulse ─────────────────────────────────────────── */
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.035) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: heroShimmer 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes heroShimmer {
  0%   { background-position: -200% 0; }
  50%  { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Table row reveal stagger ────────────────────────────────────────────── */
tbody tr {
  animation: rowFadeIn 380ms ease both;
}

tbody tr:nth-child(1)  { animation-delay: 20ms; }
tbody tr:nth-child(2)  { animation-delay: 40ms; }
tbody tr:nth-child(3)  { animation-delay: 60ms; }
tbody tr:nth-child(4)  { animation-delay: 80ms; }
tbody tr:nth-child(5)  { animation-delay: 100ms; }
tbody tr:nth-child(6)  { animation-delay: 120ms; }
tbody tr:nth-child(7)  { animation-delay: 140ms; }
tbody tr:nth-child(8)  { animation-delay: 160ms; }
tbody tr:nth-child(9)  { animation-delay: 180ms; }
tbody tr:nth-child(10) { animation-delay: 200ms; }

@keyframes rowFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Brand hover glow ────────────────────────────────────────────────────── */
.brand {
  transition: filter var(--motion-mid) ease, opacity var(--motion-fast) ease;
}

.brand:hover {
  filter: drop-shadow(0 0 8px rgba(120, 149, 202, 0.5));
  opacity: 0.92;
}

/* ── Topbar nav link micro-lift ─────────────────────────────────────────── */
.site-nav a {
  transition:
    color var(--motion-fast) ease,
    transform var(--motion-fast) ease,
    opacity var(--motion-fast) ease;
}

.site-nav a:hover {
  transform: translateY(-1px);
}

/* ── Page footer link hover lift ────────────────────────────────────────── */
.page-footer a {
  transition:
    color var(--motion-fast) ease,
    transform var(--motion-fast) ease;
}

.page-footer a:hover {
  transform: translateY(-1px);
  color: var(--text-0);
}

/* ── Scroll-reveal helper (applied by JS IntersectionObserver) ───────────── */
.reveal-hidden {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 480ms ease, transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Soccer Pitch Formation View  (match detail / live lineup)
   ═══════════════════════════════════════════════════════════════════════════ */

.lineup-pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  max-height: 560px;
  background: linear-gradient(
    180deg,
    #1b6b2e 0%,
    #1e7632 12.5%,
    #1b6b2e 12.5%,
    #1b6b2e 25%,
    #1e7632 25%,
    #1e7632 37.5%,
    #1b6b2e 37.5%,
    #1b6b2e 50%,
    #1e7632 50%,
    #1e7632 62.5%,
    #1b6b2e 62.5%,
    #1b6b2e 75%,
    #1e7632 75%,
    #1e7632 87.5%,
    #1b6b2e 87.5%,
    #1b6b2e 100%
  );
  border: 2px solid #2e8842;
  border-radius: 6px;
  overflow: hidden;
}

.lineup-pitch-markings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Halfway line */
.lineup-pitch-markings::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 50%;
  height: 2px;
  background: rgba(255, 255, 255, 0.35);
}

/* Centre circle */
.lineup-pitch-markings::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Penalty areas drawn via box-shadow hack on pseudo elements of pitch itself */
.lineup-pitch::before {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 2%;
  height: 20%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top: none;
  pointer-events: none;
}

.lineup-pitch::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 2%;
  height: 20%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-bottom: none;
  pointer-events: none;
}

.lineup-player-token {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  z-index: 2;
}

.lineup-player-shirt {
  width: 36px;
  height: 36px;
  border-radius: 6px 6px 4px 4px;
  background: linear-gradient(160deg, #1a3a6e 0%, #0f2448 100%);
  border: 2px solid #4878b8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

.lineup-player-shirt:hover {
  transform: scale(1.08);
}

.lineup-player-pos-tag {
  font-size: 0.6rem;
  font-weight: 800;
  color: #a8c4f5;
  letter-spacing: 0.06em;
}

.lineup-player-name {
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 1px 4px;
  border-radius: 3px;
  text-decoration: none;
}

.lineup-player-name:hover {
  color: #99ccff;
  text-decoration: underline;
}

/* Make match detail lineup containers flex-column */
#match-detail-home .lineup-pitch,
#match-detail-away .lineup-pitch {
  width: 100%;
}

.lineup-player-token.empty-slot {
  opacity: .55;
}

.lineup-sub-list {
  display: grid;
  gap: 2px;
  margin-top: 1px;
  min-width: 86px;
  justify-items: center;
}

.lineup-sub-row {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 112px;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(3, 12, 20, .72);
  border: 1px solid rgba(145, 189, 255, .22);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .22);
  animation: lineupSubIn .24s ease both;
}

.lineup-sub-icon {
  width: .72rem;
  height: .72rem;
  color: #9cc4ff;
}

.lineup-sub-icon svg {
  width: .72rem;
  height: .72rem;
}

.lineup-sub-name {
  min-width: 0;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #eef5ff;
  font-size: .58rem;
  font-weight: 800;
  text-decoration: none;
}

.lineup-sub-name:hover {
  color: #99ccff;
  text-decoration: underline;
}

@keyframes lineupSubIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Player Profile — Teams Section
   ═══════════════════════════════════════════════════════════════════════════ */

.player-teams-group-head {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #6d9ad4;
  margin: 1rem 0 0.55rem;
}

.player-teams-group-head:first-child {
  margin-top: 0;
}

.player-teams-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.player-team-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem 0.45rem 0.45rem;
  background: #0d1f36;
  border: 1px solid #1e3a5e;
  border-radius: 2rem;
  text-decoration: none;
  color: var(--text-0, #dce8ff);
  font-size: 0.86rem;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
  position: relative;
}

.player-team-chip:hover {
  border-color: #4878b8;
  background: #122a4a;
  transform: translateY(-1px);
  color: #fff;
}

.player-team-chip-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a1828;
  border: 1px solid #1e3a5e;
  flex-shrink: 0;
}

.player-team-chip-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-team-chip-icon.player-team-chip-icon-init {
  font-size: 0.62rem;
  font-weight: 800;
  color: #6d9ad4;
  letter-spacing: 0;
}

.player-team-chip-name {
  line-height: 1.2;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-team-chip-role {
  position: absolute;
  top: -5px;
  right: -4px;
  background: #d4a017;
  color: #000;
  font-size: 0.55rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

.player-team-chip--current {
  border-color: #22c55e;
  background: #071f10;
}

.player-team-chip--current:hover {
  border-color: #4ade80;
  background: #0d2d18;
}

.player-team-chip-current {
  position: absolute;
  top: -6px;
  right: -4px;
  background: #22c55e;
  color: #000;
  font-size: 0.52rem;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── In-page tab panels ───────────────────────────────────────────────────── */
.inpage-tabs {
  width: 100%;
  gap: 0.35rem;
}

.inpage-tabs .tab-btn {
  font-size: 0.82rem;
  padding: 0.42rem 1.1rem;
  border-radius: 0.45rem;
  border: 1px solid #243650;
  background: transparent;
  color: #7a9cc8;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.1s;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.inpage-tabs .tab-btn.active {
  background: linear-gradient(180deg, #1c2e48 0%, #122238 100%);
  border-color: #4878b8;
  color: #e8f0ff;
  box-shadow: 0 0 0 1px rgba(72, 120, 184, 0.3);
}

.inpage-tabs .tab-btn:hover:not(.active) {
  background: #152130;
  border-color: #2e4a70;
  color: #b8d0f0;
  transform: translateY(-1px);
}

.inpage-tab-panel {
  animation: tabFadeIn 0.18s ease;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Team profile hero ───────────────────────────────────────────────────── */
.team-profile-hero {
  padding-bottom: 2rem;
}

.team-profile-hero-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.team-profile-hero-badge-wrap {
  flex-shrink: 0;
}

.team-hero-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #0a1828;
  border: 2px solid #1e3a5e;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.team-hero-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.team-hero-badge.team-hero-badge-init {
  font-size: 1.4rem;
  font-weight: 800;
  color: #6d9ad4;
}

.team-profile-hero-info {
  flex: 1;
  min-width: 0;
}

.team-profile-hero-info h1 {
  margin-bottom: 0.3rem;
}

.team-profile-tabs-card {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

/* ── Match detail hero ───────────────────────────────────────────────────── */
.match-detail-hero-section {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
}

.match-detail-hero-title {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: clamp(1.1rem, 3.5vw, 2rem);
  margin-bottom: 0.5rem;
  width: 100%;
}

.match-hero-side {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.match-hero-side-home { flex-direction: row; }
.match-hero-side-away { flex-direction: row-reverse; }

.match-hero-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0a1828;
  border: 1px solid #1e3a5e;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.match-hero-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.match-hero-name {
  font-size: clamp(0.9rem, 2.5vw, 1.25rem);
  font-weight: 700;
  color: #dce8ff;
  text-decoration: none;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.14s;
}

.match-hero-name:hover {
  color: #7eb4ff;
  text-decoration: underline;
}

.match-hero-score {
  font-size: clamp(1.4rem, 5vw, 2.4rem);
  font-weight: 900;
  color: #f0f5ff;
  letter-spacing: 0.05em;
  padding: 0 0.5rem;
  background: linear-gradient(135deg, #1a2d48 0%, #0f1f36 100%);
  border: 1px solid #2a4060;
  border-radius: 0.6rem;
  min-width: 5rem;
  text-align: center;
  font-family: 'Cinzel', serif;
}

.match-hero-meta-pill {
  display: block;
  font-size: 0.75rem;
  color: #6d9ad4;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.match-detail-hero-sub {
  color: #7a9cc8;
  font-size: 0.88rem;
  margin-top: 0.4rem;
}

/* ── Match lineups two-column grid ───────────────────────────────────────── */
.match-lineups-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.match-lineup-side {
  min-width: 0;
}

@media (max-width: 640px) {
  .match-lineups-grid {
    grid-template-columns: 1fr;
  }

  .team-profile-hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .match-hero-name {
    max-width: 130px;
  }
}

/* ─── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb { font-size: 0.8rem; color: #5a7da0; padding: 0.5rem 0 0.5rem 0; margin-bottom: 0.5rem; }
.breadcrumb a { color: #5a7da0; text-decoration: none; }
.breadcrumb a:hover { color: #7eb4ff; }

/* ─── Match hero card ─────────────────────────────────────────────────────── */
.match-hero-card { padding: 1.5rem 2rem; }
.match-hero-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; font-size: 0.78rem; color: #6d9ad4; }
.match-hero-center { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-bottom: 1.2rem; }
.match-hero-team-side { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; min-width: 120px; }
.match-hero-team-badge { width: 72px; height: 72px; border-radius: 50%; background: #0a1828; border: 2px solid #1e3a5e; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.match-hero-team-badge img { width: 100%; height: 100%; object-fit: contain; }
.match-hero-team-name { font-size: 1.1rem; font-weight: 700; color: #dce8ff; text-decoration: none; text-align: center; }
.match-hero-team-name:hover { color: #7eb4ff; }
.match-hero-scorebox { text-align: center; }
.match-hero-score-big { font-size: 3.5rem; font-weight: 900; color: #fff; font-family: 'Cinzel', serif; letter-spacing: 0.1em; line-height: 1; }
.match-hero-period { font-size: 0.72rem; font-weight: 700; color: #6d9ad4; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.2rem; }
.match-hero-scorers-row { display: flex; gap: 1rem; justify-content: center; align-items: flex-start; margin: 0.5rem 0 1rem; font-size: 0.82rem; color: #8aaecc; min-height: 1rem; }
.match-scorers-col { flex: 1; max-width: 200px; display: flex; flex-direction: column; gap: 0.15rem; }
.match-scorers-col.away { text-align: right; align-items: flex-end; }
.match-scorers-ft { color: #5a7da0; font-size: 0.72rem; font-weight: 700; padding-top: 0.1rem; white-space: nowrap; }
.match-scorer-line { color: #b0c8e0; }
.match-hero-potm { text-align: center; color: #d4a017; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; }
.match-section-head { padding: 0.8rem 0 0.3rem; }
.match-section-title { font-size: 0.78rem; font-weight: 800; color: #a0b8d8; letter-spacing: 0.12em; text-transform: uppercase; }

/* ─── Team hero card ──────────────────────────────────────────────────────── */
.team-hero-card { padding: 1.5rem 2rem; }
.team-hero-inner { display: flex; align-items: center; gap: 1.5rem; }
.team-hero-badge-lg { width: 80px; height: 80px; border-radius: 50%; background: #0a1828; border: 2px solid #1e3a5e; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.team-hero-badge-lg img { width: 100%; height: 100%; object-fit: contain; }
.team-hero-badge-lg.initials { font-size: 1.4rem; font-weight: 800; color: #6d9ad4; }
.team-hero-info { flex: 1; min-width: 0; }
.team-hero-name-row { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.team-hero-name-row h1 { font-size: clamp(1.4rem, 4vw, 2rem); text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }
.team-hero-rating { font-size: 1.4rem; font-weight: 900; color: #e040a0; font-family: 'Cinzel', serif; }
.team-hero-sub-row { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.5rem; flex-wrap: wrap; }
.team-hero-code-pill { background: #111; color: #fff; font-size: 0.72rem; font-weight: 900; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.06em; }
.team-hero-region { color: #8aaecc; font-size: 0.82rem; }
.team-hero-form-pills { display: flex; gap: 0.3rem; }
.form-pill-w { background: #22c55e; color: #000; font-size: 0.68rem; font-weight: 900; padding: 2px 6px; border-radius: 4px; }
.form-pill-d { background: #4a5568; color: #fff; font-size: 0.68rem; font-weight: 900; padding: 2px 6px; border-radius: 4px; }
.form-pill-l { background: #ef4444; color: #fff; font-size: 0.68rem; font-weight: 900; padding: 2px 6px; border-radius: 4px; }

/* ─── Team stats row ──────────────────────────────────────────────────────── */
.team-stats-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.5rem; margin: 0.5rem 0; }
@media (max-width: 768px) { .team-stats-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .team-stats-row { grid-template-columns: repeat(3, 1fr); } }
.team-stat-card { background: #0d1a2e; border: 1px solid #1e3a5e; border-radius: 0.5rem; padding: 0.75rem 0.6rem; }
.team-stat-label { font-size: 0.62rem; font-weight: 700; color: #5a7da0; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.3rem; }
.team-stat-value { font-size: 1.3rem; font-weight: 800; color: #dce8ff; }
.team-stat-value.pink { color: #e040a0; }
.team-stat-value.green { color: #22c55e; }
.team-stat-value.red { color: #ef4444; }
.team-stat-value.white { color: #f4f8ff; }
.team-stat-value.dark-green { color: #15803d; }
.team-stat-value.team-accent { color: var(--team-stat-accent, #2bd6d0); display: inline-flex; align-items: center; gap: .42rem; }
.team-stat-value-icon { width: 1rem; height: 1rem; color: var(--team-stat-accent, #2bd6d0); }

body[data-page="team-profile"] .team-hero-card,
body[data-page="team-profile"] .team-wdl-section,
body[data-page="team-profile"] .team-tabs-card,
body[data-page="team-profile"] #team-tab-results .section.card,
body[data-page="team-profile"] #team-tab-squad .section.card {
  border-color: rgba(126, 180, 255, .28);
  background:
    linear-gradient(145deg, rgba(17, 31, 53, .96), rgba(9, 18, 32, .96)),
    radial-gradient(circle at 20% 0%, rgba(126, 180, 255, .12), transparent 36%);
}

body[data-page="team-profile"] .team-roster-item {
  display: grid;
  gap: .45rem;
  border-color: rgba(126, 180, 255, .22);
  animation: itemReveal .24s ease both;
}

.team-roster-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
  flex-wrap: wrap;
}

.team-role-badge {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .055);
  color: #dce8ff;
}

.team-role-badge.role-captain {
  color: #ffe08a;
  border-color: rgba(255, 202, 75, .34);
  background: rgba(255, 202, 75, .11);
}

.team-role-badge.role-vice-captain {
  color: #a8c7ff;
  border-color: rgba(126, 180, 255, .34);
  background: rgba(126, 180, 255, .10);
}

.team-role-badge.role-reserve {
  color: #b7c4d8;
}

.team-role-badge.role-loanee,
.team-role-badge.role-loaned {
  color: #9ff0d0;
  border-color: rgba(56, 211, 159, .32);
  background: rgba(56, 211, 159, .09);
}

/* ─── W/D/L bar ───────────────────────────────────────────────────────────── */
.team-wdl-section { padding: 0.75rem 1.25rem; }
.team-wdl-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 0.5rem; }
.team-wdl-bar-w { background: #22c55e; }
.team-wdl-bar-d { background: #4a5568; }
.team-wdl-bar-l { background: #ef4444; }
.team-wdl-legend { display: flex; gap: 1.2rem; font-size: 0.78rem; }
.team-wdl-legend-item { display: flex; align-items: center; gap: 0.3rem; }
.team-wdl-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.team-wdl-dot-w { background: #22c55e; }
.team-wdl-dot-d { background: #4a5568; }
.team-wdl-dot-l { background: #ef4444; }

/* ─── Team tabs ───────────────────────────────────────────────────────────── */
.team-tabs-card { padding: 0.3rem 1.25rem; border-bottom: 1px solid #1a2d48; }
.team-inpage-tabs { display: flex; gap: 0; }
.team-tab-btn { background: none; border: none; border-bottom: 2px solid transparent; color: #6d9ad4; font-size: 0.88rem; font-weight: 600; padding: 0.6rem 1.2rem; cursor: pointer; transition: color 0.14s, border-color 0.14s; letter-spacing: 0.02em; }
.team-tab-btn.active { color: #e040a0; border-bottom-color: #e040a0; }
.team-tab-btn:hover:not(.active) { color: #b8d0f0; }

/* ─── Leaderboards ────────────────────────────────────────────────────────── */
.team-leaderboards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; padding: 0.75rem 0; }
@media (max-width: 900px) { .team-leaderboards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .team-leaderboards-grid { grid-template-columns: 1fr; } }
.team-leaderboard-card { background: #0d1a2e; border: 1px solid #1e3a5e; border-radius: 0.5rem; overflow: hidden; }
.team-leaderboard-title { font-size: 0.68rem; font-weight: 800; color: #5a7da0; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.6rem 0.85rem; border-bottom: 1px solid #1a2d48; }
.team-leaderboard-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.85rem; border-bottom: 1px solid #0f1d30; font-size: 0.82rem; }
.team-leaderboard-row:last-child { border-bottom: none; }
.team-lb-rank { color: #e040a0; font-weight: 700; font-size: 0.72rem; min-width: 1.2rem; }
.team-lb-name { flex: 1; color: #c0d8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.team-lb-name:hover { color: #7eb4ff; }
.team-lb-value { color: #e0ecff; font-weight: 700; font-size: 0.88rem; }

/* Support, tournaments, and leaderboard polish */
.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 1.25rem;
}

.discord-preview-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 18px;
  background: radial-gradient(circle at 90% 10%, rgba(45, 212, 191, 0.18), transparent 36%), linear-gradient(135deg, rgba(18, 35, 59, 0.95), rgba(8, 17, 31, 0.95));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  animation: softRise 0.48s ease both;
}

.discord-preview-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: #eaf4ff;
  border: 1px solid rgba(125, 211, 252, 0.5);
  background: linear-gradient(135deg, #1d4ed8, #14b8a6);
  box-shadow: 0 0 28px rgba(20, 184, 166, 0.3);
}

.discord-preview-card h3 { margin: 0.2rem 0 0.35rem; }
.discord-preview-card p { color: var(--muted); }

.discord-preview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.8rem 0 1rem;
}

.discord-preview-stats span {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #bfd3ef;
  background: rgba(7, 16, 29, 0.5);
  font-size: 0.78rem;
}

.tournament-winner-cell,
.leaderboard-live-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.tournament-winner-link { font-weight: 800; }

.leaderboard-live-card {
  text-decoration: none;
  color: inherit;
  transform-origin: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.leaderboard-live-card:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.45);
}

.leaderboard-live-team { min-width: 0; }
.leaderboard-live-team.away { text-align: right; }

.leaderboard-live-score {
  margin-left: auto;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-family: var(--font-display);
  color: #f8fbff;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.34);
  box-shadow: 0 0 22px rgba(14, 165, 233, 0.16);
}

@media (max-width: 760px) {
  .support-grid { grid-template-columns: 1fr; }
  .leaderboard-live-card { flex-wrap: wrap; }
  .leaderboard-live-score { margin-left: 0; }
}

@keyframes softRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile shell hardening: phone browsers are much less forgiving about wide
   grids/tables, so this layer keeps the whole app inside the viewport. */
@media (max-width: 640px) {
  html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
  }

  body {
    min-width: 0;
  }

  body::before {
    inset: -30%;
    opacity: 0.72;
  }

  .topbar-inner {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    padding: calc(0.62rem + env(safe-area-inset-top, 0px)) 0.72rem 0.62rem;
  }

  .brand {
    min-width: 0;
    max-width: 100%;
  }

  .brand span,
  .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .menu-toggle,
  .sidebar-toggle {
    min-width: 2.45rem;
    min-height: 2.45rem;
  }

  .top-tools,
  .header-actions {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
  }

  .global-search,
  .search-box,
  .filter-input,
  input[type="search"],
  input[type="text"],
  select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
  }

  .page {
    width: 100%;
    max-width: 100%;
    padding: 0.72rem;
  }

  .page-hero,
  .section,
  .card,
  .panel,
  .content-card {
    border-radius: 1rem;
    padding: 1rem;
  }

  .page-hero h1,
  .page-title,
  h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 0.95;
    overflow-wrap: anywhere;
  }

  h2,
  .section-title {
    font-size: clamp(1.25rem, 6vw, 1.65rem);
  }

  .tabs,
  .filters,
  .toolbar,
  .page-subnav,
  .tournaments-controls,
  .tournaments-type-tabs,
  .button-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
    scroll-snap-type: x proximity;
  }

  .tabs > *,
  .filters > *,
  .toolbar > *,
  .page-subnav > *,
  .tournaments-controls > *,
  .tournaments-type-tabs > *,
  .button-row > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .grid,
  .grid.two,
  .grid.three,
  .grid.four,
  .stats-grid,
  .cards-grid,
  .team-gallery,
  .profile-grid,
  .detail-grid,
  .match-detail-grid,
  .comparison-grid,
  .lineup-grid,
  .support-grid {
    grid-template-columns: 1fr !important;
  }

  .table-wrap,
  .table-shell,
  .data-table-wrap,
  .rating-lab-card,
  .chart-panel {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table,
  .data-table {
    min-width: 42rem;
  }

  .table-wrap::after,
  .data-table-wrap::after {
    content: "Swipe sideways";
    display: block;
    color: var(--text-2);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.45rem 0.15rem 0;
  }

  .match-center,
  .match-hero-board,
  .match-score-row,
  .live-card,
  .match-row {
    grid-template-columns: 1fr !important;
    text-align: left;
  }

  .leaderboard-row-main,
  .leaderboard-live-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .match-hero-score,
  .match-score,
  .scoreline {
    justify-self: start;
    font-size: clamp(1.8rem, 12vw, 2.8rem);
  }

  .modal,
  .dialog,
  .popover,
  .search-popover,
  .autocomplete-list {
    max-width: calc(100vw - 1rem);
  }

  .page-footer {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 420px) {
  .brand-mark {
    width: 1.85rem;
    height: 1.85rem;
  }

  .brand {
    gap: 0.45rem;
    letter-spacing: 0.02em;
  }

  .page {
    padding: 0.55rem;
  }

  .page-hero,
  .section,
  .card,
  .panel,
  .content-card {
    padding: 0.82rem;
  }

  table,
  .data-table {
    min-width: 38rem;
  }
}
