/* css/match-premium.css — Match detail premium + responsive */

.mp-shell {
    margin-top: 0.5rem;
}

.mp-tabs {
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.mp-tabs::-webkit-scrollbar { display: none; }

.mp-tabs .match-tab {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 0.72rem;
}

@media (max-width: 640px) {
    .mp-tabs {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .mp-tabs .match-tab {
        font-size: 0.68rem;
        padding: 7px 10px;
    }
}

.mp-content {
    max-height: none;
    overflow: visible;
    padding: 0.5rem 0 1rem;
}

.card.expanded .match-tab-content {
    max-height: min(75vh, 900px);
    overflow-y: auto;
}

.mp-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.mp-section-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.mp-sub-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Venue hero */
.mp-venue-hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1rem;
    min-height: 120px;
    background: linear-gradient(135deg, #1a472a 0%, #0d1117 100%);
}

.mp-venue-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    opacity: 0.85;
}

.mp-venue-noimg .mp-venue-img { display: none; }

.mp-venue-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem 1.1rem;
}

.mp-venue-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.6);
}

.mp-venue-name {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0.2rem 0;
    color: #fff;
}

.mp-venue-meta {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
    margin: 0;
}

/* Coaches panel — like reference screenshot */
.mp-coaches-panel {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
}

.mp-coaches-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 540px) {
    .mp-coaches-grid {
        grid-template-columns: 1fr;
    }
}

.mp-coach-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem;
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    position: relative;
}

.mp-coach-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
}

.mp-coach-photo.mp-img-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
}

.mp-coach-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mp-coach-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-coach-team {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.mp-coach-formation {
    font-size: 0.8rem;
    font-weight: 800;
    color: #5dade2;
}

.mp-coach-meta {
    font-size: 0.62rem;
    color: var(--text-muted);
}

.mp-coach-team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    opacity: 0.85;
}

/* Starting XI — dual column desktop, stack mobile */
.mp-xi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .mp-xi-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.mp-xi-col {
    background: rgba(0,0,0,0.2);
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.mp-xi-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.02);
}

.mp-xi-flag {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.mp-xi-team {
    display: block;
    font-weight: 800;
    font-size: 0.85rem;
    line-height: 1.2;
}

.mp-xi-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.mp-xi-formation {
    margin-left: auto;
    font-weight: 800;
    font-size: 0.9rem;
    color: #5dade2;
}

.mp-xi-list {
    padding: 0.35rem 0;
}

.mp-player-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s ease;
}

.mp-player-row:last-child { border-bottom: none; }

.mp-player-row:hover {
    background: rgba(255,255,255,0.03);
}

.mp-player-photo-wrap {
    position: relative;
    flex-shrink: 0;
}

.mp-player-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.06);
}

.mp-player-photo.mp-img-fallback {
    background: rgba(255,255,255,0.08);
}

