:root {
    --team-color: #B4975A;
    --team-color-rgb: 180, 151, 90;
    --bg-primary: #000000;
    --bg-secondary: #19191e;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-card-hover: rgba(255, 255, 255, 0.12);
    --bg-card-today: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #8e8e93;
    --text-tertiary: #636366;
    --border-default: rgba(255, 255, 255, 0.1);
    --border-live: rgba(255, 59, 48, 0.5);
    --border-win: rgba(52, 199, 89, 0.3);
    --border-loss: rgba(255, 59, 48, 0.2);
    --color-live: #ff3b30;
    --color-win: #34c759;
    --color-loss: #ff3b30;
    --color-gold: #B4975A;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 9999px;
    --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-elevated: 0 8px 16px rgba(0, 0, 0, 0.4);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
h1:focus, h2:focus, h3:focus, div:focus { outline: none; }

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
}

body { padding-bottom: calc(70px + var(--safe-bottom)); }

#app { min-height: 100vh; min-height: 100dvh; }

/* Loading screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 20px;
}

.loading-screen .spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-default);
    border-top-color: var(--team-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen p { color: var(--text-secondary); font-size: 15px; }

/* Error state */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40vh;
    gap: 16px;
    padding: 20px;
    text-align: center;
}

.error-state .error-icon { font-size: 50px; color: var(--text-secondary); }
.error-state h3 { font-size: 18px; font-weight: 600; }
.error-state p { font-size: 14px; color: var(--text-secondary); max-width: 300px; }

.btn-retry {
    padding: 10px 24px;
    background: var(--team-color);
    color: #000;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-retry:active { opacity: 0.7; }

/* Bottom Tab Navigation */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: calc(70px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 0.5px solid rgba(255, 255, 255, 0.15);
    z-index: 1000;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    background: none;
    border: none;
    min-width: 64px;
}

.tab-item.active { color: var(--team-color); }
.tab-item svg, .tab-item .tab-icon { width: 24px; height: 24px; }
.tab-item .tab-label { font-size: 10px; }

/* Page Header / Toolbar */
.page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 16px;
    padding-top: calc(12px + var(--safe-top));
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
}

.page-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: none;
    background: none;
    color: var(--team-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.header-btn:active { background: rgba(255, 255, 255, 0.1); }

/* Segmented Control */
.segmented-control {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 2px;
    margin: 12px 16px;
}

.game-tabs {
    margin-top: 12px;
    margin-bottom: 4px;
}

.segment-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.segment-btn.active {
    background: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
}

/* Game Cards */
.game-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    padding: 16px;
    box-shadow: var(--shadow-card);
    transition: background 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.game-card:active { background: var(--bg-card-hover); }

.game-card.today {
    background: var(--bg-card-today);
    border-color: var(--team-color);
    border-width: 2px;
}

.game-card.live {
    border-color: var(--border-live);
    border-width: 1px;
}

.game-card.win { border-color: var(--border-win); }
.game-card.loss { border-color: var(--border-loss); }

/* Live Game Alert Banner */
.live-banner {
    background: rgba(255, 59, 48, 0.15);
    border: 2px solid rgba(255, 59, 48, 0.5);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.live-banner:active { background: rgba(255, 59, 48, 0.25); }

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--color-live);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    background: rgba(255, 59, 48, 0.2);
    border-radius: var(--radius-sm);
    color: var(--color-live);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Team Display */
.team-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 80px;
}

.team-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
}

.team-logo-sm { width: 32px; height: 32px; }
.team-logo-lg { width: 70px; height: 70px; }
.team-logo-xl { width: 100px; height: 100px; }

.team-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.team-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
}

.team-name.highlight {
    font-weight: 700;
    color: var(--team-color);
}

/* Score Display */
.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.score {
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.score-large {
    font-size: 56px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.score-separator {
    font-size: 20px;
    color: var(--text-tertiary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-win { background: rgba(52, 199, 89, 0.2); color: var(--color-win); }
.badge-loss { background: rgba(255, 59, 48, 0.2); color: var(--color-loss); }
.badge-final { color: var(--text-secondary); font-weight: 600; }

/* Content Container */
.page-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 100px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    overflow: hidden;
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-default);
}

.card-body { padding: 16px; }

/* Date Selector */
.date-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.date-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: var(--team-color);
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.date-nav-btn:active { background: rgba(255, 255, 255, 0.1); }

.date-display {
    text-align: center;
}

.date-today-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--team-color);
    text-transform: uppercase;
}

