:root {
    color-scheme: light;
    --accent:       #00e5a0;
    --accent-dim:   rgba(0, 229, 160, 0.15);
    --accent-text:  #00b87f;
    --live:         #34A853;
    --live-dim:     rgba(52, 168, 83, 0.12);
    --red:          #EA4335;
    --red-dim:      rgba(234, 67, 53, 0.1);
    --bg:           #ffffff;
    --bg-2:         #f6f7f9;
    --bg-3:         #eef0f4;
    --surface:      #ffffff;
    --border:       rgba(0, 0, 0, 0.07);
    --border-strong: rgba(0, 0, 0, 0.12);
    --text-1:       #0d0f14;
    --text-2:       #4a4f5e;
    --text-3:       #8a90a0;
    --font:         'Google Sans', sans-serif;
    --mono:         'Google Sans', sans-serif;
    --radius:       12px;
    --radius-sm:    8px;
    --shadow:       0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg:    0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --transition:   0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg:           #0d0f14;
    --bg-2:         #141720;
    --bg-3:         #1c2030;
    --surface:      #141720;
    --border:       rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    
    --text-1:       #f8fafc;
    --text-2:       #cbd5e1;
    --text-3:       #94a3b8;
    --shadow:       0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
    --shadow-lg:    0 4px 16px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-1);
    line-height: 1.5;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.wrapper {
    width: 100%;
    max-width: 640px;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

/* ── HEADER ── */
.header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.logo {
    font-family: var(--font);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-1);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-2);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover { background: var(--bg-2); color: var(--text-1); }

/* ── MAIN CONTENT ── */
.main {
    padding: 20px 14px;
    flex: 1;
    background: var(--bg-2);
}

/* ── HERO VIDEO ── */
.hero-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

#heroPlayer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.1) 100%);
    padding: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    pointer-events: none;
}

.hero-overlay .hero-text h1 {
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    font-family: var(--font);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.hero-overlay .hero-text p {
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    font-size: 0.85rem;
}

.hero-overlay .live-badge {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--live);
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font: 600 0.75rem var(--font);
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

/* ── LIVE INDICATORS ── */

/* Properti bersama untuk semua indikator live */
.live-dot,
.card-indicator .live-dot-lg {
    border-radius: 50%;
    background: var(--live);
    animation: pulse 1.6s infinite;
    display: inline-block;
    flex-shrink: 0;
}

.live-dot    { width: 6px;  height: 6px;  }
.live-dot-lg { width: 10px; height: 10px; }

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── SEARCH ── */
.search-wrap {
    position: relative;
    margin-bottom: 16px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-1);
    font: 0.9rem var(--font);
    padding: 12px 42px 12px 40px;
    outline: none;
    transition: var(--transition);
}

.search-input::placeholder { color: var(--text-3); }

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-3);
    border: none;
    color: var(--text-3);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.search-clear:hover { color: var(--text-1); background: var(--border-strong); }

/* ── TABS ── */
.tabs-wrap {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin: 0 -14px;
    padding: 2px 40px 12px;
    -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
    mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
}

.tab {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font: 500 0.8rem var(--font);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.tab:hover { border-color: var(--border-strong); color: var(--text-1); }

.tab.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent-text);
}

/* ── SECTION HEADERS ── */
.section-header {
    font: 600 0.75rem var(--mono);
    letter-spacing: 0.08em;
    color: var(--text-3);
    text-transform: uppercase;
    padding: 8px 0 10px;
}

/* FIX: pindahkan layout dari inline JS ke CSS */
.section-header.live-header {
    color: var(--live);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.live-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── SKELETON ── */
.skeleton-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.skeleton-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-3);
    flex-shrink: 0;
    animation: shimmer 1.4s infinite ease-in-out;
    margin-top: 4px;
}

.skeleton-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: var(--bg-3);
    animation: shimmer 1.4s infinite ease-in-out;
}

