html {
  scrollbar-gutter: stable;
}
body {
    background: var(--bg-body);
}
#main-content {
    background: var(--bg-content);
}
.mobile-livescore {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 20px;
    margin-right: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulseSlow 2s infinite ease-in-out;
    position: relative;
    overflow: hidden;
}
.mobile-livescore:hover {
    background: rgba(220, 53, 69, 0.25);
    transform: scale(1.05);
}
.mobile-livescore::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 20px;
    animation: glowPulse 3s infinite ease-in-out;
}
.livescore-icon {
    font-size: 14px;
    color: #ff6b6b;
    animation: iconBlink 2.5s infinite ease-in-out;
}
.livescore-text {
    font-size: 11px;
    font-weight: 700;
    color: #ff6b6b;
    white-space: nowrap;
    letter-spacing: 0.5px;
    animation: textBlink 2s infinite ease-in-out;
}
@keyframes pulseSlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(220, 53, 69, 0); }
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}
@keyframes iconBlink {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}
@keyframes textBlink {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; text-shadow: 0 0 8px rgba(255, 107, 107, 0.5); }
}

.site-header {
    background: color-mix(in srgb, var(--bg-header) 95%, transparent);
    border-bottom: 3px solid var(--accent);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.site-header.scrolled {
    background: color-mix(in srgb, var(--bg-header) 98%, transparent);
    box-shadow: 0 2px 20px color-mix(in srgb, var(--accent) 20%, transparent);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
}
.site-branding { flex-shrink: 0; }
.site-logo-text {
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.5px;
}
.site-logo-text span { color: var(--accent); }
.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.desktop-menu {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.custom-liga-menu {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: wrap;
}
.custom-liga-menu > li {
    position: static;
    margin: 0 0.15rem;
}
.custom-liga-menu > li > a {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 0.7rem;
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.custom-liga-menu > li > a:hover {
    background: var(--accent);
}

.custom-liga-menu .mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    width: min(750px, calc(100vw - 2rem));
    background: color-mix(in srgb, var(--bg-surface) 98%, transparent);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
    z-index: 1000;
}
.custom-liga-menu > li:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.mega-dropdown-container.single-liga {
    display: grid;
    grid-template-columns: 1.2fr 1.4fr 1.4fr;
    gap: 1.25rem;
}
.liga-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}
.liga-header img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.liga-header h3 {
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.liga-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.liga-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
    background: color-mix(in srgb, var(--text) 3%, transparent);
    border-radius: 4px;
    transition: all 0.2s ease;
    display: block;
}
.liga-link:hover {
    background: var(--accent);
    color: var(--text);
    transform: translateX(3px);
}
.liga-col h4 {
    color: var(--accent);
    font-size: 0.8rem;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.team-item,
.player-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 5%, transparent);
    font-size: 0.85rem;
}
.team-item:hover,
.player-item:hover {
    background: color-mix(in srgb, var(--accent) 20%, transparent);
    transform: translateX(4px);
}
.menu-empty {
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.35rem 0;
}
.team-logo-mini {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 50%;
}
.player-photo-mini {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
}
.player-info-mini {
    display: flex;
    flex-direction: column;
}
.player-name { font-size: 0.85rem; font-weight: 600; }
.player-team { font-size: 0.7rem; color: var(--text-muted); }

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
    z-index: 1001;
    display: none;
}
.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}
.hamburger.is-active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.hamburger.is-active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.is-active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 88vw);
    height: 100vh;
    background: color-mix(in srgb, var(--bg-body) 98%, transparent);
    padding: 5rem 1.25rem 2rem;
    overflow-y: auto;
    z-index: 999;
    backdrop-filter: blur(10px);
    border-left: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
}
.mobile-menu.is-open {
    display: block;
}
.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-menu-list > li {
    margin: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}