.date-text {
    font-size: 17px;
    font-weight: 600;
}

.date-goto-today {
    font-size: 12px;
    color: var(--team-color);
    cursor: pointer;
    background: none;
    border: none;
    font-weight: 600;
}

/* Floating Button */
.floating-btn {
    position: fixed;
    bottom: calc(90px + var(--safe-bottom));
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--team-color);
    color: #000;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-elevated);
    z-index: 50;
    transition: transform 0.2s, opacity 0.2s;
}

.floating-btn:active { transform: scale(0.95); }

/* Standings Table */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.standings-table th {
    padding: 8px 6px;
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.04);
    white-space: nowrap;
}

.standings-table th:nth-child(2) { text-align: left; }

.standings-table td {
    padding: 10px 6px;
    text-align: center;
    border-top: 1px solid var(--border-default);
    white-space: nowrap;
}

.standings-table td:nth-child(2) { text-align: left; }

.standings-table tr.highlighted {
    background: rgba(var(--team-color-rgb), 0.1);
}

.standings-table .team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.standings-table .pos { width: 25px; font-weight: 700; }
.standings-table .pos.highlight { color: var(--team-color); }
.standings-table .pts { font-weight: 700; }
.standings-table .pts.highlight { color: var(--team-color); }
.standings-table .diff-pos { color: var(--color-win); }
.standings-table .diff-neg { color: var(--color-loss); }

/* Team Highlight Card */
.team-highlight-card {
    background: linear-gradient(135deg, rgba(var(--team-color-rgb), 0.3), rgba(var(--team-color-rgb), 0.1));
    border: 1px solid rgba(var(--team-color-rgb), 0.5);
    border-radius: var(--radius-lg);
    padding: 20px;
    min-height: 140px;
}

.team-highlight-card .team-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.team-highlight-card .team-details h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--team-color);
}

.team-highlight-card .team-details p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.team-highlight-card .rank {
    font-size: 24px;
    font-weight: 700;
    color: var(--team-color);
    text-align: right;
}

.team-highlight-card .rank-label {
    font-size: 11px;
    color: var(--text-secondary);
}

.mini-stats {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-stat .label {
    font-size: 11px;
    color: var(--text-secondary);
}

.mini-stat .value {
    font-size: 14px;
    font-weight: 600;
}

/* Game Detail Page */
.game-header {
    padding: 20px 16px;
    text-align: center;
}

.game-header .teams-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.game-header .team-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.game-header .team-abbrev {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.game-status {
    text-align: center;
    margin-top: 8px;
}

.game-status .period {
    font-size: 14px;
    font-weight: 600;
}

.game-status .time {
    font-size: 13px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* Countdown Timer (Pre-game) */
.countdown-section {
    text-align: center;
    padding: 16px 0 8px;
}

.countdown-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.countdown-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.countdown-unit-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.countdown-separator {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-tertiary);
    margin: 0 2px;
    align-self: flex-start;
    line-height: 1;
}

.countdown-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* Live Game Header */
.live-game-header {
    background: linear-gradient(180deg, rgba(255, 59, 48, 0.15), transparent);
    padding: 16px;
}

.live-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(90deg, rgba(255, 59, 48, 0.3), rgba(255, 59, 48, 0.1));
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
}

.live-indicator .live-text {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-live);
}

.live-indicator .time-display {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    font-family: ui-monospace, 'SF Mono', monospace;
}

.live-indicator .period-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* Clock running/stopped state */
.clock-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.clock-state.running {
    color: #34C759;
    opacity: 0.8;
}

.clock-state.stopped {
    color: #FF9500;
}

.clock-state.intermission {
    font-size: 10px;
    font-weight: 700;
    color: #FF9500;
    letter-spacing: 0.5px;
}

/* Quick Stats Bar */
.quick-stats {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    margin-top: 8px;
    border-top: 1px solid var(--border-default);
}

.quick-stat {
    text-align: center;
}

.quick-stat .qs-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.quick-stat .qs-value {
    font-size: 14px;
    font-weight: 700;
    margin-top: 2px;
}

