/* ============================================================
   matches-style.css — Premium Matches Page Styles
   ============================================================ */

/* ── Sticky Matches Header Section ── */
.yk-matches-header-section {
    background: rgba(5, 7, 20, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 77, 0, 0.2);
    padding: 1.1rem 0 0.7rem;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.yk-matches-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.yk-matches-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 30%, #ff6a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: 1.5px;
    text-shadow: none;
}

/* ── Date Nav Arrows ── */
.yk-nav-arrow {
    background: rgba(255, 77, 0, 0.08);
    border: 1.5px solid rgba(255, 77, 0, 0.4);
    color: #ff6a00;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.yk-nav-arrow:hover {
    background: #ff4d00;
    color: #fff;
    border-color: #ff4d00;
    transform: scale(1.15);
    box-shadow: 0 0 16px rgba(255, 77, 0, 0.5);
}

/* ── Status Filter Tabs ── */
.yk-filter-tabs {
    display: flex;
    gap: 0.45rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
    padding: 0 1rem;
}

.yk-filter-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    color: #8a8a9a;
    padding: 5px 16px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Rajdhani', sans-serif;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.yk-filter-tab:hover {
    border-color: rgba(255, 77, 0, 0.5);
    color: #ff6a00;
    background: rgba(255, 77, 0, 0.06);
    transform: translateY(-2px);
}

.yk-filter-tab.active {
    background: linear-gradient(135deg, #ff4d00, #ff8c00);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 77, 0, 0.35);
    transform: translateY(-1px);
}

/* ── League Filter Tabs ── */
.yk-league-filter-tabs {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 1rem 0.6rem;
}

.yk-league-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #7a7a8a;
    padding: 4px 13px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Rajdhani', sans-serif;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.yk-league-tab:hover {
    border-color: rgba(255, 77, 0, 0.5);
    color: #ff6a00;
    background: rgba(255, 77, 0, 0.06);
    transform: translateY(-1px);
}

.yk-league-tab.active {
    background: rgba(255, 77, 0, 0.12);
    border-color: rgba(255, 77, 0, 0.6);
    color: #ff6a00;
    box-shadow: 0 2px 10px rgba(255, 77, 0, 0.2);
}

/* ── Matches Display Container ── */
.matches-display {
    padding: 1.2rem 0 5rem;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* ── League Section Card ── */
.yk-league-section {
    background: rgba(12, 16, 40, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: ykFadeIn 0.4s ease both;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.yk-league-section:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 77, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@keyframes ykFadeIn {
    from { opacity: 0; transform: translateY(14px) scale(0.99); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── League Header ── */
.yk-league-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1.1rem;
    background: linear-gradient(135deg, rgba(255, 77, 0, 0.1) 0%, rgba(255, 140, 0, 0.06) 100%);
    border-bottom: 1px solid rgba(255, 77, 0, 0.12);
    position: relative;
    overflow: hidden;
}

.yk-league-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #ff4d00, #ff8c00);
    border-radius: 0 2px 2px 0;
}

.yk-league-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.yk-league-section:hover .yk-league-logo {
    transform: scale(1.1) rotate(-3deg);
}

.yk-league-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.yk-league-name {
    font-weight: 800;
    font-size: 0.92rem;
    color: #ffffff;
    letter-spacing: 0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yk-league-country {
    font-size: 0.72rem;
    color: #7a8090;
    letter-spacing: 0.2px;
}

/* ── Match Row ── */
.yk-match-row {
    display: grid;
    grid-template-columns: 1fr 100px 1fr;
    align-items: center;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    gap: 0.6rem;
    position: relative;
}

.yk-match-row:last-child {
    border-bottom: none;
}

.yk-match-row::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,77,0,0.04), transparent, rgba(255,77,0,0.04));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.yk-match-row:hover::after {
    opacity: 1;
}

.yk-match-row:hover {
    background: rgba(255, 77, 0, 0.04);
}

.yk-match-row--live {
    background: rgba(255, 77, 0, 0.05);
    border-left: none;
}

.yk-match-row--live::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #ff4d00, transparent);
    animation: liveBarPulse 2s ease-in-out infinite;
}

@keyframes liveBarPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ── Team Blocks ── */
.yk-team-home {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    min-width: 0;
    overflow: hidden;
}

.yk-team-away {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    min-width: 0;
    overflow: hidden;
}

.yk-team-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #e0e2ee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    transition: color 0.2s ease;
}

