/**
 * Live Cricket Score - Stylesheet
 * Responsive, Dark & Light Mode Scorecard & Ticker
 */

:root {
    --lcs-primary: #10b981;
    --lcs-primary-dark: #059669;
    --lcs-live-red: #ef4444;
    --lcs-strike-gold: #f59e0b;
}

/* Base Widget Container */
.lcs-widget.lcs-scoreboard {
    max-width: 680px;
    margin: 1.5rem auto;
    border-radius: 14px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    overflow: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.lcs-widget * {
    box-sizing: border-box;
}

/* Dark Theme */
.lcs-widget.lcs-theme-dark {
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid #1e293b;
}

.lcs-widget.lcs-theme-dark .lcs-header {
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.lcs-widget.lcs-theme-dark .lcs-score-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
}

.lcs-widget.lcs-theme-dark .lcs-table th {
    background: #1e293b;
    color: #94a3b8;
    border-bottom: 1px solid #334155;
}

.lcs-widget.lcs-theme-dark .lcs-table td {
    border-bottom: 1px solid #1e293b;
    color: #e2e8f0;
}

.lcs-widget.lcs-theme-dark .lcs-footer-meta {
    background: #131d35;
    border-top: 1px solid #1e293b;
}

/* Light Theme */
.lcs-widget.lcs-theme-light {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.lcs-widget.lcs-theme-light .lcs-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.lcs-widget.lcs-theme-light .lcs-score-card {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border: 1px solid #e2e8f0;
}

.lcs-widget.lcs-theme-light .lcs-table th {
    background: #f1f5f9;
    color: #475569;
    border-bottom: 1px solid #cbd5e1;
}

.lcs-widget.lcs-theme-light .lcs-table td {
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

.lcs-widget.lcs-theme-light .lcs-footer-meta {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Header Area */
.lcs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    font-size: 0.82rem;
}

.lcs-badge-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lcs-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.15);
    color: var(--lcs-live-red);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.lcs-live-dot {
    width: 7px;
    height: 7px;
    background-color: var(--lcs-live-red);
    border-radius: 50%;
    animation: lcs-pulse 1.4s infinite;
}

@keyframes lcs-pulse {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.lcs-match-id {
    font-size: 0.75rem;
    opacity: 0.6;
}

.lcs-refresh-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    opacity: 0.8;
}

.lcs-manual-refresh {
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: transform 0.2s, background 0.2s;
}

.lcs-manual-refresh:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lcs-manual-refresh.lcs-spinning svg {
    animation: lcs-spin 0.8s linear infinite;
}

@keyframes lcs-spin {
    100% { transform: rotate(360deg); }
}

/* Title Wrap */
.lcs-title-wrap {
    padding: 16px 20px 8px;
}

.lcs-title {
    margin: 0 0 4px 0 !important;
    font-size: 1.15rem !important;
    font-weight: 700;
    line-height: 1.35;
}

.lcs-summary {
    margin: 0 !important;
    font-size: 0.82rem;
    opacity: 0.75;
}

/* Score Display Card */
.lcs-score-card {
    margin: 12px 20px 18px;
    padding: 16px 20px;
    border-radius: 10px;
    text-align: center;
}

.lcs-score-main {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--lcs-primary);
    transition: color 0.3s;
}

.lcs-score-updating {
    animation: lcs-flash 0.6s ease;
}

@keyframes lcs-flash {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); color: var(--lcs-strike-gold); }
    100% { transform: scale(1); }
}

.lcs-status-banner {
    margin-top: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #eab308;
}

/* Stats Section & Tables */
.lcs-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 20px 16px;
}

.lcs-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    color: #94a3b8;
}

.lcs-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 0.84rem;
    margin: 0 !important;
}

.lcs-table th,
.lcs-table td {
    padding: 7px 10px !important;
    text-align: left;
}

.lcs-table th:not(:first-child),
.lcs-table td:not(:first-child) {
    text-align: right;
}

.lcs-player-name {
    font-weight: 600;
}

.lcs-strike-dot {
    color: var(--lcs-strike-gold);
    font-weight: 900;
    margin-left: 2px;
}

.lcs-on-strike {
    background: rgba(245, 158, 11, 0.08);
}

.lcs-empty {
    text-align: center !important;
    opacity: 0.5;
    font-style: italic;
    padding: 14px !important;
}

/* Footer Meta */
.lcs-footer-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 20px;
    font-size: 0.8rem;
}

.lcs-meta-key {
    opacity: 0.7;
    margin-right: 4px;
}

.lcs-meta-val {
    font-weight: 600;
    color: var(--lcs-primary);
}

/* Compact Ticker Mode */
.lcs-ticker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    margin: 8px 0;
}

.lcs-ticker.lcs-theme-dark {
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid #334155;
}

.lcs-ticker.lcs-theme-light {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.lcs-badge-mini {
    padding: 2px 6px;
    font-size: 0.68rem;
}

.lcs-ticker-score {
    font-weight: 700;
    color: var(--lcs-primary);
}

.lcs-ticker-divider {
    opacity: 0.4;
}

/* Mobile Responsive */
@media (max-width: 580px) {
    .lcs-widget.lcs-scoreboard {
        margin: 1rem 0;
        border-radius: 8px;
    }

    .lcs-score-main {
        font-size: 1.35rem;
    }

    .lcs-table th,
    .lcs-table td {
        padding: 6px 5px !important;
        font-size: 0.78rem;
    }

    .lcs-footer-meta {
        flex-direction: column;
        gap: 6px;
    }
}

