/**
 * NFL LiveScores - Stylesheet
 * Dark sports theme, Promiedos-inspired
 */

/* ─── Variables ──────────────────────────────────────── */
:root {
    --nfl-bg:           #0a0e17;
    --nfl-surface:      #131a2b;
    --nfl-surface-alt:  #1a2235;
    --nfl-border:       #243049;
    --nfl-text:         #e8edf5;
    --nfl-text-muted:   #8892a4;
    --nfl-accent:       #0066ff;
    --nfl-accent-glow:  rgba(0, 102, 255, 0.15);
    --nfl-live:         #ff3b3b;
    --nfl-live-glow:    rgba(255, 59, 59, 0.2);
    --nfl-positive:     #00c853;
    --nfl-negative:     #ff5252;
    --nfl-winner:       #ffffff;
    --nfl-radius:       8px;
    --nfl-radius-sm:    4px;
    --nfl-transition:   0.2s ease;
}

/* ─── Container ──────────────────────────────────────── */
.nfl-ls-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--nfl-bg);
    color: var(--nfl-text);
    border-radius: var(--nfl-radius);
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto 2rem;
    font-size: 14px;
    line-height: 1.5;
}

.nfl-ls-container *,
.nfl-ls-container *::before,
.nfl-ls-container *::after {
    box-sizing: border-box;
}

/* ─── Header ─────────────────────────────────────────── */
.nfl-ls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--nfl-surface);
    border-bottom: 1px solid var(--nfl-border);
}

.nfl-ls-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--nfl-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nfl-ls-shield {
    font-size: 22px;
}

.nfl-ls-week,
.nfl-ls-season {
    font-size: 13px;
    font-weight: 400;
    color: var(--nfl-accent);
    background: var(--nfl-accent-glow);
    padding: 2px 10px;
    border-radius: 12px;
}

.nfl-ls-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nfl-ls-btn {
    background: var(--nfl-surface-alt);
    color: var(--nfl-text);
    border: 1px solid var(--nfl-border);
    padding: 6px 14px;
    border-radius: var(--nfl-radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: background var(--nfl-transition);
}

.nfl-ls-btn:hover {
    background: var(--nfl-border);
}

.nfl-ls-refresh {
    font-size: 18px;
    padding: 4px 10px;
    line-height: 1;
}

.nfl-ls-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nfl-live);
    animation: nfl-ls-pulse 2s infinite;
}

@keyframes nfl-ls-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--nfl-live-glow); }
    50%      { opacity: 0.5; box-shadow: 0 0 0 6px transparent; }
}

/* ─── Scores Grid ────────────────────────────────────── */
.nfl-ls-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1px;
    background: var(--nfl-border);
    padding: 1px;
}

.nfl-ls-game-card {
    background: var(--nfl-surface);
    padding: 16px 20px;
    position: relative;
    transition: background var(--nfl-transition);
}

.nfl-ls-game-card:hover {
    background: var(--nfl-surface-alt);
}

.nfl-ls-game-card.nfl-ls-status--live {
    border-left: 3px solid var(--nfl-live);
}

.nfl-ls-game-live-badge {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--nfl-live);
    padding: 1px 8px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    animation: nfl-ls-pulse 2s infinite;
}

/* ─── Game Status ────────────────────────────────────── */
.nfl-ls-game-status {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nfl-ls-clock {
    font-weight: 700;
    color: var(--nfl-live);
}

.nfl-ls-period {
    font-size: 12px;
    color: var(--nfl-text-muted);
    background: var(--nfl-surface-alt);
    padding: 1px 6px;
    border-radius: 3px;
}

.nfl-ls-final {
    font-size: 12px;
    font-weight: 700;
    color: var(--nfl-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nfl-ls-time {
    font-size: 13px;
    color: var(--nfl-text-muted);
}

/* ─── Matchup (Teams + Scores) ───────────────────────── */
.nfl-ls-matchup {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nfl-ls-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.nfl-ls-team--winner .nfl-ls-team-name,
.nfl-ls-team--winner .nfl-ls-score {
    color: var(--nfl-winner);
    font-weight: 700;
}

.nfl-ls-team-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nfl-ls-team-name {
    font-size: 15px;
    font-weight: 500;
}

.nfl-ls-team-record {
    font-size: 12px;
    color: var(--nfl-text-muted);
}

.nfl-ls-score {
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 40px;
    text-align: right;
    color: var(--nfl-text-muted);
}

.nfl-ls-vs {
    font-size: 12px;
    color: var(--nfl-text-muted);
    text-align: center;
    display: none;
}

/* ─── Game Meta ──────────────────────────────────────── */
.nfl-ls-game-meta {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--nfl-text-muted);
}

/* ─── Tabs ───────────────────────────────────────────── */
.nfl-ls-standings-tabs,
.nfl-ls-stats-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px;
    background: var(--nfl-surface);
    border-bottom: 1px solid var(--nfl-border);
}

.nfl-ls-tab {
    background: transparent;
    color: var(--nfl-text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--nfl-transition);
}

.nfl-ls-tab:hover {
    color: var(--nfl-text);
}

.nfl-ls-tab--active {
    color: var(--nfl-accent);
    border-bottom-color: var(--nfl-accent);
}

/* ─── Tables (Standings & Stats) ─────────────────────── */
.nfl-ls-conference {
    padding: 0 16px 20px;
}

.nfl-ls-conf-title {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 12px;
    color: var(--nfl-text);
    padding-left: 4px;
}

.nfl-ls-div-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--nfl-accent);
    margin: 16px 0 8px;
    padding-left: 4px;
}

