/* ══════════════════════════════════════════
   NBA Analytics — Black & Orange theme
   ══════════════════════════════════════════ */

:root {
    --bg-1: #0a0a0a;
    --panel: #111111;
    --panel-2: #1a1a1a;
    --muted: #777777;
    --muted-light: #999999;
    --accent: #FF6B00;
    --accent-glow: rgba(255, 107, 0, 0.18);
    --good: #34a853;
    --good-bright: #43b864;
    --bad: #ff4d4d;
    --border: #262626;
    --border-light: #333333;
    --text: #d4d4d4;
    --text-bright: #f0f0f0;
    --radius: 8px;
    --radius-sm: 12px;
    --radius-xs: 8px;
}

* { box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
    background: var(--bg-1);
    color: var(--text);
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body > *:not(.navbar) {
    width: 100%;
    max-width: 1100px;
    padding-left: 16px;
    padding-right: 16px;
}

body > *:not(.navbar):first-of-type {
    margin-top: 20px;
}

/* ── Custom scrollbar ─────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #4a5268; }

/* ── Navbar ───────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.navbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 16px;
    flex-wrap: nowrap;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-bright);
    transition: opacity 0.15s;
    flex-shrink: 0;
    white-space: nowrap;
}

.navbar-brand:hover { opacity: 0.8; }

.navbar-logo {
    height: 32px;
    width: 32px;
    border-radius: var(--radius-xs);
    object-fit: contain;
}

.navbar-brand span {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* ── Search (inside navbar) ────────────── */
.search-form {
    margin: 0;
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 600px;
    margin-left: auto;
}

.search-form input {
    height: 34px;
    padding: 0 14px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text-bright);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    flex: 1;
    min-width: 0;
    font-family: inherit;
}

.search-form input::placeholder {
    color: var(--muted);
}

.search-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-form button {
    height: 34px;
    padding: 0 16px;
    border-radius: var(--radius-xs);
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    letter-spacing: 0.2px;
    transition: background 0.15s;
    flex-shrink: 0;
    font-family: inherit;
}

.search-form button:hover {
    background: #ff8533;
}

.search-input-wrap {
    position: relative;
    display: flex;
    flex: 1;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel-2);
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: 100;
    display: none;
    max-height: 280px;
    overflow-y: auto;
}

.search-suggestions.active { display: block; }

.search-suggestion {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    transition: background 0.1s;
}

.search-suggestion:hover,
.search-suggestion.selected {
    background: var(--accent-glow);
    color: #fff;
}

/* ── Card base ─────────────────────────── */
.card {
    background: var(--panel);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: 100%;
}

.card h3 { margin: 0 0 10px 0; color: var(--accent); }
.card h2 { margin: 0 0 16px 0; font-size: 24px; color: #fff; font-weight: 800; }

/* ── Page layout (sidebar + main) ──────── */
.page-layout {
    display: flex;
    gap: 24px;
    width: 100%;
    margin-top: 20px;
}

.page-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-main > .props-card,
.page-main > .games_today-card {
    margin-bottom: 0;
}

/* ── Sidebar ───────────────────────────── */
.team-sidebar {
    width: 224px;
    flex-shrink: 0;
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 16px;
    align-self: flex-start;
    overflow-y: auto;
    max-height: calc(100vh - 6rem);
    position: sticky;
    top: 72px;
}

.sidebar-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding-bottom: 8px;
}

.team-players-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}


.team-player-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 500;
    color: var(--muted-light);
    transition: all 0.15s;
    cursor: pointer;
}

