:root{
  --bg:#000;
  --card:#0b1220;
  --text:#fff;
  --muted:#b6c0d4;
  --neon1:#22d3ee;
  --neon2:#a855f7;
}

/* ===== THEME ===== */
[data-theme="neon"]{
  --bg:#05050a;
  --card:#0f172a;
  --neon1:#22d3ee;
  --neon2:#f472b6;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* ===== HEADER ===== */
.header{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
}
.header img{height:38px}
.header button{
  background:none;
  border:none;
  color:#fff;
  font-size:20px;
  cursor:pointer;
}

/* ===== NAV ===== */
#navMenu{
  position:fixed;
  top:0;
  left:-100%;
  width:70%;
  max-width:320px;
  height:100%;
  background:var(--bg);
  padding:20px;
  transition:left .3s ease;
  z-index:9999;
}
#navMenu.active{left:0}
#navMenu a{
  display:block;
  padding:12px 0;
  color:#fff;
  text-decoration:none;
  font-size:14px;
}

/* ===== MAIN ===== */
main{padding:16px}

/* ===== SCENE ===== */
.scene{
  perspective:900px;
}

/* ===== CARD 3D (OPTIMIZED) ===== */
.card-3d{
  background:var(--card);
  padding:18px;
  border-radius:18px;
  margin-bottom:26px;
  position:relative;
  transform-style:preserve-3d;
  transition:transform .25s ease, box-shadow .25s ease;
  box-shadow:0 10px 24px rgba(0,0,0,.6);
  will-change:transform;
}

/* Neon edge (cheap render) */
.card-3d::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  pointer-events:none;
  outline:1px solid transparent;
  transition:outline-color .25s ease;
}

/* Neon active */
.neon-active::after{
  outline-color:var(--neon1);
}

/* ===== BANNER ===== */
.banner-card{
  text-align:center;
  background:
    linear-gradient(135deg,
      rgba(34,211,238,.12),
      rgba(168,85,247,.12)
    );
}
.banner-card h1{margin-top:0}

/* ===== GRID SEPARATOR ===== */
.grid-separator{
  height:60px;
  margin:28px 0;
  position:relative;
  overflow:hidden;
}
.grid-separator::before{
  content:"";
  position:absolute;
  inset:-40px;
  background:
    linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px),
    linear-gradient(0deg,rgba(255,255,255,.06) 1px,transparent 1px);
  background-size:26px 26px;
  transform:rotateX(65deg);
}
.grid-separator::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;
  height:1px;
  background:linear-gradient(90deg,var(--neon1),var(--neon2));
  opacity:.5;
}

/* ===== ACTION BUTTONS ===== */
.action-buttons{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
  margin:18px 0 28px;
}

.action-btn{
  padding:16px 14px;
  border-radius:18px;
  text-align:center;
  text-decoration:none;
  color:#fff;
  background:rgba(255,255,255,.04);
  box-shadow:0 8px 18px rgba(0,0,0,.55);
  transition:transform .2s ease, box-shadow .2s ease;
  will-change:transform;
}

.action-btn.primary{
  background:linear-gradient(135deg,var(--neon1),var(--neon2));
  color:#000;
  font-weight:800;
}

.action-btn:hover{
  transform:translateY(-4px);
}

.btn-title{
  font-size:14px;
  font-weight:800;
}
.btn-sub{
  font-size:12px;
  opacity:.85;
}

/* ===== FOOTER ===== */
.site-footer{
  padding:30px 16px 24px;
  text-align:center;
  background:linear-gradient(180deg,transparent,rgba(0,0,0,.6));
}

.league-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  justify-items:center;
}

.league-grid img{
  max-height:36px;
  opacity:.85;
}

/* ===== MOBILE ===== */
@media(max-width:768px){

  .scene{perspective:none}

  .card-3d{
    transform:none!important;
  }

  .action-buttons{
    grid-template-columns:1fr;
  }

  .league-grid{
    grid-template-columns:repeat(3,1fr);
  }

  /* Mobile carousel (manual scroll – CWV safe) */
  .league-carousel{
    overflow:hidden;
    padding:6px 0 14px;
  }
  .league-track{
    display:flex;
    gap:20px;
    padding:8px 16px;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
  }
  .league-track::-webkit-scrollbar{display:none}
  .league-track img{
    max-height:34px;
    scroll-snap-align:center;
  }

}
/* ===== STICKY HEADER (CWV SAFE) ===== */
.header{
  position:sticky;
  top:0;
  z-index:10000;
  backdrop-filter:saturate(1.2) blur(6px);
  background:rgba(0,0,0,.65);
  border-bottom:1px solid rgba(255,255,255,.06);
  transition:
    background .25s ease,
    box-shadow .25s ease,
    border-color .25s ease;
}

