/* ============================================================================
   NBA COMPARISON TOOL - STYLESHEET
   Based on NCAAB design with full mobile responsiveness
   ============================================================================ */

/* CSS Variables */
:root {
    --bg-dark: #0f1419;
    --bg-card: #1a1f2e;
    --bg-hover: #242d3d;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --muted: #64748b;
    --border: rgba(255, 255, 255, 0.1);
    --gradient-start: #1a1a2e;
    --gradient-end: #16213e;
}

/* Utility Classes */
.hidden { display: none !important; }

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Page Shell */
.page-shell {
    max-width: 1260px;
    margin: 0 auto;
    padding: 28px 18px 40px;
}

/* Header */
.page-header {
    margin-bottom: 16px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 12px;
    cursor: pointer;
}

.back-link:hover {
    color: var(--accent-hover);
}

.title-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-small {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.nba-logo {
    filter: drop-shadow(0 2px 8px rgba(200, 16, 46, 0.3));
}

.title-block h1 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.5px;
}

.subtitle {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 15px;
}

/* Control Grid */
.matchup-shell {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    margin-bottom: 20px;
    position: sticky;
    top: 10px;
    z-index: 5;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.control {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control.wide {
    grid-column: span 2;
}

.control label {
    display: block;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.control input,
.control select {
    width: 100%;
    padding: 12px 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    height: 48px;
    box-sizing: border-box;
    line-height: normal;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.control input:focus,
.control select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.control input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Game List Section */
.game-list-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    margin-bottom: 18px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.mini-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 12px 0;
}

/* Game Cards */
.game-card {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr minmax(200px, 0.9fr) 1.1fr;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    transition: border 0.2s ease, transform 0.2s ease;
}

.game-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.game-card-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-self: flex-start;
}

.game-card-right {
    align-self: center;
    justify-self: flex-end;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.team-line {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
}

.team-line img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    object-fit: contain;
}

.team-line .name {
    font-weight: 800;
}

.team-line .record {
    color: var(--text-muted);
    font-size: 12px;
}

.game-card-center {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 64px;
}

.game-card-center .meta-chip {
    justify-self: center;
}

.meta-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-chip.muted {
    color: var(--text-muted);
}

.game-card-time {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.game-card-venue {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* Mobile spread - hidden by default, shown on mobile */
.mobile-spread {
    display: none;
}

/* Matchup Detail Section */
.matchup-detail {
    animation: fadeIn 0.3s ease;
}

.matchup-detail.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.detail-header {
    margin-bottom: 20px;
}

/* Tab System */
.tab-container {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.tab-buttons {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border);
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

.tab-explanation {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding: 8px 16px;
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* Comparison Container */
.comparison-container {
    background: transparent;
}

/* Teams Header */
.teams-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(16, 185, 129, 0.12));
    margin-bottom: 16px;
}

.team-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-block:last-child {
    justify-content: flex-end;
}

.team-block:last-child > div {
    text-align: right;
}

.team-logo {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 6px;
    object-fit: contain;
}

.team-name {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 2px;
}

.team-record {
    color: var(--text-muted);
    font-weight: 600;
}

.matchup-center {
    text-align: center;
}

.matchup-center .meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.meta-pill {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-weight: 500;
}
.meta-pill.conference-chip { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.4); color: #d1fae5; }
.meta-pill.non-conference-chip { background: rgba(245, 158, 11, 0.15); border-color: rgba(245, 158, 11, 0.4); color: #fde68a; }
.meta-pill.neutral-chip { background: rgba(16, 185, 129, 0.18); border-color: rgba(16, 185, 129, 0.5); color: #d1fae5; }

/* Coming Soon State */
.coming-soon {
    text-align: center;
    padding: 60px 20px;
}

.coming-soon-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.coming-soon h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.coming-soon p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================================================
   GAME LOGS TAB STYLES
   ============================================================================ */

/* Quick Pulse Section */
.quick-pulse-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.quick-pulse-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    text-align: center;
}

.quick-pulse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.pulse-stat {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.pulse-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.pulse-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Bar Comparison */
.bar-comparison-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bar-stat-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bar-stat-row:last-child {
    border-bottom: none;
}

.bar-stat-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}

.bar-stat-value {
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.bar-stat-value:first-child {
    text-align: right;
}

.bar-stat-value:last-child {
    text-align: left;
}

.bar-stat-value.stat-better {
    color: #10b981;
}

.bar-stat-value.stat-worse {
    color: #ef4444;
}

.bar-stat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.bar-stat-label span {
    min-width: 100px;
    text-align: center;
}

.bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    display: flex;
    overflow: hidden;
}

.bar-fill-away {
    height: 100%;
    background: linear-gradient(90deg, var(--success) 0%, #34d399 100%);
    transition: width 0.3s ease;
}

.bar-fill-home {
    height: 100%;
    background: linear-gradient(90deg, var(--warning) 0%, #fbbf24 100%);
    transition: width 0.3s ease;
}

/* Mobile-only team logos - shown inline with values on mobile */
.mobile-team-logo {
    display: none; /* Hidden on desktop */
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

/* Mobile comparison header - hidden on desktop */
.mobile-comparison-header {
    display: none;
}

/* Visibility classes for responsive design */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* Recent Games */
.recent-games-section {
    margin-bottom: 20px;
}

.recent-games-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    text-align: center;
}

.recent-games-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.recent-games-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-games-column.home-column {
    align-items: flex-end;
}

/* Mini Game Info */
.mini-game-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s ease;
}

.mini-game-info:hover {
    background: rgba(255, 255, 255, 0.03);
}

.mini-game-info.win {
    border-left: 3px solid rgba(16, 185, 129, 0.6);
}

.mini-game-info.loss {
    border-left: 3px solid rgba(239, 68, 68, 0.6);
}

/* Mirrored layout for home team */
.mini-game-home.win {
    border-left: none;
    border-right: 3px solid rgba(16, 185, 129, 0.6);
}

.mini-game-home.loss {
    border-left: none;
    border-right: 3px solid rgba(239, 68, 68, 0.6);
}

.mini-game-home .mini-game-header {
    justify-content: flex-end;
}

.mini-game-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.mini-location {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 18px;
}

.mini-opp {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-rank {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.mini-game-score {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mini-result {
    font-size: 11px;
    font-weight: 800;
}

.mini-result.win {
    color: #10b981;
}

.mini-result.loss {
    color: #ef4444;
}

.mini-scores {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.mini-date {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Mobile Recent Games */
.mobile-recent-games {
    display: none;
}

.mobile-team-games-section {
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

.mobile-team-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-team-header-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.mobile-team-header-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.mobile-team-rank {
    font-size: 11px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.mobile-game-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 8px;
    padding: 10px 12px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-game-row:last-child {
    border-bottom: none;
}

.mobile-game-row.win {
    border-left: 3px solid rgba(16, 185, 129, 0.6);
}

.mobile-game-row.loss {
    border-left: 3px solid rgba(239, 68, 68, 0.6);
}

.mobile-game-date {
    font-size: 11px;
    color: var(--muted);
}

.mobile-game-opponent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mobile-game-location {
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
}

.mobile-game-opp-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.mobile-game-opp-name {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}

.mobile-game-result {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-game-indicator {
    font-size: 12px;
    font-weight: 700;
}

.mobile-game-indicator.win {
    color: var(--success);
}

.mobile-game-indicator.loss {
    color: var(--danger);
}

.mobile-game-score {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

/* H2H Insights */
.h2h-insights {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.h2h-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.h2h-insight-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.h2h-insight-item:last-child {
    border-bottom: none;
}

.h2h-insight-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.team-highlight {
    color: var(--text-primary);
    font-weight: 600;
}

.stat-highlight {
    color: var(--accent);
    font-weight: 700;
}

/* ============================================================================
   RANKINGS TAB STYLES
   ============================================================================ */

.rankings-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 16px;
}

.rankings-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.rankings-tab {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-align: center;
}

.rankings-tab:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
}

.rankings-tab.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.rankings-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.rankings-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.rankings-legend .legend-emoji {
    font-size: 16px;
}

.rankings-legend .legend-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

/* Rankings View Tabs (Last 5 / Home Away / Season) */
.rankings-view-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.rankings-view-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-align: center;
}

.rankings-view-tab:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
}

.rankings-view-tab.active {
    background: rgba(59, 130, 246, 0.3);
    color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.rankings-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rankings-view {
    display: none;
}

.rankings-view.active {
    display: block;
}

.rankings-view table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.rankings-view th {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    padding: 14px 10px;
    text-align: center;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

.rankings-view td {
    padding: 12px 10px;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
    font-size: 15px;
}

.rankings-view tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.rankings-view td:first-child {
    text-align: left;
    font-weight: 500;
    max-width: 140px;
    font-size: 14px;
}

.rankings-view td:last-child {
    text-align: right;
    font-weight: 500;
    max-width: 140px;
    font-size: 14px;
}

.rankings-view td img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    vertical-align: middle;
}

/* Rankings Table (11-column layout) */
.rankings-table {
    width: 100%;
    border-collapse: collapse;
    background: #0f1419;
}

.rankings-table thead {
    background: #1a1f2e;
    border-bottom: 2px solid #2a3f5f;
}

.rankings-table th {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
}

.rankings-table tbody tr {
    border-bottom: 1px solid #1a1f2e;
    transition: background 0.2s ease;
}

.rankings-table tbody tr.even-row {
    background: #0f1419;
}

.rankings-table tbody tr.odd-row {
    background: #141920;
}

/* Zebra striping for paired rows (matching NCAAB) */
.rankings-table tbody tr.pair-light {
    background: rgba(255, 255, 255, 0.02);
}

.rankings-table tbody tr.pair-dark {
    background: rgba(0, 0, 0, 0.3);
}

.rankings-table tbody tr.pair-light:hover {
    background: rgba(255, 255, 255, 0.05);
}

.rankings-table tbody tr.pair-dark:hover {
    background: rgba(0, 0, 0, 0.4);
}

.rankings-table tbody tr:hover {
    background: #1f2937 !important;
}

.rankings-table td {
    padding: 14px 16px;
    font-size: 14px;
    color: #e5e7eb;
}

/* Rankings table column styles */
.rankings-table th.stat-name-col:first-child,
.rankings-table td.stat-name-col:first-child {
    text-align: left;
    font-weight: 500;
    color: #d1d5db;
    width: 18% !important;
}

.rankings-table th.stat-name-col:last-child,
.rankings-table td.stat-name-col:last-child {
    text-align: right;
    font-weight: 500;
    color: #d1d5db;
    width: 18% !important;
}

.rankings-table th.season-col,
.rankings-table td.season-col {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    width: 8% !important;
}

.rankings-table th.away-col,
.rankings-table td.away-col,
.rankings-table th.home-col,
.rankings-table td.home-col {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    width: 7% !important;
}

.rankings-table th.last5-col,
.rankings-table td.last5-col {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    width: 7% !important;
}

.rankings-table th.l5rank-col,
.rankings-table td.l5rank-col {
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    min-width: 110px;
    width: 9% !important;
    white-space: nowrap;
}

.rankings-table th.logo-col,
.rankings-table td.logo-col {
    text-align: center;
    width: 6% !important;
    padding: 8px;
}

.logo-cell-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.team-logo-table {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.advantage-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: 0.9;
}

.even-indicator {
    color: #6b7280;
    font-size: 18px;
    font-weight: 300;
}

/* "ALL" VIEW TABLE STYLES */
.rankings-table-all {
    min-width: 900px;
}

.value-col-sm {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 6px;
    min-width: 55px;
}

.rankings-table-all th.stat-name-col,
.rankings-table-all td.stat-name-col {
    width: 12% !important;
}

.rankings-table-all th.value-col-sm,
.rankings-table-all td.value-col-sm {
    width: 8% !important;
}

.rankings-table-all th.rank-col,
.rankings-table-all td.rank-col {
    width: 10% !important;
    min-width: 80px;
}

.rankings-table-all th.logo-col,
.rankings-table-all td.logo-col {
    width: 8% !important;
}

/* Fixed-width columns for alignment */
.col-matchup {
    display: inline-block;
    width: 20px;
    text-align: center;
    font-size: 12px;
    vertical-align: middle;
}

.col-emoji {
    display: inline-block;
    width: 18px;
    text-align: center;
    font-size: 11px;
    vertical-align: middle;
}

.col-rank {
    display: inline-block;
    width: 48px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    vertical-align: middle;
}

.col-value {
    display: inline-block;
    width: 55px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    vertical-align: middle;
}

.col-arrow {
    display: inline-block;
    width: 16px;
    text-align: center;
    font-family: Arial, sans-serif;
    font-size: 10px;
    color: #6b7280;
    vertical-align: middle;
    line-height: 1;
}

/* Color classes */
.highlight-green {
    color: #10B981;
    font-weight: 600;
}

.highlight-yellow {
    color: #F59E0B;
    font-weight: 600;
}

.highlight-red {
    color: #EF4444;
    font-weight: 600;
}

/* ============================================================================
   ODDS PILLS STYLES
   ============================================================================ */

.odds-pill {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.odds-pill .label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.odds-pill .value {
    font-weight: 800;
}

.game-card-right {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.spread-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

/* ============================================================================
   CARD BLOCKS & SPOT ALERTS STYLES
   ============================================================================ */

.game-logs-v2 {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

.card-title {
    font-size: 12px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: var(--text-muted) !important;
    margin-bottom: 14px !important;
}

/* Spot Alerts Section */
.spot-alerts-section {
    margin-bottom: 16px;
}

.spot-alerts-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: stretch;
}

.spot-alerts-team {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
}

.spot-alerts-team-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.spot-team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.spot-team-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.rest-badge {
    font-size: 11px;
    background: rgba(100, 116, 139, 0.3);
    color: #94a3b8;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.spot-alerts-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
    justify-content: center;
}

.spot-alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 500;
    white-space: nowrap;
}

.spot-alert-hot {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.4);
}

.spot-alert-cold {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.spot-alert-warning {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.spot-alert-good {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.spot-alert-neutral {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.spot-alerts-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    min-width: 50px;
}

.vs-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rest-advantage {
    font-size: 11px;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    white-space: nowrap;
}

/* Half Performance Section */
.half-performance {
    margin-bottom: 16px;
}

/* ============================================================================
   WIN/LOSS BARS & COMPARISON STYLES
   ============================================================================ */

/* Win Percentage Header */
.win-pct-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
}

.win-pct-team-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.win-pct-team-section.right {
    justify-content: flex-end;
}

.win-pct-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.win-pct-team-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.team-rank-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    white-space: nowrap;
}

.win-pct-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.games-count {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Win/Loss Progress Bars */
.win-loss-bars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.wl-bar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wl-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.wl-win-label,
.wl-loss-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.3;
}

.wl-win-label {
    color: #10b981;
}

.wl-loss-label {
    color: #ef4444;
}

.wl-win-label strong,
.wl-loss-label strong {
    font-size: 14px;
    display: block;
    margin-top: 2px;
}

.wl-bar {
    position: relative;
    height: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
}

.wl-win-fill,
.wl-loss-fill {
    height: 100%;
    transition: width 0.6s ease;
}

.wl-win-fill {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.wl-loss-fill {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

/* Comparison Game Rows */
.comparison-game-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.comparison-game-left,
.comparison-game-right {
    min-width: 0;
}

.no-game {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    color: var(--text-muted);
}

/* Bar Stat Visuals */
.bar-stat-visual {
    display: none;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 10px;
}

.bar-fill {
    height: 100%;
    transition: width 0.6s ease;
}

.bar-fill-left {
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
}

.bar-fill-right {
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    margin-left: auto;
}

.bar-fill.bar-better {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.bar-fill.bar-worse {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

/* Bar Team Logo */
.bar-team-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 3px;
}

/* Recent Games Comparison Header */
.recent-games-comparison-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.recent-comparison-team-left,
.recent-comparison-team-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-comparison-team-right {
    justify-content: flex-end;
}

.team-logo-comparison {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.team-name-comparison {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-rank-comparison {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   ============================================================================ */

/* Visibility classes */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* ===== HIDE "ALL" TAB ON TABLET AND SMALLER (1024px and below) ===== */
@media (max-width: 1024px) {
    /* Hide the "All" tab button on mobile/tablet */
    .rankings-tab-all {
        display: none !important;
    }

    /* Hide the "All" view table on mobile/tablet */
    .rankings-view-all {
        display: none !important;
    }

    /* Show "Last 5" view as default when "All" is hidden */
    .rankings-view[data-view="last5"] {
        display: block !important;
    }

    /* Style "Last 5" tab as active when "All" is hidden */
    .rankings-view-tab[data-view="last5"] {
        background: var(--accent) !important;
        color: white !important;
    }
}

/* ===== TABLET / LARGE PHONE (768px and below) ===== */
@media (max-width: 768px) {

    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    /* --- Control Grid / Date Input Fix --- */
    .control-grid {
        gap: 12px;
    }

    .control input,
    .control select {
        height: 44px;
        padding: 10px 12px;
        font-size: 14px;
    }

    .control input[type="date"] {
        height: 44px;
        line-height: 24px;
        -webkit-appearance: none;
        appearance: none;
    }

    /* --- Tab Buttons --- */
    .tab-buttons {
        gap: 6px;
        padding: 4px;
    }

    .tab-button {
        padding: 10px 14px;
        font-size: 12px;
        border-radius: 6px;
    }

    /* --- Tab Explanation Text --- */
    .tab-explanation {
        font-size: 12px;
        padding: 8px 12px;
        margin-bottom: 12px;
    }

    /* --- Rankings Table Mobile --- */
    .rankings-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rankings-table {
        min-width: auto;
        font-size: 11px;
    }

    .rankings-table th,
    .rankings-table td {
        padding: 8px 4px;
        font-size: 11px;
    }

    /* Hide Season columns on mobile */
    .rankings-table th.season-col,
    .rankings-table td.season-col {
        display: none;
    }

    /* Hide Away/Home split columns on mobile */
    .rankings-table th.away-col,
    .rankings-table td.away-col,
    .rankings-table th.home-col,
    .rankings-table td.home-col {
        display: none;
    }

    /* Hide duplicate stat name on right side */
    .rankings-table th.stat-name-col:last-child,
    .rankings-table td.stat-name-col:last-child {
        display: none;
    }

    /* Adjust remaining columns */
    .rankings-table th.stat-name-col:first-child,
    .rankings-table td.stat-name-col:first-child {
        width: auto;
        min-width: 70px;
        font-size: 10px;
        padding: 8px 6px;
    }

    .rankings-table th.last5-col,
    .rankings-table td.last5-col {
        width: auto;
        min-width: 45px;
        font-size: 11px;
        padding: 8px 4px;
    }

    .rankings-table th.l5rank-col,
    .rankings-table td.l5rank-col {
        width: auto;
        min-width: 70px;
        font-size: 10px;
        padding: 8px 2px;
    }

    .rankings-table th.logo-col,
    .rankings-table td.logo-col {
        width: auto;
        min-width: 50px;
        padding: 6px 4px;
    }

    .rankings-table .team-logo-table {
        width: 20px;
        height: 20px;
    }

    .rankings-table .advantage-logo {
        width: 24px;
        height: 24px;
    }

    /* Fixed-width column spans */
    .col-matchup {
        width: 16px;
        font-size: 10px;
    }

    .col-emoji {
        width: 14px;
        font-size: 9px;
    }

    .col-rank {
        width: 34px;
        font-size: 12px;
    }

    .col-value {
        width: 42px;
        font-size: 12px;
    }

    .col-arrow {
        width: 12px;
        font-size: 9px;
    }

    /* --- Game Cards --- */
    .game-card {
        padding: 12px;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .game-card-right,
    .odds-pill,
    .spread-block,
    .game-card-angles {
        display: none !important;
    }

    .game-card-left {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .team-line {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .team-line .team-info {
        flex: 1;
        min-width: 0;
    }

    .team-line .name {
        font-size: 14px;
        font-weight: 700;
        line-height: 1.2;
    }

    .team-line .record {
        font-size: 11px;
        color: var(--muted);
    }

    .team-line img {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .mobile-spread {
        display: block;
        font-size: 13px;
        font-weight: 700;
        color: var(--accent);
        margin-left: auto;
        flex-shrink: 0;
        padding: 4px 8px;
        background: rgba(37, 99, 235, 0.12);
        border-radius: 6px;
    }

    .game-card-center {
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--border);
    }

    .game-card-center .meta-chip {
        font-size: 11px;
        padding: 6px 10px;
    }

    /* --- Teams Header --- */
    .teams-header {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 6px;
        padding: 12px 10px;
        align-items: center;
    }

    .team-block {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .team-block:first-child {
        justify-content: flex-start;
    }

    .team-block:last-child {
        justify-content: flex-end;
        flex-direction: row-reverse;
    }

    .team-block:last-child > div {
        text-align: right;
    }

    .team-logo {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .team-name {
        font-size: 12px;
        font-weight: 600;
        line-height: 1.2;
    }

    .team-record {
        font-size: 10px;
        color: var(--muted);
    }

    .matchup-center {
        text-align: center;
        padding: 0 4px;
    }

    .matchup-center .meta-row {
        font-size: 9px;
        margin: 2px 0;
    }

    .meta-pill {
        font-size: 8px;
        padding: 2px 5px;
    }

    /* --- Quick Pulse --- */
    .quick-pulse-section {
        padding: 16px;
    }

    .quick-pulse-title {
        font-size: 14px;
    }

    .pulse-stat-label {
        font-size: 11px;
    }

    .pulse-stat-value {
        font-size: 14px;
    }

    /* --- Spot Alerts Mobile --- */
    .spot-alerts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .spot-alerts-divider {
        padding: 8px 0;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
    }

    .spot-alerts-team-header {
        justify-content: center;
    }

    .spot-alerts-badges {
        justify-content: center;
    }

    /* --- Win/Loss Bars Mobile --- */
    .win-loss-bars {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .wl-bar-section {
        gap: 6px;
    }

    .wl-bar {
        height: 20px;
    }

    /* --- Bar Comparison Mobile --- */
    .mobile-comparison-header {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 8px;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px 8px 0 0;
        margin-bottom: 2px;
        align-items: center;
    }

    .mobile-team-col {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        font-weight: 700;
        color: #fff;
    }

    .mobile-team-col.left {
        justify-content: flex-start;
    }

    .mobile-team-col.right {
        justify-content: flex-end;
    }

    .mobile-header-logo {
        width: 20px;
        height: 20px;
        object-fit: contain;
        border-radius: 3px;
    }

    .mobile-label-col {
        font-size: 10px;
        color: var(--muted);
        text-transform: uppercase;
        text-align: center;
        min-width: 60px;
    }

    .bar-stat-header {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        gap: 8px;
        align-items: center;
        justify-items: center;
        padding: 0;
    }

    .bar-stat-value {
        font-size: 12px;
        min-width: auto;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .bar-stat-label {
        text-align: center;
        min-width: 100px;
        font-size: 10px;
    }

    .bar-stat-label .bar-team-logo {
        display: none;
    }

    .mobile-team-logo {
        display: none !important;
    }

    .bar-stat-row {
        padding: 8px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .bar-comparison-container {
        background: rgba(255, 255, 255, 0.02);
        border-radius: 8px;
        overflow: hidden;
    }

    /* --- Recent Games Mobile --- */
    .recent-games-comparison-grid.desktop-only {
        display: none;
    }

    .mobile-recent-games.mobile-only {
        display: block;
    }

    .mobile-team-games-section {
        margin-bottom: 16px;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 8px;
        overflow: hidden;
    }

    .mobile-team-games-section:last-child {
        margin-bottom: 0;
    }

    /* --- Rankings Tabs Mobile --- */
    .rankings-container {
        padding: 12px;
        border-radius: 12px;
    }

    .rankings-tabs {
        gap: 3px;
        padding: 3px;
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .rankings-tab {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    .rankings-legend {
        gap: 16px;
        padding: 8px 12px;
    }

    .rankings-legend .legend-item {
        font-size: 12px;
        gap: 5px;
    }

    .rankings-legend .legend-emoji {
        font-size: 14px;
    }

    .rankings-legend .legend-desc {
        font-size: 10px;
    }

    .rankings-view table {
        font-size: 13px;
    }

    .rankings-view th {
        padding: 10px 6px;
        font-size: 10px;
    }

    .rankings-view td {
        padding: 9px 6px;
        font-size: 13px;
    }

    .rankings-view td:first-child,
    .rankings-view td:last-child {
        font-size: 12px;
        max-width: 100px;
    }

    .rankings-view td img {
        width: 26px;
        height: 26px;
    }
}

/* ===== SMALL PHONE (480px and below) ===== */
@media (max-width: 480px) {

    .page-shell {
        padding: 12px 8px 20px;
    }

    /* --- Tab Buttons --- */
    .tab-buttons {
        gap: 4px;
        padding: 3px;
    }

    .tab-button {
        padding: 8px 10px;
        font-size: 11px;
    }

    /* --- Rankings Table Ultra Compact --- */
    .rankings-table th,
    .rankings-table td {
        padding: 6px 3px;
        font-size: 10px;
    }

    .rankings-table th.stat-name-col:first-child,
    .rankings-table td.stat-name-col:first-child {
        min-width: 55px;
        font-size: 9px;
        padding: 6px 4px;
    }

    .rankings-table th.last5-col,
    .rankings-table td.last5-col {
        min-width: 38px;
        font-size: 10px;
    }

    .rankings-table th.l5rank-col,
    .rankings-table td.l5rank-col {
        min-width: 55px;
        font-size: 9px;
    }

    .rankings-table th.logo-col,
    .rankings-table td.logo-col {
        min-width: 40px;
        padding: 4px 2px;
    }

    .rankings-table .team-logo-table {
        width: 16px;
        height: 16px;
    }

    .rankings-table .advantage-logo {
        width: 20px;
        height: 20px;
    }

    /* --- Fixed-width spans Ultra Compact --- */
    .col-matchup {
        width: 14px;
        font-size: 9px;
    }

    .col-emoji {
        width: 12px;
        font-size: 8px;
    }

    .col-rank {
        width: 30px;
        font-size: 11px;
    }

    .col-value {
        width: 38px;
        font-size: 11px;
    }

    .col-arrow {
        width: 10px;
        font-size: 7px;
    }

    /* --- Game Cards Compact --- */
    .game-card {
        padding: 10px;
        gap: 10px;
    }

    .team-line img {
        width: 32px;
        height: 32px;
    }

    .team-line .name {
        font-size: 12px;
    }

    .team-line .record {
        font-size: 10px;
    }

    .game-card-center {
        padding-top: 6px;
        gap: 6px;
    }

    .game-card-center .meta-chip {
        font-size: 10px;
        padding: 5px 8px;
    }

    /* --- Quick Pulse Compact --- */
    .quick-pulse-section {
        padding: 12px;
    }

    .quick-pulse-title {
        font-size: 12px;
    }

    .pulse-stat-label {
        font-size: 10px;
    }

    .pulse-stat-value {
        font-size: 13px;
    }

    /* --- Rankings Tabs Compact --- */
    .rankings-container {
        padding: 10px;
        border-radius: 10px;
        margin: 0 -4px;
    }

    .rankings-tabs {
        gap: 2px;
        padding: 3px;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .rankings-tab {
        padding: 10px 8px;
        font-size: 12px;
        border-radius: 6px;
        font-weight: 700;
    }

    .rankings-tab.active {
        box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
    }

    .rankings-legend {
        gap: 12px;
        padding: 6px 10px;
        margin-bottom: 8px;
    }

    .rankings-legend .legend-item {
        font-size: 11px;
    }

    .rankings-legend .legend-emoji {
        font-size: 12px;
    }

    .rankings-legend .legend-desc {
        display: none;
    }

    .rankings-view table {
        font-size: 12px;
    }

    .rankings-view th {
        padding: 8px 4px;
        font-size: 9px;
        letter-spacing: 0.3px;
    }

    .rankings-view td {
        padding: 8px 4px;
        font-size: 12px;
    }

    .rankings-view td:first-child,
    .rankings-view td:last-child {
        font-size: 11px;
        max-width: 85px;
    }

    .rankings-view td img {
        width: 22px;
        height: 22px;
    }
}

/* ===== ULTRA COMPACT (360px and below) ===== */
@media (max-width: 360px) {

    .rankings-container {
        padding: 8px;
        border-radius: 8px;
    }

    .rankings-tabs {
        margin-bottom: 8px;
    }

    .rankings-tab {
        padding: 9px 6px;
        font-size: 10px;
    }

    .rankings-legend {
        gap: 8px;
        padding: 4px 6px;
    }

    .rankings-legend .legend-item {
        font-size: 9px;
    }

    .rankings-view th {
        padding: 6px 3px;
        font-size: 8px;
    }

    .rankings-view td {
        padding: 6px 3px;
        font-size: 10px;
    }

    .rankings-view td:first-child,
    .rankings-view td:last-child {
        font-size: 9px;
        max-width: 70px;
    }

    .rankings-view td img {
        width: 18px;
        height: 18px;
    }
}