.nfl-ls-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nfl-ls-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.nfl-ls-table thead th {
    background: var(--nfl-surface-alt);
    color: var(--nfl-text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 10px;
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid var(--nfl-border);
    position: sticky;
    top: 0;
}

.nfl-ls-table thead th.nfl-ls-th-team {
    text-align: left;
}

.nfl-ls-table tbody tr {
    border-bottom: 1px solid var(--nfl-border);
    transition: background var(--nfl-transition);
}

.nfl-ls-table tbody tr:hover {
    background: var(--nfl-surface-alt);
}

.nfl-ls-table tbody td {
    padding: 10px;
    text-align: center;
    white-space: nowrap;
}

.nfl-ls-td-team,
.nfl-ls-td-player {
    text-align: left !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nfl-ls-team-logo-sm {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.nfl-ls-team-fullname {
    display: none;
}

.nfl-ls-headshot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.nfl-ls-rank {
    color: var(--nfl-text-muted);
    font-weight: 600;
}

.nfl-ls-stat-value {
    color: var(--nfl-accent);
}

.nfl-ls-positive { color: var(--nfl-positive); }
.nfl-ls-negative { color: var(--nfl-negative); }

/* ─── Schedule ───────────────────────────────────────── */
.nfl-ls-schedule-list {
    padding: 0;
}

.nfl-ls-week-nav {
    display: flex;
    gap: 8px;
}

.nfl-ls-day-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--nfl-text-muted);
    background: var(--nfl-surface-alt);
    padding: 10px 20px;
    margin: 0;
    border-bottom: 1px solid var(--nfl-border);
}

.nfl-ls-schedule-row {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    align-items: center;
    padding: 12px 20px;
    gap: 16px;
    border-bottom: 1px solid var(--nfl-border);
    background: var(--nfl-surface);
    transition: background var(--nfl-transition);
}

.nfl-ls-schedule-row:hover {
    background: var(--nfl-surface-alt);
}

.nfl-ls-schedule-time {
    font-size: 13px;
    color: var(--nfl-text-muted);
    font-weight: 500;
}

.nfl-ls-schedule-teams {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nfl-ls-schedule-away,
.nfl-ls-schedule-home {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nfl-ls-schedule-away img,
.nfl-ls-schedule-home img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.nfl-ls-schedule-away small,
.nfl-ls-schedule-home small {
    color: var(--nfl-text-muted);
    font-size: 11px;
}

.nfl-ls-at {
    color: var(--nfl-text-muted);
    font-size: 12px;
}

.nfl-ls-schedule-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: var(--nfl-text-muted);
    text-align: right;
}

/* ─── Footer ─────────────────────────────────────────── */
.nfl-ls-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    font-size: 11px;
    color: var(--nfl-text-muted);
    background: var(--nfl-surface);
    border-top: 1px solid var(--nfl-border);
}

/* ─── Empty State ────────────────────────────────────── */
.nfl-ls-empty {
    padding: 40px 20px;
    text-align: center;
    background: var(--nfl-surface);
}

.nfl-ls-empty p {
    margin: 4px 0;
    color: var(--nfl-text-muted);
}

.nfl-ls-muted {
    font-size: 12px;
}

/* ─── Loading ────────────────────────────────────────── */
.nfl-ls-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--nfl-text-muted);
}

