:root {
  --bg: #0b0e14;
  --bg-elev: #131722;
  --bg-elev-2: #1a2032;
  --border: #232a3d;
  --text: #e8ecf4;
  --text-dim: #8b93a7;
  --primary: #ff3b30;
  --primary-dark: #cc2e26;
  --accent: #2ee6a6;
  --gold: #f5c542;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0,0,0,.35);
  /* Aksen hijau ala Kick.com — dipakai untuk tombol/aksi utama & elemen interaktif,
     sementara --primary (merah) tetap dipakai khusus untuk status LIVE. */
  --brand: #53fc18;
  --brand-dark: #3fd60c;
  --brand-glow: rgba(83, 252, 24, .25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 18px; }

/* ---------- Top bar (live ticker) ---------- */
.topbar {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 0;
  text-align: center;
  letter-spacing: .3px;
}
.topbar .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #fff; margin-right: 6px; animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.35;} }

/* ---------- Header ---------- */
header.site-header {
  background: rgba(19, 23, 34, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 18px rgba(0,0,0,.25);
}
.nav-wrap {
  display: flex; align-items: center; padding: 12px 0; gap: 22px;
  flex-wrap: nowrap;
}
.brand {
  display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800;
  transition: opacity .15s; flex: 0 0 auto; white-space: nowrap;
}
.brand:hover { opacity: .85; }
.brand-logo-img { height: 36px; max-height: 36px; width: auto; object-fit: contain; display: block; }
.brand .badge {
  background: linear-gradient(135deg, var(--primary), #ff7a5c);
  color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 6px; letter-spacing: .5px;
}
nav.main-nav {
  display: flex; align-items: center; gap: 20px; font-weight: 600; font-size: 14.5px;
  flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none;
}
nav.main-nav::-webkit-scrollbar { display: none; }
nav.main-nav a { color: var(--text-dim); transition: color .15s; position: relative; white-space: nowrap; flex: 0 0 auto; padding: 4px 0; }
nav.main-nav a:hover, nav.main-nav a.active { color: #fff; }
nav.main-nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -19px; height: 2px; background: var(--brand); border-radius: 2px;
}
.nav-actions {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  padding-left: 14px; border-left: 1px solid var(--border);
}
@media (max-width: 900px) { .nav-actions { padding-left: 0; border-left: none; } }

/* Tombol Masuk/Daftar cadangan di dalam menu ☰ — hanya dipakai di layar HP sempit (lihat breakpoint 480px) */
.mobile-guest-cta { display: none; }

/* ---------- Compact icon buttons (search, notifikasi) ---------- */
.icon-btn {
  display: flex; align-items: center; justify-content: center; position: relative;
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto;
  background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text-dim);
  font-size: 16px; cursor: pointer; transition: border-color .15s, color .15s, background .15s;
  text-decoration: none;
}
.icon-btn:hover, .icon-btn.open { color: #fff; border-color: var(--brand); }

/* ---------- Hamburger toggle (mobile nav) ---------- */
.nav-toggle {
  display: none; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  background: var(--bg-elev-2); border: 1px solid var(--border); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span { display: block; width: 16px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Search dropdown panel (dipicu ikon 🔍, terpisah total dari Masuk/Daftar) ---------- */
.search-panel {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg-elev); border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(0,0,0,.3); z-index: 55;
}
.search-panel.open { display: block; animation: search-panel-in .18s ease; }
@keyframes search-panel-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.search-panel-form { display: flex; align-items: center; gap: 10px; padding: 16px 18px; max-width: 640px; }
.search-panel-icon { color: var(--text-dim); font-size: 16px; flex: 0 0 auto; }
.search-panel-form input {
  flex: 1; min-width: 0; padding: 11px 4px; border: none; border-bottom: 2px solid var(--border);
  background: transparent; color: var(--text); font-size: 15px;
}
.search-panel-form input:focus { outline: none; border-color: var(--brand); }
.search-panel-close {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; background: transparent;
  border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; font-size: 13px;
}
.search-panel-close:hover { color: #fff; border-color: var(--text-dim); }

/* ---------- User account dropdown ---------- */
.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px; background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: 30px; padding: 5px 12px 5px 5px; cursor: pointer; color: var(--text); font-size: 13.5px;
  transition: border-color .15s;
}
.user-menu-btn:hover, .user-menu.open .user-menu-btn { border-color: var(--brand); }
.user-avatar {
  width: 27px; height: 27px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #04240a; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.user-menu-name { font-weight: 700; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-caret { color: var(--text-dim); font-size: 10px; transition: transform .15s; }
.user-menu.open .user-menu-caret { transform: rotate(180deg); }
.user-menu-drop {
  display: none; position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  box-shadow: var(--shadow); z-index: 60;
}
.user-menu.open .user-menu-drop { display: block; animation: search-panel-in .15s ease; }
.user-menu-head {
  padding: 12px 16px; font-size: 12px; color: var(--text-dim); line-height: 1.5;
  border-bottom: 1px solid var(--border); background: var(--bg-elev-2);
}
.user-menu-head b { color: #fff; font-size: 13.5px; }
.user-menu-drop a { display: block; padding: 11px 16px; font-size: 13.5px; font-weight: 600; color: var(--text); }
.user-menu-drop a:hover { background: var(--bg-elev-2); color: var(--brand); }
.user-menu-drop a.user-menu-logout:hover { color: var(--primary); }

/* ---------- Ticker bar (teks berjalan) ---------- */
.ticker-bar {
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  overflow: hidden;
}
.ticker-label {
  flex: 0 0 auto;
  background: var(--brand);
  color: #04240a;
  font-size: 11.5px; font-weight: 800; letter-spacing: .5px;
  padding: 6px 14px;
}
.ticker-viewport { flex: 1 1 auto; overflow: hidden; position: relative; }
.ticker-track {
  display: flex; width: max-content;
  animation: ticker-scroll 28s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-seg {
  white-space: nowrap;
  padding: 7px 40px 7px 0;
  font-size: 13px; font-weight: 600; color: var(--text-dim);
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Pop-up promosi/pengumuman ---------- */
.site-popup-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(5, 7, 12, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
  transition: background .25s ease, backdrop-filter .25s ease;
}
.site-popup-overlay.open {
  background: rgba(5, 7, 12, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
}
.site-popup {
  position: relative; width: 100%; max-width: 380px; max-height: 88vh; overflow-y: auto;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(83,252,24,.08);
  transform: scale(.9) translateY(14px); opacity: 0; transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .25s ease;
}
.site-popup-overlay.open .site-popup { transform: scale(1) translateY(0); opacity: 1; }
.site-popup-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff; font-size: 14px; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); transition: background .15s;
}
.site-popup-close:hover { background: rgba(0,0,0,.8); }
.site-popup-img { width: 100%; aspect-ratio: 4/3; background: #05070c; overflow: hidden; border-radius: 18px 18px 0 0; }
.site-popup-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.site-popup-body { padding: 22px 24px 26px; text-align: center; }
.site-popup-body h3 {
  margin: 0 0 10px; font-size: 20px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #fff, var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-popup-body p { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: var(--text-dim); }
.site-popup-cta { margin-top: 4px; box-shadow: 0 8px 20px var(--brand-glow); }

@media (max-width: 480px) {
  .site-popup-overlay { padding: 14px; align-items: flex-end; }
  .site-popup { max-width: none; border-radius: 18px 18px 0 0; max-height: 82vh; }
  .site-popup-overlay.open .site-popup { transform: translateY(0); }
  .site-popup-img { border-radius: 18px 18px 0 0; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px; font-weight: 700; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: all .15s;
}
.btn-primary { background: var(--brand); color: #04240a; font-weight: 800; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--text-dim); border-color: var(--border); }
.btn-ghost:hover { color: #fff; border-color: var(--text-dim); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { background: #e5484d; color: #fff; }
.btn-success { background: var(--accent); color: #04241a; }

/* ---------- Hero / live player section ---------- */
.hero {
  padding: 28px 0 10px;
}
.live-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) { .live-layout { grid-template-columns: 1fr; } }

.player-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Crect width='40' height='40' fill='%23000'/%3E%3C/svg%3E");
  display: flex; align-items: center; justify-content: center;
}
.player-frame iframe, .player-frame video { width: 100%; height: 100%; border: 0; }
.offline-msg { text-align: center; color: var(--text-dim); padding: 20px; }
.offline-msg .icon { font-size: 40px; margin-bottom: 8px; }

.player-meta { padding: 16px 18px; }
.player-meta h1 { font-size: 20px; margin: 0 0 6px; }
.player-meta p { color: var(--text-dim); margin: 0; font-size: 14px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: .5px;
}
.live-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
.offline-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-elev-2); color: var(--text-dim); font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 6px; text-transform: uppercase;
}
.meta-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.viewers { font-size: 13px; color: var(--text-dim); }

/* ---------- Sidebar ranking ---------- */
.side-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.side-card h3 { margin: 0 0 14px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.side-card h3 .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.4s infinite; }

.rank-row {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center;
  gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.rank-row:last-child { border-bottom: none; }
.rank-num { font-weight: 800; color: var(--text-dim); }
.rank-row:nth-child(1) .rank-num, .rank-idx-1 { color: var(--gold); }
.rank-idx-2 { color: #c8ccd6; }
.rank-idx-3 { color: #d79a5b; }
.rank-name { font-weight: 600; }
.rank-cat { font-size: 11px; color: var(--text-dim); display:block; }
.rank-score { font-weight: 800; color: var(--accent); }

/* ---------- Section headers ---------- */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; margin: 0; }
.section-head a { color: var(--brand); font-weight: 700; font-size: 14px; }

/* ---------- Article grid ---------- */
.article-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
@media (max-width: 900px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .article-grid { grid-template-columns: 1fr; } }

.article-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s, border-color .15s;
}
.article-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.article-thumb { aspect-ratio: 16/10; background: var(--bg-elev-2); display:flex; align-items:center; justify-content:center; color: var(--text-dim); font-size: 13px; }
.article-body { padding: 14px 16px; }
.article-cat { font-size: 11px; font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: .4px; }
.article-title { font-size: 16px; font-weight: 700; margin: 6px 0; }
.article-excerpt { font-size: 13.5px; color: var(--text-dim); }
.article-foot { display:flex; justify-content: space-between; color: var(--text-dim); font-size: 12px; margin-top: 10px; }

.video-embed-wrap {
  position: relative; width: 100%; aspect-ratio: 16/9;
  background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px;
}
.video-embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Forms ---------- */
.auth-wrap { max-width: 420px; margin: 60px auto; }
.card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.card h2 { margin-top: 0; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text-dim); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 13px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 14px; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--brand);
}
.alert { padding: 11px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px; }
.alert-error { background: rgba(255,59,48,.12); color: #ff9992; border: 1px solid rgba(255,59,48,.3); }
.alert-success { background: rgba(46,230,166,.12); color: var(--accent); border: 1px solid rgba(46,230,166,.3); }
.muted-link { text-align: center; margin-top: 14px; font-size: 13.5px; color: var(--text-dim); }
.muted-link a { color: var(--brand); font-weight: 700; }

/* ---------- Tables (admin) ---------- */
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data-table th, table.data-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left;
}
table.data-table th { color: var(--text-dim); font-size: 12px; text-transform: uppercase; }
.badge-live { background: var(--primary); color:#fff; padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 800;}
.badge-off { background: var(--bg-elev-2); color: var(--text-dim); padding: 2px 8px; border-radius: 5px; font-size: 11px; font-weight: 800;}

/* ---------- Admin layout ---------- */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
@media (max-width: 800px) { .admin-layout { grid-template-columns: 1fr; } }
.admin-sidebar {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; align-self: start; position: sticky; top: 90px;
}
.admin-sidebar a { display: block; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--text-dim); margin-bottom: 4px; }
.admin-sidebar a.active, .admin-sidebar a:hover { background: var(--bg-elev-2); color: #fff; }
.admin-main {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
}
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 800px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-box { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.stat-box .num { font-size: 26px; font-weight: 800; }
.stat-box .label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; }

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px; padding: 30px 0; color: var(--text-dim); font-size: 13.5px;
}
footer.site-footer .foot-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Hero Banner Carousel ---------- */
.banner-carousel { position: relative; border-radius: var(--radius); overflow: hidden; margin: 20px 0; background: var(--bg-elev); border: 1px solid var(--border); }
.banner-track { display: flex; transition: transform .5s ease; }
.banner-slide { min-width: 100%; position: relative; aspect-ratio: 21/8; }
@media (max-width: 700px) { .banner-slide { aspect-ratio: 16/10; } }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-caption { position: absolute; left: 0; bottom: 0; right: 0; padding: 24px 28px; background: linear-gradient(to top, rgba(0,0,0,.85), transparent); }
.banner-caption h2 { margin: 0 0 4px; font-size: 22px; color: #fff; }
.banner-caption p { margin: 0; color: #d8dce6; font-size: 14px; }
.banner-dots { position: absolute; bottom: 14px; right: 20px; display: flex; gap: 6px; }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; border: none; }
.banner-dot.active { background: var(--brand); width: 20px; border-radius: 4px; }
.banner-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); border: none; color: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px; z-index: 2; }
.banner-arrow.prev { left: 14px; }
.banner-arrow.next { right: 14px; }

/* ---------- Two-column: Cuplikan / Berita ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.mini-list-item { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px; border-radius: 10px; margin-bottom: 6px; }
.mini-list-item:hover { background: var(--bg-elev-2); }
.mini-thumb { aspect-ratio: 16/10; background: var(--bg-elev-2); border-radius: 8px; overflow: hidden; display:flex; align-items:center; justify-content:center; color: var(--text-dim); font-size: 11px; }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-title { font-size: 13.5px; font-weight: 700; line-height: 1.35; margin-bottom: 4px; }
.mini-meta { font-size: 11.5px; color: var(--text-dim); }
.mini-link { color: var(--brand); font-size: 12px; font-weight: 700; }

/* ---------- Event cards (jadwal live, horizontal scroll) ---------- */
.event-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.event-scroll::-webkit-scrollbar { height: 6px; }
.event-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.event-card { flex: 0 0 220px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; padding: 14px; position: relative; }
.event-card .ev-badge { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 5px; text-transform: uppercase; }
.event-card .ev-badge.live { background: var(--primary); color: #fff; }
.event-card .ev-badge.upcoming { background: var(--accent); color: #04241a; }
.event-card .ev-badge.ended { background: var(--bg-elev-2); color: var(--text-dim); }
.event-card .ev-comp { font-size: 11px; color: var(--text-dim); margin-bottom: 10px; display:flex; align-items:center; gap:6px; }
.event-card .ev-teams { display: flex; align-items: center; justify-content: space-between; }
.event-card .ev-team { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; text-align: center; }
.event-card .ev-team img { width: 34px; height: 34px; object-fit: contain; }
.event-card .ev-team span { font-size: 11.5px; font-weight: 700; }
.event-card .ev-vs { font-size: 11px; color: var(--text-dim); font-weight: 800; padding: 0 6px; }
.event-card .ev-time { text-align: center; margin-top: 10px; font-size: 11px; color: var(--text-dim); }

/* ---------- Live Score ---------- */
.ls-layout { display: grid; grid-template-columns: 220px 1fr 300px; gap: 18px; }
@media (max-width: 1050px) { .ls-layout { grid-template-columns: 1fr; } }

.ls-sidebar { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; align-self: start; }
.ls-sidebar h4 { font-size: 12px; text-transform: uppercase; color: var(--text-dim); margin: 4px 0 10px; }
.ls-sidebar a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text-dim); margin-bottom: 2px; }
.ls-sidebar a.active, .ls-sidebar a:hover { background: var(--bg-elev-2); color: #fff; }
.ls-sidebar .crest { width: 18px; height: 18px; object-fit: contain; }

.ls-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.ls-tab { padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 700; background: var(--bg-elev-2); color: var(--text-dim); border: 1px solid var(--border); cursor: pointer; }
.ls-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.ls-group { margin-bottom: 20px; }
.ls-group-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 8px; color: var(--text-dim); }
.ls-group-title img { width: 18px; height: 18px; }

.ls-match { display: grid; grid-template-columns: 60px 1fr auto 1fr; align-items: center; gap: 10px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; font-size: 14px; }
.ls-status { font-size: 11px; font-weight: 800; text-align: center; }
.ls-status.live { color: var(--primary); }
.ls-status.finished { color: var(--text-dim); }
.ls-status.scheduled { color: var(--accent); }
.ls-team { display: flex; align-items: center; gap: 8px; }
.ls-team.away { justify-content: flex-end; text-align: right; flex-direction: row-reverse; }
.ls-team img { width: 22px; height: 22px; object-fit: contain; }
.ls-score { font-weight: 800; font-size: 16px; text-align: center; min-width: 50px; }

.ls-standings-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ls-standings-table th, .ls-standings-table td { padding: 7px 6px; border-bottom: 1px solid var(--border); text-align: center; }
.ls-standings-table th { color: var(--text-dim); font-size: 10.5px; text-transform: uppercase; }
.ls-standings-table td.team-cell { text-align: left; display: flex; align-items: center; gap: 6px; }
.ls-standings-table td.team-cell img { width: 16px; height: 16px; object-fit: contain; }
.ls-standings-table td.pts { font-weight: 800; color: var(--accent); }

.tag-pill {
  display: inline-block; background: var(--bg-elev-2); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 20px; font-size: 12px; margin: 2px 4px 2px 0; color: var(--text-dim);
}

/* ---------- Video Live Sebelumnya (VOD / Replay, kick.com style) ---------- */
.vod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .vod-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .vod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .vod-grid { grid-template-columns: 1fr; } }

.vod-card { display: block; color: inherit; }
.vod-thumb {
  position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden;
  background: var(--bg-elev-2); border: 1px solid var(--border);
}
.vod-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.vod-card:hover .vod-thumb img { transform: scale(1.04); }
.vod-thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--text-dim); }
.vod-duration {
  position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.75); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 5px;
}
.vod-views-badge {
  position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px;
}
.vod-meta { display: flex; gap: 10px; margin-top: 10px; align-items: flex-start; }
.vod-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--bg-elev-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;
}
.vod-info { min-width: 0; }
.vod-title {
  font-size: 13.5px; font-weight: 700; line-height: 1.35; margin-bottom: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vod-sub { font-size: 11.5px; color: var(--text-dim); }

/* ---------- Notification bell (dipakai bersama .icon-btn) ---------- */
.notif-badge {
  position: absolute; top: -2px; right: -2px; background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 800; border-radius: 10px; padding: 1px 5px; line-height: 1.3;
}
.notif-list { display: flex; flex-direction: column; gap: 10px; }
.notif-item {
  display: block; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; color: inherit; transition: border-color .15s;
}
.notif-item:hover { border-color: var(--brand); }
.notif-title { font-weight: 700; font-size: 14px; }
.notif-msg { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.notif-time { font-size: 11.5px; color: var(--text-dim); margin-top: 6px; }

/* ---------- Kategori grid ---------- */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
.category-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 16px; text-align: center; transition: border-color .15s, transform .15s;
}
.category-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.category-icon { font-size: 26px; margin-bottom: 8px; }
.category-name { font-weight: 700; font-size: 14px; }
.category-count { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; }

/* ---------- Live Chat widget ---------- */
.chat-card { display: flex; flex-direction: column; max-height: 480px; }
.chat-box { display: flex; flex-direction: column; height: 400px; }
.chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.chat-msg { font-size: 13px; line-height: 1.4; }
.chat-msg .chat-user { font-weight: 800; color: var(--brand); margin-right: 6px; }
.chat-msg.chat-msg-admin .chat-user { color: var(--gold); }
.chat-msg .chat-time { font-size: 10.5px; color: var(--text-dim); }
.chat-msg .chat-text { color: var(--text); word-break: break-word; }
.chat-form { display: flex; gap: 8px; margin-top: 12px; }
.chat-input {
  flex: 1; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 13.5px;
}
.chat-input:focus { outline: none; border-color: var(--brand); }
.chat-login-msg { margin-top: 12px; font-size: 13px; color: var(--text-dim); text-align: center; }
.chat-login-msg a { color: var(--brand); font-weight: 700; }

/* ---------- Header collapse (tablet & mobile) ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-wrap { position: relative; flex-wrap: wrap; }
  nav.main-nav {
    display: none; flex: 1 1 100%; order: 4;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-elev); border: 1px solid var(--border); border-top: none;
    border-radius: 0 0 12px 12px; box-shadow: var(--shadow);
    max-height: calc(100vh - 60px); overflow-y: auto; padding: 6px 0;
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 13px 20px; font-size: 15px; }
  nav.main-nav a.active::after { display: none; }
  nav.main-nav a.active { background: var(--bg-elev-2); color: var(--brand); font-weight: 800; }
  .user-menu-name { display: none; }
  .user-menu-btn { padding: 5px; }
  .search-panel-form { max-width: none; }

  /* Tombol Masuk/Daftar dipindah ke dalam menu ☰ di layar sempit (lihat breakpoint 480px) */
  .mobile-guest-cta { display: none; gap: 10px; padding: 14px 20px 8px; margin-top: 4px; border-top: 1px solid var(--border); }
  .mobile-guest-cta .btn { flex: 1; }
}

/* ===========================================================
   MOBILE RESPONSIVE FIXES
   =========================================================== */
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .brand { font-size: 17px; }
  .brand-logo-img { height: 30px; }
  .ticker-label { font-size: 10px; padding: 5px 10px; }
  .ticker-seg { font-size: 12px; padding: 6px 26px 6px 0; }
  .ticker-track { animation-duration: 20s; }

  /* Banner: sembunyikan panah (geser pakai dot/otomatis), rapikan caption & dot */
  .banner-carousel { margin: 14px 0; }
  /* Rasio lebih landscape + object-fit:contain supaya banner PROMO/gambar apapun selalu tampil UTUH
     (tidak kepotong kiri-kanan) di layar HP, dengan letterbox gelap yang menyatu dengan tema situs. */
  .banner-slide { aspect-ratio: 16/9; background: #05070c; }
  .banner-slide img { object-fit: contain; background: #05070c; }
  .banner-arrow { display: none; }
  .banner-caption { padding: 14px 14px 12px; }
  .banner-caption h2 { font-size: 16px; }
  .banner-caption p { font-size: 12.5px; }
  .banner-dots { right: 12px; bottom: 10px; gap: 5px; }
  .banner-dot { width: 6px; height: 6px; }
  .banner-dot.active { width: 16px; }

  /* Kategori grid & chat */
  .category-grid { gap: 10px; }
  .category-card { padding: 16px 10px; }
  .category-icon { font-size: 22px; }
  .chat-box, .chat-card { height: auto; max-height: none; }
  .chat-messages { height: 260px; }

  .topbar { font-size: 11.5px; padding: 7px 10px; }

  .section { padding: 22px 0; }
  .section-head h2 { font-size: 18px; }

  /* Hero player */
  .player-meta { padding: 12px 14px; }
  .player-meta h1 { font-size: 17px; }

  /* Event cards */
  .event-card { flex: 0 0 170px; padding: 10px; }
  .event-card .ev-team img { width: 26px; height: 26px; }
  .event-card .ev-team span { font-size: 10.5px; }

  /* Two-column Cuplikan/Berita already stacks at 800px; tighten spacing */
  .two-col { gap: 16px; }
  .mini-list-item { grid-template-columns: 72px 1fr; }

  /* Article grid card text */
  .article-title { font-size: 14.5px; }

  /* Video Live Sebelumnya (VOD) */
  .vod-grid { gap: 12px; }
  .vod-title { font-size: 12.5px; }
  .vod-sub { font-size: 10.5px; }
  .vod-avatar { width: 26px; height: 26px; font-size: 12px; }
  .vod-duration, .vod-views-badge { font-size: 10px; padding: 2px 6px; }

  /* Live Score: match rows squeeze on tiny screens */
  .ls-match { grid-template-columns: 44px 1fr auto 1fr; gap: 6px; padding: 10px 8px; font-size: 12.5px; }
  .ls-team img { width: 18px; height: 18px; }
  .ls-score { font-size: 14px; min-width: 34px; }
  .ls-tabs { gap: 6px; }
  .ls-tab { padding: 6px 12px; font-size: 12px; }

  /* Tables: allow horizontal scroll instead of squashing */
  .admin-main { padding: 14px; overflow-x: auto; }
  table.data-table { min-width: 560px; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-box { padding: 12px; }
  .stat-box .num { font-size: 21px; }

  .card { padding: 18px; }
  .auth-wrap { margin: 30px auto; padding: 0 14px; }

  footer.site-footer .foot-row { flex-direction: column; text-align: center; }
}

/* Header: di layar sangat sempit, Masuk/Daftar pindah ke dalam menu ☰ supaya baris atas tidak turun 2 baris */
@media (max-width: 480px) {
  .nav-wrap { flex-wrap: nowrap; gap: 8px; }
  .nav-actions { gap: 6px; }
  .nav-actions > a.btn, .nav-actions > .btn { display: none; }
  .mobile-guest-cta { display: flex; }
  .icon-btn, .nav-toggle { width: 34px; height: 34px; font-size: 15px; }
  .brand-logo-img { height: 26px; }
  .brand .badge { display: none; }
}

@media (max-width: 400px) {
  .brand { font-size: 15px; }
  .event-card { flex: 0 0 150px; }
}