/* Saat scroll */
.header.is-scrolled{
  background:rgba(0,0,0,.85);
  box-shadow:0 8px 24px rgba(0,0,0,.6);
  border-bottom-color:rgba(34,211,238,.35);
}

/* Neon edge tipis */
.header::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:1px;
  background:linear-gradient(90deg,var(--neon1),var(--neon2));
  opacity:.35;
  pointer-events:none;
}

/* Space fix supaya konten tidak ketutup */
main{
  padding-top:72px;
}

/* Mobile optimization */
@media(max-width:768px){
  .header{
    backdrop-filter:none; /* hemat GPU */
    background:rgba(0,0,0,.8);
  }
}
/* ===== COLLAPSE MENU PILAR ===== */
.nav-collapse-toggle{
  width:100%;
  background:none;
  border:none;
  padding:12px 0;
  color:#fff;
  font-size:14px;
  font-weight:600;
  text-align:left;
  display:flex;
  justify-content:space-between;
  align-items:center;
  cursor:pointer;
}

.nav-collapse-toggle .chevron{
  transition:transform .25s ease;
}

/* Content wrapper */
.nav-collapse{
  max-height:0;
  overflow:hidden;
  transition:max-height .3s ease;
  padding-left:8px;
}

/* Open state */
.nav-collapse.open{
  max-height:420px; /* cukup untuk 5 link */
}

.nav-collapse.open + .nav-divider{
  margin-top:12px;
}

/* Rotate arrow */
.nav-collapse-toggle[aria-expanded="true"] .chevron{
  transform:rotate(180deg);
}

/* Child links */
.nav-collapse a{
  padding:10px 0;
  font-size:13px;
  opacity:.9;
}

/* =========================================================
   FOOTER LEAGUE SECTION
========================================================= */
.league-section{
  margin-bottom:28px;
}

.league-title{
  font-size:14px;
  font-weight:700;
  letter-spacing:.4px;
  margin-bottom:16px;
  color:var(--muted);
  text-align:center;
}

/* ===== DESKTOP GRID (CENTERED PERFECTLY) ===== */
.league-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(120px, 1fr));
  gap:20px;
  align-items:center;
  justify-items:center;
  justify-content:center; /* PENTING: center keseluruhan grid */
  max-width:900px;        /* batasi agar terlihat rapi */
  margin:0 auto;          /* center container */
}

.league-grid img{
  max-height:36px;
  max-width:100%;
  opacity:.85;
  filter:grayscale(100%);
  transition:
    opacity .25s ease,
    transform .25s ease,
    filter .25s ease;
}


.league-grid img:hover{
  opacity:1;
  filter:none;
  transform:translateY(-4px);
}

/* =========================================================
   MOBILE AUTO CAROUSEL (CWV SAFE)
========================================================= */
.league-carousel{
  position:relative;
  overflow:hidden;
  padding:8px 0 14px;
}

.league-track{
  display:flex;
  align-items:center;
  gap:28px;
  padding:10px 0;
}

.league-track img{
  flex:0 0 auto;
  max-height:34px;
  opacity:.85;
  filter:grayscale(100%);
}

/* Auto scroll animation */
.league-track.auto-scroll{
  animation:leagueScroll 22s linear infinite;
}

@keyframes leagueScroll{
  0%{transform:translateX(0)}
  100%{transform:translateX(-50%)}
}

/* Pause on touch (mobile UX) */
.league-carousel:hover .league-track,
.league-carousel:active .league-track{
  animation-play-state:paused;
}

/* =========================================================
   RESPONSIVE VISIBILITY
========================================================= */
.desktop-only{display:block}
.mobile-only{display:none}

@media(max-width:768px){
  .desktop-only{display:none}
  .mobile-only{display:block}
}

.league-grid img,
.league-track img{
  display:block;
  max-height:36px;
  width:auto;
  height:auto;
  object-fit:contain;
}

/* ===== HERO BANNER ===== */
.hero-banner{
  position:relative;
  padding:0;
  overflow:hidden;
  border-radius:18px;
}

/* Image */
.hero-image{
  width:100%;
  height:260px;
  object-fit:cover;
  display:block;
  filter:brightness(.85);
}

/* Overlay content */
.hero-content{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  padding:24px;
  text-align:center;
  background:linear-gradient(
    180deg,
    rgba(0,0,0,.25),
    rgba(0,0,0,.65)
  );
}

.hero-content h1{
  margin:0 0 10px;
  font-size:20px;
  line-height:1.3;
}

.hero-content p{
  max-width:560px;
  margin:0 auto;
  font-size:14px;
  color:var(--muted);
}

/* Desktop enhancement */
@media(min-width:768px){
  .hero-image{
    height:340px;
  }
  .hero-content h1{
    font-size:26px;
  }
  .hero-content p{
    font-size:15px;
  }
}
