:root {
    --bg: #07162d;
    --surface: #091d36;
    --surface-2: #0b203b;
    --border: #12578a;
    --border-soft: #1b4168;
    --text: #eaf2ff;
    --text-muted: #91abc9;
    --accent: #168cff;
    --accent-cyan: #35c5f4;
    --brand: #e85b70;
    --sidebar-w: 270px;

    /* Derived shades: follow the team theme automatically */
    --row-hover: color-mix(in srgb, var(--border) 45%, var(--surface-2));
    --row-strong: color-mix(in srgb, var(--border) 75%, var(--surface-2));
    --table-head: color-mix(in srgb, var(--border) 25%, var(--surface-2));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background-color: var(--bg);
    color: white;
    display: flex;
}
.main-content {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-w);
    padding: 24px 30px;
}
.logo h2 {
    font-size: 30px;
    letter-spacing: 1px;
}
.logo h2 span {
    color: #e85b70;
}
.logo p {
    font-size: 10px;
    letter-spacing: 3px;
    color: #9da8ba;
    margin-top: 5px;
}

/* ===== HOME / DASHBOARD PAGE ===== */
.home-page {
    background-color: var(--bg);
    color: #eaf2ff;
}
.home-page .home-main { padding: 24px 30px; min-width: 0; }
.home-page section { margin-bottom: 0; }