.mobile-menu-list > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0.75rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    min-height: 44px;
}
.mobile-menu-list .menu-item-has-children > a::after {
    content: '▼';
    font-size: 0.65rem;
    opacity: 0.6;
    transition: transform 0.25s ease;
}
.mobile-menu-list .menu-item-has-children > a.submenu-open::after {
    transform: rotate(180deg);
}
.mobile-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.mobile-menu .sub-menu.submenu-open {
    max-height: 1200px;
}
.mobile-menu .sub-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 0.75rem 0.55rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    min-height: 40px;
}
.mobile-menu .sub-menu a:hover {
    background: color-mix(in srgb, var(--accent) 20%, transparent);
    color: var(--text);
}
.mobile-menu .sub-menu li.divider {
    border-top: 1px solid color-mix(in srgb, var(--text) 15%, transparent);
    margin: 0.4rem 0;
    pointer-events: none;
}
body.menu-open { overflow: hidden; }

.container {
    width: min(1140px, calc(100% - 2rem));
    margin-left: auto;
    margin-right: auto;
}
body.has-fixed-header { padding-top: 78px; }

@media (min-width: 1024px) {
    .hamburger { display: none; }
    .mobile-menu { display: none !important; }
}

@media (max-width: 1200px) {
    .custom-liga-menu > li > a {
        padding: 0.4rem 0.55rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 1023px) {
    .desktop-menu { display: none; }
    .hamburger {
        display: flex;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        background: color-mix(in srgb, var(--accent) 15%, transparent);
        border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
        border-radius: 8px;
    }
    .mobile-livescore {
        display: flex;
        margin-right: auto;
        margin-left: 12px;
    }
    .header-inner { padding: 0.7rem 0; }
}

@media (max-width: 767px) {
    .site-header {
        background: color-mix(in srgb, var(--bg-header) 75%, transparent);
        border-bottom: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
    }
    .header-inner {
        padding: 0.5rem 0;
        min-height: 60px;
    }
    .site-logo-text { font-size: 1.25rem; }
    .logo img { height: 42px; }
    body.has-fixed-header { padding-top: 64px; }

    .mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: 80vh;
        border-radius: 0 0 12px 12px;
        border-bottom: 3px solid var(--accent);
        border-left: none;
        padding: 1rem 1.25rem 1.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
}

@media (max-width: 480px) {
    .site-logo-text { font-size: 1.1rem; }
    .hamburger { width: 40px; height: 40px; }
    .livescore-text { font-size: 9px; }
}

.site-logo-text {
    display: flex;
    align-items: center;
    line-height: 1;
}
.site-logo-img {
    display: block;
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}
@media (max-width: 720px) {
    .site-logo-img {
        height: 28px;
        max-width: 120px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-livescore,
    .livescore-icon,
    .livescore-text { animation: none !important; }
}

/* footer.php — semua halaman */
.site-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 80;
    clear: both;
    width: 100%;
    transform: none;
    float: none;
    margin-top: 2rem;
    padding: 1.25rem 0.85rem 1.6rem;
    border-top: 1px solid color-mix(in srgb, var(--accent) 28%, var(--bg-body));
    background: var(--bg-footer);
    color: var(--text-muted);
}
.site-footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.15rem;
    margin-bottom: 0.7rem;
}
.site-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    padding: 0.15rem 0.45rem;
}
.site-footer-links a:not(:last-child)::after {
    content: "•";
    color: color-mix(in srgb, var(--accent) 35%, var(--text-muted));
    margin-left: 0.55rem;
}
.site-footer-links a:hover { color: var(--accent); }
.site-footer-copy { margin: 0; font-size: 0.78rem; color: var(--text-muted); }
@media (max-width: 720px) {
    .site-footer { padding: 1rem 0.7rem 1.35rem; }
    .site-footer-links a { font-size: 0.78rem; }
}

