/* Market Filter Pills */
.market-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    background-color: #f1f5f9;
    color: #1e293b;
    transition: all 0.2s ease;
    text-decoration: none;
}

.market-pill:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.market-pill.active {
    background-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

/* Date Tabs (Yesterday, Today, Tomorrow) */
.date-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3.1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-tab-btn:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

.date-tab-btn.active {
    background-color: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

/* Match Row Layout: Mobile Horizontal Teams + Stacked Pills, Desktop Single-Line */
.match-row {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

@media (min-width: 768px) {
    .match-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }
}

.league-logo {
    width: 1.125rem;
    height: 1.125rem;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 0.15rem;
}

.league-logo-fallback {
    display: none;
}

/* Left Column: Home | Time/Score | Away — spaced, time centered between names */
.match-teams-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.85rem;
    width: 100%;
    min-width: 0;
}

@media (min-width: 640px) {
    .match-teams-col {
        column-gap: 1.15rem;
    }
}

@media (min-width: 768px) {
    .match-teams-col {
        flex: 1 1 auto;
        column-gap: 1.35rem;
        padding-right: 0.5rem;
    }
}

.team-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
}

.team-block.home-side {
    justify-content: flex-end;
    text-align: right;
    padding: 0;
}

.team-block.away-side {
    justify-content: flex-start;
    text-align: left;
    padding: 0;
}

.team-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 0 1 auto;
    margin-bottom: 0;
}

@media (min-width: 640px) {
    .team-name {
        font-size: 0.85rem;
    }
}

/* Form Badges (W / D / L) */
.form-badges {
    display: flex;
    align-items: center;
    gap: 2px;
}

.badge-w,
.badge-d,
.badge-l {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    font-size: 9px;
    font-weight: 800;
    border-radius: 3px;
    color: #ffffff;
    line-height: 1;
}

.badge-w {
    background-color: #10b981;
}

.badge-d {
    background-color: #eab308;
}

.badge-l {
    background-color: #ef4444;
}

/* Team Initials Circle */
.team-logo-circle {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* Match Center: WIN/LOST on top, time + score on one line below */
.match-center-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    width: max-content;
    max-width: 100%;
    min-width: 3rem;
    margin: 0 auto;
    padding: 0;
    text-align: center;
}

.match-score-line {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.match-time {
    font-size: 0.78rem;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.1;
}

.match-score {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

@media (min-width: 640px) {
    .match-time {
        font-size: 0.82rem;
    }

    .match-score {
        font-size: 0.95rem;
    }
}

.match-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    padding: 0.12rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

.match-result-win {
    background-color: #16a34a;
    color: #ffffff;
}

.match-result-loss {
    background-color: #dc2626;
    color: #ffffff;
}

/* Right Column: TIPS, ODDS, PROB. % pills */
.match-pills-col {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .match-pills-col {
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 0.45rem;
    }
}

.pred-pill {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 9999px;
    padding: 0.2rem 0.25rem 0.2rem 0.55rem;
    font-size: 0.68rem;
    white-space: nowrap;
    gap: 0.35rem;
}

.pred-pill .pill-label {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pred-pill .pill-val {
    background-color: #ffffff;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    font-weight: 800;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pill-tip,
.pill-prob {
    background-color: #ecfdf5;
    border: 1px solid #166534;
    color: #14532d;
}

.pill-odds {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

/* Games loading skeleton */
@keyframes game-skel-shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

.game-skel {
    display: inline-block;
    border-radius: 9999px;
    background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 45%, #e2e8f0 90%);
    background-size: 200% 100%;
    animation: game-skel-shimmer 1.15s ease-in-out infinite;
}

.game-skel-icon {
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
}

.game-skel-league {
    width: 9.5rem;
    height: 0.75rem;
}

.game-skel-team {
    width: 5.5rem;
    height: 0.7rem;
    max-width: 100%;
}

.game-skel-avatar {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
}

.game-skel-time {
    width: 1.75rem;
    height: 0.55rem;
}

.game-skel-score {
    width: 2rem;
    height: 0.7rem;
}

.game-skel-pill {
    width: 5.75rem;
    height: 1.55rem;
}

.game-skel-pill-sm {
    width: 4.25rem;
}

#load-more-btn.is-loading {
    opacity: 0.8;
    pointer-events: none;
}

#load-more-btn.is-loading i {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
