/* ===================================================================
   Bảng Kèo — Football Features CSS
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bk-bg: #0f1117;
    --bk-surface: #1a1d2e;
    --bk-card: #1e2235;
    --bk-border: rgba(255, 255, 255, 0.08);
    --bk-primary: #4f8ef7;
    --bk-green: #22c55e;
    --bk-orange: #f97316;
    --bk-red: #ef4444;
    --bk-yellow: #eab308;
    --bk-text: #e2e8f0;
    --bk-text-muted: #64748b;
    --bk-skeleton: #252840;
    --bk-radius: 12px;
    --bk-radius-sm: 8px;
    --bk-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --bk-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Zone colors */
    --bk-ucl: rgba(59, 130, 246, 0.15);
    --bk-uel: rgba(249, 115, 22, 0.12);
    --bk-rel: rgba(239, 68, 68, 0.12);
    --bk-ucl-border: #3b82f6;
    --bk-uel-border: #f97316;
    --bk-rel-border: #ef4444;
}

/* === Base Widget === */
.bk-football-widget {
    font-family: var(--bk-font);
    background: var(--bk-surface);
    border: 1px solid var(--bk-border);
    border-radius: var(--bk-radius);
    overflow: hidden;
    margin: 24px 0;
    box-shadow: var(--bk-shadow);
    color: var(--bk-text);
}

/* === Header === */
.bk-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(79, 142, 247, 0.15) 0%, rgba(139, 92, 246, 0.10) 100%);
    border-bottom: 1px solid var(--bk-border);
    gap: 12px;
    flex-wrap: wrap;
}

.bk-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bk-icon {
    font-size: 22px;
    line-height: 1;
}

.bk-widget-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--bk-text);
    letter-spacing: -0.01em;
}

/* === League Selector === */
.bk-league-select {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--bk-border);
    border-radius: var(--bk-radius-sm);
    color: var(--bk-text);
    padding: 6px 12px;
    font-size: 13px;
    font-family: var(--bk-font);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.bk-league-select:hover,
.bk-league-select:focus {
    border-color: var(--bk-primary);
    background: rgba(79, 142, 247, 0.12);
}

.bk-league-select option {
    background: #1a1d2e;
    color: var(--bk-text);
}

/* === Widget Body === */
.bk-widget-body {
    padding: 0;
}

/* === Error State === */
.bk-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: var(--bk-red);
    font-size: 14px;
    background: rgba(239, 68, 68, 0.08);
    border-radius: var(--bk-radius-sm);
    margin: 12px;
}

/* === Empty State === */
.bk-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--bk-text-muted);
    font-size: 14px;
}

.bk-empty .bk-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

/* ===================================================================
   LOADING SKELETON
   =================================================================== */