.mp-player-num {
    position: absolute;
    bottom: -2px;
    right: -4px;
    background: var(--primary);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.mp-player-body {
    flex: 1;
    min-width: 0;
}

.mp-player-name {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-player-pos {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.mp-player-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.mp-player-value {
    font-size: 0.68rem;
    font-weight: 700;
    color: #2ecc71;
    white-space: nowrap;
}

.mp-player-attr {
    font-size: 0.62rem;
    color: var(--primary);
    font-weight: 700;
}

/* Substitutes */
.mp-subs-block {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(0,0,0,0.15);
    border-radius: 12px;
}

.mp-subs-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.mp-subs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 768px) {
    .mp-subs-grid {
        grid-template-columns: 1fr 1fr;
        column-gap: 0.5rem;
    }
}

.mp-badge-row {
    text-align: center;
    margin-bottom: 0.75rem;
}

/* H2H + ESPN + 365Scores + SofaScore + Sportmonks */
.mp-h2h, .mp-espn, .mp-scores365, .mp-sofascore, .mp-sportmonks {
    padding: 1rem;
    border-radius: 14px;
    margin: 1rem 0;
    border: 1px solid var(--glass-border);
}

.sofascore-stages-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.sofascore-stage-chip {
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.scores365-stages-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.scores365-stage-chip {
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.scores365-poll-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.82rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.scores365-poll-row b {
    color: var(--primary);
    white-space: nowrap;
}

.mp-h2h-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 0.5rem;
    text-align: center;
}

.mp-h2h-stats b {
    display: block;
    font-size: 1.1rem;
    color: var(--text-main);
}

.mp-h2h-stats span {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.mp-espn-leader {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 8px;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.78rem;
}

.mp-espn-leader span { color: var(--text-muted); }
.mp-espn-leader b { grid-column: 2; text-align: right; }
.mp-espn-leader small { grid-column: 1 / -1; color: var(--primary); }

.mp-meta {
    margin-bottom: 0.5rem;
}

.mp-players .player-stat-row {
    padding: 0.65rem 0;
}

.mp-player-stat-line {
    flex: 1;
    font-size: 0.78rem;
}

/* Lang switcher */
.lang-switcher {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 5px 8px;
    border-radius: 7px;
    cursor: pointer;
    font-family: var(--font-stack);
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: var(--primary);
    color: #fff;
}

.lang-btn:hover:not(.active) {
    color: var(--text-main);
}

/* Expanded card spacing mobile */
@media (max-width: 480px) {
    .match-card.expanded {
        padding: 1rem !important;
    }

    .mp-coach-photo {
        width: 38px;
        height: 38px;
    }

    .mp-player-photo {
        width: 32px;
        height: 32px;
    }

    .mp-venue-img {
        height: 110px;
    }
}

.card.expanded .match-details-panel {
    max-height: none;
}

.mp-pitch-embed .live-pitch-wrap {
    pointer-events: none;
}

.mp-hint {
    font-size: 0.7rem;
    margin-top: 0.5rem;
}

/* --- Match page (jogo.html) --- */

.match-page-body {
    padding-bottom: 88px;
}

.match-page-shell {
    max-width: 920px;
    margin: 0 auto;
}

.mp-loading-page {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.mp-loading-page p {
    margin-top: 1rem;
}

.match-page-hero {
    padding: 1.25rem 1.5rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 16px;
}

.mp-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 1rem;
}

.mp-back:hover {
    color: var(--primary);
}

.mp-hero-league {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.mp-hero-league img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.mp-hero-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
}

.mp-hero-team {
    text-align: center;
}

.mp-hero-team h2 {
    font-size: clamp(0.85rem, 2.5vw, 1.05rem);
    font-weight: 700;
    margin: 0.5rem 0 0;
    line-height: 1.25;
}

.mp-hero-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.mp-hero-center {
    text-align: center;
    min-width: 100px;
}

.mp-hero-score {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: 0.05em;
    margin: 0.35rem 0;
}

.mp-hero-score.live {
    color: var(--danger, #e74c3c);
}

.mp-score-sep {
    opacity: 0.5;
    margin: 0 0.15em;
}

.mp-vs {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-muted);
}

.mp-hero-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.mp-live-badge {
    color: #e74c3c;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mp-finished-badge,
.mp-scheduled-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.match-formation-section,
.match-fd-section {
    margin-bottom: 1rem;
}

.match-ai-preview-section {
    margin-bottom: 1rem;
}

.mp-ai-preview {
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(52, 152, 219, 0.15);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.mp-ai-preview-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.85rem;
}

.mp-ai-badge,
.mp-ai-badge-inline {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(52, 152, 219, 0.15);
    color: var(--primary);
    border: 1px solid rgba(52, 152, 219, 0.25);
}

.mp-ai-badge-inline {
    font-size: 0.58rem;
    vertical-align: middle;
}

#odds-ai-summary:not(:empty) {
    margin: 1.25rem 0 1.75rem;
}

.oi-ai-summary {
    padding: 1.35rem 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(52, 152, 219, 0.18);
}

.oi-ai-summary .mp-section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.oi-ai-summary .mp-section-label i {
    color: #5dade2;
    font-size: 0.85rem;
}

.oi-ai-summary p {
    margin: 0;
    padding-top: 1rem;
    font-size: 0.92rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.9);
}

.mp-ai-preview-head h3 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mp-ai-preview-body p {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-main, #e6edf3);
}

.mp-ai-preview-body p:last-child {
    margin-bottom: 0;
}


.match-page-tabs .mp-content {
    max-height: none;
    overflow: visible;
}

.match-page-tabs .mp-shell {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    padding: 0.75rem 1rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Smart live bar */
.match-smart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(10, 11, 16, 0.98) 70%, transparent);
    transform: translateY(110%);
    transition: transform 0.35s ease;
    pointer-events: none;
}

.match-smart-bar.visible {
    transform: translateY(0);
    pointer-events: auto;
}

.match-smart-bar.hidden {
    transform: translateY(110%);
}

.mp-smart-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 32px rgba(231, 76, 60, 0.35);
}

.mp-smart-live {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    animation: mpPulseGlow 2s ease-in-out infinite;
}

@keyframes mpPulseGlow {
    0%, 100% { box-shadow: 0 8px 32px rgba(231, 76, 60, 0.35); }
    50% { box-shadow: 0 8px 40px rgba(231, 76, 60, 0.55); }
}

.mp-smart-scheduled {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto;
    padding: 0.5rem;
}

.match-page-footer {
    margin-bottom: 1rem;
}

/* Formation pitch */
.fp-wrap {
    padding: 1rem;
    border-radius: 14px;
}

.fp-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.72rem;
}

.fp-team {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fp-away {
    text-align: right;
    align-items: flex-end;
}

.fp-formation {
    font-weight: 800;
    color: var(--primary);
}

.fp-team-name {
    color: var(--text-muted);
    font-weight: 600;
}

.fp-title {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-align: center;
}

.fp-svg {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
}

.fp-dot {
    fill: rgba(255, 255, 255, 0.92);
    stroke: rgba(0, 0, 0, 0.25);
    stroke-width: 0.5;
}

.fp-home .fp-dot {
    fill: #3498db;
    stroke: #2980b9;
}

.fp-away .fp-dot {
    fill: #e74c3c;
    stroke: #c0392b;
}

.fp-num {
    fill: #fff;
    font-size: 5px;
    font-weight: 800;
    text-anchor: middle;
    font-family: 'Outfit', sans-serif;
}

.fp-name {
    fill: rgba(255, 255, 255, 0.92);
    font-size: 4px;
    font-weight: 600;
    text-anchor: middle;
    font-family: 'Outfit', sans-serif;
}

.fp-badge-row {
    margin-bottom: 0.5rem;
}

.mp-fd {
    padding: 1rem 1.25rem;
    border-radius: 14px;
}

.mp-fd-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.mp-fd-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.mp-fd-item i {
    color: var(--primary);
    width: 14px;
}

@media (max-width: 600px) {
    .mp-hero-teams {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .mp-hero-center {
        order: -1;
    }

    .mp-hero-logo {
        width: 52px;
        height: 52px;
    }

    .fp-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .fp-away {
        text-align: center;
        align-items: center;
    }
}