.yk-match-row:hover .yk-team-name {
    color: #ffffff;
}

.yk-team-logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.yk-match-row:hover .yk-team-logo-img {
    transform: scale(1.12);
}

.yk-team-emoji {
    font-size: 1.6rem;
    flex-shrink: 0;
}

/* ── Center Score Block ── */
.yk-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.yk-match-row:hover .yk-score-block {
    background: rgba(255, 77, 0, 0.07);
    border-color: rgba(255, 77, 0, 0.2);
}

.yk-score {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1px;
}

.yk-score-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    font-weight: 400;
}

.yk-match-time {
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffaa00;
    letter-spacing: 0.5px;
    font-family: 'Orbitron', sans-serif;
}

.yk-match-minute {
    font-size: 0.7rem;
    color: #ff4d00;
    font-weight: 800;
    animation: livePulseYk 1.5s ease-in-out infinite;
    letter-spacing: 0.5px;
}

@keyframes livePulseYk {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.95); }
}

.yk-match-status {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.yk-status-live {
    background: rgba(255, 77, 0, 0.18);
    color: #ff6a00;
    border: 1px solid rgba(255, 77, 0, 0.3);
    animation: livePulseYk 1.5s ease-in-out infinite;
}

.yk-status-finished {
    background: rgba(255, 255, 255, 0.05);
    color: #6a7080;
}

.yk-status-upcoming {
    background: rgba(0, 170, 255, 0.08);
    color: #00aaff;
    border: 1px solid rgba(0, 170, 255, 0.2);
}

/* ── RTL Support ── */
[dir="rtl"] .yk-team-home {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

[dir="rtl"] .yk-team-away {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

[dir="rtl"] .yk-league-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .yk-league-header::before {
    left: auto;
    right: 0;
    border-radius: 2px 0 0 2px;
}

[dir="rtl"] .yk-match-row--live::before {
    left: auto;
    right: 0;
}

/* ── Mobile ── */
@media (max-width: 700px) {
    .yk-team-name { max-width: 80px; font-size: 0.78rem; }
    .yk-team-logo-img { width: 28px; height: 28px; }
    .yk-score { font-size: 1.1rem; }
    .yk-match-row { grid-template-columns: 1fr 78px 1fr; padding: 0.75rem 0.75rem; }
    .yk-matches-title { font-size: 1rem; }
    .yk-league-section { border-radius: 12px; }
}

@media (max-width: 400px) {
    .yk-team-name { max-width: 65px; font-size: 0.72rem; }
    .yk-score { font-size: 1rem; }
    .yk-match-row { grid-template-columns: 1fr 68px 1fr; }
}

/* ============================================================
   Match Detail Modal — Premium
   ============================================================ */

.md-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.md-modal-overlay.md-modal-visible {
    opacity: 1;
}

.md-modal {
    background: linear-gradient(180deg, #111827 0%, #0d1220 100%);
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(80px);
    transition: transform 0.38s cubic-bezier(0.34, 1.3, 0.64, 1);
    overflow: hidden;
    box-shadow: 0 -20px 60px rgba(0,0,0,0.7),
                0 0 0 1px rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 77, 0, 0.2);
}

.md-modal-overlay.md-modal-visible .md-modal {
    transform: translateY(0);
}

/* Drag handle */
.md-modal::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(255, 77, 0, 0.3);
    border-radius: 2px;
    margin: 12px auto 0;
    flex-shrink: 0;
}

.md-modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 6px 14px 0;
    flex-shrink: 0;
}

.md-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.md-close-btn:hover {
    background: rgba(255, 77, 0, 0.3);
    border-color: rgba(255, 77, 0, 0.5);
    transform: scale(1.1);
}

.md-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,77,0,0.3) transparent;
}

/* ── Global Search ── */
.md-global-search {
    display: flex;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(5, 8, 20, 0.6);
    flex-shrink: 0;
}

.md-global-search input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 0.85rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.md-global-search input:focus {
    outline: none;
    border-color: rgba(255, 77, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.1);
}

.md-global-search button {
    background: linear-gradient(135deg, #ff4d00, #ff8c00);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(255, 77, 0, 0.3);
}

.md-global-search button:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 16px rgba(255, 77, 0, 0.5);
}

/* ── Match Header ── */
.md-match-header {
    text-align: center;
    padding: 0.7rem 1rem 0.9rem;
}