.teammate-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.ww-btns {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.ww-btn {
    font-size: 13px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    background: var(--panel-2);
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    transition: all 0.12s;
    padding: 0;
}

.ww-btn:hover {
    color: var(--text);
    background: var(--border-light);
}

.ww-btn.ww-with.active {
    background: rgba(52, 168, 83, 0.18);
    color: var(--good);
}

.ww-btn.ww-without.active {
    background: rgba(255, 77, 77, 0.18);
    color: var(--bad);
}

.ww-btn.ww-with:hover {
    background: rgba(52, 168, 83, 0.22);
    color: var(--good);
}

.ww-btn.ww-without:hover {
    background: rgba(255, 77, 77, 0.22);
    color: var(--bad);
}

.filter-badge {
    margin-left: 0.6rem;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: var(--radius-xs);
    font-weight: 600;
}

.filter-badge.filter-with {
    background: rgba(52, 168, 83, 0.12);
    border: 1px solid var(--good);
    color: var(--good);
}

.filter-badge.filter-without {
    background: rgba(255, 77, 77, 0.12);
    border: 1px solid var(--bad);
    color: var(--bad);
}

.team-player-item:hover {
    background: var(--panel-2);
    color: var(--text);
}

.team-player-item.active {
    background: rgba(255, 107, 0, 0.12);
    color: var(--accent);
    font-weight: 600;
}

/* Legacy — kept for compatibility */
.player-main-content {
    flex: 1;
    min-width: 0;
}

/* ── Main player card ──────────────────── */
.main-card {
    padding: 24px;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.player-info h2 {
    margin: 0;
    font-size: 22px;
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.player-position {
    margin: 4px 0 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.player-stats-top {
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-align: right;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ── Stats + controls row ──────────────── */
.stats-and-controls-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-bottom: 16px;
    width: 100%;
}

/* Quick stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    flex: 1;
    background: var(--panel-2);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.quick-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.quick-stat:last-child {
    border-right: none;
}

.qs-label {
    font-size: 10px;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.qs-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-bright);
}

/* Range controls */
.range-controls {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: var(--panel-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    align-items: center;
}

.range-controls button {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.15s;
    font-family: inherit;
}

.range-controls button:hover {
    color: var(--text);
    background: var(--panel);
}

.range-controls button.active {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

/* ── Chart card ────────────────────────── */
.chart-card {
    padding: 20px;
}

/* ── Chart section ─────────────────────── */

.chart-section {
    margin-bottom: 8px;
}

.chart-container {
    max-width: 100%;
    height: 280px;
    margin: 4px 0 0 0;
    background: transparent;
    padding: 0 4px;
    overflow: visible;
}

/* ── Mini tracking charts ─────────────── */
.mini-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.mini-chart-card {
    padding: 14px;
}

.mini-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mini-chart-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
}

.mini-chart-avg {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted-light);
}

.mini-chart-container {
    max-width: 100%;
    height: 150px;
}

/* ── Line controls ─────────────────────── */
.line-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    padding: 6px 0;
    flex-wrap: wrap;
}

.line-controls button {
    background: var(--panel);
    border: none;
    color: var(--text);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.12s;
}

.line-controls button:hover {
    background: var(--border-light);
    color: #fff;
}

.line-controls span {
    color: var(--muted-light);
    font-size: 14px;
    font-weight: 500;
}

.line-controls strong {
    color: var(--text-bright);
    font-weight: 700;
}

/* ── Win rate indicators ───────────────── */
.win-rate-indicators {
    display: flex;
    gap: 10px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.win-rate-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    min-width: 56px;
    text-align: center;
    border: 1px solid transparent;
    transition: transform 0.15s;
    cursor: default;
}

.win-rate-item:hover {
    transform: scale(1.05);
}

/* Dynamic win-rate colors */
.win-rate-item.wr-good {
    background: rgba(52, 168, 83, 0.12);
    border-color: rgba(52, 168, 83, 0.3);
}

.win-rate-item.wr-good .win-rate-value,
.win-rate-item.wr-good .win-rate-label,
.win-rate-item.wr-good .win-rate-detail {
    color: var(--good);
}

.win-rate-item.wr-mid {
    background: rgba(255, 107, 0, 0.12);
    border-color: rgba(255, 107, 0, 0.3);
}

.win-rate-item.wr-mid .win-rate-value,
.win-rate-item.wr-mid .win-rate-label,
.win-rate-item.wr-mid .win-rate-detail {
    color: var(--accent);
}

.win-rate-item.wr-bad {
    background: rgba(255, 77, 77, 0.12);
    border-color: rgba(255, 77, 77, 0.3);
}

.win-rate-item.wr-bad .win-rate-value,
.win-rate-item.wr-bad .win-rate-label,
.win-rate-item.wr-bad .win-rate-detail {
    color: var(--bad);
}

.win-rate-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.85;
}

.win-rate-value {
    font-size: 22px;
    font-weight: 800;
}

.win-rate-detail {
    font-size: 10px;
    opacity: 0.65;
}

/* ── Stat buttons row ──────────────────── */
.stat-buttons-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.stat-buttons-row button {
    background: var(--panel-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.12s;
    font-family: inherit;
}

.stat-buttons-row button:hover {
    color: var(--text);
    background: var(--border-light);
}

.stat-buttons-row button.active {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    border-color: var(--accent);
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.3);
}

/* ── Props table ────────────────────────── */
.props-card {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    width: 100%;
    overflow: hidden;
}

.props-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.props-header-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.props-header h2 {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0;
}

.props-game-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--panel-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 8px 32px 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7f8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.props-game-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.props-stat-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.props-stat-tabs button {
    background: var(--panel-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: all 0.12s;
    font-family: inherit;
}

.props-stat-tabs button:hover {
    color: var(--text);
    background: var(--border-light);
}

.props-stat-tabs button.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.3);
}

#props-table-wrap {
    overflow-x: auto;
}