.bk-loading-skeleton {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@keyframes bk-shimmer {
    0% {
        background-position: -600px 0;
    }

    100% {
        background-position: 600px 0;
    }
}

.bk-skeleton-row {
    background: linear-gradient(90deg, var(--bk-skeleton) 25%, #2e325a 50%, var(--bk-skeleton) 75%);
    background-size: 1200px 100%;
    animation: bk-shimmer 1.4s infinite;
    border-radius: 6px;
}

.bk-skeleton-match {
    height: 64px;
}

.bk-skeleton-standing {
    height: 44px;
}

/* ===================================================================
   MATCH CARDS (Lịch thi đấu & Kết quả)
   =================================================================== */
.bk-matches-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bk-match-day-group {
    border-bottom: 1px solid var(--bk-border);
}

.bk-match-day-group:last-child {
    border-bottom: none;
}

.bk-match-day-header {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 11px;
    font-weight: 600;
    color: var(--bk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bk-match-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.bk-match-card:last-child {
    border-bottom: none;
}

.bk-match-card:hover {
    background: rgba(79, 142, 247, 0.06);
}

/* Home team */
.bk-team {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bk-team-home {
    justify-content: flex-end;
    text-align: right;
}

.bk-team-away {
    justify-content: flex-start;
    text-align: left;
}

.bk-team-crest {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.bk-team-crest-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bk-card);
    border: 1px solid var(--bk-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    color: var(--bk-text-muted);
}

.bk-team-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--bk-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* Score/Time center */
.bk-match-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 80px;
}

.bk-score {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 700;
    color: var(--bk-text);
    letter-spacing: -0.02em;
}

.bk-score-sep {
    color: var(--bk-text-muted);
    font-weight: 400;
}

.bk-match-time {
    font-size: 16px;
    font-weight: 700;
    color: var(--bk-primary);
    font-variant-numeric: tabular-nums;
}

.bk-match-date-label {
    font-size: 10px;
    color: var(--bk-text-muted);
    letter-spacing: 0.04em;
}

.bk-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bk-status-FINISHED {
    background: rgba(34, 197, 94, 0.15);
    color: var(--bk-green);
}

.bk-status-SCHEDULED,
.bk-status-TIMED {
    background: rgba(79, 142, 247, 0.15);
    color: var(--bk-primary);
}

.bk-status-POSTPONED {
    background: rgba(234, 179, 8, 0.15);
    color: var(--bk-yellow);
}

.bk-status-LIVE {
    background: rgba(239, 68, 68, 0.15);
    color: var(--bk-red);
    animation: bk-pulse 1.5s ease-in-out infinite;
}

@keyframes bk-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* ===================================================================
   STANDINGS TABLE
   =================================================================== */
.bk-standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bk-standings-table thead tr {
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--bk-border);
}

.bk-standings-table thead th {
    padding: 10px 12px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--bk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bk-standings-table thead th.th-team {
    text-align: left;
    padding-left: 20px;
}

.bk-standings-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
    position: relative;
}

.bk-standings-table tbody tr:last-child {
    border-bottom: none;
}

.bk-standings-table tbody tr:hover {
    background: rgba(79, 142, 247, 0.06);
}

/* Zone highlighting */
.bk-zone-ucl {
    background: var(--bk-ucl);
    border-left: 3px solid var(--bk-ucl-border);
}

.bk-zone-uel {
    background: var(--bk-uel);
    border-left: 3px solid var(--bk-uel-border);
}

.bk-zone-rel {
    background: var(--bk-rel);
    border-left: 3px solid var(--bk-rel-border);
}

.bk-standings-table tbody td {
    padding: 10px 12px;
    text-align: center;
    color: var(--bk-text);
}

.bk-standings-table tbody td.td-team {
    text-align: left;
    padding-left: 8px;
}

.bk-pos {
    color: var(--bk-text-muted);
    font-weight: 600;
    min-width: 28px;
    display: inline-block;
    text-align: center;
}

.bk-standings-team {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 0;
}

.bk-standings-team img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.bk-standings-team-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.bk-pts {
    font-weight: 700;
    color: var(--bk-text);
    font-size: 14px;
}

.bk-gd-pos {
    color: var(--bk-green);
}

.bk-gd-neg {
    color: var(--bk-red);
}

/* Form badges */
.bk-form {
    display: flex;
    gap: 3px;
    justify-content: center;
}

.bk-form-w,
.bk-form-d,
.bk-form-l {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.bk-form-w {
    background: var(--bk-green);
}

.bk-form-d {
    background: var(--bk-text-muted);
}

.bk-form-l {
    background: var(--bk-red);
}

/* Legend */
.bk-standings-legend {
    display: flex;
    gap: 16px;
    padding: 10px 20px;
    border-top: 1px solid var(--bk-border);
    flex-wrap: wrap;
}

.bk-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--bk-text-muted);
}

.bk-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.bk-legend-ucl {
    background: var(--bk-ucl-border);
}

.bk-legend-uel {
    background: var(--bk-uel-border);
}

.bk-legend-rel {
    background: var(--bk-rel-border);
}
.bk-live-banner {
    padding: 8px 12px;
    margin-bottom: 12px;
    background: #fff1f0;
    border: 1px solid #ffa39e;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #cf1322;
}
.bk-live-hint { font-weight: 400; color: #8c8c8c; font-size: 12px; }
.bk-match-live { border-left: 3px solid #f5222d; }
.bk-score-live { color: #cf1322; font-weight: 700; }
.bk-status-LIVE {
    background: #fff1f0;
    color: #cf1322;
    animation: bk-pulse 1.5s ease-in-out infinite;
}
@keyframes bk-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}
/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 640px) {
    .bk-match-card {
        grid-template-columns: 1fr auto 1fr;
        padding: 10px 12px;
        gap: 8px;
    }

    .bk-team-name {
        font-size: 11px;
        max-width: 90px;
    }

    .bk-score {
        font-size: 16px;
    }

    .bk-match-time {
        font-size: 14px;
    }

    .bk-standings-table thead th:not(.th-team):not(:last-child):not(.th-pts) {
        display: none;
    }

    .bk-standings-table tbody td:not(.td-team):not(:last-child):not(.td-pts) {
        display: none;
    }

    .bk-form {
        display: none;
    }

    .bk-standings-legend {
        display: none;
    }

    .bk-standings-team-name {
        max-width: 110px;
    }

    .bk-widget-header {
        gap: 8px;
    }
}