/* ==========================================
   صفحة المباراة - Light Theme Fluid Grid
   ========================================== */
body:has(.match-page) {
    background-color: #f8f9fc;
}

.match-page {
    --mp-surface: #ffffff;
    --mp-border: rgba(15, 23, 42, 0.1);
    --mp-text: #0f172a;
    --mp-muted: #64748b;
    --mp-blue: #4285f4;
    --mp-purple: #a855f7;
    --mp-live: #ef4444;
    max-width: 1000px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}

.match-breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--mp-text);
    background: #ffffff;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
    margin-bottom: 24px;
}
.match-breadcrumb a { color: var(--mp-muted); text-decoration: none; transition: color 0.2s; }
.match-breadcrumb a:hover { color: var(--mp-blue); }
.match-breadcrumb span { color: var(--mp-muted); opacity: 0.5; }
.match-breadcrumb span:last-child { color: var(--mp-text); opacity: 1; }

/* Scoreboard Hero */
.match-hero {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 30px -12px rgba(15, 23, 42, 0.08);
}

.match-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.match-hero-league {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    background: rgba(66, 133, 244, 0.1);
    color: var(--mp-blue);
    text-decoration: none;
}

.match-hero-round {
    font-size: 12px;
    font-weight: 700;
    color: var(--mp-muted);
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 8px;
}

/* Fluid Match Board */
.match-hero-board {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.match-hero-team {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.match-hero-team-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.team-logo-wrap {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    background: #f8fafc;
    border: 1px solid var(--mp-border);
    border-radius: 20px;
    margin-bottom: 12px;
    padding: 10px;
}
.team-logo-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.match-hero-name {
    font-size: 18px;
    font-weight: 900;
    color: var(--mp-text);
    margin: 0;
}

.match-hero-center {
    flex: 0 0 auto;
    text-align: center;
}

.fx-center {
    background: #f8fafc;
    border: 1px solid var(--mp-border);
    border-radius: 16px;
    padding: 16px 24px;
    min-width: 160px;
}

.fx-score {
    font-size: 36px;
    font-weight: 900;
    color: var(--mp-text);
    line-height: 1;
    margin-bottom: 8px;
}

.fx-kickoff-time { font-size: 24px; font-weight: 900; color: var(--mp-text); }
.fx-kickoff-date { font-size: 13px; font-weight: 700; color: var(--mp-muted); }

/* Details Grid */
.match-details-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--mp-border);
}

.match-detail-card {
    flex: 1 1 200px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid var(--mp-border);
    border-radius: 14px;
}

.detail-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--mp-border);
    color: var(--mp-blue);
    flex-shrink: 0;
}

.detail-card-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--mp-muted);
    margin-bottom: 2px;
}

.detail-card-value {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--mp-text);
}

/* Tabs */
.match-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: var(--mp-surface);
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--mp-border);
    margin-bottom: 20px;
}

.match-tab-btn {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    color: var(--mp-muted);
}

.match-tab-btn:hover {
    background: #f8fafc;
    color: var(--mp-text);
}

.match-tab-btn.active {
    background: var(--mp-text);
    color: #fff;
}

/* Panels */
.match-panel {
    background: var(--mp-surface);
    border: 1px solid var(--mp-border);
    border-radius: 20px;
    padding: 24px;
}
.match-tab-pane { display: none; }
.match-tab-pane.active { display: block; }

.match-panel-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.match-panel-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--mp-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.match-event {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--mp-border);
    border-radius: 14px;
}
.match-event-min {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: rgba(66, 133, 244, 0.1);
    color: var(--mp-blue);
    font-weight: 900;
    font-size: 14px;
    border-radius: 10px;
    flex-shrink: 0;
}
.match-event-body {
    flex: 1;
}
.match-event-type {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--mp-text);
}
.match-event-player {
    display: block;
    font-size: 13px;
    color: var(--mp-muted);
}

/* Empty Events State */
.match-events-empty-card {
    text-align: center;
    padding: 48px 24px;
    background: #f8fafc;
    border: 1px dashed rgba(15, 23, 42, 0.15);
    border-radius: 14px;
    color: var(--mp-muted);
}
.match-events-empty-card svg {
    color: var(--mp-blue);
    opacity: 0.6;
    margin-bottom: 8px;
}
.match-events-empty-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
    color: var(--mp-text);
}
.match-events-empty-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Timezone */
.match-tz-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--mp-border);
}
.match-tz-select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--mp-border);
    background: #fff;
    font-size: 13px;
}
.match-clock {
    display: flex;
    background: #fff;
    border: 1px solid var(--mp-border);
    border-radius: 8px;
    padding: 2px;
}
.match-clock-btn {
    padding: 4px 12px;
    border: none;
    background: transparent;
    font-weight: 800;
}
.match-clock-btn[aria-pressed="true"] {
    background: var(--mp-text);
    color: #fff;
    border-radius: 6px;
}

@media (max-width: 640px) {
    .match-hero-board {
        flex-direction: column;
    }
    .match-hero-team {
        flex-direction: row;
        align-items: center;
        text-align: right;
        gap: 16px;
    }
    .match-hero-team-link {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    .team-logo-wrap {
        margin-bottom: 0;
        width: 60px;
        height: 60px;
    }
}

/* Footer Links */
.match-page-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--mp-border);
    justify-content: center;
}
.mp-foot-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    color: var(--mp-text);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
    transition: all 0.2s;
}
.mp-foot-link svg {
    color: var(--mp-blue);
}
.mp-foot-link:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.15);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}
