.md {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 16px 40px;
    color: #111827;
}

.md [hidden] {
    display: none !important;
}

.md,
.md [id^="md-"] {
    scroll-margin-top: 90px;
}

.md-yol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.md-yol a {
    color: #6b7280;
}

.md-yol a:hover {
    color: #b91c1c;
}

.md-baslik {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
}

.md-hero {
    position: relative;
    margin-bottom: 14px;
    padding: 18px 24px 28px;
    color: #fff;
    background:
        radial-gradient(ellipse at 10% -20%, rgba(255, 255, 255, .28), transparent 38%),
        radial-gradient(ellipse at 90% -20%, rgba(255, 255, 255, .28), transparent 38%),
        radial-gradient(ellipse at 50% 135%, rgba(34, 197, 94, .35), transparent 55%),
        linear-gradient(135deg, #2a0609 0%, #7f1d1d 48%, #3b0a0f 100%);
    border-radius: 18px;
    overflow: hidden;
}

.md-hero-ust {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    text-align: center;
    color: rgba(255, 255, 255, .85);
}

.md-hero-lig {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #fff;
}

.md-hero-lig img {
    width: 20px;
    height: 20px;
    padding: 2px;
    object-fit: contain;
    background: #fff;
    border-radius: 5px;
}

.md-hero-yer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 18px;
}

.md-hero-yer i {
    margin-right: 6px;
    opacity: .8;
}

.md-paylas,
.md-geri {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 10px;
    cursor: pointer;
}

.md-geri {
    right: auto;
    left: 14px;
}

.md-paylas:hover,
.md-geri:hover {
    color: #fff;
    background: rgba(255, 255, 255, .22);
}

.md-paylas.kopyalandi {
    background: #16a34a;
    border-color: #16a34a;
}

.md-hero-mac {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    margin-top: 18px;
}

.md-hero-takim {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    min-width: 0;
}

.md-hero-dep {
    flex-direction: row-reverse;
    text-align: right;
}

.md-hero-logo {
    flex: none;
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35));
}

.md-hero-yazi {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.md-hero-dep .md-hero-yazi {
    align-items: flex-end;
}

.md-hero-ad {
    font-size: 22px;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
}

.md-golcu {
    max-width: 100%;
    overflow: hidden;
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, .85);
}

.md-golcu i {
    margin-right: 5px;
    font-size: 11px;
}

.md-hero-orta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 150px;
}

.md-hero-skor {
    font-size: 58px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.md-hero-saat {
    font-size: 46px;
}

.md-hero-devre {
    font-size: 13px;
    color: rgba(255, 255, 255, .85);
}

.md-hero-durum {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: #b91c1c;
    border-radius: 6px;
}

.md-hero-durum.canli {
    color: #b91c1c;
    background: #fff;
}

.md-hero-durum.canli::before {
    content: '';
    width: 7px;
    height: 7px;
    background: #dc2626;
    border-radius: 50%;
    animation: md-nabiz 1.4s ease-in-out infinite;
}

@keyframes md-nabiz {
    50% {
        opacity: .25;
    }
}

.md-sekmeler {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    scrollbar-width: none;
}

.md-sekmeler::-webkit-scrollbar {
    display: none;
}

.md-sekmeler a {
    flex: 1 0 auto;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    color: #4b5563;
    border-radius: 9px;
}

.md-sekmeler a:hover {
    color: #991b1b;
}

.md-sekmeler a.aktif {
    color: #fff;
    background: #991b1b;
}

.md-izgara {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.md-alt {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 20px;
    align-items: start;
}

.md .mm-filtre-dugmeler button.aktif {
    background: #991b1b;
}

.md-dizilisler {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.md-dizilis {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.md-dizilis:last-child {
    flex-direction: row-reverse;
    text-align: right;
}

.md-dizilis img {
    flex: none;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.md-dizilis strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
}

.md-dizilis small {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #6b7280;
}

.md-saha {
    position: relative;
    aspect-ratio: 1.75;
    background: repeating-linear-gradient(90deg, #2f8f3a 0 10%, #2a8234 10% 20%);
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 10px;
    overflow: hidden;
}

.md-saha > span:not(.md-oyuncu) {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, .6);
}

.md-saha .md-saha-orta {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 0;
    border-width: 0 0 0 2px;
}

.md-saha .md-saha-daire {
    top: 50%;
    left: 50%;
    height: 30%;
    aspect-ratio: 1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.md-saha .md-saha-ceza {
    top: 22%;
    bottom: 22%;
    width: 15%;
}

.md-saha .md-saha-kale {
    top: 38%;
    bottom: 38%;
    width: 5%;
}

.md-saha .md-saha-ev {
    left: -2px;
}

.md-saha .md-saha-dep {
    right: -2px;
}

.md-oyuncu {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
    transform: translate(-50%, -50%);
}

.md-forma {
    position: relative;
    display: inline-flex;
    font-size: 30px;
    line-height: 1;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4));
}

.md-forma b {
    position: absolute;
    top: 56%;
    left: 50%;
    font-size: 11px;
    font-weight: 900;
    transform: translate(-50%, -50%);
}

.md-oyuncu-ad {
    max-width: 100%;
    overflow: hidden;
    padding: 1px 5px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #fff;
    background: rgba(0, 0, 0, .35);
    border-radius: 4px;
}

.md-yedekler {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 14px;
}

.md-yedek h3 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 800;
}

.md-yedek ul,
.md-akis,
.md-istler,
.md-h2h-liste,
.md-form ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.md-yedek li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 12.5px;
    border-bottom: 1px solid #f3f4f6;
}

.md-no {
    flex: none;
    width: 22px;
    font-weight: 700;
    text-align: right;
    color: #9ca3af;
}

.md-ad {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #374151;
}

.md-girdi {
    font-size: 12px;
    font-weight: 700;
    color: #16a34a;
}

.md-hoca {
    margin: 8px 0 0;
    font-size: 12px;
    color: #6b7280;
}

.md-akis-takimlar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 800;
}

