/* --- Live Scores Widget Styles --- */
:root {
    --live-bg: #121212;
    --live-card-bg: #1e1e1e;
    --live-border: #333;
    --live-accent: #2575fc;
    /* Matching site primary */
    --live-text-main: #ffffff;
    --live-text-muted: #a1a1a1;
    --live-live-color: #ff3b30;
    --live-font: 'Outfit', sans-serif;
}

#livescores-section {
    background-color: var(--live-bg);
    padding: 60px 0;
    font-family: var(--live-font);
}

.livescores-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Controls */
.livescores-header {
    margin-bottom: 30px;
}

.visit-header-title {
    text-align: center;
    margin-bottom: 25px;
}

.visit-header-title h2 {
    font-size: 2.5rem;
    color: var(--live-text-main);
    margin-bottom: 10px;
}

.visit-header-title p {
    color: var(--live-text-muted);
}

.ls-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.ls-dates,
.ls-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.ls-btn {
    background: transparent;
    border: 1px solid var(--live-border);
    color: var(--live-text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.ls-btn:hover,
.ls-btn.active {
    background: var(--live-accent);
    color: white;
    border-color: var(--live-accent);
}

/* Games List */
.ls-loading,
.ls-error {
    text-align: center;
    padding: 40px;
    color: var(--live-text-muted);
    font-size: 1.1rem;
}

.ls-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--live-accent);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Competition Group */
.ls-competition {
    margin-bottom: 20px;
    background: var(--live-card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--live-border);
}

.ls-comp-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ls-comp-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.ls-comp-name {
    font-weight: 600;
    color: #e0e0e0;
    font-size: 0.95rem;
}

.ls-comp-country {
    font-size: 0.8rem;
    color: var(--live-text-muted);
    margin-left: auto;
}

/* Game Card */
.ls-game-card {
    display: grid;
    grid-template-columns: 80px 1fr 1fr 1fr;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.ls-game-card:last-child {
    border-bottom: none;
}

.ls-game-card:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Column */
.ls-status-col {
    text-align: center;
    font-size: 0.8rem;
    color: var(--live-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ls-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ls-badge.live {
    color: var(--live-live-color);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.ls-time {
    font-weight: 500;
}

/* Teams Column */
.ls-match-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    grid-column: 2 / 4;
    /* Span 2 cols for mobile layout friendliness */
}

.ls-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ls-team-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ls-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.ls-team-name {
    font-weight: 500;
    color: white;
    font-size: 0.95rem;
}

.ls-score {
    font-weight: 700;
    font-size: 1rem;
    color: var(--live-text-main);
    min-width: 20px;
    text-align: right;
}

.ls-winner {
    color: #ffd700;
    /* Gold for winner highlight if needed */
}

/* TV Column */
.ls-tv-col {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
}

.ls-channel {
    background: rgba(37, 117, 252, 0.15);
    color: #8ab4f8;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .ls-game-card {
        grid-template-columns: 60px 1fr;
        padding: 12px;
        gap: 10px;
    }

    .ls-match-col {
        grid-column: 2;
    }

    .ls-tv-col {
        grid-column: 2;
        justify-content: flex-start;
        margin-top: 5px;
    }

    .ls-controls {
        width: 100%;
    }

    .ls-dates {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        justify-content: flex-start;
    }

    .ls-btn {
        flex: 0 0 auto;
    }
}