/* ArenaLive — tema gelap olahraga */
:root {
    --bg: #0c0f16;
    --bg-2: #131826;
    --surface: #181f30;
    --surface-2: #1f273b;
    --border: #28324a;
    --text: #e9edf6;
    --muted: #8a96ad;
    --primary: #ff4d3d;
    --primary-2: #ff7a2f;
    --accent: #2ad17a;
    --live: #ff2e54;
    --warn: #ffb020;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --nav-h: 62px;
}

* { box-sizing: border-box; }

/* Atribut [hidden] harus selalu menang atas display: grid/flex pada elemen
   (mis. .player-status, .player-badge, .player-unmute) — kalau tidak, overlay
   "Menyambungkan…" tak pernah hilang walau video sudah PLAYING. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    background: radial-gradient(1200px 600px at 80% -10%, #1a2236 0%, var(--bg) 55%) fixed;
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(1180px, 92%); margin-inline: auto; }

/* ---------------- Header ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(12, 15, 22, .82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.site-header .bar {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 64px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: .3px;
}
.brand .dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 77, 61, .2);
}
.brand b { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.nav a {
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
    font-size: .93rem;
    transition: .15s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.header-spacer { flex: 1; }

/* Top nav gaya nobarwarna: item kapital, tab aktif oranye setinggi header */
.topnav { display: flex; align-items: stretch; height: 64px; }
.topnav a {
    display: inline-flex; align-items: center; padding: 0 18px;
    color: #cdd5e2; font-weight: 700; font-size: .82rem; letter-spacing: .6px; text-transform: uppercase;
    transition: .15s;
}
.topnav a:hover { color: #fff; }
.topnav a.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.lang { display: flex; align-items: center; gap: 8px; margin-left: 16px; font-size: .82rem; font-weight: 700; }
.lang b { color: var(--primary); border-bottom: 2px solid var(--primary); }
.lang span { color: var(--muted); cursor: default; }
@media (max-width: 720px) {
    .topnav a { padding: 0 11px; font-size: .72rem; letter-spacing: .3px; }
    .lang { display: none; }
}
.btn-admin {
    padding: 8px 16px; border-radius: 999px;
    border: 1px solid var(--border); color: var(--text); font-weight: 600;
}
.btn-admin:hover { border-color: var(--primary); color: #fff; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    padding: 10px 18px; border-radius: var(--radius-sm);
    border: 1px solid transparent; cursor: pointer;
    font-weight: 700; font-size: .92rem; font-family: inherit;
    transition: .15s; background: var(--surface-2); color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--primary); }