/* Stat Comparison Bars */
.stat-comparison {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-row .stat-label {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: var(--text-secondary);
}

.stat-values {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
}

.stat-bar-container {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.stat-bar-away {
    background: var(--text-secondary);
    border-radius: 3px 0 0 3px;
    transition: width 0.5s ease;
}

.stat-bar-home {
    background: var(--team-color);
    border-radius: 0 3px 3px 0;
    transition: width 0.5s ease;
}

/* Linescore Table */
.linescore {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: center;
}

.linescore th, .linescore td {
    padding: 8px 6px;
    min-width: 32px;
}

.linescore th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    border-bottom: 1px solid var(--border-default);
}

.linescore td { border-bottom: 1px solid var(--border-default); }
.linescore .total { font-weight: 700; font-size: 15px; }
.linescore .team-header { text-align: left; }

/* Scoring/Penalty Summary */
.period-section { margin-bottom: 16px; }

.period-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 8px;
}

.goal-item, .penalty-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.goal-item .time, .penalty-item .time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 45px;
    font-variant-numeric: tabular-nums;
}

.goal-item .details { flex: 1; }
.goal-item .scorer { font-size: 14px; font-weight: 600; }
.goal-item .assists-text { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.goal-item .goal-score { font-size: 13px; font-weight: 700; color: var(--team-color); }

.penalty-item .details { flex: 1; }
.penalty-item .player-name { font-size: 14px; font-weight: 600; }
.penalty-item .penalty-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.penalty-item .duration-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    background: rgba(255, 59, 48, 0.15);
    color: var(--color-loss);
    border-radius: 4px;
}

/* Three Stars */
.three-stars {
    display: flex;
    justify-content: space-around;
    padding: 16px 0;
}

.star-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.star-item .star-label {
    font-size: 20px;
}

.star-item .star-headshot {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.star-item .star-name {
    font-size: 12px;
    font-weight: 600;
    max-width: 90px;
}

.star-item .star-stats {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Player Stats Table */
.player-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    overflow-x: auto;
}

.player-stats-table th {
    padding: 6px 4px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
}

.player-stats-table th:first-child { text-align: left; position: sticky; left: 0; z-index: 2; }

.player-stats-table td {
    padding: 8px 4px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-variant-numeric: tabular-nums;
}

.player-stats-table td:first-child {
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    left: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.player-stats-table .goals-highlight { color: var(--team-color); font-weight: 700; }

/* Boxscore table refinements */
.boxscore-table td,
.boxscore-table th { padding: 10px 6px; }

.boxscore-table td:first-child { font-size: 13px; }

.player-number-sm {
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 400;
    margin-right: 4px;
}

@media (max-width: 767px) {
    .hide-mobile { display: none; }
}

/* Play-by-Play */
.play-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.play-item .play-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 55px;
    font-variant-numeric: tabular-nums;
}

.play-item .play-period {
    font-size: 10px;
    color: var(--text-tertiary);
}

.play-item .play-desc {
    flex: 1;
    font-size: 13px;
}

.play-item.goal { background: rgba(var(--team-color-rgb), 0.1); border-radius: var(--radius-sm); padding: 10px; }
.play-item.goal .play-desc { font-weight: 700; color: var(--team-color); }
.play-item.penalty .play-desc { color: var(--color-loss); }

/* Team Picker Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-default);
}

.modal-header h2 { font-size: 18px; font-weight: 700; }

.modal-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

.modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(80vh - 60px);
    padding: 8px 16px 20px;
}

.team-picker-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.team-picker-item:active { background: rgba(255, 255, 255, 0.1); }
.team-picker-item.selected { background: rgba(255, 255, 255, 0.15); }

.team-picker-item .team-full-name {
    flex: 1;
    font-size: 15px;
}

.team-picker-item .team-abbrev-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.team-picker-item .check { color: var(--color-win); font-size: 18px; }

/* Player Detail Page */
.player-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 16px;
}

.player-headshot {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.player-info h1 { font-size: 22px; font-weight: 700; }

.player-info .player-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.player-info .player-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--team-color);
}

.player-bio {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 16px 16px;
}

.bio-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 80px;
}

.bio-item .bio-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-weight: 600;
}

.bio-item .bio-value {
    font-size: 14px;
    font-weight: 600;
}

/* Team Detail Roster */
.roster-section { margin-bottom: 24px; }