.md-akis-takimlar span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.md-akis-takimlar img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.md-akis {
    position: relative;
}

.md-akis::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #e5e7eb;
    transform: translateX(-50%);
}

.md-akis-olay {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    align-items: start;
    padding: 7px 0;
}

.md-akis-dakika {
    position: relative;
    grid-row: 1;
    grid-column: 2;
    justify-self: center;
    padding: 1px 4px;
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
    color: #64748b;
    background: #fff;
}

.md-akis-icerik {
    grid-row: 1;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.md-akis-ev .md-akis-icerik {
    grid-column: 1;
    flex-direction: row-reverse;
    text-align: right;
}

.md-akis-dep .md-akis-icerik {
    grid-column: 3;
}

.md-akis-ikon {
    flex: none;
    width: 22px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.md-akis-degisiklik {
    gap: 1px;
    font-size: 12px;
}

.md-akis-degisiklik .fa-arrow-up {
    color: #16a34a;
}

.md-akis-degisiklik .fa-arrow-down {
    color: #dc2626;
}

.md-akis-metin {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.md-akis-metin strong {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 20px;
}

.md-akis-gol .md-akis-metin strong {
    font-weight: 800;
}

.md-akis-metin small {
    font-size: 12px;
    color: #9ca3af;
}

.md-akis-ozel {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 6px 0;
}

.md-akis-duduk {
    display: inline-flex;
    padding: 2px 6px;
    color: #64748b;
    background: #fff;
}

.md-akis-duduk svg {
    width: 20px;
    height: 20px;
    transform: rotate(-20deg);
}

.md-akis-ara {
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: #334155;
    border-radius: 9999px;
}

.md-istler {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.md-ist {
    display: grid;
    grid-template-columns: 92px 40px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
}

.md-ist-ad {
    font-weight: 600;
    color: #4b5563;
}

.md-ist b {
    font-weight: 800;
}

.md-ist-ev {
    text-align: right;
    color: #991b1b;
}

.md-ist-dep {
    color: #1d4ed8;
}

.md-ist-cubuk {
    position: relative;
    height: 8px;
    overflow: hidden;
    background: #93c5fd;
    border-radius: 9999px;
}

.md-ist-cubuk i {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    background: #991b1b;
}

.md-yildiz {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
}

.md-yildiz-foto {
    width: 92px;
    height: 92px;
    object-fit: cover;
    background: #f3f4f6;
    border-radius: 12px;
}

.md-yildiz-bilgi strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
}

.md-yildiz-bilgi small {
    display: block;
    font-size: 13px;
    color: #6b7280;
}

.md-yildiz-sayilar {
    display: flex;
    gap: 18px;
    margin-top: 12px;
}

.md-yildiz-sayilar span {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #6b7280;
}

.md-yildiz-sayilar b {
    font-size: 20px;
    font-weight: 900;
    color: #991b1b;
}

.md-yildiz-puan {
    padding: 6px 10px;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    background: #991b1b;
    border-radius: 8px;
}

.md-bilgi {
    margin: 0;
}

.md-bilgi div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid #f3f4f6;
}

.md-bilgi div:last-child {
    border-bottom: 0;
}

.md-bilgi dt {
    font-weight: 600;
    color: #6b7280;
}

.md-bilgi dt i {
    width: 18px;
    color: #9ca3af;
}

.md-bilgi dd {
    margin: 0;
    font-weight: 600;
}

.md .mm-vurgu td {
    background: #fef2f2;
}

.md .mm-ara td {
    border-top: 2px dashed #e5e7eb;
}


.md-h2h {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px 72px 52px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    margin-bottom: 12px;
}

.md-h2h-ad {
    padding-top: 8px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.md-h2h-ad:last-child {
    text-align: left;
}

.md-h2h-ev,
.md-h2h-dep,
.md-h2h-ber b {
    display: block;
    padding: 6px 0;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
    color: #fff;
    background: #991b1b;
    border-radius: 8px;
}

.md-h2h-dep {
    background: #1d4ed8;
}

.md-h2h-ber {
    text-align: center;
}

.md-h2h-ber b {
    color: #374151;
    background: #e5e7eb;
}

.md-h2h-ber small {
    font-size: 10.5px;
    color: #6b7280;
}

.md-h2h-liste a {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) 54px minmax(0, 1fr) 76px;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    font-size: 12.5px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.md-h2h-liste a:hover {
    background: #f9fafb;
}

.md-h2h-tarih,
.md-h2h-lig {
    overflow: hidden;
    font-size: 11.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #6b7280;
}

.md-h2h-lig {
    text-align: right;
}

.md-h2h-takim {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-weight: 700;
}

.md-h2h-takim span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.md-h2h-sol {
    justify-content: flex-end;
}

.md-h2h-takim img {
    flex: none;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.md-h2h-skor {
    padding: 3px 0;
    font-weight: 900;
    text-align: center;
    background: #f3f4f6;
    border-radius: 6px;
}

.md-not {
    margin: 10px 0 0;
    font-size: 11.5px;
    color: #9ca3af;
}

.md-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.md-form-ust {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 14px;
}

.md-form-ust img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.md-form li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 12.5px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.md-sonuc {
    flex: none;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    border-radius: 5px;
}

.md-sonuc-G {
    background: #16a34a;
}

.md-sonuc-B {
    background: #9ca3af;
}

.md-sonuc-M {
    background: #dc2626;
}

.md-takim-sec {
    margin-bottom: 10px;
}

.md-takim-sec button {
    flex: 1;
}

.md-perf .md-perf-ad {
    font-weight: 700;
    white-space: nowrap;
    color: #111827;
}

.md-puan {
    display: inline-block;
    min-width: 34px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    border-radius: 5px;
}

.md-puan-yuksek {
    background: #15803d;
}

.md-puan-iyi {
    background: #22c55e;
}

.md-puan-orta {
    background: #eab308;
}

.md-puan-dusuk {
    background: #f97316;
}

.md-puan-yok {
    color: #6b7280;
    background: #f3f4f6;
}

a.md-hero-ad:hover,
a.md-ad:hover,
.md-perf-ad a:hover,
.md-yildiz-bilgi a:hover strong {
    text-decoration: underline;
}

body.dark-mode .md,
body.dark-mode .md-baslik,
body.dark-mode .md-akis-metin strong,
body.dark-mode .md-bilgi dd,
body.dark-mode .md-perf .md-perf-ad {
    color: #f1f5f9;
}

body.dark-mode .md-sekmeler {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .md-sekmeler a:not(.aktif),
body.dark-mode .md-ad,
body.dark-mode .md-h2h-liste a,
body.dark-mode .md-form li {
    color: #cbd5e1;
}

body.dark-mode .md-yedek li,
body.dark-mode .md-bilgi div,
body.dark-mode .md-h2h-liste a,
body.dark-mode .md-form li {
    border-color: #334155;
}

body.dark-mode .md .mm-vurgu td {
    background: rgba(153, 27, 27, .25);
}

body.dark-mode .md-akis-dakika,
body.dark-mode .md-akis-duduk {
    background: #1e293b;
}

body.dark-mode .md-akis::before {
    background: #334155;
}

body.dark-mode .md-h2h-skor,
body.dark-mode .md-h2h-ber b,
body.dark-mode .md-h2h-liste a:hover {
    color: #f1f5f9;
    background: #334155;
}

@media (max-width: 1024px) {
    .md-izgara {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .md-sol,
    .md-sag {
        display: contents;
    }

    #md-olaylar {
        order: 1;
    }

    #md-istatistik {
        order: 2;
    }

    #md-kadrolar {
        order: 3;
    }

    .md-yildiz-bolum {
        order: 4;
    }

    .md-bilgi-bolum {
        order: 5;
    }

    #md-puan {
        order: 6;
    }
}

@media (max-width: 768px) {
    .md-hero {
        padding: 16px 14px 22px;
    }

    .md-hero-yer {
        font-size: 12px;
    }

    .md-hero-mac {
        gap: 10px;
    }

    .md-hero-takim,
    .md-hero-dep {
        flex-direction: column;
        justify-content: flex-start;
        gap: 8px;
        text-align: center;
    }

    .md-hero-yazi,
    .md-hero-dep .md-hero-yazi {
        align-items: center;
        width: 100%;
    }

    .md-hero-logo {
        width: 58px;
        height: 58px;
    }

    .md-hero-ad {
        font-size: 14px;
    }

    .md-golcu {
        font-size: 11px;
        white-space: normal;
    }

    .md-hero-orta {
        min-width: 0;
    }

    .md-hero-skor {
        font-size: 38px;
    }

    .md-hero-saat {
        font-size: 30px;
    }

    .md-hero-devre {
        font-size: 11px;
    }

    .md-sekmeler a {
        flex: none;
    }
}

@media (max-width: 640px) {
    .md {
        padding: 12px 12px 30px;
    }

    .md-baslik {
        font-size: 16px;
    }

    .md-saha {
        aspect-ratio: .66;
        background: repeating-linear-gradient(180deg, #2f8f3a 0 10%, #2a8234 10% 20%);
    }

    .md-saha .md-saha-orta {
        top: 50%;
        right: 0;
        bottom: auto;
        left: 0;
        width: auto;
        height: 0;
        border-width: 2px 0 0;
    }

    .md-saha .md-saha-daire {
        height: auto;
        width: 30%;
    }

    .md-saha .md-saha-ceza,
    .md-saha .md-saha-kale {
        top: auto;
        bottom: auto;
        width: auto;
    }

    .md-saha .md-saha-ceza {
        right: 22%;
        left: 22%;
        height: 15%;
    }

    .md-saha .md-saha-kale {
        right: 38%;
        left: 38%;
        height: 5%;
    }

    .md-saha .md-saha-ev {
        top: -2px;
    }

    .md-saha .md-saha-dep {
        bottom: -2px;
    }

    .md-oyuncu {
        left: calc(100% - var(--y));
        top: var(--x);
        width: 64px;
    }

    .md-forma {
        font-size: 24px;
    }

    .md-forma b {
        font-size: 10px;
    }

    .md-oyuncu-ad {
        font-size: 9.5px;
    }

    .md-yedekler,
    .md-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .md-akis-olay {
        grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
    }

    .md-akis-icerik {
        gap: 5px;
    }

    .md-akis-metin strong {
        font-size: 12.5px;
    }

    .md-akis-metin small {
        font-size: 11px;
    }

    .md-ist {
        grid-template-columns: 80px 34px minmax(0, 1fr) 34px;
    }

    .md-bilgi div {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .md-h2h-liste a {
        grid-template-columns: 70px minmax(0, 1fr) 46px minmax(0, 1fr);
    }

    .md-h2h-lig {
        display: none;
    }
}