/* berita.php, kategori.php, tag.php — daftar berita */
.page-berita { max-width: 1100px; margin: 0 auto; padding: 0.75rem 0.85rem 2.5rem; }
.pemain-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.pemain-news-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.pemain-news-item img { width: 100%; height: 140px; object-fit: cover; display: block; }
.pemain-news-body { padding: 1rem; }
.pemain-news-title { margin: 0 0 0.4rem; font-size: 1rem; line-height: 1.35; }
.pemain-news-title a { color: var(--text); text-decoration: none; }
.pemain-news-title a:hover { color: var(--accent); }
.pemain-news-meta { color: var(--text-muted); font-size: 0.8rem; }
.pemain-pagination { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.25rem; }
.pemain-pagination a {
    padding: 0.45rem 0.85rem; border-radius: 8px; text-decoration: none;
    background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text-muted); border: 1px solid var(--border);
}
.pemain-pagination a.active { background: var(--accent); color: var(--text); border-color: var(--accent); }
.pemain-card h3 { margin: 0 0 0.85rem; color: var(--text); font-size: 1.15rem; }

/* post.php — artikel */
.post-content img { max-width: 100%; height: auto; }
.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 { scroll-margin-top: 80px; }
.post-caption { margin: 1rem 0; text-align: center; }
.post-caption figcaption { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.35rem; }
.post-featured img { width: 100%; height: auto; border-radius: 12px; display: block; }
html { scroll-behavior: smooth; }

/* post.php — TOC (warna dari token; panel menyusul) */
.post-toc {
    background: var(--toc-bg, var(--bg-surface));
    border: 1px solid var(--toc-border, var(--border));
    border-radius: var(--toc-radius, 10px);
    padding: var(--toc-padding, 1rem);
    margin: var(--toc-margin, 1rem 0);
    color: var(--toc-text, var(--text));
    font-size: var(--toc-font-size, 15px);
}
.post-toc-title { margin: 0; font-weight: 600; }
.post-toc-toggle {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: left;
    color: var(--toc-title, var(--accent));
}
.post-toc-list {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
    list-style: none;
    counter-reset: toc1;
}
.post-toc-list > li {
    margin: 0.25rem 0;
    counter-increment: toc1;
}
.post-toc-list > li > a::before {
    content: counter(toc1) ". ";
    font-weight: 600;
}
.post-toc-list ol {
    margin: var(--toc-nested-margin, 0.25rem 0 0);
    padding-left: 1.25rem;
    list-style: none;
    counter-reset: toc2;
    font-size: var(--toc-nested-font-size, 0.92em);
}
.post-toc-list ol > li {
    margin: 0.25rem 0;
    counter-increment: toc2;
}
.post-toc-list ol > li > a::before {
    content: counter(toc1) "." counter(toc2) " ";
    font-weight: 600;
}
.post-toc-list ol ol { counter-reset: toc3; }
.post-toc-list ol ol > li { counter-increment: toc3; }
.post-toc-list ol ol > li > a::before {
    content: counter(toc1) "." counter(toc2) "." counter(toc3) " ";
    font-weight: 600;
}
.post-toc a { text-decoration: none; color: var(--toc-link, var(--text)); }
.post-toc a:hover { text-decoration: underline; }

/* post.php — IRP */
.irp-box {
    margin: var(--irp-margin, 1.25rem 0);
    padding: var(--irp-padding, 0.75rem 1rem);
    border-left: 4px solid var(--irp-border, var(--accent));
    background: var(--irp-bg, var(--bg-surface));
    border-radius: 0 var(--irp-radius, 8px) var(--irp-radius, 8px) 0;
    font-size: var(--irp-font-size, 15px);
    line-height: 1.45;
}
.irp-label {
    font-weight: 700;
    margin-right: 0.4rem;
    color: var(--irp-label, var(--accent));
}
.irp-link a {
    color: var(--irp-link, var(--text));
    text-decoration: none;
    font-weight: 500;
}
.irp-link a:hover { text-decoration: underline; }