/* header + filters */
.home-page .hm-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}
.home-page .hm-top h1 { font-size: 26px; margin-bottom: 12px; color: #f1f6ff; }
.home-page .hm-top p { font-size: 12px; color: #91abc9; }
.home-page .hm-top > div:first-child { flex: 1 1 auto; min-width: 240px; }
.home-page .hm-filters { display: flex; gap: 14px; align-items: flex-end; flex-wrap: nowrap; justify-content: flex-end; }
.home-page .hm-filter { display: flex; flex-direction: column; gap: 8px; }
.home-page .hm-filter span { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; }
.home-page .hm-filter select,
.home-page .hm-search input {
    height: 38px;
    background-color: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    color: #eaf2ff;
    font-size: 12px;
    outline: none;
}
.home-page .hm-filter select { width: 140px; padding: 0 10px; }
.home-page .hm-filter option { background: var(--surface-2); }
.home-page .hm-search input {
    width: 220px;
    padding: 0 12px 0 38px;
    background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2391abc9' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center;
}
.home-page .hm-search input::placeholder { color: #91abc9; }
.home-page .hm-filter select:focus,
.home-page .hm-search input:focus { border-color: #168ceb; }

/* stat cards */
.home-page .hm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.home-page .hm-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
}
.home-page .hm-ico {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 26px;
    border-radius: 8px;
}
.home-page .ico-blue { background: linear-gradient(135deg, #2f7bff, #168cff); }
.home-page .ico-teal { background: linear-gradient(135deg, #00cba4, #00b08a); }
.home-page .ico-purple { background: linear-gradient(135deg, #943cff, #7a4dff); }
.home-page .ico-orange { background: linear-gradient(135deg, #ff981f, #f59e0b); }
.home-page .hm-stat .lab { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; color: #dcecff; }
.home-page .hm-stat strong { display: block; font-size: 30px; line-height: 1.1; }
.home-page .hm-stat em { display: block; font-style: normal; font-size: 10px; margin-top: 8px; color: #19d27f; }
.home-page .hm-stat em.muted { color: #91abc9; }

/* cards + rows */
.home-page .hm-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    min-width: 0;
}
.home-page .hm-card h2 { font-size: 16px; margin-bottom: 6px; color: #eaf2ff; }
.home-page .hm-sub { font-size: 11px; color: #91abc9; margin-bottom: 8px; }
.home-page .hm-row { display: grid; gap: 16px; margin-bottom: 16px; }
.home-page .r-a,
.home-page .r-b { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-page .hm-chart { position: relative; height: 210px; }
.home-page .hm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.home-page .hm-head h2 { margin-bottom: 0; }
.home-page .hm-pill {
    padding: 6px 10px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: 5px;
    color: #eaf2ff;
    font-size: 10px;
    text-decoration: none;
}
.home-page .hm-pill:hover { border-color: #168ceb; }
.home-page .hm-link { color: #35c5f4; font-size: 11px; text-decoration: underline; }
.home-page .hm-empty { color: #91abc9; font-size: 11px; padding: 12px; text-align: center; }

/* mini comparison cards */
.home-page .hm-cmp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-page .hm-mini {
    min-width: 0;
    padding: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-left: 4px solid #168cff;
    border-radius: 10px;
}
.home-page a.hm-mini {
    display: block;
    color: inherit;
    text-decoration: none;
}
.home-page a.hm-mini:hover { background: var(--row-hover); }
.home-page .hm-mhead { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; min-height: 52px; }
.home-page .hm-av {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border);
    border: 2px solid #35c5f4;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}
.home-page .hm-mhead b {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 11px;
    margin-bottom: 4px;
    color: #eaf2ff;
}
.home-page .hm-mhead small { font-size: 9px; color: #91abc9; }
.home-page .hm-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 10px; color: #91abc9; }
.home-page .hm-line b { color: #eaf2ff; }

/* recent table */
.home-page .hm-tablewrap { overflow-x: auto; }
.home-page .hm-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.home-page .hm-table th,
.home-page .hm-table td { padding: 11px 8px; text-align: center; border: 0; }
.home-page .hm-table th { color: #dcecff; background: var(--table-head); }
.home-page .hm-table td { color: #d9e8f7; border-bottom: 1px solid #173858; }
.home-page .hm-table th:nth-child(2),
.home-page .hm-table td.nm { text-align: left; font-weight: 700; color: #eaf2ff; }
.home-page .hm-table td.tm { color: #35c5f4; }
.home-page .hm-table tbody tr:hover { background: var(--row-hover); }

/* Dashboard: Player Comparison card fills its height */
:has(> #cmp) { display: flex; flex-direction: column; }

#cmp {
  flex: 1 1 auto;
  min-height: 0;
  align-content: stretch;
  grid-auto-rows: 1fr;          /* the row of player cards takes all the height */
}

#cmp .hm-mini {
  display: flex;
  flex-direction: column;
  padding-block: 20px;
}

#cmp .hm-mhead { flex: 0 0 auto; gap: 16px; margin-bottom: 12px; }
#cmp .hm-mini .hm-mhead .av { width: 84px; height: 84px; }  /* bigger headshot */
#cmp .hm-mhead b { font-size: 18px; }
#cmp .hm-mhead small { font-size: 13px; }

/* the four stat lines share the leftover height */
#cmp .hm-line {
  flex: 1 1 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(75, 130, 181, .18);
  font-size: 15px;
}
#cmp .hm-line b { font-size: 20px; }


/* ===== PLAYER STATS PAGE ===== */
.player-stats-page {
    background-color:var(--bg);
    color:#eaf2ff;
}
.player-stats-content {
    margin-left: 270px;
    width: calc(100% - 270px);
    padding: 28px 30px;
    min-width: 0;
}
.stats-header {
    margin-bottom: 22px;
}
.stats-header h1 {
    font-size: 25px;
    margin-bottom: 7px;
    color:#f1f6ff;
}
.stats-header p {
    color:#91abc9;
    font-size: 13px;
}
.player-filters {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}
.player-filters input,
.player-filters select {
    width: 100%;
    min-width: 0;
    padding: 12px;
    background:var(--surface-2);
    color:#eaf2ff;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: 12px;
    outline: none;
}
.player-filters input::placeholder {
    color:#91abc9;
}
.player-filters input:focus,
.player-filters select:focus {
    border-color:#168ceB;
}
.player-stats-layout {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 16px;
    align-items: stretch;
}
.player-table-card,
.player-profile-card,
.shooting-card,
.vorp-card {
    background:var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    min-width: 0;
}
.player-table-card h3,
.player-profile-card h3,
.shooting-card h3,
.vorp-card h3 {
    font-size: 15px;
    margin-bottom: 16px;
    color:#eaf2ff;
}
.player-table-card {
    grid-column: 1;
    grid-row: 1 / 4;
    overflow: hidden;
}
.table-scroll {
    overflow-x: auto;
    width: 100%;
}
.player-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    white-space: nowrap;
}
.player-stats-table th {
    color:#8fb2d3;
    padding: 13px 10px;
    border-bottom: 1px solid #17618e;
    text-align: left;
}
.player-stats-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #173858;
    color:#d9e8f7;
}
.player-stats-table tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}
.player-stats-table tbody tr:hover {
    background:var(--row-hover);
}
.player-stats-table tbody tr.selected-player {
    background:var(--row-strong);
    outline: 1px solid #35c5f4;
}
.player-stats-table td:nth-child(3) {
    color:#35c5f4;
}
.table-result {
    margin-top: 15px;
    color:#8fb2d3;
    font-size: 11px;
}
.player-profile-card {
    grid-column: 2;
    grid-row: 1;
}
.profile-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}
.profile-info h3 {
    margin-bottom: 5px;
    font-size: 15px;
}
.profile-info p {
    font-size: 11px;
    color:#91abc9;
}
.profile-tabs {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
    margin-bottom: 15px;

    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.profile-tab {
    flex: 0 0 auto;
    white-space: nowrap;

    border: none;
    background: var(--row-hover);
    color: #dcecff;
    padding: 7px 10px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
}

.profile-tab.active,
.profile-tab:hover {
    background: #168ceb;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
}
.profile-stats div {
    background:var(--surface-2);
    border: 1px solid #1a4165;
    padding: 12px;
    border-radius: 7px;
}
.profile-stats span {
    display: block;
    font-size: 10px;
    color:#91abc9;
    margin-bottom: 7px;
}
.profile-stats strong {
    font-size: 14px;
    color:#35c5f4;
}
.shooting-card {
    grid-column: 2;
    grid-row: 2;
}
.efficiency-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    text-align: center;
}
.efficiency-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.donut {
    --percentage: 50%;
    width: clamp(45px, 5vw, 75px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(
        #168cff var(--percentage),
        var(--row-hover) 0
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.donut::before {
    content: "";
    position: absolute;
    width: 65%;
    height: 65%;
    border-radius: 50%;
    background:var(--surface);
}
.donut span {
    position: relative;
    z-index: 1;
    font-size: clamp(8px, 0.8vw, 10px);
    color: white;
}
.donut.cyan {
    background: conic-gradient(#00d8ed var(--percentage),var(--row-hover) 0);
}
.donut.purple {
    background: conic-gradient(#943cff var(--percentage),var(--row-hover) 0);
}
.donut.green {
    background: conic-gradient(#00cba4 var(--percentage),var(--row-hover) 0);
}
.donut.orange {
    background: conic-gradient(#ff981f var(--percentage),var(--row-hover) 0);
}
.efficiency-item strong {
    font-size: 11px;
}
.vorp-card {
    grid-column: 2;
    grid-row: 3;
}
.vorp-row {
    display: grid;
    grid-template-columns: 20px minmax(90px, 1fr) 1.2fr 30px;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
    font-size: 10px;
    color:#d9e8f7;
}
.vorp-bar {
    height: 11px;
    background:var(--row-hover);
    border-radius: 3px;
    overflow: hidden;
}
.vorp-bar div {
    height: 100%;
    background:#168cff;
    border-radius: 3px;
}
.vorp-row strong {
    color:#8fb2d3;
}
.player-stats-content footer {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid var(--border-soft);
    color:#91abc9;
}
@media (max-width: 1100px) {
    .player-stats-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .player-table-card,
    .player-profile-card,
    .shooting-card,
    .vorp-card {
        grid-column: 1;
        grid-row: auto;
    }
}
@media (max-width: 750px) {
    .player-filters {
        grid-template-columns: 1fr 1fr;
    }
    .efficiency-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .player-stats-content {
        padding: 20px 15px;
    }
}
@media (max-width: 450px) {
    .player-filters {
        grid-template-columns: 1fr;
    }
    .profile-stats {
        grid-template-columns: 1fr 1fr;
    }
}
.player-stats-page .player-stats-content {
    padding: 24px 22px;
}
.player-stats-page .stats-header {
    margin-bottom: 18px;
}
.player-stats-page .stats-header h1 {
    font-size: 26px;
    font-weight: 700;
}
.player-stats-page .player-filters {
    gap: 16px;
    margin-bottom: 20px;
}
.player-stats-page .player-filters input,
.player-stats-page .player-filters select {
    height: 38px;
    padding: 9px 12px;
    border-radius: 6px;
}
.player-stats-page .player-stats-layout {
    grid-template-columns: 1.35fr 1fr;
    gap: 12px;
    align-items: stretch;
}
.player-stats-page .player-table-card {
    min-height: 555px;
    padding: 17px 14px;
    border-radius: 20px;
}
.player-stats-page .player-table-card h3 {
    margin-bottom: 12px;
}
.player-stats-page .player-stats-table {
    font-size: 11px;
}
.player-stats-page .player-stats-table th {
    padding: 13px 9px;
}
.player-stats-page .player-stats-table td {
    padding: 13px 9px;
}
.player-stats-page .player-stats-table tbody tr:nth-child(even) {
    background-color:var(--table-head);
}
.player-stats-page .player-stats-table tbody tr:nth-child(odd) {
    background-color:var(--surface);
}
.player-stats-page .player-stats-table tbody tr.selected-player {
    background-color:var(--row-strong);
    outline: 2px solid #48c9ff;
    outline-offset: -2px;
}
.player-stats-page .player-profile-card {
    padding: 17px;
    border-radius: 20px;
}
.player-stats-page .profile-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}
.player-stats-page .profile-stats div {
    padding: 11px 9px;
    min-width: 0;
}
.player-stats-page .profile-stats span {
    font-size: 10px;
}
.player-stats-page .profile-stats strong {
    font-size: 13px;
}
.player-stats-page .shooting-card {
    padding: 19px;
    border-radius: 20px;
}
.player-stats-page .donut {
    width: clamp(55px, 5vw, 80px);
}
.player-stats-page .donut::before {
    width: 62%;
    height: 62%;
}
.player-stats-page .efficiency-grid {
    gap: 12px;
}
.player-stats-page .vorp-card {
    padding: 19px;
    border-radius: 20px;
}
.player-stats-page .vorp-row {
    grid-template-columns: 22px minmax(100px, 1fr) 1.5fr 30px;
    gap: 10px;
    margin-bottom: 15px;
}
.player-stats-page .vorp-bar {
    height: 12px;
}
@media (max-width: 1100px) {
    .player-stats-page .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .player-stats-page .player-table-card {
        min-height: auto;
    }
}
@media (max-width: 650px) {
    .player-stats-page .player-stats-content {
        padding: 20px 14px;
    }
    .player-stats-page .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
.player-stats-page .sidebar {
    box-sizing: border-box;
    width: 270px;
    min-width: 270px;
    padding: 22px 24px;
}
.player-stats-page .main-content {
    margin-left: 270px;
    width: calc(100% - 270px);
}
.player-stats-page .sidebar .logo h2 {
    font-size: 28px;
    letter-spacing: 1px;
}
.player-stats-page .sidebar .logo h2 span {
    color:var(--brand);
}
.player-stats-page .sidebar .logo p {
    font-size: 10px;
    letter-spacing: 3px;
}
.player-stats-page .sidebar nav {
    margin-top: 42px;
    gap: 10px;
}
.player-stats-page .sidebar nav a {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 17px;
    font-size: 14px;
    border-radius: 7px;
}
.player-stats-page .sidebar nav a.active {
    background-color:color-mix(in srgb, var(--accent) 45%, var(--surface-2));
    border-left: 3px solid var(--brand);
}
.player-stats-page .sidebar-footer {
    font-size: 11px;
    line-height: 2;
}
.player-stats-page .stats-header {
    margin-bottom: 18px;
}
@media (max-width: 650px) {
    .player-stats-page .sidebar {
        width: 100%;
        min-width: 0;
    }
    .player-stats-page .main-content {
        margin-left: 0;
        width: 100%;
    }
}
.player-stats-page .data-note {
    color:#91abc9;
    font-size: 10px;
    line-height: 1.5;
    margin: -7px 0 12px;
}
.player-stats-page .insight-card {
    min-width: 0;
}
.player-stats-page .player-stats-table tbody tr[style*="display: none"] {
    display: none !important;
}
@media (min-width: 651px) {
    .player-stats-page .sidebar {
        width: 270px;
        min-width: 270px;
    }
    .player-stats-page .main-content {
        margin-left: 270px;
        width: calc(100% - 270px);
    }
}
@media (min-width: 651px) {
    .sidebar {
        width: 270px;
        min-width: 270px;
        box-sizing: border-box;
    }
    .main-content {
        margin-left: 270px;
        width: calc(100% - 270px);
    }
}
@media (min-width: 651px) {
    .sidebar {
        width: 270px;
        min-width: 270px;
        padding: 22px 24px;
        box-sizing: border-box;
    }
    .sidebar .logo h2 {
        font-size: 28px;
        letter-spacing: 1px;
    }
    .sidebar .logo h2 span {
        color: var(--brand);
    }
    .sidebar .logo p {
        font-size: 10px;
        letter-spacing: 3px;
    }
    .sidebar nav {
        margin-top: 42px;
        gap: 10px;
    }
    .sidebar nav a {
        width: 100%;
        box-sizing: border-box;
        padding: 14px 17px;
        font-size: 14px;
        border-radius: 7px;
    }
    .sidebar nav a.active {
        background-color: color-mix(in srgb, var(--accent) 45%, var(--surface-2));
        border-left: 3px solid var(--brand);
    }
    .sidebar-footer {
        font-size: 11px;
        line-height: 2;
    }
    .main-content,
    .teams-main {
        margin-left: 270px;
        width: calc(100% - 270px);
        box-sizing: border-box;
    }
}
.insight-card p {
    margin: 0 0 10px;
    line-height: 1.5;
}
.insight-card h4 {
    margin: 0 0 16px;
}
.insight-card .recommendation-label {
    display: block;
    margin: 0 0 6px;
    line-height: 1.4;
}
.insight-card .recommendation-text {
    margin: 0;
    line-height: 1.5;
}


/* ===== PLAYER STATISTICS: Key Insights panel + grid ===== */

.player-stats-page .insights-section {
    clear: both;
    width: 100%;
    min-width: 0;
    margin-top: 16px;
    padding: 20px 22px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.player-stats-page .insights-section h2 {
    margin: 0 0 16px;
    font-size: 17px;
    line-height: 1.3;
    color: #eaf2ff;
}

.player-stats-page .insights-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .player-stats-page .insights-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .player-stats-page .insights-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== PLAYER COMPARISON PAGE ===== */

.comparison-page {
    --field-h: 48px;   /* one height shared by the search bar and both filters */
    background-color: var(--bg);
    color: #eaf2ff;
}
.comparison-page .comparison-main {
    padding: 28px 30px;
    min-width: 0;
}
.comparison-page section { margin-bottom: 0; }
.comparison-page .topbar {
    align-items: flex-start;
    margin-bottom: 22px;
}
.comparison-page .topbar .sub {
    color: #91abc9;
    font-size: 13px;
    margin-bottom: 14px;
}
.comparison-page .topbar h3 {
    font-size: 15px;
    color: #eaf2ff;
}


/* ---------- Search bar ---------- */
.comparison-page .search-wrap {
    position: relative;
    width: 380px;
    max-width: 100%;
}
.comparison-page .search-wrap input {
    width: 100%;
    height: var(--field-h);
    padding: 0 12px 0 36px;
    background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2391abc9' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    color: #eaf2ff;
    font-size: 12px;
    outline: none;
}
.comparison-page .search-wrap input::placeholder { color: #91abc9; }
.comparison-page .search-wrap input:focus { border-color: #168ceb; }
.comparison-page .search-results {
    position: absolute;
    top: calc(var(--field-h) + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    max-height: 340px;
    overflow-y: auto;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.comparison-page .search-results li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #173858;
}
.comparison-page .search-results li:last-child { border-bottom: 0; }
.comparison-page .search-results li:hover,
.comparison-page .search-results li.active { background: var(--row-hover); }
.comparison-page .search-results .av { width: 32px; height: 32px; font-size: 11px; border-width: 1px; }
.comparison-page .search-results b { display: block; font-size: 12px; color: #eaf2ff; }
.comparison-page .search-results small { font-size: 10px; color: #91abc9; }
.comparison-page .search-results .tag { margin-left: auto; font-size: 10px; color: #35c5f4; }
.comparison-page .search-results li.added { opacity: 0.5; cursor: default; }
.comparison-page .search-results li.empty { color: #91abc9; font-size: 11px; cursor: default; }

/* ---------- Player chips ---------- */
.comparison-page .chips { display: flex; gap: 16px; margin-bottom: 16px; }
.comparison-page .chip {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    cursor: pointer;
}
.comparison-page .chip.focus { border-color: #35c5f4; }
.comparison-page .chip b {
    display: block;
    font-size: 15px;
    margin-bottom: 5px;
    color: #eaf2ff;
}
.comparison-page .chip small { color: #91abc9; font-size: 11px; }
.comparison-page .chip .x {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: #91abc9;
    font-size: 13px;
    cursor: pointer;
}
.comparison-page .chip .x:hover { color: #35c5f4; }
.comparison-page .av {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid #35c5f4;
    font-size: 17px;
    font-weight: bold;
}
.comparison-page .add {
    width: 170px;
    border: none;
    border-radius: 6px;
    background: #168ceb;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.comparison-page .add:hover { background: #35c5f4; }

/* ---------- Cards + rows ---------- */
.comparison-page .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    min-width: 0;
}
.comparison-page .card h2 {
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 16px;
    color: #eaf2ff;
}
.comparison-page .row { display: grid; gap: 16px; margin-bottom: 16px; }
.comparison-page .r1 { grid-template-columns: 1fr 1.22fr 1.2fr; min-height: 330px; }
.comparison-page .r2 { grid-template-columns: 1fr 1fr 1fr; min-height: 310px; }
.comparison-page .cv { position: relative; height: 230px; }

/* ---------- Player overview ---------- */
.comparison-page .ov-head { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }
.comparison-page .ov-head .av { width: 80px; height: 80px; font-size: 24px; }
.comparison-page .ov-head b { display: block; font-size: 15px; margin-bottom: 5px; color: #eaf2ff; }
.comparison-page .ov-head small { color: #91abc9; font-size: 11px; }
.comparison-page .ov-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 4px;
    border-bottom: 1px solid #173858;
    font-size: 11px;
    color: #91abc9;
}
.comparison-page .ov-row b { width: auto; font-size: 11px; color: #35c5f4; }

/* ---------- Key stats table ---------- */
.comparison-page .ks { display: grid; gap: 7px; margin-top: 6px; }
.comparison-page .ks .lab {
    height: 37px;
    display: grid;
    place-items: center;
    background: var(--row-hover);
    color: #dcecff;
    font-weight: 700;
    font-size: 10px;
    border-radius: 4px;
}
.comparison-page .ks .val {
    height: 37px;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    border: 1px solid #1a4165;
    color: #d9e8f7;
    font-size: 13px;
    border-radius: 7px;
}
.comparison-page .ks .val.top { color: #35c5f4; font-weight: 700; }
.comparison-page .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}


/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .comparison-page .r1,
    .comparison-page .r2 { grid-template-columns: 1fr; min-height: 0; }
    .comparison-page .card .cv { height: 280px; }
    .comparison-page .ins-grid { grid-template-columns: repeat(2, 1fr); }
    .comparison-page .chips { flex-wrap: wrap; }
    .comparison-page .chip { flex: 1 1 220px; }
    .comparison-page .add { height: 48px; }
}
@media (max-width: 650px) {
    .comparison-page .comparison-main { padding: 20px 14px; }
    .comparison-page .filters { flex-wrap: wrap; }
    .comparison-page .filter { width: 100%; }
    .comparison-page .ins-grid { grid-template-columns: 1fr; }
}




/* =====================================================================
   PLAYER HEADSHOTS (circular avatars)
   Keeps each photo clipped inside its circle. Sizes are overridden
   per location below, so adjust them here.
   ===================================================================== */
:root {
  --headshot-zoom: 1.4;        /* 1 = no zoom, 1.1 = slight, 1.3 = strong */
}

.av {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;            /* clips the zoomed photo to the circle */
  background: #2b2f3600;
}

.av img.player-headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* fills the circle without stretching */
  object-position: center top; /* keeps faces in frame */
  transform: scale(var(--headshot-zoom));
  transform-origin: center center;
  display: block;
}

/* Per-location sizes (adjust or delete as needed) */
.ov-head .av { width: 56px; height: 56px; }
#searchResults .av { width: 32px; height: 32px; }

/* Dashboard (index.html) */
.hm-mhead .av { width: 44px; height: 44px; }   /* Player Comparison cards */
.av-sm { width: 26px; height: 26px; }          /* Recent Player Stats table */
.hm-nmwrap { display: inline-flex; align-items: center; gap: 8px; }

.profile-avatar {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;            /* clips the zoomed photo to the circle */
  background: #2b2f3600;
  padding: 0;
}

.profile-avatar img.player-headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;           /* fills the circle without stretching */
  object-position: center top; /* keeps faces in frame */
  transform: scale(var(--headshot-zoom));
  transform-origin: center center;
  display: block;
}
/* =========================================
   COURTIQ COMMUNITY FORUM
========================================= */

.forum-page {
    background: var(--bg);
}

.forum-main {
    width: calc(100% - var(--sidebar-w));
    min-height: 100vh;
    padding: 35px 40px;
}

.forum-header {
    margin-bottom: 30px;
}

.forum-eyebrow {
    color: var(--accent-cyan);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.forum-header h1 {
    font-size: 30px;
    margin-bottom: 9px;
}

.forum-subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* Main layout */

.forum-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 25px;
    align-items: start;
}

.forum-feed {
    min-width: 0;
}

/* Shared cards */

.forum-create-card,
.forum-post-card,
.forum-info-card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 23px;
    margin-bottom: 20px;
}

.forum-create-heading h2,
.forum-feed-controls h2 {
    font-size: 18px;
    margin-bottom: 7px;
}

.forum-create-heading p,
.forum-feed-controls p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 17px;
}

/* Buttons */

.forum-primary-btn,
.forum-secondary-btn {
    border: none;
    border-radius: 7px;
    padding: 11px 17px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.forum-primary-btn {
    background: var(--accent);
    color: white;
}

.forum-primary-btn:hover {
    background: #0875df;
}

.forum-secondary-btn {
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    color: var(--text);
}

.forum-primary-btn:disabled,
.forum-secondary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form */

.forum-post-form {
    margin-top: 22px;
    border-top: 1px solid var(--border-soft);
    padding-top: 20px;
}

.forum-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 17px;
}

.forum-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.forum-form-group input,
.forum-form-group select,
.forum-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.forum-form-group input:focus,
.forum-form-group select:focus,
.forum-form-group textarea:focus {
    border-color: var(--accent);
}

.forum-form-group textarea {
    resize: vertical;
}

.forum-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Feed controls */

.forum-feed-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 30px 0 17px;
}

.forum-control-row {
    display: flex;
    gap: 10px;
}

.forum-control-row select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    padding: 10px;
    font-size: 12px;
}

/* Post cards */

.forum-post-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.forum-category {
    background: rgba(22, 140, 255, 0.13);
    color: var(--accent-cyan);
    border: 1px solid rgba(22, 140, 255, 0.25);
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 700;
}

.forum-post-date {
    color: var(--text-muted);
    font-size: 11px;
}

.forum-post-author {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 17px;
}

.forum-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    color: var(--accent-cyan);
    font-weight: 700;
}

.forum-post-author strong,
.forum-post-author span {
    display: block;
}

.forum-post-author strong {
    font-size: 13px;
}

.forum-post-author span {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 4px;
}

.forum-post-title {
    font-size: 18px;
    margin-bottom: 11px;
}

.forum-post-content {
    color: #c4d3e7;
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.forum-reference {
    display: inline-block;
    margin: 13px 7px 0 0;
    padding: 6px 10px;
    background: var(--surface-2);
    border-radius: 6px;
    color: var(--accent-cyan);
    font-size: 11px;
}

/* Post actions */

.forum-post-actions {
    display: flex;
    gap: 20px;
    border-top: 1px solid var(--border-soft);
    margin-top: 20px;
    padding-top: 15px;
}

.forum-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
}

.forum-action-btn:hover,
.forum-action-btn.is-liked {
    color: var(--accent-cyan);
}

.forum-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Comments */

.forum-comments-container {
    margin-top: 20px;
    border-top: 1px solid var(--border-soft);
    padding-top: 18px;
}

.forum-comments-list h4 {
    font-size: 14px;
    margin-bottom: 15px;
}

.forum-comment {
    background: var(--surface-2);
    border-radius: 8px;
    padding: 13px;
    margin-bottom: 10px;
}

.forum-comment strong {
    font-size: 12px;
}

.forum-comment p {
    color: #c4d3e7;
    font-size: 12px;
    line-height: 1.6;
    margin: 7px 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.forum-comment small {
    color: var(--text-muted);
    font-size: 10px;
}

.forum-no-comments {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 15px;
}

.forum-comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.forum-comment-form input,
.forum-comment-form textarea {
    width: 100%;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    border-radius: 7px;
    color: var(--text);
    padding: 11px;
    font-family: inherit;
    font-size: 12px;
}

.forum-comment-form button {
    align-self: flex-end;
}

/* Community sidebar */

.forum-info-card h3 {
    font-size: 15px;
    margin-bottom: 12px;
}

.forum-info-card p,
.forum-info-card li {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.8;
}

.forum-info-card ul {
    padding-left: 18px;
}

/* Loading and empty states */

.forum-loading,
.forum-empty-state {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 35px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.forum-empty-state h3 {
    color: var(--text);
    margin-bottom: 9px;
}

.forum-error {
    color: #ff8a9a;
    font-size: 12px;
}

/* Responsive layout */

@media (max-width: 1050px) {
    .forum-layout {
        grid-template-columns: 1fr;
    }

    .forum-community-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }
}

@media (max-width: 700px) {
    .forum-main {
        padding: 25px 18px;
    }

    .forum-feed-controls {
        align-items: flex-start;
        flex-direction: column;
    }

    .forum-control-row {
        width: 100%;
        flex-wrap: wrap;
    }

    .forum-control-row select {
        flex: 1;
        min-width: 0;
    }

    .forum-community-sidebar {
        grid-template-columns: 1fr;
    }

    .forum-post-top {
        align-items: flex-start;
        flex-direction: column;
    }
}


.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.profile-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0;
}


/* ===== PLAYER STATISTICS STYLING ===== */
.player-stats-page .stats-note {
    color: #91abc9;
    font-size: 11px;
    line-height: 1.5;
    margin-top: 6px;
    max-width: 900px;
}

.player-stats-page .profile-summary {
    color: #c4d3e7;
    font-size: 12px;
    line-height: 1.6;
    margin: -4px 0 14px;
}

.player-stats-page .player-stats-table th[data-sort] {
    cursor: pointer;
    user-select: none;
}

.player-stats-page .player-stats-table th[data-sort]:hover,
.player-stats-page .player-stats-table th.sorted {
    color: #eaf2ff;
}

.player-stats-page .player-stats-table th[data-arrow]::after {
    content: " " attr(data-arrow);
    font-size: 8px;
    color: #35c5f4;
}

.player-stats-page .stat-glossary {
    margin-top: 18px;
    padding: 16px 19px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
}

.player-stats-page .stat-glossary summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: #eaf2ff;
}

.player-stats-page .stat-glossary dl {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px 14px;
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.5;
}

.player-stats-page .stat-glossary dt {
    color: #35c5f4;
    font-weight: 700;
}

.player-stats-page .stat-glossary dd {
    color: #91abc9;
    margin: 0;
}

/* TEAM LOGOS */
#teamMark .team-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#teamMark {
  width: 80px;
  height: 80px;
}

/* =====================================================================
   TOP NAVIGATION BAR (replaces the sidebar)
   ===================================================================== */
:root {
    --bar-h: 72px;
}

/* The sidebar is no longer used */
.sidebar {
    display: none !important;
}

body {
    padding-top: var(--bar-h);
}

/* Pages use the full width now that the sidebar is gone */
.main-content,
.player-stats-content,
.teams-main,
.comparison-main,
.home-main,
.forum-main {
    margin-left: 0 !important;
    width: 100% !important;
}

.app-bar {
    display: flex;
    align-items: center;
    gap: 28px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--bar-h);
    padding: 0 24px;
    background: var(--bg);
    border-bottom: none;
    box-shadow: none;
    z-index: 120;
}

/* Logo + lettering */
.app-bar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: #fff;
    text-decoration: none;
}
.app-bar-logo-img {
    height: 44px;                 /* change this to resize the logo */
    width: auto;
    display: block;
}
.app-bar-text {
    display: flex;
    flex-direction: column;
}
.app-bar-text strong {
    font-size: 28px;
    line-height: 1;
    letter-spacing: 1px;
}
.app-bar-text strong span {
    color: var(--brand);
}
.app-bar-text small {
    margin-top: 5px;
    font-size: 10px;
    letter-spacing: 3px;
    color: #9da8ba;
}

/* Page links */
.app-bar-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;           /* pushes the buttons to the right */
}


/* Basketball-inspired navigation links */

.app-bar-link {
    position: relative;
    padding: 12px 16px;
    border-radius: 6px;
    color: #b9c1cf;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: color 0.25s ease,
                background 0.25s ease;
}

/* Hardwood-inspired orange court line */
.app-bar-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #f07845;
    border-radius: 3px;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

/* Hover */
.app-bar-link:hover {
    color: #ffffff;
    background: rgba(240, 120, 69, 0.10);
}

.app-bar-link:hover::after {
    width: 65%;
}

/* Active page */
.app-bar-link.active {
    color: #ffffff;
    background: rgba(240, 120, 69, 0.14);
}

.app-bar-link.active::after {
    width: 65%;
    background: #f07845;
}

/* Keyboard accessibility */
.app-bar-link:focus-visible {
    outline: 2px solid #f07845;
    outline-offset: 3px;
}

.app-bar-brand:focus-visible,
.app-bar-menu:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* Three-dash button: hidden on wide screens */
.app-bar-menu {
    display: none;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #b9c1cf;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.app-bar-menu:hover {
    background: #293349;
    color: #fff;
}

/* Narrow screens: links move into a dropdown opened by the three dashes */
@media (max-width: 1100px) {
    .app-bar {
        gap: 14px;
        padding: 0 16px;
    }
    .app-bar-menu {
        display: grid;
    }
    .app-bar-nav {
        margin-left: 0; 
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 16px;
        background: var(--surface);
        border-bottom: 1px solid var(--border-soft);
    }
    .app-bar.open .app-bar-nav {
        display: flex;
    }
}

/* =====================================================================
   TEAM LOGO STRIP
   Colours come from the :root variables in style.css (--brand,
   --accent-cyan), which applySiteTheme() overrides per team.
   ===================================================================== */

.team-strip {
    position: relative;
    margin: 0 0 16px;
}

/* Horizontal scrolling track */
.team-strip-track {
    display: flex;
    gap: 14px;
    padding: 8px 4px 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.team-strip-track::-webkit-scrollbar {
    display: none;
}

.team-strip-track:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
    border-radius: 14px;
}


/* Team cards (no boxes: just logo + name) */
.team-card {
    position: relative;
    flex: 0 0 132px;
    height: 170px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 13px;

    padding: 14px 10px;

    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: center;

    scroll-snap-align: start;

    background: none;
    border: none;
    box-shadow: none;
}

/* Underline accent, only shown for the selected team */
.team-card::before {
    content: "";
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 40px;
    height: 3px;
    transform: translateX(-50%);
    border-radius: 2px;

    background: linear-gradient(
        90deg,
        var(--brand),
        var(--accent-cyan)
    );

    opacity: 0;
    transition: opacity 0.25s ease;
}

.team-card.selected::before {
    opacity: 1;
}

/* Logo */
.team-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;

    /* Grow upward so the logo doesn't cover the name */
    transform-origin: center bottom;
    transition: transform 0.25s ease;
}

/* Team name under the logo */
.team-card span {
    max-width: 100%;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.01em;
    color: #b9c7d6;               /* default name color */

    /* Long names wrap to 2 lines, then ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;

    transition: color 0.25s ease;
}

/* Hover: logo grows, name takes the accent colour */
.team-card:hover img {
    transform: scale(1.60);
}

.team-card:hover span {
    color: var(--accent-cyan);
}

/* Pressed and selected: logo grows a bit, name takes the brand colour */
.team-card:active img,
.team-card.selected img {
    transform: scale(1.75);
}

.team-card:active span,
.team-card.selected span {
    color: var(--brand);
}


/* Keyboard accessibility */
.team-card:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
}

/* Left / right arrows */
.team-strip-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;

    display: grid;
    place-items: center;

    width: 36px;
    height: 36px;
    padding: 0;

    background: var(--surface-2);
    border: 1px solid #315473;
    border-radius: 50%;

    color: #ffffff;
    font-size: 21px;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}

.team-strip-btn.prev {
    left: -7px;
}

.team-strip-btn.next {
    right: -7px;
}

.team-strip-btn:hover:not(:disabled) {
    background: var(--brand);
    border-color: var(--brand);
    transform: translateY(-50%) scale(1.08);
}

.team-strip-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.team-strip-btn:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* Smaller screens */
@media (max-width: 768px) {
    .team-strip-track {
        gap: 10px;
    }

    .team-card {
        flex-basis: 112px;
        height: 145px;
        gap: 10px;
    }

    .team-card img {
        width: 72px;
        height: 72px;
    }

    .team-card span {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .team-card::before,
    .team-card img,
    .team-card span,
    .team-strip-btn {
        transition: none;
    }
}





/* ===== TEAM THEME OVERRIDES (VERY BOTTOM) ===== */
.app-bar-text strong span,
.logo h2 span { color: var(--brand); }

.app-bar-link::after,
.app-bar-link.active::after { background: var(--brand); }
.app-bar-link:hover,
.app-bar-link.active { background: color-mix(in srgb, var(--brand) 14%, transparent); }
.app-bar-link:focus-visible { outline-color: var(--brand); }

.home-page .hm-filter select:focus,
.home-page .hm-search input:focus,
.home-page .hm-pill:hover { border-color: var(--accent-cyan); }

.home-page .hm-link,
.home-page .hm-table td.tm { color: var(--accent-cyan); }

.home-page .hm-mini { border-left-color: var(--accent); }
.home-page .hm-av,
.home-page .hm-iic { border-color: var(--accent-cyan); }
.home-page .hm-tag { color: var(--accent-cyan); border-color: var(--accent); }

/* =====================================================================
   style-fix.css  -  restores layout rules that style.css still refers to
   but no longer defines.

   Paste at the bottom of style.css, OR link after style.css/insights.css.

   NOTE: the comparison page already styles its own toolbar and filters
   (inline <style> + player-comparison.css), so nothing for those is
   included here on purpose.
   ===================================================================== */

/* ---------- Comparison page: insights grid ---------- */
/* base is 4 columns; style.css media queries already drop it to 2 / 1 */
.comparison-page .ins-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

/* ---------- Home page: extra card rows ---------- */
.home-page .r-c { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-page .r-d { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 1100px) {
    .home-page .hm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-page .r-a,
    .home-page .r-b,
    .home-page .r-c { grid-template-columns: minmax(0, 1fr); }
    .home-page .hm-cmp { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 650px) {
    .home-page .hm-top { flex-direction: column; }
    .home-page .hm-filters { flex-wrap: wrap; justify-content: flex-start; }
    .home-page .hm-stats { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Insight cards: never overflow their cell ---------- */
.hm-ins { width: 100%; }
.hm-ins p,
.hm-ins strong { overflow-wrap: anywhere; }

/* Teams page: interactive chart points and shooting heatmap */
.teams-page #panel-statistics .team-chart-point {
  cursor: pointer;
  outline: none;
}

.teams-page #panel-statistics .team-chart-point circle {
  stroke: #fff;
  stroke-width: 1;
  transition: r 0.15s ease, filter 0.15s ease;
}

.teams-page #panel-statistics .team-chart-point:hover circle,
.teams-page #panel-statistics .team-chart-point:focus circle {
  r: 6;
  filter: brightness(1.25);
}

.teams-page #panel-statistics .heatmap .heat-cell {
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: help;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.teams-page #panel-statistics .heatmap .heat-cell:hover {
  position: relative;
  z-index: 2;
  transform: scale(1.07);
  filter: brightness(1.18);
}