:root{
  --bg:#0b0b0c;
  --surface-1:#141416;
  --surface-2:#18181b;
  --surface-3:#1f1f23;

  --line:#2a2a2f;

  --text:#e9e9ea;
  --muted:#a8a8ad;
  --muted2:#7f7f86;

  --accent:#ff3b3b;
  --pill:#232327;
  --pillOn:#2f2f35;

  --shadow: 0 10px 26px rgba(0,0,0,.35);
  --shadow2: 0 16px 40px rgba(0,0,0,.40);

  --radius:14px;
  --container: 1320px;

  --select-bg:#0f0f10;
  --select-item-hover:#17171a;
  --select-item-active:#1b66d1;

  --z-popover: 9000;
  --z-modal: 9500;

  /* footer height untuk perhitungan fixed */
  --footer-h: 52px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:"Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(255,59,59,.10), transparent 60%),
              linear-gradient(#0b0b0c, #0b0b0c);
  color:var(--text);

  /* biar konten tidak ketutup footer fixed */
  padding-bottom: var(--footer-h);
}

a{color:inherit;text-decoration:none}
button{font-family:inherit;background:none;border:0;color:inherit}
main{position:relative; z-index:0;}

.container{max-width:var(--container);margin:0 auto;padding:0 16px}

:focus-visible{
  outline:2px solid rgba(255,59,59,.65);
  outline-offset:2px;
  border-radius:10px;
}

/* ===== Icons (SVG) ===== */
.svg{
  width:16px;height:16px;display:block;
  fill:none;stroke:currentColor;stroke-width:2;
  stroke-linecap:round;stroke-linejoin:round;
  opacity:.95;
}
.svg.sm{width:14px;height:14px}
.svg.lg{width:18px;height:18px}

/* ===== Topbar ===== */
.topbar{
  position:sticky;top:0;z-index:50;
  background:linear-gradient(#121213,#101011);
  border-bottom:1px solid var(--line);
  backdrop-filter: blur(8px);
}

.topbar-row{
  min-height:60px;
  display:flex;
  align-items:center;
  gap:14px;
  padding:10px 0;
}

.brand{
  display:flex;align-items:center;gap:10px;
  min-width:220px;
  flex:0 0 auto;
}
.logo{
  width:34px;height:34px;border-radius:10px;
  background:
    radial-gradient(circle at 30% 30%, #fff 0 18%, transparent 19%),
    radial-gradient(circle at 70% 30%, #fff 0 18%, transparent 19%),
    radial-gradient(circle at 50% 65%, #fff 0 10%, transparent 11%),
    linear-gradient(135deg,#ff3b3b,#ff8b3d);
  box-shadow:0 10px 20px rgba(255,59,59,.18);
  border:1px solid rgba(255,255,255,.10);
}
.brand-name{
  font-weight:900;
  letter-spacing:.3px;
  display:flex;align-items:baseline;gap:8px;
  font-size:18px;line-height:1;
}
.brand-name .accent{color:var(--accent)}
.brand-sub{
  font-size:11px;font-weight:800;color:var(--muted2);
  margin-top:2px;letter-spacing:.4px;
}

.search{
  flex:1 1 auto;
  display:flex;align-items:center;gap:10px;
  height:40px;padding:0 12px;
  background:#0c0c0d;
  border:1px solid #242428;
  border-radius:12px;
  min-width:220px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.search .icon{color:var(--muted)}
.search input{
  width:100%;
  background:transparent;border:0;outline:none;
  color:var(--text);font-size:14px;
}
.search input::placeholder{color:#6f6f76}

.top-actions{
  display:flex;align-items:center;gap:10px;
  white-space:nowrap;
  flex:0 0 auto;
  position:relative;
}

.chip{
  display:inline-flex;align-items:center;gap:8px;
  height:38px;padding:0 12px;
  background:transparent;border:1px solid var(--line);
  border-radius:12px;color:var(--text);
  font-size:13px;cursor:pointer;
  transition:.12s ease;
}
.chip:hover{background:#151518;border-color:#35353b}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:38px;padding:0 14px;
  border-radius:999px;border:1px solid var(--line);
  background:#141416;color:var(--text);
  font-weight:800;font-size:13px;cursor:pointer;
  transition:.12s ease;
}
.btn:hover{background:#1a1a1d;border-color:#35353b}
.btn.primary{
  border-color:transparent;background:var(--accent);color:#fff;
  box-shadow:0 12px 22px rgba(255,59,59,.16);
}
.btn.primary:hover{filter:brightness(1.05)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--muted);padding:0 10px}
.btn.ghost:hover{background:#151518;border-color:#151518;color:var(--text)}

.avatar-btn{
  width:38px;height:38px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#141416;
  display:inline-grid;
  place-items:center;
  cursor:pointer;
  transition:.12s ease;
  padding:0;
}
.avatar-btn:hover{background:#1a1a1d;border-color:#35353b}
.avatar-btn[aria-expanded="true"]{border-color:rgba(255,255,255,.18)}

.hamburger-btn{
  width:38px;height:38px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#141416;
  display:none;
  place-items:center;
  cursor:pointer;
  transition:.12s ease;
  padding:0;
}
.hamburger-btn:hover{background:#1a1a1d;border-color:#35353b}
.hamburger-btn[aria-expanded="true"]{border-color:rgba(255,255,255,.18)}

/* ===== NAVBAR ===== */
.navrow{
  border-top:1px solid rgba(255,255,255,.03);
  background:#0f0f10;
}
.nav-wrap{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
}
.nav-scroll{
  flex:1 1 auto;
  overflow-x:auto;
  overflow-y:visible;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
  padding:10px 0 12px;
}
.navbar{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  margin:0;
  padding:0;
  list-style:none;
  min-width:max-content;
}
.nav-item{
  display:inline-flex;
  padding:8px 12px;
  border-radius:12px;
  border:1px solid transparent;
  font-weight:900;
  font-size:13px;
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
  transition:.12s ease;
  background:transparent;
  align-items:center;
  gap:8px;
}
.nav-item:hover{background:#151518;border-color:#1f1f23}
.nav-item.active{
  background:rgba(255,59,59,.10);
  border-color:rgba(255,59,59,.22);
}
.caret{opacity:.8;display:inline-grid;place-items:center}

/* Premium (kuning) */
.is-premium{
  color:#f6c744; /* kuning */
}
.is-premium:hover{
  color:#ffd76a; /* kuning lebih terang pas hover */
}

/* opsional: bikin icon juga ikut kuning */
.is-premium .svg{
  stroke: currentColor;
}

/* opsional: kalau Premium lagi active */
.nav-item.is-premium.active{
  background: rgba(246,199,68,.12);
  border-color: rgba(246,199,68,.26);
}

/* Categories button (desktop) */
.cat-select{
  height:38px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid transparent;
  background:transparent;
  color:var(--text);
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  font-weight:900;
  font-size:13px;
  transition:.12s ease;
}
.cat-select:hover{background:#151518;border-color:#1f1f23}
.cat-select[aria-expanded="true"]{background:#151518;border-color:#1f1f23}

/* ===== Popover menus ===== */
.select-menu{
  position:fixed;
  width:260px;
  max-width:calc(100vw - 32px);
  background:var(--select-bg);
  border:1px solid #2a2a2f;
  border-radius:12px;
  padding:6px;
  box-shadow: var(--shadow2);
  z-index:var(--z-popover);
  max-height: 420px;
  overflow:auto;
  scrollbar-width:thin;
}

/* Wajib: atribut hidden harus selalu menang */
[hidden]{ display:none !important; }

.select-item{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border-radius:10px;
  border:0;
  background:transparent;
  color:var(--text);
  font-weight:800;
  font-size:13px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.select-item:hover{ background:var(--select-item-hover); }
.select-item.is-selected{ background:var(--select-item-active); color:#fff; }
.select-item .right{ opacity:.85; }

/* Auth menu */
.auth-menu{
  position:fixed;
  width:320px;
  max-width: calc(100vw - 32px);
  background: var(--surface-1);
  border:1px solid #2a2a2f;
  border-radius:16px;
  padding:12px;
  box-shadow: var(--shadow2);
  z-index:var(--z-popover);
}
.auth-menu[hidden]{display:none}
.auth-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:6px 6px 10px;
  border-bottom:1px solid rgba(255,255,255,.06);
  margin-bottom:10px;
}
.auth-title{
  font-weight:900;
  letter-spacing:.2px;
  color:#dadada;
  display:flex;align-items:center;gap:8px;
}
.auth-hint{color:var(--muted2);font-size:12px;font-weight:800;}
.auth-form{display:flex;flex-direction:column;gap:10px;}
.field{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted);font-weight:800;}
.field input{
  height:40px;border-radius:12px;border:1px solid #2a2a2f;background:#0c0c0d;color:var(--text);
  padding:0 12px;outline:none;font-size:14px;box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.field input::placeholder{color:#6f6f76}
.auth-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 0;}
.check{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:800;color:var(--muted);user-select:none;cursor:pointer;}
.check input{width:16px;height:16px;accent-color: var(--accent);}
.auth-submit{width:100%;justify-content:center;height:40px;border-radius:12px;}
.auth-foot{margin:4px 2px 0;font-size:12px;color:var(--muted);font-weight:800;}
.auth-foot a{color:#d9d9dc;text-decoration:underline;text-underline-offset:2px;}
.auth-foot a:hover{color:#fff}

/* ===== Mobile drawer overlay ===== */
.mobile-overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index:var(--z-modal);
  display:flex;
  justify-content:flex-end;
  align-items:stretch;
}
.mobile-overlay[hidden]{display:none}

.mobile-drawer{
  width:min(520px, 50vw);
  height:100%;
  background: var(--surface-1);
  border-left:1px solid #2a2a2f;
  box-shadow: var(--shadow2);
  padding:12px 12px 16px;
  overflow:auto;
  outline:none;
}

.mhead{
  display:flex;align-items:center;justify-content:space-between;
  padding:6px 6px 10px;
  border-bottom:1px solid rgba(255,255,255,.06);
  margin-bottom:10px;
}
.mtitle{
  font-weight:900;letter-spacing:.2px;color:#dadada;
  display:flex;align-items:center;gap:8px;
}
.mclose{
  width:34px;height:34px;border-radius:12px;
  border:1px solid transparent;background:transparent;color:var(--muted);
  display:inline-grid;place-items:center;cursor:pointer;transition:.12s ease;
}
.mclose:hover{background:#151518;border-color:#242428;color:var(--text)}
.mgroup{display:flex;flex-direction:column;gap:10px;padding:0 2px 4px;}

.mitem{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
  color:var(--text);
  font-weight:900;
  font-size:13px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  transition:.12s ease;
}
.mitem:hover{background:#1a1a1d;border-color:#2a2a2f}
.mitem.active{background:rgba(255,59,59,.10);border-color:rgba(255,59,59,.22);}

.mitem .left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.mitem .left span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.mitem .right{
  color:var(--muted2);
  font-weight:900;
  display:inline-flex;
  align-items:center;
  gap:6px
}
.mcaret{
  display:inline-grid;
  place-items:center;
  transition: transform .14s ease;
  opacity:.9;
}
.mitem[aria-expanded="true"] .mcaret{ transform: rotate(180deg); }

/* sub list categories (mobile) */
.msub{
  margin:2px 0 2px 14px;
  padding-left:10px;
  border-left:1px solid rgba(255,255,255,.10);
  display:flex;
  flex-direction:column;
  gap:8px;
}
.msub-item{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.01);
  color:var(--text);
  font-weight:800;
  font-size:13px;
  cursor:pointer;
  transition:.12s ease;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.msub-item:hover{background:#1a1a1d;border-color:#2a2a2f}
.msub-item.is-selected{background: rgba(27,102,209,.18);border-color: rgba(27,102,209,.35);}

/* ===== Footer fixed ===== */
.site-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  background: linear-gradient(#101011,#0b0b0c);
  border-top: 1px solid var(--line);
  z-index: 45;
}
.site-footer .container{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.site-footer small{
  color: var(--muted2);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .2px;
}

/* ===== Responsive global (header/nav) ===== */
@media (max-width: 980px){
  .brand{min-width:auto}
  .topbar-row{flex-wrap:wrap}
  .search{flex:1 1 100%; order:3}
  .top-actions{margin-left:auto}
}
@media (max-width: 680px){
  .navrow{display:none;}
  .hamburger-btn{display:inline-grid;}
}

/* Reduced motion (global) */
@media (prefers-reduced-motion: reduce){
  .mcaret{ transition:none; }
}

/* =========================
   CATEGORY UI (public)
   ========================= */

.cat-list,
#mobileCats{
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:stretch;
}

/* catMenu hanya flex saat sedang dibuka */
#catMenu:not([hidden]){
  display:flex;
  flex-direction:column;
  gap:10px;
  align-items:stretch;
}


/* Base button reset + styling */
.cat-opt,
.side-cat,
.mcat{
  appearance:none;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: inherit;

  width:100%;
  text-align:left;
  cursor:pointer;

  padding:10px 12px;
  border-radius:14px;

  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;

  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}

/* Dot icon biar “hidup” kayak dummy */
.cat-opt::before,
.side-cat::before,
.mcat::before{
  content:"";
  width:10px;
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.22);
  box-shadow: 0 0 0 3px rgba(255,255,255,.05);
  flex: 0 0 10px;
}

/* Hover */
.cat-opt:hover,
.side-cat:hover,
.mcat:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.16);
  transform: translateY(-1px);
}

/* Active */
.cat-opt.active,
.side-cat.active,
.mcat.active{
  border-color: rgba(255, 59, 59, .45);
  background: linear-gradient(180deg, rgba(255,59,59,.14), rgba(255,255,255,.04));
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-weight: 900;
font-size: 13px;
letter-spacing: .1px;

}

.cat-opt.active::before,
.side-cat.active::before,
.mcat.active::before{
  background: rgba(255, 59, 59, .95);
  box-shadow: 0 0 0 3px rgba(255, 59, 59, .15);
  
}


/* Dropdown menu container (catMenu) biar kayak popup rapi */
.select-menu#catMenu{
  position: fixed;
  z-index: var(--z-popover);

  padding:10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(10,10,12,.95);
  backdrop-filter: blur(10px);
  max-height: 320px;
  overflow:auto;
}

/* Mobile sub list spacing */
#mobileCats{
  padding:10px 2px;
}


