/* Root Variables - Light Theme */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e8e8e8;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #dddddd;
    --accent-primary: #0066cc;
    --accent-hover: #0052a3;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    --info-color: #17a2b8;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --transition-speed: 0.2s;
}

/* Dark Theme */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-tertiary: #3a3a3a;
        --text-primary: #ffffff;
        --text-secondary: #b0b0b0;
        --text-tertiary: #808080;
        --border-color: #444444;
        --accent-primary: #4d94ff;
        --accent-hover: #6ba3ff;
        --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
        --shadow-md: 0 4px 8px rgba(0,0,0,0.4);
        --shadow-lg: 0 8px 16px rgba(0,0,0,0.5);
    }
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* App Container */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.app-header {
    background-color: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.app-header h1 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    outline: none;
}

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

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

/* Screen Management */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Screen Header */
.screen-header {
    margin-bottom: 20px;
}

.screen-header h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.date-display {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Games Container */
.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.game-card {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.game-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-live {
    background-color: var(--error-color);
    color: white;
    animation: pulse 2s infinite;
}

.status-final {
    background-color: var(--text-tertiary);
    color: white;
}

.status-scheduled {
    background-color: var(--info-color);
    color: white;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.game-teams {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.game-score {
    display: flex;
    justify-content: space-around;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 10px;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background-color: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-speed) ease;
}

.tab-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.tab-content-container {
    position: relative;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Stats Section Container */
.stats-section-container {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.stats-section-container h2 {
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.stats-explanation {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    font-style: italic;
}

.stats-content {
    margin-top: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 10px;
}

.stat-label {
    font-weight: 600;
    color: var(--text-primary);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.comparison-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 15px;
}

.comparison-card h4 {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 1rem;
}

.comparison-values {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.comparison-team,
.comparison-league {
    text-align: center;
}

.comparison-team label,
.comparison-league label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.comparison-team .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.comparison-league .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* Win Probability Display */
.win-prob-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
}

.win-prob-team {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.win-prob-team h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.win-prob-percentage {
    font-size: 3rem;
    font-weight: 700;
    margin: 10px 0;
}

.win-prob-team.winning .win-prob-percentage {
    color: var(--success-color);
}

.win-prob-team.losing .win-prob-percentage {
    color: var(--error-color);
}

.win-prob-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.win-prob-bar {
    margin-top: 20px;
    height: 40px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
}

.win-prob-bar-fill-home {
    height: 100%;
    background-color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    transition: width 0.5s ease;
}

.win-prob-bar-fill-away {
    height: 100%;
    background-color: var(--error-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    transition: width 0.5s ease;
}

.polymarket-comparison {
    margin-top: 15px;
    padding: 15px;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
}

.polymarket-comparison h4 {
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--text-primary);
}

/* Simplified Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table td {
    color: var(--text-primary);
}

.comparison-table .team-value {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.comparison-table .league-value {
    color: var(--text-secondary);
    font-weight: 600;
}

.comparison-table .diff-positive {
    color: var(--success-color);
}

.comparison-table .diff-negative {
    color: var(--error-color);
}

/* Team Focus Toggle */
.team-focus-container {
    background-color: var(--bg-primary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.team-focus-container label {
    font-weight: 600;
}

.team-toggle {
    display: flex;
    gap: 10px;
}

.team-toggle-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background-color: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.team-toggle-btn:hover {
    border-color: var(--accent-primary);
}

.team-toggle-btn.active {
    background-color: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Game State Container */
/* TV Broadcast Container */
.tv-broadcast-container {
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    position: relative;
}

/* Football Field */
.football-field {
    background: linear-gradient(to right,
        #2d5016 0%,
        #3a6b1e 50%,
        #2d5016 100%);
    position: relative;
    height: 300px;
    display: flex;
    flex-direction: row;
}

/* End Zones */
.endzone {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    position: relative;
    z-index: 1;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.endzone-away {
    background: linear-gradient(to right, rgba(220, 53, 69, 0.8), rgba(200, 33, 49, 0.9));
}

.endzone-home {
    background: linear-gradient(to left, rgba(30, 100, 200, 0.9), rgba(10, 80, 180, 0.8));
}

.endzone-text {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

/* Field Area */
.field-area {
    flex: 1;
    position: relative;
    background-image:
        repeating-linear-gradient(
            to right,
            transparent 0px,
            transparent 9px,
            rgba(255,255,255,0.08) 9px,
            rgba(255,255,255,0.08) 10px
        );
}

/* Yard Markers */
.yard-markers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.yard-line {
    width: 2px;
    background: rgba(255,255,255,0.3);
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5px;
}

.yard-line.midfield {
    background: rgba(255,255,255,0.5);
    width: 3px;
}

.yard-line span {
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Field Elements */
.field-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

/* Team Logo Positions (fixed on their side) */
.team-logo-field {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
}

.team-logo-field img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5)) opacity(0.6);
}

.away-logo-field {
    left: 20px;
}

.home-logo-field {
    right: 20px;
}

/* Offensive Team Marker (positioned at ball location) */
.offensive-team-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: left 0.5s ease;
    z-index: 3;
}

.offensive-team-marker img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.9));
    animation: pulse 2s ease-in-out infinite;
}

.football-icon {
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.7));
    animation: bounce 1s ease-in-out infinite;
}

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* TV-Style Scoreboard Overlay */
.tv-scoreboard {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.7));
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid rgba(255,255,255,0.1);
    z-index: 10;
}

.scoreboard-left,
.scoreboard-right {
    flex: 1;
}

.scoreboard-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.team-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.away-team-info {
    justify-content: flex-start;
}

.home-team-info {
    justify-content: flex-end;
}

.team-logo-score {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.team-abbr {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.team-score-tv {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    min-width: 40px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.game-clock {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.down-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.clock-separator,
.field-pos-separator {
    color: rgba(255,255,255,0.5);
}

/* Last Play Container */
.last-play-container {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.last-play-container h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.last-play-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.last-play-epa {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
}

.epa-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.epa-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.epa-value.positive {
    color: var(--success-color);
}

.epa-value.negative {
    color: var(--error-color);
}

.last-play-players {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
}

.player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background-color: var(--bg-primary);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    min-width: 120px;
}

.player-card.offensive {
    border-color: var(--accent-primary);
}

.player-card.defensive {
    border-color: var(--error-color);
}

.player-headshot {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.player-card.offensive .player-headshot {
    border-color: var(--accent-primary);
}

.player-card.defensive .player-headshot {
    border-color: var(--error-color);
}

.player-name {
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
}

.player-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.last-play-description {
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
}

.last-play-description p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Probability Container */
.probability-container {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.probability-container h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.prob-section {
    margin-bottom: 20px;
}

.prob-section h4 {
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.prob-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.prob-bar {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.prob-bar label {
    font-weight: 600;
    font-size: 0.95rem;
}

.bar-container {
    position: relative;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    height: 35px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-hover));
    transition: width 0.5s ease;
    border-radius: 8px;
}

.bar-fill.team-specific {
    background: linear-gradient(90deg, var(--success-color), #3bc857);
}

.bar-label {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.prob-insight {
    margin-top: 15px;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--info-color);
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Players Container */
.players-container {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.players-container h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.player-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
}

.player-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.player-card-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.player-card-position {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Plays Container */
.plays-container {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.plays-container h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.plays-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.play-item {
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    border-left: 3px solid var(--accent-primary);
}

.play-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.play-item-text {
    font-size: 0.95rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

.modal-content {
    background-color: var(--bg-primary);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

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

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

.modal-header h2 {
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-speed) ease;
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.player-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.player-position,
.player-team {
    padding: 6px 12px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.stats-section {
    margin-bottom: 25px;
}

.stats-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-item {
    background-color: var(--bg-secondary);
    padding: 12px;
    border-radius: 6px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.probability-impact-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.probability-impact {
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 250px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.info {
    border-left: 4px solid var(--info-color);
}

/* Banner Container */
.banner-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    width: 90%;
    max-width: 800px;
}

.banner {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.banner.warning {
    background-color: var(--warning-color);
    color: #000;
}

.banner.error {
    background-color: var(--error-color);
    color: white;
}

.banner.info {
    background-color: var(--info-color);
    color: white;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 15px;
    }

    .app-header h1 {
        font-size: 1.4rem;
    }

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

    .team-focus-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .game-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .situation-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .players-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .toast-container {
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .games-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Play Item Players */
.play-item-players {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.play-item-player {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 4px;
    border-radius: 20px;
    background-color: var(--bg-primary);
    border: 2px solid var(--border-color);
    font-size: 0.85rem;
}

.play-item-player.offensive {
    border-color: var(--accent-primary);
}

.play-item-player.defensive {
    border-color: var(--error-color);
}

.play-item-headshot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.play-item-player-name {
    font-weight: 600;
    color: var(--text-primary);
}

/* Player Tooltips */
.has-tooltip {
    position: relative;
}

.player-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    min-width: 180px;
    max-width: 250px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    margin-bottom: 10px;
    text-align: center;
}

.player-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--bg-primary);
}

.player-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 9px solid transparent;
    border-top-color: var(--border-color);
}

.has-tooltip:hover .player-tooltip {
    display: block;
}

.tooltip-header {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.tooltip-position {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.tooltip-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tooltip-stat {
    font-size: 0.85rem;
    color: var(--text-primary);
    padding: 4px 8px;
    background-color: var(--bg-secondary);
    border-radius: 4px;
}

.tooltip-no-stats {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-style: italic;
}

/* Hide tooltips on touch devices */
@media (hover: none) {
    .player-tooltip {
        display: none !important;
    }
}
