.match-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.is-live-card {
    border-color: rgba(220, 38, 38, 0.18);
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.08);
}

.is-upcoming-card {
    border-color: rgba(37, 99, 235, 0.14);
}

.is-finished-card {
    border-color: rgba(22, 163, 74, 0.14);
    box-shadow: 0 14px 30px rgba(22, 163, 74, 0.05);
}

.is-postponed-card {
    border-color: rgba(245, 158, 11, 0.28);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.08);
    background: linear-gradient(180deg, #fffdf7, #ffffff);
}

.is-cancelled-card {
    border-color: rgba(71, 85, 105, 0.24);
    box-shadow: 0 14px 30px rgba(71, 85, 105, 0.08);
    background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.is-interrupted-card {
    border-color: rgba(168, 85, 247, 0.24);
    box-shadow: 0 14px 30px rgba(168, 85, 247, 0.08);
    background: linear-gradient(180deg, #fcfaff, #ffffff);
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.match-card-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.match-card-top {
    padding: 1rem 1rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.status-pill--icon {
    min-width: 2.35rem;
    justify-content: center;
    padding-inline: 0.65rem;
    gap: 0;
}

.status-live {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.status-upcoming {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

.status-finished {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.status-postponed {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.status-cancelled {
    background: rgba(71, 85, 105, 0.12);
    color: #475569;
}

.status-interrupted {
    background: rgba(168, 85, 247, 0.12);
    color: #7c3aed;
}

.match-card-kicker {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
    color: #64748b;
    font-size: 0.8rem;
}

.match-card-kicker span {
    color: #0f172a;
    font-weight: 700;
}

.match-card-main {
    padding: 0 1rem 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.match-info {
    padding: 1rem;
    flex-grow: 1;
}

.team-stack {
    display: grid;
    align-items: center;
    align-content: start;
    align-self: start;
    gap: 10px;
    min-width: 0;
    justify-items: center;
}

.team-stack--home {
    grid-template-columns: 1fr;
    grid-template-areas:
        "emblem"
        "name";
    text-align: center;
}

.team-stack--away {
    grid-template-columns: 1fr;
    grid-template-areas:
        "emblem"
        "name";
    text-align: center;
}

.team-meta {
    min-width: 0;
    grid-area: name;
    min-height: 2.8rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}

.team-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    border: 1px solid rgba(226, 232, 240, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 7px;
}

.team-logo-fallback {
    color: #5c6bc0;
    font-size: 1rem;
}

.team-emblem-stack {
    display: grid;
    grid-template-rows: minmax(54px, auto) 58px minmax(54px, auto);
    align-items: center;
    justify-items: center;
    row-gap: 6px;
    grid-area: emblem;
}

.team-name {
    max-width: 11ch;
    font-weight: 700;
    color: #334155;
    font-size: 0.7rem;
    line-height: 1.22;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
    text-wrap: balance;
}

.team-event-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: center;
    gap: 4px;
    align-items: start;
    align-content: start;
    width: 100%;
    max-width: 116px;
}

.team-stack--home .team-event-row,
.team-stack--away .team-event-row {
    justify-content: center;
}

.team-event-row--cards,
.team-event-row--goals {
    min-height: 54px;
}

.team-event-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 0.2rem 0.22rem;
    border-radius: 12px;
    font-size: 0.66rem;
    line-height: 1;
    font-weight: 800;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.92);
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
}

.team-event-chip.is-goal {
    color: #1d4ed8;
}

.team-event-chip i {
    font-size: 0.62rem;
    flex-shrink: 0;
    line-height: 1;
}

.team-event-chip.is-yellow {
    color: #a16207;
    background: rgba(250, 204, 21, 0.18);
    border-color: rgba(250, 204, 21, 0.42);
}

.team-event-chip.is-red {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.25);
}

.match-scoreboard {
    text-align: center;
    min-width: 110px;
}

.match-league-name {
    max-width: 132px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.35;
    color: #64748b;
    text-align: center;
}

.match-league-name--center {
    margin: 0 auto 0.55rem;
}

.match-scoreline {
    font-size: 1.5rem;
    font-weight: 900;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.score-separator {
    color: #94a3b8;
}

.match-context-line {
    margin-top: 6px;
    font-size: 0.78rem;
    color: #64748b;
}

.match-context-line--state {
    font-weight: 800;
}

.is-postponed-card .match-context-line--state {
    color: #b45309;
}

.is-cancelled-card .match-context-line--state {
    color: #475569;
}

.is-interrupted-card .match-context-line--state {
    color: #7c3aed;
}

.match-context-line--primary {
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
}

.match-detail-strip {
    padding: 0 1rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    text-align: center;
}

.match-live-summary {
    margin: 0 1rem 1rem;
    padding: 0.9rem;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fafc, #fff);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.summary-block + .summary-block {
    margin-top: 0.75rem;
}

.summary-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.55rem;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 800;
}

.summary-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.76rem;
    color: #475569;
}

.summary-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.event-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.38rem 0.62rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.event-card-mark {
    width: 10px;
    height: 14px;
    border-radius: 2px;
    display: inline-block;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.event-chip.warning {
    background: rgba(250, 204, 21, 0.18);
    color: #a16207;
}

.event-chip.danger {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.event-card-mark.warning {
    background: #facc15;
    box-shadow: inset 0 0 0 1px rgba(161, 98, 7, 0.18);
}

.event-card-mark.danger {
    background: #dc2626;
}

.muted {
    color: #94a3b8;
}

.filter-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.date-pill-bar {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}

.date-pill {
    min-width: 112px;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    color: #0f172a;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.date-pill.active {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    border-color: transparent;
}

.date-pill span {
    font-size: 0.8rem;
    opacity: 0.82;
}

.date-picker-wrap {
    min-width: 180px;
}

.date-picker-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    color: #64748b;
}

.matches-intro {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.matches-intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 800;
}

.matches-intro-text {
    color: #64748b;
    font-size: 0.88rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #718096;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
}

@media (max-width: 767px) {
    .match-card {
        border-radius: 16px;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    }

    .match-card-top {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-bottom: 0.5rem;
    }

    .status-pill {
        align-self: flex-start;
        padding: 0.3rem 0.58rem;
        font-size: 0.66rem;
    }

    .match-card-kicker {
        width: 100%;
        text-align: right;
    }

    .match-card-main {
        grid-template-columns: minmax(0, 1fr) minmax(88px, auto) minmax(0, 1fr);
        align-items: start;
        gap: 8px;
    }

    .match-scoreboard {
        order: 0;
        min-width: 0;
    }

    .match-league-badge {
        margin-bottom: 0.4rem;
    }

    .match-league-logo {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }

    .match-league-name {
        max-width: 100%;
        font-size: 0.68rem;
        line-height: 1.25;
    }

    .match-scoreline {
        font-size: 1.14rem;
    }

    .match-card-top,
    .match-card-main,
    .match-detail-strip {
        padding-right: 0.68rem;
        padding-left: 0.68rem;
    }

    .team-stack,
    .team-stack--home,
    .team-stack--away {
        grid-template-columns: 1fr;
        grid-template-areas:
            "emblem"
            "name";
        justify-items: center;
        text-align: center;
        gap: 6px;
    }

    .team-meta {
        grid-area: name;
        min-height: 2.35rem;
        text-align: center;
        align-items: flex-start;
    }

    .team-emblem-stack {
        grid-area: emblem;
        grid-template-rows: minmax(34px, auto) 42px minmax(34px, auto);
        row-gap: 4px;
    }

    .team-logo {
        width: 42px;
        height: 42px;
        margin: 0;
        border-radius: 12px;
        box-shadow: none;
    }

    .team-logo img {
        padding: 4px;
    }

    .team-name {
        margin-top: 3px;
        text-align: center;
    }

    .team-name {
        font-size: 0.72rem;
        line-height: 1.22;
        max-width: 100%;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .match-context-line {
        line-height: 1.28;
        font-size: 0.72rem;
    }

    .match-detail-strip {
        gap: 6px;
        justify-content: center;
        padding-top: 0.2rem;
        padding-bottom: 0.85rem;
    }

    .detail-chip {
        max-width: none;
        font-size: 0.66rem;
        padding: 0.34rem 0.58rem;
    }

    .team-emblem-stack {
        grid-template-rows: minmax(34px, auto) 42px minmax(34px, auto);
    }

    .team-event-row {
        margin-top: 0;
        max-width: 92px;
        gap: 3px;
        align-items: center;
        align-content: center;
    }

    .team-event-row--cards,
    .team-event-row--goals {
        min-height: 34px;
    }

    .team-event-chip {
        padding: 0.14rem 0.16rem;
        border-radius: 9px;
        font-size: 0.56rem;
        gap: 1px;
    }

    .team-event-chip i {
        font-size: 0.46rem;
    }

    .match-context-line--primary {
        margin-bottom: 0.26rem;
        font-size: 0.72rem;
        font-weight: 800;
    }

    .match-live-summary {
        display: none;
    }

    .summary-columns {
        grid-template-columns: 1fr;
    }

    .date-picker-wrap {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .match-card-main {
        grid-template-columns: minmax(0, 1fr) minmax(82px, auto) minmax(0, 1fr);
        gap: 6px;
    }

    .team-meta {
        min-height: 2.2rem;
    }

    .team-name {
        font-size: 0.68rem;
        max-width: 100%;
    }

    .match-card-top,
    .match-card-main,
    .match-detail-strip {
        padding-right: 0.78rem;
        padding-left: 0.78rem;
    }
}

@media (max-width: 360px) {
    .match-scoreline {
        font-size: 1.02rem;
    }

    .team-name {
        font-size: 0.62rem;
    }
}

.pagination .page-item .page-link {
    color: #667eea;
    border: none;
    margin: 0 2px;
    border-radius: 20px !important;
    transition: all 0.3s ease;
}

.pagination .page-item .page-link:hover {
    background: #667eea;
    color: white;
}

.pagination .page-item.active .page-link {
    background: #667eea;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    background: #f8f9fa;
}

@media (max-width: 768px) {
    .teams-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .score {
        width: 100%;
    }

    .match-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}