.props-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.props-table thead th {
    padding: 10px 12px;
    text-align: left;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    user-select: none;
}

.props-table thead th:not(:first-child) { text-align: center; }

.props-table thead th.sortable { cursor: pointer; }
.props-table thead th.sortable:hover { color: var(--text); }
.props-table thead th.sort-desc::after { content: " \2193"; color: var(--accent); }
.props-table thead th.sort-asc::after  { content: " \2191"; color: var(--accent); }

.props-table tbody tr.props-row {
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.1s;
}

.props-table tbody tr.props-row:hover {
    background: rgba(30, 35, 48, 0.5);
}

.props-table td {
    padding: 10px 12px;
    vertical-align: middle;
    white-space: nowrap;
}

.player-cell { min-width: 160px; }

.player-link {
    font-weight: 600;
    color: var(--text-bright);
    font-size: 14px;
    display: block;
}

.matchup-label {
    font-size: 10px;
    color: var(--muted);
    display: block;
    margin-top: 2px;
}

.line-cell {
    font-weight: 700;
    color: #fff;
    font-size: 14px;
    text-align: center;
}

.odds-cell {
    text-align: center;
    color: var(--muted-light);
    font-size: 12px;
    font-family: 'Inter', monospace;
}

.streak-cell {
    text-align: center;
    font-weight: 700;
    font-size: 13px;
}

.streak-hot  { color: var(--good); }
.streak-cold { color: var(--bad); }

/* Heatmap-style percentage cells */
.pct-cell {
    text-align: center;
    padding: 6px 4px;
}

