/* ============================================================
   WP Live Football Score – Frontend Styles
   ============================================================ */

/* --- Reset & Base --- */
.wplfs-scoreboard *,
.wplfs-scoreboard *::before,
.wplfs-scoreboard *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.wplfs-match-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ============================================================
   SCOREBOARD CARD
   ============================================================ */
.wplfs-scoreboard {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    border-radius: 16px;
    overflow: hidden;
    max-width: 680px;
    margin: 0 auto 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wplfs-scoreboard:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* ============================================================
   DARK THEME (default)
   ============================================================ */
.wplfs-theme-dark {
    background: linear-gradient(135deg, #0f1923 0%, #1a2a3a 50%, #0f1923 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.wplfs-theme-dark .wplfs-header {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wplfs-theme-dark .wplfs-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
}

.wplfs-theme-dark .wplfs-team-name {
    color: #e0e6ef;
}

.wplfs-theme-dark .wplfs-score-display {
    color: #ffffff;
}

.wplfs-theme-dark .wplfs-shield-placeholder {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.wplfs-theme-dark .wplfs-scorers {
    color: rgba(255, 255, 255, 0.65);
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
.wplfs-theme-light {
    background: linear-gradient(135deg, #f8faff 0%, #e8f0fe 50%, #f8faff 100%);
    color: #1a2a3a;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.wplfs-theme-light .wplfs-header {
    background: rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.wplfs-theme-light .wplfs-footer {
    background: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.4);
}

.wplfs-theme-light .wplfs-team-name {
    color: #1a2a3a;
}

.wplfs-theme-light .wplfs-score-display {
    color: #1a2a3a;
}

.wplfs-theme-light .wplfs-shield-placeholder {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.5);
}

.wplfs-theme-light .wplfs-scorers {
    color: rgba(0, 0, 0, 0.6);
}

/* ============================================================
   HEADER
   ============================================================ */
.wplfs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    gap: 12px;
}

.wplfs-header-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.wplfs-league-badge {
    font-size: 12px;
    opacity: 0.85;
}

/* ============================================================
   STATUS BADGE
   ============================================================ */
.wplfs-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.wplfs-status-live {
    background: #e53e3e;
    color: #fff;
    animation: wplfs-pulse-bg 2s ease-in-out infinite;
}

.wplfs-status-halftime {
    background: #d69e2e;
    color: #fff;
}

.wplfs-status-finished {
    background: #38a169;
    color: #fff;
}

.wplfs-status-scheduled {
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
}

.wplfs-status-postponed {
    background: rgba(255, 165, 0, 0.25);
    color: #ffa500;
}

/* Live dot animation */
.wplfs-live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: wplfs-blink 1.2s ease-in-out infinite;
}

@keyframes wplfs-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

@keyframes wplfs-pulse-bg {
    0%, 100% { background: #e53e3e; }
    50% { background: #c53030; }
}

.wplfs-minute {
    font-size: 13px;
    font-weight: 800;
}

/* ============================================================
   SCORE AREA
   ============================================================ */
.wplfs-score-area {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 28px 20px 24px;
    gap: 16px;
}

/* ============================================================
   TEAM BLOCK
   ============================================================ */
.wplfs-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.wplfs-shield-wrap {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wplfs-shield {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.2s ease;
}

.wplfs-scoreboard:hover .wplfs-shield {
    transform: scale(1.05);
}

.wplfs-shield-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
}

.wplfs-team-name {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    max-width: 140px;
}

/* ============================================================
   SCORE CENTER
   ============================================================ */
.wplfs-score-center {
    text-align: center;
    min-width: 120px;
}

.wplfs-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 56px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    font-variant-numeric: tabular-nums;
}

.wplfs-score-divider {
    font-size: 40px;
    font-weight: 300;
    opacity: 0.6;
    margin: 0 4px;
}

.wplfs-score-vs {
    font-size: 28px;
    font-weight: 900;
    opacity: 0.5;
    letter-spacing: 4px;
}

.wplfs-match-date {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 6px;
}

.wplfs-halftime-label {
    font-size: 13px;
    font-weight: 700;
    color: #d69e2e;
    margin-top: 4px;
    letter-spacing: 2px;
}

/* ============================================================
   SCORERS LIST
   ============================================================ */
.wplfs-scorers {
    list-style: none;
    font-size: 12px;
    text-align: center;
    line-height: 1.8;
    max-width: 140px;
}

/* ============================================================
   MATCH DETAILS: STADIUM & REFEREE
   ============================================================ */
.wplfs-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

.wplfs-theme-light .wplfs-details {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.wplfs-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 150px;
}

.wplfs-detail-icon {
    font-size: 16px;
    opacity: 0.8;
}

.wplfs-detail-text {
    font-weight: 500;
    opacity: 0.9;
}

/* ============================================================
   FOOTER
   ============================================================ */
.wplfs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    font-size: 11px;
}

.wplfs-auto-refresh {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #e53e3e;
    font-weight: 600;
}

.wplfs-auto-refresh::before {
    content: '↻';
    animation: wplfs-spin 2s linear infinite;
    display: inline-block;
}

@keyframes wplfs-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================
   GOAL ANIMATION
   ============================================================ */
.wplfs-goal-flash {
    animation: wplfs-goal-anim 1.5s ease-out;
}

@keyframes wplfs-goal-anim {
    0%   { transform: scale(1); }
    20%  { transform: scale(1.25); color: #ffd700; }
    40%  { transform: scale(1.1); }
    60%  { transform: scale(1.2); color: #ffd700; }
    100% { transform: scale(1); }
}

/* ============================================================
   ERROR / EMPTY STATES
   ============================================================ */
.wplfs-error,
.wplfs-no-matches {
    padding: 16px;
    background: rgba(229, 62, 62, 0.1);
    border: 1px solid rgba(229, 62, 62, 0.3);
    border-radius: 8px;
    color: #e53e3e;
    font-size: 14px;
    text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
    .wplfs-score-display {
        font-size: 40px;
    }

    .wplfs-shield-wrap {
        width: 60px;
        height: 60px;
    }

    .wplfs-shield,
    .wplfs-shield-placeholder {
        max-width: 60px;
        max-height: 60px;
        width: 60px;
        height: 60px;
    }

    .wplfs-team-name {
        font-size: 13px;
        max-width: 100px;
    }

    .wplfs-score-area {
        padding: 20px 12px 16px;
        gap: 8px;
    }

    .wplfs-score-center {
        min-width: 90px;
    }
}