.skeleton-line.short  { width: 45%; }
.skeleton-line.medium { width: 70%; }

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ── EVENT CARDS ── */
.event-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.event-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.event-card.is-live {
    border-color: rgba(52, 168, 83, 0.25);
    background: linear-gradient(to right, rgba(52, 168, 83, 0.04), var(--surface));
}

.card-indicator {
    width: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-shrink: 0;
    padding-top: 2px;
}

.card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-time-row {
    font: 0.75rem var(--mono);
    color: var(--text-3);
    line-height: 1.4;
}

.card-match-row {
    font: 500 1rem var(--font);
    color: var(--text-1);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.card-league {
    font: 0.75rem var(--font);
    color: var(--text-3);
    padding: 2px 8px;
    background: var(--bg-3);
    border-radius: 4px;
    line-height: 1.4;
}

.card-countdown {
    font: 500 0.75rem var(--mono);
    color: var(--accent-text);
    padding: 2px 8px;
    background: var(--accent-dim);
    border-radius: 4px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.btn-watch {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: #0d0f14;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-watch:hover { opacity: 0.85; transform: scale(1.08); }

.btn-watch svg {
    width: 18px;
    height: 18px;
    color: #0d0f14;
}

.btn-notify {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-3);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-notify:hover { color: var(--accent-text); border-color: var(--accent); }

.btn-notify.notified {
    color: var(--accent-text);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.btn-notify svg { width: 14px; height: 14px; }

.sport-group { margin-bottom: 4px; }

/* ── EMPTY / ERROR ── */
.state-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 20px;
    text-align: center;
    color: var(--text-2);
    font-size: 0.9rem;
    margin: 8px 0;
}

.state-card.is-error { border-color: rgba(255, 69, 96, 0.2); }

/* ── FOOTER ── */
.footer {
    background: var(--bg-3);
    border-top: 1px solid var(--border);
    padding: 28px 20px 20px;
    font-size: 0.82rem;
    color: var(--text-3);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 400px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* FIX: selector diubah dari .footer h3 → .footer strong karena HTML footer
   sudah diubah ke <strong class="footer-heading"> untuk menjaga heading hierarchy */
.footer strong {
    font: 500 0.85rem var(--font);
    color: var(--text-1);
    margin-bottom: 10px;
}

.footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.footer a {
    color: var(--text-3);
    text-decoration: none;
    transition: color var(--transition);
}

.footer a:hover { color: var(--accent-text); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    text-align: center;
}

.footer-disclaimer {
    font-size: 0.75rem;
    color: var(--text-3);
    margin-top: 6px;
    line-height: 1.6;
}

/* ── TOAST ── */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--text-1);
    color: var(--bg);
    padding: 10px 20px;
    border-radius: var(--radius);
    font: 500 0.85rem var(--font);
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    white-space: nowrap;
}

.toast.visible { transform: translateX(-50%) translateY(0); }

/* ── SCROLL TO TOP ── */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--text-1);
    color: var(--bg);
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.scroll-top:hover { transform: translateY(-2px); }
.scroll-top.visible { display: flex; }


/* =====================================================================
   HALAMAN: WATCH-LIVE.HTML
   ===================================================================== */

.player-wrap {
    position: relative;
    width: auto;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    margin: -20px -14px 16px -14px;
    border: none;
}

.player-wrap iframe,
.player-wrap #adContainer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

#adContainer {
    background: #000;
    z-index: 20;
    display: none;
}

#adYtEl { width: 100%; height: 100%; }

.ad-skip-wrap {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 25;
}

.ad-countdown-text {
    background: rgba(0,0,0,0.75);
    color: rgba(255,255,255,0.7);
    padding: 7px 14px;
    border-radius: 6px;
    font: 0.8rem var(--mono);
    display: none;
}