.md-league-badge {
    display: inline-block;
    font-size: 0.7rem;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.8rem;
    background: rgba(255,255,255,0.04);
    padding: 3px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.md-teams-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    margin-bottom: 0.5rem;
}

.md-team-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    max-width: 140px;
}

.md-team-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.5));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.md-team-logo:hover {
    transform: scale(1.1);
}

.md-team-emoji { font-size: 2.5rem; }

.md-team-name {
    font-weight: 800;
    font-size: 0.88rem;
    color: #ffffff;
    text-align: center;
    line-height: 1.2;
}

.md-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 90px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
}

.md-score {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 2px;
}

.md-score-divider { color: rgba(255, 255, 255, 0.25); }

.md-match-status {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.md-status-live {
    background: rgba(255,77,0,0.18);
    color: #ff6a00;
    border: 1px solid rgba(255, 77, 0, 0.3);
    animation: livePulseYk 1.5s ease-in-out infinite;
}

.md-status-ft {
    background: rgba(255,255,255,0.05);
    color: #6a7080;
}

.md-status-upcoming {
    background: rgba(0,170,255,0.08);
    color: #00aaff;
    border: 1px solid rgba(0, 170, 255, 0.2);
}

.md-match-time-big {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.55rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffaa00, #ff6a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.md-match-date {
    font-size: 0.75rem;
    color: #7a8090;
}

/* ── Tabs ── */
.md-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0 0.5rem;
    flex-shrink: 0;
    background: rgba(5, 8, 20, 0.4);
}

.md-tab {
    background: transparent;
    border: none;
    color: #7a8090;
    padding: 0.65rem 1rem;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    flex: 1;
    text-align: center;
}

.md-tab:hover { color: #e0e2ee; }
.md-tab.active {
    color: #ff5500;
    border-bottom-color: #ff4d00;
    background: rgba(255, 77, 0, 0.04);
}

.md-tab-content { padding: 0.8rem; }

.md-empty {
    text-align: center;
    color: #7a8090;
    padding: 3rem 1rem;
    font-size: 0.9rem;
}

/* ── Formation ── */
.md-formation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
    padding: 0 0.3rem;
}

.md-formation-label {
    font-size: 0.78rem;
    color: #7a8090;
}

/* ── Pitch ── */
.md-pitch-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg,
        #1a4a28 0%, #226135 25%,
        #1d5e33 48%, #1a5530 52%,
        #226135 75%, #1a4a28 100%);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.3);
}

.md-pitch {
    position: relative;
    width: 100%;
    padding-bottom: 140%;
}

.md-pitch-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.md-pitch-half {
    position: absolute;
    width: 100%;
    height: 50%;
    pointer-events: none;
}

.md-pitch-home { bottom: 0; top: auto; }
.md-pitch-away { top: 0; }

.md-pitch-player {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    pointer-events: auto;
    z-index: 2;
}

.md-player-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.6rem;
    border: 2px solid rgba(255,255,255,0.7);
    transition: transform 0.2s, box-shadow 0.2s;
}

