@import url("style.css");

:root {
    --match-bg: #203961;
    --match-text: #f8fafc;
    --match-muted: #94a3b8;
    --match-border: rgba(148, 163, 184, 0.15);
    --match-border-strong: rgba(148, 163, 184, 0.24);
    --match-card: rgba(255, 255, 255, 0.05);
}

.matches-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    width: 100%;
    padding: 10px 0 20px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .matches-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.mobile-card {
    background: var(--match-bg);
    color: var(--match-text);
    padding: 14px 14px 12px;
    border-radius: 14px;
    border: 1px solid var(--match-border);
    box-shadow: 0 15px 28px rgba(0, 0, 0, 0.24);
    position: relative;
}

.mobile-card.completed {
    background: #162a54;
    border-color: rgba(96, 165, 250, 0.35);
}

.mobile-card.completed::before {
    background: linear-gradient(90deg, #60a5fa, #22c55e);
}

.mobile-card.upcoming {
    background: #1f345e;
    border-color: rgba(248, 195, 113, 0.35);
}

.mobile-card.upcoming::before {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.mobile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #60a5fa, #34d399);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.mobile-card > * {
    position: relative;
    z-index: 1;
}

.mobile-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.75rem;
    color: var(--match-muted);
}

.mobile-header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mobile-header .match-date {
    text-align: center;
    justify-self: center;
}

.mobile-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.mobile-main .team {
    width: 36%;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--match-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.score {
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    color: var(--match-text);
    white-space: nowrap;
}

.mobile-events {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-top: 8px;
}

.event-text {
    flex: 1 1 45%;
    min-width: 0;
    font-size: 0.70rem;
    line-height: 1.4;
    color: var(--match-muted);
    white-space: normal;
    overflow-wrap: anywhere;
}

.event-text.left {
    text-align: left;
}

.event-text.right {
    text-align: right;
}

@media (max-width: 620px) {
    .mobile-main {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .mobile-main .team {
        width: auto;
        min-width: 0;
        max-width: 30%;
        font-size: 0.82rem;
    }

    .score {
        font-size: 1.12rem;
    }

    .mobile-events {
        gap: 8px;
    }
}