.ad-skip-btn {
    background: rgba(0,0,0,0.85);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 7px 16px;
    border-radius: 6px;
    font: 500 0.82rem var(--font);
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.ad-skip-btn:hover { background: #000; border-color: rgba(255,255,255,0.5); }

.content-area { width: 100%; }

.event-info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.event-info-main { flex: 1; min-width: 0; }

.event-title {
    font: 600 1.1rem var(--font);
    letter-spacing: -0.02em;
    color: var(--text-1);
    margin-bottom: 4px;
    word-break: break-word;
}

.event-subtitle {
    font: 0.82rem var(--font);
    color: var(--text-2);
}

.event-live-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--live-dim);
    color: var(--live);
    padding: 4px 10px;
    border-radius: 6px;
    font: 600 0.7rem var(--font);
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
}

.action-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font: 500 0.82rem var(--font);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-action:hover {
    border-color: var(--border-strong);
    color: var(--text-1);
    background: var(--bg-3);
}

/* ── OVERLAY (berakhir / error) ── */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(13, 15, 20, 0.94);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.overlay.visible { display: flex; }

.overlay-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    max-width: 360px;
    width: 100%;
    text-align: center;
}

.overlay-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.overlay-title {
    font: 600 1rem var(--font);
    color: var(--text-1);
    margin-bottom: 8px;
}

.overlay-msg {
    font: 0.85rem var(--font);
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: 20px;
}

.overlay-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #0d0f14;
    text-decoration: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font: 600 0.88rem var(--font);
    transition: var(--transition);
}

.overlay-back:hover { opacity: 0.88; }


/* ── SPONSOR SLIDER ── */
.sponsor-slider-container {
    position: relative;
    width: auto;
    border-radius: 0;
    overflow: hidden;
    margin: -20px -14px 16px -14px;
    background: var(--bg-3);
    border: none;
}

.sponsor-slider-wrapper {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    align-items: stretch;
}

.sponsor-slide { min-width: 100%; box-sizing: border-box; position: relative; }

.sponsor-slide img {
    width: 100%;
    /* FIX: height:auto + menghapus aspect-ratio fixed agar slider menyesuaikan
       dimensi asli gambar yang di-upload. Sebelumnya aspect-ratio: 21/7 memaksa
       semua gambar dikrop ke rasio 3:1 — gambar 1200×628 (rasio ~1.91:1) menjadi
       terpotong dan salah proporsi.
       Dengan height:auto, tinggi container dihitung otomatis dari lebar × rasio asli gambar. */
    height: auto;
    aspect-ratio: unset;
    object-fit: contain;
    display: block;
}


.slide-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(13, 15, 20, 0.5);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    opacity: 0;
}

.sponsor-slider-container:hover .slider-btn { opacity: 1; }
.slider-btn:hover { background: var(--accent); color: #000; }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.slider-dot {
    border: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* ── ACCESSIBILITY & SEO UTILITIES ── */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    background: var(--accent);
    color: #0d0f14;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font: 600 0.85rem var(--font);
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 8px;
}

.footer-heading {
    font: 500 0.85rem var(--font);
    color: var(--text-1);
    margin-bottom: 10px;
    display: block; /* FIX: display:block agar <strong> berperilaku seperti heading block-level */
}

/* ── CARD LIST (ul semantik untuk event cards) ── */
.card-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.card-list li {
    padding: 0;
    margin: 0;
}

/* h2/h3 section headers — reset browser heading margin agar tampilan sama */
h2.section-header,
h3.section-header {
    font: 600 0.75rem var(--mono);
    letter-spacing: 0.08em;
    color: var(--text-3);
    text-transform: uppercase;
    padding: 8px 0 10px;
    margin: 0;
}

/* FIX: selector h2.section-header.live-header — warna override untuk live section */
h2.section-header.live-header {
    color: var(--live);
}

/* h3 di dalam article card — reset browser default */
.card-match-row {
    font: 500 1rem var(--font);
    color: var(--text-1);
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin: 0;
}

/* footer di dalam article card */
article .card-meta-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

/* ── ADS PLACEHOLDER ── */
.ads-placeholder {
    margin: -20px -14px 16px -14px; 
    height: 200px;
    background: var(--bg-3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}

.ads-placeholder p {
    color: var(--text-3);
    font: 600 1rem var(--font);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}