.md-player-home .md-player-dot {
    background: linear-gradient(135deg, #ff4d00, #ff8c00);
    color: #fff;
}

.md-player-away .md-player-dot {
    background: linear-gradient(135deg, #1a56a0, #2573d8);
    color: #fff;
}

.md-pitch-player:hover .md-player-dot {
    transform: scale(1.35);
    box-shadow: 0 0 12px rgba(255,77,0,0.7);
}

.md-player-heat {
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    opacity: 0.12;
    z-index: -1;
}

.md-player-home .md-player-heat { background: #ff4d00; }
.md-player-away .md-player-heat { background: #1a56a0; }

.md-player-number { font-weight: 800; font-size: 0.58rem; }

.md-player-name {
    font-size: 0.52rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.99);
    text-align: center;
    max-width: 50px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0,0,0,0.6);
    border-radius: 4px;
    padding: 1px 3px;
}

/* ── Events ── */
.md-events-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.md-event-row {
    display: grid;
    grid-template-columns: 34px 28px 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 9px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s ease;
}

.md-event-row:hover {
    background: rgba(255, 77, 0, 0.05);
}

.md-event-home { border-left: 2px solid #ff4d00; }
.md-event-away { border-right: 2px solid #1a56a0; }

.md-event-minute {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    color: #ff6a00;
    text-align: right;
}

.md-event-icon { font-size: 1rem; text-align: center; }

.md-event-player {
    font-weight: 700;
    font-size: 0.85rem;
    color: #e0e2ee;
}

.md-event-assist {
    font-size: 0.75rem;
    color: #7a8090;
    margin-left: 4px;
}

.md-event-sub { font-size: 0.8rem; color: #7a8090; }

/* ── Stats ── */
.md-stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.md-stat-item { padding: 0.1rem 0; }

.md-stat-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.md-stat-home-val { font-weight: 800; color: #ff5500; min-width: 36px; }
.md-stat-away-val { font-weight: 800; color: #2573d8; min-width: 36px; text-align: right; }
.md-stat-label { color: #7a8090; font-size: 0.78rem; text-align: center; }

.md-stat-bar {
    height: 5px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    display: flex;
    overflow: hidden;
}

.md-stat-bar-home {
    background: linear-gradient(90deg, #ff4d00, #ff8c00);
    border-radius: 4px 0 0 4px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.md-stat-bar-away {
    background: linear-gradient(90deg, #2573d8, #1a56a0);
    border-radius: 0 4px 4px 0;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Player Card ── */
.md-player-card-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 10;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.md-player-card-backdrop.visible { opacity: 1; }

.md-player-card {
    background: linear-gradient(160deg, #1a202c, #111827);
    border-radius: 16px;
    padding: 1.2rem;
    width: 88%;
    max-width: 310px;
    position: relative;
    border: 1px solid rgba(255, 77, 0, 0.2);
    box-shadow: 0 15px 40px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
}

.md-player-card-close {
    position: absolute;
    top: 9px;
    right: 9px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}

.md-player-card-close:hover {
    background: rgba(255, 77, 0, 0.3);
    transform: scale(1.1);
}

.md-pcard-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.9rem;
}

.md-pcard-photo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff4d00;
    box-shadow: 0 0 12px rgba(255, 77, 0, 0.3);
}

.md-pcard-name {
    font-weight: 900;
    font-size: 0.95rem;
    color: #fff;
    display: block;
    margin-bottom: 0.25rem;
}

.md-pcard-meta {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: #7a8090;
}

.md-pcard-rating {
    background: linear-gradient(135deg, #ff4d00, #ff8c00);
    color: #fff;
    border-radius: 5px;
    padding: 1px 6px;
    font-weight: 800;
    font-size: 0.72rem;
}

.md-pcard-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}

.md-pcard-info-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
}

.md-pcard-info-label {
    display: block;
    font-size: 0.62rem;
    color: #7a8090;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.md-pcard-info-value {
    font-weight: 800;
    font-size: 0.82rem;
    color: #e0e2ee;
}

.md-pcard-stats-title {
    font-weight: 800;
    font-size: 0.72rem;
    color: #ff6a00;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.md-pcard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.md-pcard-stat-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.45rem;
    text-align: center;
}

.md-pcard-stat-val {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
}

.md-pcard-stat-lbl {
    display: block;
    font-size: 0.6rem;
    color: #7a8090;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.md-pcard-footer { text-align: center; }

.md-pcard-source {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 8px;
}

.md-pcard-source.live {
    background: rgba(0,200,100,0.08);
    color: #00c864;
    border: 1px solid rgba(0,200,100,0.2);
}

.md-pcard-source.simulated {
    background: rgba(255,255,255,0.04);
    color: #7a8090;
}

/* ── RTL for Modal ── */
[dir="rtl"] .md-event-home { border-left: none; border-right: 2px solid #ff4d00; }
[dir="rtl"] .md-event-away { border-right: none; border-left: 2px solid #1a56a0; }
[dir="rtl"] .md-player-card-close { right: auto; left: 9px; }
[dir="rtl"] .md-pcard-header { flex-direction: row-reverse; }
[dir="rtl"] .md-event-minute { text-align: left; }
[dir="rtl"] .md-stat-home-val { text-align: left; }
[dir="rtl"] .md-stat-away-val { text-align: left; }

/* ── Mobile Modal ── */
@media (max-width: 600px) {
    .md-score { font-size: 1.7rem; }
    .md-team-logo { width: 42px; height: 42px; }
    .md-team-name { font-size: 0.8rem; }
    .md-tab { font-size: 0.78rem; padding: 0.55rem 0.5rem; }
    .md-modal { max-height: 92vh; }
}