.pct-pill {
    display: inline-block;
    width: 52px;
    padding: 5px 0;
    border-radius: var(--radius-xs);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.pct-pill.heat-5 { background: rgba(52, 168, 83, 0.5); color: #fff; }
.pct-pill.heat-4 { background: rgba(52, 168, 83, 0.22); color: var(--text); }
.pct-pill.heat-3 { background: var(--panel-2); color: var(--text); }
.pct-pill.heat-2 { background: rgba(255, 77, 77, 0.22); color: var(--text); }
.pct-pill.heat-1 { background: rgba(255, 77, 77, 0.45); color: #fff; }
.pct-pill.heat-0 { background: var(--panel-2); color: var(--muted); }

/* ── Today's games ─────────────────────── */
.games_today-card {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    width: 100%;
}

.games_today-card h2 {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0 0 16px 0;
    text-align: left;
}

.today-games {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.today-games li {
    padding: 12px 14px;
    background: var(--panel-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.today-games li:hover {
    border-color: rgba(255, 107, 0, 0.3);
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.06);
}

.today-games li .away-team { text-align: left; }

.today-games li .away-team strong,
.today-games li .home-team strong {
    color: var(--text-bright);
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
}

.today-games li .home-team { text-align: right; }
.today-games li .home-team strong { justify-content: flex-end; }

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

.today-games li .time-display {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
}

.today-games li .status {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

/* ── Misc / hidden elements ────────────── */
.player-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.player-left { display: none; }
.player-right { display: none; }
.avatar img { width: 64px; height: 64px; border-radius: var(--radius-xs); object-fit: cover; border: 1px solid var(--border); }
.player-meta h2 { margin: 0; font-size: 24px; }
.player-meta .player-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.avg-badge { background: var(--panel-2); padding: 8px 12px; border-radius: var(--radius-xs); color: var(--accent); font-weight: 700; font-size: 15px; }
.filters { display: none; }
.stat-chips { display: none; }
.chip { display: none; }
.chip-sub { display: none; }
.stats-row { display: flex; gap: 12px; margin-top: 14px; }
.stat-pill { padding: 8px 10px; background: var(--panel-2); border-radius: var(--radius-xs); font-weight: 700; }
.error { color: #f87171; margin-top: 15px; width: 100%; font-size: 14px; }

table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th, td { padding: 10px; text-align: center; border-bottom: 1px solid var(--border); }
th { color: var(--accent); font-size: 14px; }
td { font-size: 14px; }

h2, h3 { color: var(--accent); }

/* ── Info bar ─────────────────────────── */
.info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    margin: 20px 0;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.3px;
}

/* ── Responsive ────────────────────────── */
@media (max-width: 1200px) {
    .page-layout {
        flex-direction: column;
        gap: 16px;
    }
    .team-sidebar {
        width: 100%;
        max-height: none;
        position: static;
        border-radius: var(--radius);
    }
    .team-players-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }
    .team-player-item {
        border-radius: var(--radius-xs);
        padding: 6px 10px;
    }
}

@media (max-width: 768px) {
    body > *:not(.navbar) {
        padding-left: 14px;
        padding-right: 14px;
    }

    .navbar-inner {
        padding: 8px 14px;
        flex-wrap: wrap;
        height: auto;
        min-height: 48px;
        gap: 8px;
    }

    .search-form {
        max-width: 100%;
        flex-basis: 100%;
        order: 2;
    }

    .search-form input { height: 36px; font-size: 13px; }

    .search-form button { height: 36px; font-size: 12px; padding: 0 14px; }

    .stats-and-controls-row { flex-direction: column; }

    .quick-stats { gap: 6px; }
    .quick-stat { padding: 8px 4px; }
    .qs-value { font-size: 16px; }

    .range-controls { justify-content: center; }

    .chart-container { height: 240px; }

    .mini-charts-row { grid-template-columns: 1fr; }
    .mini-chart-container { height: 130px; }

    .stat-buttons-row button { padding: 6px 10px; font-size: 11px; }

    .props-card { padding: 14px; border-radius: var(--radius-sm); }

    .props-stat-tabs {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .props-stat-tabs button { flex-shrink: 0; }
    .props-table { font-size: 12px; }
    .props-table thead th, .props-table td { padding: 7px 8px; }
    .player-cell { min-width: 130px; }

    .team-sidebar { padding: 12px; }

    .team-players-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }

    .team-player-item {
        font-size: 12px;
        padding: 6px 6px;
        white-space: nowrap;
        overflow: hidden;
        justify-content: center;
    }

    .teammate-name { font-size: 12px; }
    .ww-btn { width: 20px; height: 20px; font-size: 11px; }
    .sidebar-header { font-size: 11px; margin-bottom: 8px; }

    .today-games { grid-template-columns: 1fr; }

    .player-header { flex-direction: column; gap: 8px; }
    .player-info h2 { font-size: 20px; }
    .stat-value { font-size: 28px; }

    .line-controls { font-size: 14px; gap: 8px; }

    .win-rate-item { padding: 8px 12px; min-width: 48px; }
    .win-rate-value { font-size: 18px; }

    .card, .games_today-card { border-radius: var(--radius-sm); }
}

@media (max-width: 480px) {
    body > *:not(.navbar) { padding-left: 10px; padding-right: 10px; }

    .main-card { padding: 16px; }
    .card { padding: 16px; border-radius: var(--radius-sm); }

    .range-controls button { padding: 5px 10px; font-size: 12px; }

    .stat-buttons-row { gap: 4px; }
    .stat-buttons-row button { padding: 5px 8px; font-size: 11px; }

    .props-card { padding: 12px; }

    .today-games li { padding: 10px 12px; }
    .team-logo { width: 20px; height: 20px; }

    .team-players-list { grid-template-columns: repeat(2, 1fr); }

    .win-rate-item { padding: 6px 10px; }
    .win-rate-value { font-size: 16px; }
}