.roster-section h3 {
    font-size: 12px;
    font-weight: 700;
    padding: 0 0 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.roster-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.roster-player:active { background: rgba(255, 255, 255, 0.05); }

.roster-player .player-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.roster-player .player-details {
    flex: 1;
}

.roster-player .player-name-text {
    font-size: 15px;
    font-weight: 600;
}

.roster-player .player-pos-num {
    font-size: 12px;
    color: var(--text-secondary);
}

.roster-player .player-size {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: right;
}

/* Section Title */
.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Goal Alert Overlay */
.goal-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s ease;
}

.goal-alert {
    background: linear-gradient(180deg, rgba(50, 50, 60, 1), rgba(25, 25, 35, 1));
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 60px rgba(var(--team-color-rgb), 0.5);
    animation: goalBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 320px;
    width: 90%;
}

@keyframes goalBounce {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.goal-alert .siren { font-size: 60px; }
.goal-alert .goal-text {
    font-size: 48px;
    font-weight: 900;
    color: white;
    margin: 8px 0;
}

.goal-alert .scorer-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--team-color);
}

.goal-alert .goal-score-display {
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 2px; }

/* Table scroll wrapper */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Utility classes */
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-team { color: var(--team-color); }
.fw-bold { font-weight: 700; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.flex-row { display: flex; align-items: center; }
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }

/* Desktop responsive - removed old 768px breakpoint, now handled by 1024px sidebar layout */

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 12px;
    text-align: center;
}

.empty-state .empty-icon { font-size: 50px; color: var(--text-tertiary); }
.empty-state h3 { font-size: 18px; font-weight: 600; }
.empty-state p { font-size: 14px; color: var(--text-secondary); }

/* Back button */
.back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--team-color);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
}

.back-btn:active { opacity: 0.7; }

/* Divider */
.divider { height: 1px; background: var(--border-default); margin: 8px 0; }

/* Pull to refresh indicator (for future) */
.refresh-indicator {
    text-align: center;
    padding: 12px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Shot map placeholder */
.shot-map {
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.shot-map .rink-outline {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 2/1;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 40%;
    position: relative;
}

.shot-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.shot-dot.away { background: rgba(255, 255, 255, 0.6); }
.shot-dot.home { background: var(--team-color); }
.shot-dot.goal { width: 12px; height: 12px; border: 2px solid white; }

/* Awards section */
.award-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.award-item .award-year {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 70px;
}

.award-item .award-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--team-color);
}

/* Season history table */
.season-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.season-table th {
    padding: 6px 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    text-align: center;
    border-bottom: 1px solid var(--border-default);
}

.season-table th:first-child { text-align: left; }

.season-table td {
    padding: 8px 4px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-variant-numeric: tabular-nums;
}

.season-table td:first-child {
    text-align: left;
    font-weight: 600;
}

/* No-select for interactive elements */
.no-select {
    -webkit-user-select: none;
    user-select: none;
}

/* Team stats overview */
.team-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.team-stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.team-stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--team-color);
}

.team-stat-card .stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 4px;
}

/* Sidebar - Desktop only */
.sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 240px;
    background: rgba(10, 10, 14, 0.95);
    border-right: 1px solid var(--border-default);
    z-index: 200;
    padding: 20px 0;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 24px 32px;
    font-size: 22px;
    font-weight: 800;
    color: var(--team-color);
}

.brand-icon { font-size: 28px; }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(var(--team-color-rgb), 0.15);
    color: var(--team-color);
    font-weight: 600;
}

.sidebar-link svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* Desktop layout */
@media (min-width: 1024px) {
    .sidebar { display: flex; }
    .tab-bar { display: none !important; }

    .main-content {
        margin-left: 240px;
    }

    body { padding-bottom: 0; }

    .page-content {
        max-width: 900px;
        margin: 0 auto;
    }

    .page-header .page-header-row,
    .page-header h1 {
        max-width: 900px;
        margin: 0 auto;
    }

    .game-header {
        max-width: 900px;
        margin: 0 auto;
    }

    .segmented-control {
        max-width: 868px;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 16px;
        padding-right: 16px;
    }

    .live-game-header {
        max-width: 900px;
        margin: 0 auto;
    }

    .player-header {
        max-width: 900px;
        margin: 0 auto;
    }

    .player-bio {
        max-width: 900px;
        margin: 0 auto;
        padding-bottom: 16px;
    }

    .date-selector {
        max-width: 900px;
        margin: 0 auto;
    }

    .modal-overlay { align-items: center; }
    .modal-content { border-radius: var(--radius-lg); margin-bottom: 0; max-height: 70vh; }

    .floating-btn { right: calc(50% - 420px); }
}
