/* ==========================================================================
   Live Cricket Scoreboard Styling (SkyExchange Theme - Desktop & Mobile)
   ========================================================================== */

.live-scoreboard-wrapper {
    background: linear-gradient(135deg, #182938 0%, #101c27 100%);
    border-bottom: 2px solid #ffb800;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-family: 'Montserrat', 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 10px 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    user-select: none;
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 2px;
}

.live-scoreboard-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Left Section: Team, Live Badge, Score, Overs */
.ls-left-col {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

.ls-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.ls-live-dot {
    width: 7px;
    height: 7px;
    background-color: #10b981;
    border-radius: 50%;
    animation: ls-pulse 1.4s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes ls-pulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    50% { opacity: 0.6; transform: scale(1.15); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}

.ls-team-score-group {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ls-batting-team {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.ls-bat-icon {
    color: #ffb800;
    font-size: 14px;
    display: inline-block;
    filter: drop-shadow(0 0 4px rgba(255, 184, 0, 0.5));
}

.ls-score-val {
    font-size: 22px;
    font-weight: 800;
    color: #ffb800;
    letter-spacing: -0.5px;
    text-shadow: 0 0 8px rgba(255, 184, 0, 0.3);
}

.ls-overs-val {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
}

.ls-rates-badges {
    display: flex;
    gap: 6px;
    font-size: 11px;
}

.ls-badge-crr {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.ls-badge-rrr {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

/* Center Section: Active Players (Batsmen & Bowler) */
.ls-center-col {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    flex: 1 1 auto;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 16px;
}

.ls-players-box {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ls-player-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #cbd5e1;
    white-space: nowrap;
}

.ls-player-name {
    font-weight: 600;
    color: #f1f5f9;
}

.ls-player-item.ls-striker .ls-player-name {
    color: #ffb800;
}

.ls-player-stat {
    font-weight: 500;
    color: #94a3b8;
    background: rgba(0, 0, 0, 0.25);
    padding: 1px 6px;
    border-radius: 4px;
}

.ls-bowler-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

/* Right Section: Recent Deliveries / Over Balls */
.ls-right-col {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.ls-over-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ls-balls-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ls-ball {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s;
}

.ls-ball:hover {
    transform: scale(1.15);
}

/* Ball types */
.ls-ball-dot {
    background: #334155;
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ls-ball-run {
    background: #0284c7;
    color: #ffffff;
}

.ls-ball-four {
    background: #16a34a;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 0 6px rgba(22, 163, 74, 0.5);
}

.ls-ball-six {
    background: #9333ea;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 0 8px rgba(147, 51, 234, 0.6);
}

.ls-ball-wicket {
    background: #dc2626;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
}

.ls-ball-extra {
    background: #d97706;
    color: #ffffff;
}

/* Bottom Bar: Status / Info Strip */
.ls-sub-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    font-size: 11px;
    color: #94a3b8;
}

.ls-status-text {
    font-weight: 600;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-meta-text {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.ls-venue-format {
    color: #64748b;
}

.ls-prev-score {
    color: #cbd5e1;
}

/* ==========================================================================
   Mobile-Specific Scoreboard Optimizations (<= 991px)
   ========================================================================== */

.mobile-live-score-container {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.mobile-live-score-container .live-scoreboard-wrapper {
    margin: 0 0 4px 0;
    border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid #ffb800;
}

@media (max-width: 991px) {
    .live-scoreboard-wrapper {
        padding: 8px 10px;
    }

    .live-scoreboard-main {
        flex-direction: column;
        align-items: stretch;
        gap: 7px;
    }

    .ls-left-col {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
    }

    .ls-team-score-group {
        gap: 6px;
    }

    .ls-batting-team {
        font-size: 13.5px;
    }

    .ls-score-val {
        font-size: 18px;
    }

    .ls-overs-val {
        font-size: 12px;
    }

    .ls-center-col {
        border-left: none;
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 5px 0;
        width: 100%;
        justify-content: space-between;
    }

    .ls-players-box {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
    }

    .ls-player-item {
        font-size: 11px;
    }

    .ls-bowler-item {
        font-size: 10.5px;
        padding: 1px 6px;
    }

    .ls-right-col {
        width: 100%;
        justify-content: space-between;
        gap: 6px;
    }

    .ls-balls-container {
        gap: 4px;
    }

    .ls-ball {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .ls-sub-bar {
        font-size: 10.5px;
        margin-top: 4px;
        padding-top: 4px;
        flex-wrap: wrap;
        gap: 4px;
    }
}