.btn-danger { background: transparent; border-color: #5a2230; color: #ff8197; }
.btn-danger:hover { background: #ff2e54; color: #fff; border-color: transparent; }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn-block { width: 100%; }

/* ---------------- Section headings ---------------- */
.section { margin: 38px 0; }
.section-head {
    display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-size: 1.35rem; letter-spacing: .2px; }
.section-head .pill {
    font-size: .72rem; font-weight: 800; text-transform: uppercase;
    padding: 4px 10px; border-radius: 999px; letter-spacing: .6px;
}
.section-head .more { margin-left: auto; color: var(--muted); font-weight: 600; font-size: .9rem; }
.section-head .more:hover { color: var(--primary); }

.pill-live { background: rgba(255, 46, 84, .16); color: #ff7088; }
.pill-soon { background: rgba(255, 176, 32, .15); color: var(--warn); }

.section-head h2 .dot-live,
.dot-live { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #2fd47a; box-shadow: 0 0 6px #2fd47a; margin-right: 4px; animation: blink 1s steps(1) infinite; }

/* ---------------- Chip liga (scroll horizontal) ---------------- */
.league-chips {
    display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 6px; margin-top: 6px;
    scrollbar-width: thin;
}
.league-chips .chip {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
    color: var(--text); font-weight: 600; font-size: .85rem; text-decoration: none;
}
.league-chips .chip:hover { border-color: var(--primary); color: #fff; }
.league-chips .chip img { width: 18px; height: 18px; object-fit: contain; }

/* ---------------- Logo badge / header ---------------- */
.logo-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 7px; font-weight: 800; font-size: .8rem; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

/* ---------------- Sub-nav (cabang + pencarian) ---------------- */
.subnav { background: var(--bg-2); border-bottom: 1px solid var(--border); }
.subnav-bar { display: flex; align-items: center; gap: 14px; min-height: 50px; }
.sport-tabs { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: thin; }
.sport-tabs a {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 14px 12px; color: var(--muted); font-weight: 600; font-size: .9rem;
    border-bottom: 2px solid transparent;
}
.sport-tabs a:hover { color: var(--text); }
.sport-tabs a.active { color: #fff; border-bottom-color: var(--primary); }
.subnav-search { display: flex; gap: 6px; align-items: center; }
.subnav-search input {
    width: 200px; max-width: 42vw; padding: 8px 12px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit;
}

/* ---------------- Layout beranda 2 kolom ---------------- */
.home-layout { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 18px; }
@media (min-width: 940px) { .home-layout { grid-template-columns: 260px 1fr; align-items: start; } }
.liga-side .panel { padding: 14px; }
.liga-title { margin: 0 0 10px; font-size: 1rem; }
.liga-list { display: flex; flex-direction: column; }
.liga-list a {
    display: flex; align-items: center; gap: 10px; padding: 9px 6px; color: var(--text);
    border-bottom: 1px solid var(--border); font-size: .9rem; font-weight: 600;
}
.liga-list a:last-child { border-bottom: 0; }
.liga-list a:hover { color: var(--primary); }
.liga-list img { width: 24px; height: 24px; object-fit: contain; }
.liga-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); flex: 0 0 auto; }
.home-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---------------- Panel papan (board) ---------------- */
.board { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.board-head {
    display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-weight: 800; font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
}
.board .match-rows { padding: 10px; gap: 8px; }
.board .day-group { padding: 0 10px; }

/* Toolbar halaman Jadwal: tab (Jadwal/Populer) kiri + tanggal kanan */
.sched-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px;
}
@media (max-width: 480px) {
    .sched-bar { flex-wrap: nowrap; gap: 6px; padding: 8px 10px; }
    .sched-tab { padding: 8px 12px; font-size: .82rem; }
    .sched-datebox { margin-left: auto; flex-shrink: 0; }
    .sched-datebox input { padding: 8px 6px; font-size: .82rem; max-width: 130px; }
}
.sched-tabs { display: flex; gap: 8px; }
.sched-tab {
    padding: 8px 18px; border-radius: 8px; font-weight: 700; font-size: .9rem;
    color: var(--muted); background: var(--bg-2); border: 1px solid var(--border);
}
.sched-tab:hover { color: var(--text); }
.sched-tab.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; }
.sched-datebox { margin-left: auto; }
.sched-datebox input {
    padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg-2); color: var(--text); font: inherit; color-scheme: dark;
}

/* Pencarian di header (float kanan) */
.header-search { display: flex; align-items: center; gap: 6px; margin-right: 14px; }
.header-search input {
    width: 200px; max-width: 38vw; padding: 8px 12px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit;
}
@media (max-width: 900px) { .header-search { display: none; } }

/* ---------------- Hamburger + mobile nav ---------------- */
.hamburger {
    display: none; width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 1.2rem; cursor: pointer; line-height: 1;
}
.m-subnav { display: none; }
.bottom-nav { display: none; }

@media (max-width: 820px) {
    .hamburger { display: inline-flex; align-items: center; justify-content: center; }
    .lang { display: none; }
    .site-header .bar { gap: 10px; }
    .header-spacer { flex: 1; }

    /* Topnav jadi dropdown saat hamburger ditekan */
    .topnav {
        position: absolute; top: 100%; left: 0; right: 0; height: auto;
        flex-direction: column; align-items: stretch; display: none;
        background: var(--bg-2); border-bottom: 1px solid var(--border);
    }
    .topnav.open { display: flex; }
    .topnav a { height: auto; padding: 14px 18px; border-bottom: 1px solid var(--border); }
    .topnav a.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }

    /* Sub-nav mobile: cabang + search */
    .m-subnav { display: block; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 8px 0 12px; }
    .m-subnav .sport-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
    .m-subnav .sport-tabs a {
        display: flex; flex-direction: column; align-items: center; gap: 3px; white-space: nowrap;
        padding: 8px 14px; color: var(--muted); font-weight: 600; font-size: .78rem; border-bottom: 2px solid transparent;
    }
    .m-subnav .sport-tabs a .ico { font-size: 1.3rem; }
    .m-subnav .sport-tabs a.active { color: #fff; border-bottom-color: var(--primary); }
    .m-search { display: flex; gap: 8px; margin-top: 12px; }
    .m-search input {
        flex: 1; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--border);
        background: var(--surface); color: var(--text); font: inherit;
    }

    /* Nav bawah fixed */
    body { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); }
    .bottom-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
        height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
        background: var(--bg-2); border-top: 1px solid var(--border);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .bottom-nav a, .bottom-nav button {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
        padding: 8px 4px; color: var(--muted); font-size: .72rem; font-weight: 600;
        background: none; border: 0; cursor: pointer; text-decoration: none;
    }
    .bottom-nav .bi { font-size: 1.25rem; }
    .bottom-nav a.active { color: var(--primary); }
    .float-ad { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 4px); padding: 0 8px 0; }
    .float-ad .ad-item img { width: 100%; max-height: 80px; object-fit: contain; }
    .site-footer { margin-bottom: 0; }
}