.nfl-ls-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 2px solid var(--nfl-border);
    border-top-color: var(--nfl-accent);
    border-radius: 50%;
    margin-left: 10px;
    animation: nfl-ls-spin 0.8s linear infinite;
}

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

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    .nfl-ls-scores-grid {
        grid-template-columns: 1fr;
    }

    .nfl-ls-hide-mobile {
        display: none !important;
    }

    .nfl-ls-team-fullname {
        display: none;
    }

    .nfl-ls-schedule-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .nfl-ls-schedule-meta {
        text-align: left;
        flex-direction: row;
        gap: 10px;
    }

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

    .nfl-ls-table {
        font-size: 12px;
    }

    .nfl-ls-table thead th,
    .nfl-ls-table tbody td {
        padding: 6px 6px;
    }
}

@media (min-width: 769px) {
    .nfl-ls-team-abbr {
        display: none;
    }

    .nfl-ls-team-fullname {
        display: inline;
    }
}

/* ═══════════════════════════════════════════════════════
   NBA-SPECIFIC STYLES
   ═══════════════════════════════════════════════════════ */

/* ─── NBA Accent Overrides ───────────────────────────── */
.nba-ls-container {
    --nfl-accent: #ff6b00;
    --nfl-accent-glow: rgba(255, 107, 0, 0.15);
}

.nba-ls-header .nfl-ls-shield {
    font-size: 22px;
}

.nba-live-badge {
    background: var(--nfl-live) !important;
}

.nba-ls-container .nfl-ls-tab--active {
    color: #ff6b00;
    border-bottom-color: #ff6b00;
}

.nba-ls-container .nfl-ls-stat-value {
    color: #ff6b00;
}

.nba-ls-container .nfl-ls-week,
.nba-ls-container .nfl-ls-season {
    color: #ff6b00;
    background: rgba(255, 107, 0, 0.15);
}

/* ─── NBA Date Navigation ────────────────────────────── */
.nba-date-nav {
    display: flex;
    gap: 4px;
}

.nba-date-nav .nfl-ls-btn {
    font-size: 12px;
    padding: 4px 10px;
}

/* ─── NBA Standings: Playoff / Play-In indicators ──── */
.nba-playoff td:first-child {
    border-left: 3px solid #00c853;
}

.nba-playin td:first-child {
    border-left: 3px solid #ffc107;
}

.nba-standings-legend {
    display: flex;
    gap: 16px;
    padding: 10px 12px;
    font-size: 11px;
    color: var(--nfl-text-muted);
}

.nba-playoff-legend {
    color: #00c853;
}

.nba-playin-legend {
    color: #ffc107;
}

/* ─── NBA Game Card tweaks ───────────────────────────── */
.nba-game-card.nfl-ls-status--live {
    border-left-color: #ff6b00;
}

/* ─── NBA Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    .nba-date-nav {
        flex-wrap: wrap;
    }
}

/* ═══════════════════════════════════════════════════════
   MLS-SPECIFIC STYLES
   ═══════════════════════════════════════════════════════ */

.mls-ls-container {
    --nfl-accent: #00e676;
    --nfl-accent-glow: rgba(0, 230, 118, 0.15);
}

.mls-ls-container .nfl-ls-tab--active {
    color: #00e676;
    border-bottom-color: #00e676;
}

.mls-ls-container .nfl-ls-stat-value {
    color: #00e676;
}

.mls-ls-container .nfl-ls-week,
.mls-ls-container .nfl-ls-season {
    color: #00e676;
    background: rgba(0, 230, 118, 0.15);
}

.mls-live-badge {
    background: var(--nfl-live) !important;
}

.mls-game-card.nfl-ls-status--live {
    border-left-color: #00e676;
}

.mls-ht {
    color: #ffc107;
    font-weight: 700;
}

.mls-pts {
    color: #00e676 !important;
}

.mls-date-nav {
    display: flex;
    gap: 4px;
}

.mls-date-nav .nfl-ls-btn {
    font-size: 12px;
    padding: 4px 10px;
}

.mls-playoff td:first-child {
    border-left: 3px solid #00e676;
}

.mls-standings-legend {
    display: flex;
    gap: 16px;
    padding: 10px 12px;
    font-size: 11px;
    color: var(--nfl-text-muted);
}

.mls-playoff-legend {
    color: #00e676;
}

@media (max-width: 768px) {
    .mls-date-nav {
        flex-wrap: wrap;
    }
}