/* ---------------- Jadwal per hari (baris) ---------------- */
.day-group { margin-bottom: 14px; }
.day-head {
    font-weight: 700; font-size: .9rem; color: var(--text); margin: 0 0 8px;
    padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
    text-transform: capitalize;
}
.match-rows { display: flex; flex-direction: column; gap: 8px; }
.mrow {
    display: grid; align-items: center; gap: 12px; color: var(--text);
    grid-template-columns: 180px 1fr 110px;
    background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
}
.mrow:hover { border-color: var(--primary); }
.mrow-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mrow-time { font-size: .8rem; color: var(--muted); font-weight: 600; }
.mrow-live { display: inline-flex; align-items: center; gap: 6px; color: #2fd47a; font-weight: 800; font-size: .74rem; }
.mrow-live .blip { width: 9px; height: 9px; border-radius: 50%; background: #2fd47a; box-shadow: 0 0 6px #2fd47a; animation: blink 1s steps(1) infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
.mrow-league { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-fix { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; min-width: 0; }
.mrow-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mrow-team.home { justify-content: flex-end; text-align: right; }
.mrow-team.away { justify-content: flex-start; }
.mrow-name { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-team .mini-logo, .mrow-team .mini-badge {
    width: 28px; height: 28px; border-radius: 5px; object-fit: contain; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center; font-size: 28px; color: #fff;
}
.mrow-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mrow-vs { font-weight: 800; color: var(--muted); font-size: .95rem; white-space: nowrap; }
.mrow-vs b { color: var(--text); }
.mrow-vs span { margin: 0 4px; opacity: .6; }
.mrow-watch {
    text-align: center; font-weight: 700; font-size: .82rem; color: #fff; text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    padding: 9px 12px; border-radius: 8px; white-space: nowrap;
}
.mrow-watch span { font-size: .7rem; }
@media (max-width: 720px) {
    /* Mobile: baris 1 = waktu (kiri) + tombol Tonton (kanan)
               baris 2 = tim kiri | nama liga + vs/skor tengah | tim kanan */
    .mrow {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 10px 8px; padding: 10px 12px;
    }
    .mrow-meta {
        grid-column: 1; grid-row: 1;
        flex-direction: column; gap: 2px;
    }
    .mrow-watch {
        grid-column: 2; grid-row: 1;
        align-self: center; padding: 8px 14px;
    }
    .mrow-fix {
        grid-column: 1 / -1; grid-row: 2;
    }
    .mrow-time { color: var(--text); font-size: .82rem; }
    .mrow-league { font-size: .74rem; }
    .mrow-name { font-size: .85rem; }
}

/* ---------------- Iklan ---------------- */
.ad-grid { display: grid; gap: 10px; margin-top: 16px; }
.ad-grid.ad-even { grid-template-columns: 1fr 1fr; }              /* genap -> kiri & kanan */
.ad-grid.ad-odd  { grid-template-columns: 1fr; max-width: 970px; margin-inline: auto; } /* ganjil -> tengah */
.ad-grid.ad-full { grid-template-columns: 1fr; }                 /* full width sesuai wadah */
.ad-item { position: relative; display: block; border-radius: 8px; overflow: hidden; line-height: 0; }
.ad-item img { width: 100%; height: auto; display: block; }
.ad-close {
    position: absolute; top: 6px; right: 6px; z-index: 2; width: 22px; height: 22px; border-radius: 50%;
    border: 0; cursor: pointer; background: rgba(0, 0, 0, .6); color: #fff; font-size: .7rem; line-height: 1;
}
@media (max-width: 640px) { .ad-grid.ad-even { grid-template-columns: 1fr; } }

/* Float ad: TRANSPARAN (tanpa background), melayang di bawah; close ada di banner */
.float-ad { position: fixed; left: 0; right: 0; bottom: 60; z-index: 90; padding: 0 10px 10px; pointer-events: none; }
.float-ad .ad-grid { margin: 0 auto; max-width: 1100px; pointer-events: auto; }
.float-ad .ad-item img { max-height: 110px; width: auto; margin: 0 auto; }

/* ---------------- Halaman nonton ---------------- */
.watch { max-width: 960px; margin: 18px auto 0; }
.watch > .ad-grid { margin: 0 0 14px; }
.watch-stage { background: #000; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stage-placeholder {
    position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center;
    background: radial-gradient(900px 500px at 50% -20%, #16324a 0%, #0a1018 60%);
}
.stage-ball { font-size: 4rem; opacity: .8; }
.stage-status {
    position: absolute; left: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 2px;
    background: rgba(0, 0, 0, .55); padding: 8px 14px; border-radius: 8px;
}
.stage-status b { font-size: .95rem; }
.stage-status span { color: var(--muted); font-size: .8rem; }

.watch-share { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 2px; color: var(--muted); font-size: .88rem; }
.watch-share .sh {
    width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff; border: 0; cursor: pointer; font-size: .95rem; text-decoration: none;
}
.watch-share .sh:hover { filter: brightness(1.1); }

.scorebar {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 18px; margin-top: 6px;
}
.sb-team { display: flex; align-items: center; gap: 12px; }
.sb-team.away { flex-direction: row-reverse; text-align: right; }
.sb-team .logo, .sb-team .badge-initial { width: 56px; height: 56px; border-radius: 8px; font-size: 1rem; }
.sb-team-info b { display: block; font-size: .95rem; }
.sb-team-info span { color: var(--muted); font-size: .82rem; }
.sb-center { text-align: center; }
.sb-score { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.sb-list { list-style: none; margin: 0; padding: 0; font-size: .82rem; color: var(--muted); }
.sb-list li { padding: 2px 0; }
.sb-ft { display: inline-block; background: var(--bg-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 7px; color: var(--text); font-weight: 700; }
@media (max-width: 680px) {
    .scorebar { grid-template-columns: 1fr 1fr; row-gap: 18px; }
    .sb-center { grid-column: 1 / -1; order: 3; }
}

/* ---------------- Hero ---------------- */
.hero {
    margin-top: 26px;
    background: linear-gradient(135deg, #1a2133, #141a29);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}
.hero h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.hero p { margin: 0; color: var(--muted); max-width: 60ch; }

/* ---------------- Match grid & cards ---------------- */
.grid { display: grid; gap: 16px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

.match-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex; flex-direction: column; gap: 14px;
    transition: .18s;
    position: relative;
    overflow: hidden;
}
.match-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--shadow); }
.match-card .mc-top { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.match-card .mc-top .league { font-weight: 700; color: var(--text); }
.match-card .mc-top .sep { opacity: .5; }

.status-badge {
    font-size: .68rem; font-weight: 800; text-transform: uppercase;
    padding: 4px 9px; border-radius: 999px; letter-spacing: .5px; margin-left: auto;
    border: 1px solid transparent;
}
.status-badge.is-live { background: var(--live); color: #fff; animation: livepulse 1.6s infinite; }
.status-badge.is-upcoming { background: rgba(138, 150, 173, .15); color: var(--muted); }
.status-badge.is-finished { background: rgba(42, 209, 122, .14); color: var(--accent); }
.status-badge.is-postponed,
.status-badge.is-cancelled { background: rgba(255, 176, 32, .14); color: var(--warn); }
@keyframes livepulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 46, 84, .5); } 50% { box-shadow: 0 0 0 6px rgba(255, 46, 84, 0); } }

.teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.team .logo {
    width: 56px; height: 56px; border-radius: 14px; object-fit: contain;
    background: transparent; border: none;
}
.team .badge-initial {
    width: 56px; height: 56px; border-radius: 14px;
    display: grid; place-items: center; font-size: 1.6rem; background: transparent;
}
.team .tname { font-weight: 700; font-size: .9rem; line-height: 1.2; }
.score {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.7rem; font-weight: 800; min-width: 78px; justify-content: center;
}
.score .vs { font-size: .8rem; color: var(--muted); font-weight: 700; }
.score .sc-num.dim { color: var(--muted); }

.mc-foot { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; }
.mc-foot .when b { color: var(--text); }
.mc-foot .watch { margin-left: auto; }
.live-tag { color: #ff7088; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.live-tag .blip { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: livepulse 1.6s infinite; }

.card-link::after { content: ""; position: absolute; inset: 0; }

/* ---------------- Empty state ---------------- */
.empty {
    text-align: center; padding: 40px 20px; color: var(--muted);
    background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty .ico { font-size: 2rem; margin-bottom: 6px; }

/* ---------------- Match detail ---------------- */
.detail-head {
    margin-top: 24px; background: linear-gradient(135deg, #1a2133, #141a29);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
}
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.detail-meta a { color: var(--text); font-weight: 700; }
.detail-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.detail-teams .team .logo, .detail-teams .team .badge-initial { width: 84px; height: 84px; border-radius: 18px; font-size: 1.6rem; }
.detail-teams .tname { font-size: 1.05rem; }
.detail-score { font-size: 2.8rem; font-weight: 900; text-align: center; }
.detail-score .vs { font-size: 1rem; color: var(--muted); }
.detail-venue { text-align: center; color: var(--muted); margin-top: 14px; font-size: .92rem; }

.layout-2 { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 22px; }
@media (min-width: 940px) { .layout-2.with-side { grid-template-columns: 1fr 330px; } }

/* ---------------- Player ---------------- */
.player-wrap {
    background: #000; border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; position: relative; aspect-ratio: 16 / 9;
}
.player-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player-status {
    position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
    background: radial-gradient(circle at center, #11151f, #05070b); color: var(--muted); padding: 20px;
}
.player-status .spin {
    width: 38px; height: 38px; border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--primary);
    animation: spin 1s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.player-badge {
    position: absolute; top: 12px; left: 12px; z-index: 3;
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--live); color: #fff; font-weight: 800; font-size: .72rem;
    padding: 5px 10px; border-radius: 999px; letter-spacing: .5px;
}
.player-badge .blip { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: livepulse 1.6s infinite; }
.player-tech {
    position: absolute; bottom: 10px; right: 12px; z-index: 3; font-size: .7rem; color: #9fb0c9;
    background: rgba(0, 0, 0, .5); padding: 3px 8px; border-radius: 6px;
}
.player-debug {
    position: absolute; left: 12px; bottom: 10px; z-index: 3; max-width: 70%;
    font: 11px/1.5 ui-monospace, monospace; color: #9fe6b8;
    background: rgba(0, 0, 0, .6); padding: 6px 9px; border-radius: 6px; white-space: pre-wrap;
}
/* badge tech kanan-bawah lama digantikan .pc-tech di control bar */
.player-tech { display: none !important; }

/* Overlay tap-to-play (aktifkan suara dalam satu klik) */
.player-tap {
    position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px; cursor: pointer;
    border: 0; color: #fff; background: rgba(0, 0, 0, .45); font: inherit;
}
.player-tap:hover { background: rgba(0, 0, 0, .55); }
.player-tap-ico {
    width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center;
    background: var(--primary); font-size: 1.7rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}
.player-tap-txt { font-weight: 700; font-size: .95rem; letter-spacing: .3px; }

/* Control bar */
.player-controls {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0));
    opacity: 0; transition: opacity .2s ease;
}
.player-wrap:hover .player-controls,
.player-controls:focus-within { opacity: 1; }
.pc-spacer { flex: 1; }
.pc-btn {
    appearance: none; border: 0; cursor: pointer; color: #fff;
    background: rgba(255, 255, 255, .12); border-radius: 8px;
    min-width: 36px; height: 36px; padding: 0 10px; font-size: 1rem; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center; transition: background .15s;
}
.pc-btn:hover { background: rgba(255, 255, 255, .25); }
.pc-live { font-weight: 800; font-size: .75rem; letter-spacing: .5px; gap: 2px; }
.pc-vol { display: flex; align-items: center; gap: 6px; }
.pc-vol-range { width: 90px; height: 4px; cursor: pointer; accent-color: var(--primary); }
.pc-tech { color: #cfe; font-size: .7rem; background: rgba(0, 0, 0, .4); padding: 3px 8px; border-radius: 6px; }
@media (max-width: 560px) {
    .pc-vol-range { width: 60px; }
    .pc-live-txt { display: none; }
    .pc-tech { display: none; }
}

.stream-offline-note { color: var(--muted); font-size: .85rem; margin-top: 10px; }

/* ---------------- Library (Tim & Liga) ---------------- */
.lib-tabs { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.lib-tabs-scroll { display: flex; gap: 8px; overflow-x: auto; flex: 1; padding-bottom: 4px; }
.lib-tab {
    white-space: nowrap; padding: 9px 16px; border-radius: 999px; text-decoration: none;
    background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 600;
}
.lib-tab:hover { color: #fff; }
.lib-tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; border-color: transparent; }
.lib-add-sport-btn {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px dashed var(--border);
    background: var(--surface); color: var(--muted); font-size: 1.3rem; cursor: pointer; line-height: 1;
}
.lib-add-sport-btn:hover { color: #fff; border-color: var(--primary); }
.lib-addsport { margin-bottom: 16px; }
.lib-addsport .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.lib-addsport .row input { flex: 1; min-width: 160px; }
.lib-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 20px; }
@media (min-width: 820px) { .lib-grid { grid-template-columns: 1fr 1fr; } }
.lib-grid input, .lib-grid textarea {
    width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--bg); color: inherit; font: inherit; margin-bottom: 8px;
}
.lib-leagues { display: flex; flex-direction: column; gap: 10px; }
.lib-league { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lib-league > summary {
    display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer;
    list-style: none; font-weight: 700;
}
.lib-league > summary::-webkit-details-marker { display: none; }
.lib-league > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.lib-league[open] > summary::before { transform: rotate(90deg); }
.lib-lg-logo { width: 26px; height: 26px; object-fit: contain; border-radius: 4px; }
.lib-lg-name { flex: 1; }
.lib-lg-count { color: var(--muted); font-weight: 500; font-size: .82rem; }
.lib-league-body { padding: 4px 16px 16px; border-top: 1px solid var(--border); }
.lib-team-list { list-style: none; margin: 10px 0 0; padding: 0; }
.lib-team-list li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.lib-team-list li:last-child { border-bottom: 0; }
.lib-team-row { display: flex; align-items: center; gap: 10px; }
.lib-team { flex: 1; display: flex; align-items: center; gap: 10px; }
.lib-team-item .row-actions { display: flex; gap: 6px; align-items: center; }
.lib-edit-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.lib-edit-form input, .lib-edit-form select {
    padding: 7px 10px; border-radius: 7px; border: 1px solid var(--border);
    background: var(--surface); color: inherit; font: inherit;
}
.lib-edit-form input[name=name] { flex: 1; min-width: 140px; }
.lib-edit-form input[name=logo_url] { flex: 2; min-width: 180px; }
.lib-team .mini-logo, .lib-team .mini-badge {
    width: 26px; height: 26px; border-radius: 5px; object-fit: contain;
    display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; color: #fff;
}
.lib-league-delete { margin-top: 14px; }

/* ---------------- Cards / panels ---------------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.panel h3 { margin: 0 0 12px; font-size: 1rem; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list .k { color: var(--muted); }
.info-list .v { font-weight: 700; text-align: right; }

/* ---------------- Tables (league/admin) ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.tbl th, table.tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.tbl th { background: var(--surface-2); color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .5px; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--surface-2); }
.mini-team { display: inline-flex; align-items: center; gap: 8px; }
.mini-logo { width: 26px; height: 26px; border-radius: 7px; object-fit: contain; background: transparent; }
.mini-badge { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; font-size: 1rem; background: transparent; }

/* ---------------- Footer ---------------- */
.site-footer { margin-top: 50px; border-top: 1px solid var(--border); padding: 30px 0 0; color: var(--muted); font-size: .88rem; background: var(--bg-2); }
.site-footer .bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.site-footer .header-spacer { flex: 1; }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 24px; padding-bottom: 24px; }
@media (min-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr 1.4fr; } }
.footer-cols h4 { margin: 0 0 12px; color: var(--text); font-size: .95rem; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-cols a { color: var(--muted); }
.footer-cols a:hover { color: var(--primary); }
.footer-about .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.footer-about p { margin: 0; max-width: 46ch; line-height: 1.6; }
.footer-base { border-top: 1px solid var(--border); padding: 16px 0; text-align: center; font-size: .82rem; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 6px; color: var(--text); }
.field .hint { color: var(--muted); font-weight: 400; font-size: .8rem; }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=time], input[type=file], select, textarea {
    width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
    background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
    font-family: inherit; font-size: .92rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 77, 61, .15); }
textarea { resize: vertical; min-height: 80px; }
.checkbox { display: flex; align-items: center; gap: 9px; }
.checkbox input { width: auto; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---------------- Alerts ---------------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600; font-size: .9rem; border: 1px solid transparent; }
.alert-success { background: rgba(42, 209, 122, .12); color: #6ee2a4; border-color: rgba(42, 209, 122, .3); }
.alert-error { background: rgba(255, 46, 84, .12); color: #ff8197; border-color: rgba(255, 46, 84, .3); }
.alert-warn { background: rgba(255, 176, 32, .12); color: var(--warn); border-color: rgba(255, 176, 32, .3); }

/* ---------------- Admin layout ---------------- */
.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin-side { background: var(--bg-2); border-right: 1px solid var(--border); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { margin: 4px 8px 20px; font-size: 1.15rem; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; font-size: .92rem; }
.admin-nav a:hover { background: var(--surface); color: var(--text); }
.admin-nav a.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.admin-nav .ico { width: 20px; text-align: center; }
.admin-nav .sep { margin: 12px 10px 6px; font-size: .68rem; text-transform: uppercase; letter-spacing: .8px; color: #5a667e; }
.admin-main { padding: 22px 26px 60px; min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.admin-top h1 { margin: 0; font-size: 1.5rem; }
.admin-top .header-spacer { flex: 1; }
.admin-user { color: var(--muted); font-size: .88rem; }
.admin-user b { color: var(--text); }

.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 26px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat .num { font-size: 2rem; font-weight: 900; }
.stat .lbl { color: var(--muted); font-size: .85rem; font-weight: 600; }
.stat.live .num { color: var(--live); }

.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; }
.admin-card > h2 { margin: 0 0 16px; font-size: 1.1rem; }
.row-actions { display: flex; gap: 6px; }
.inline-form { display: inline; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .header-spacer { flex: 1; }
.muted { color: var(--muted); }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.tag.on { background: rgba(42, 209, 122, .15); color: var(--accent); }
.tag.off { background: rgba(138, 150, 173, .12); color: var(--muted); }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.login-card .brand { justify-content: center; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: .9rem; }

/* accordion edit items */
details.edit-item { margin-bottom: 10px; }
details.edit-item > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; list-style: none; padding: 4px 0; }
details.edit-item > summary::-webkit-details-marker { display: none; }
details.edit-item > summary .edit-hint { color: var(--muted); font-size: .82rem; }
details.edit-item[open] > summary .edit-hint { color: var(--primary); }
.edit-body { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }

/* code block */
.codebox { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font: 12.5px/1.6 ui-monospace, monospace; color: #9fe6b8; word-break: break-all; display: flex; align-items: center; gap: 10px; }
.codebox code { flex: 1; }
.copy-btn { flex-shrink: 0; }

/* ---------------- Kelola Admin (badge role, modal, tabel aksi) ---------------- */
.badge-role { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .74rem; font-weight: 700; }
.role-super   { background: rgba(255,180,0,.15);  color: #ffb400; }
.role-editor  { background: rgba(138,150,173,.15); color: var(--muted); }
.role-active  { background: rgba(42,209,122,.12);  color: #6ee2a4; }
.role-inactive{ background: rgba(255,46,84,.12);   color: #ff6b6b; }
.td-actions   { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn-sm       { padding: 5px 10px; border-radius: 6px; font-size: .78rem; font-weight: 700; cursor: pointer; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.btn-sm:hover { border-color: var(--primary); color: var(--primary); }
.btn-warn     { border-color: rgba(255,176,32,.4); color: var(--warn); }
.btn-warn:hover { background: rgba(255,176,32,.1); }
.btn-danger   { border-color: rgba(255,46,84,.4); color: #ff6b6b; }
.btn-danger:hover { background: rgba(255,46,84,.1); }
.toggle-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .9rem; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; width: min(420px, 100%); box-shadow: var(--shadow); }
.modal-box h3 { margin: 0 0 18px; font-size: 1rem; }

@media (max-width: 760px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side { position: static; height: auto; display: flex; flex-direction: column; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-nav .sep { display: none; }
    .detail-teams .team .logo, .detail-teams .team .badge-initial { width: 60px; height: 60px; }
    .detail-score { font-size: 2rem; }
}
