:root{
  --bg: #f7f8ff;
  --card: rgba(255,255,255,.92);
  --border: rgba(17,24,39,.10);
  --text: #101828;
  --muted: #667085;

  --brand1: #6d5efc;
  --brand2: #ff6fae;
  --good: #19c37d;

  --radius: 20px;
  --radius-sm: 16px;

  --shadow: 0 18px 55px rgba(16,24,40,.10);
  --shadow2: 0 10px 25px rgba(16,24,40,.08);
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 12% 10%, rgba(109,94,252,.18), transparent 60%),
    radial-gradient(900px 450px at 88% 15%, rgba(255,111,174,.14), transparent 55%),
    radial-gradient(900px 450px at 55% 100%, rgba(25,195,125,.10), transparent 55%),
    var(--bg);
  overflow-x:hidden;
}

a{ color:inherit; text-decoration:none; }
img{ max-width:100%; height:auto; display:block; }

.container{ max-width:1100px; margin:0 auto; padding:0 14px; }

.h2{ font-weight:1000; font-size:15px; margin:0 0 6px; }
.muted{ color: var(--muted); font-weight:800; font-size:12px; }
.hr{ height:1px; background: var(--border); margin:12px 0; }

/* ===== Basic components ===== */
.card{
  border:1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 20px rgba(16,24,40,.06);
  font-weight: 900;
  font-size: 13px;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 12px 28px rgba(16,24,40,.10); }
.btn.active{
  border-color: rgba(109,94,252,.28);
  background: linear-gradient(135deg, rgba(109,94,252,.14), rgba(255,111,174,.10));
}
.btn.primary{
  background: linear-gradient(135deg, rgba(109,94,252,.20), rgba(255,111,174,.14));
  border-color: rgba(109,94,252,.25);
}

.btn-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 12px 16px;
  border-radius: 18px;
  border: 0;
  background: linear-gradient(135deg, #6d5efc, #ff6fae);
  color:#fff;
  font-weight:1000;
  cursor:pointer;
  box-shadow: 0 16px 40px rgba(109,94,252,.22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-cta:hover{ transform: translateY(-1px); box-shadow: 0 20px 55px rgba(109,94,252,.26); }

/* ===== Grid ===== */
.grid{ display:flex; flex-wrap:wrap; margin:-10px; }
.col-12,.col-6,.col-4,.col-3{ padding:10px; }
.col-12{ width:100%; }
.col-6{ width:50%; }
.col-4{ width:33.3333%; }
.col-3{ width:25%; }

@media(max-width: 900px){
  .col-3{ width:50%; }
  .col-4{ width:50%; }
  .col-6{ width:100%; }
}
@media(max-width: 380px){
  .col-3{ width:100%; }
  .col-4{ width:100%; }
}

/* =========================================================
   TOPBAR FIXED + COMPACT
   ========================================================= */
.topbar-fixed{
  position: fixed;
  top: 10px;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0 14px;
}

.topbar{
  max-width:1100px;
  margin: 0 auto;
  border:1px solid var(--border);
  background: rgba(255,255,255,.82);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 12px;
  transition: padding .18s ease, border-radius .18s ease, box-shadow .18s ease;
}

.topbar-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.brand-premium{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 220px;
}

.brand-badge{
  width:44px;
  height:44px;
  border-radius: 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, rgba(109,94,252,.18), rgba(255,111,174,.14));
  border:1px solid rgba(109,94,252,.18);
  box-shadow: var(--shadow2);
  font-size: 18px;
  user-select:none;
  transition: width .18s ease, height .18s ease, border-radius .18s ease, font-size .18s ease;
}

.brand-text{ display:flex; flex-direction:column; line-height:1.05; }
.brand-name{ font-weight:1000; letter-spacing:.2px; font-size:16px; transition: font-size .18s ease; }
.brand-sub{
  color: var(--muted);
  font-weight:900;
  font-size: 11px;
  margin-top:4px;
  transition: opacity .18s ease, height .18s ease;
}

.top-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
  justify-content:flex-end;
}

/* Nav chips */
.nav{
  margin-top: 10px;
  display:flex;
  gap:10px;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
  transition: margin-top .18s ease;
}
.nav::-webkit-scrollbar{ display:none; }

.nav a{
  white-space:nowrap;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.88);
  font-weight: 900;
  font-size: 12px;
  box-shadow: 0 8px 20px rgba(16,24,40,.06);
  transition: transform .15s ease, box-shadow .15s ease, padding .18s ease, font-size .18s ease;
}
.nav a:hover{ transform: translateY(-1px); box-shadow: 0 12px 28px rgba(16,24,40,.10); }
.nav a.active{
  border-color: rgba(109,94,252,.28);
  background: linear-gradient(135deg, rgba(109,94,252,.14), rgba(255,111,174,.10));
}

.topbar-spacer{ height: 132px; transition: height .18s ease; }

@media(min-width: 901px){
  .nav{ flex-wrap:wrap; overflow-x: visible; }
}

@media(max-width: 680px){
  .topbar-row{ flex-direction:column; align-items:flex-start; }
  .top-actions{ width:100%; justify-content:flex-start; }
  .topbar-spacer{ height: 168px; }
}

/* Compact mode (body.is-compact ditoggle JS di _topbar.php) */
body.is-compact .topbar{
  padding: 8px 10px;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(16,24,40,.10);
}
body.is-compact .brand-badge{
  width:34px;
  height:34px;
  border-radius: 14px;
  font-size: 15px;
}
body.is-compact .brand-name{ font-size:14px; }
body.is-compact .brand-sub{ opacity:0; height:0; margin-top:0; overflow:hidden; }
body.is-compact .nav{ margin-top: 6px; }
body.is-compact .nav a{
  padding: 7px 10px;
  font-size: 11px;
}
body.is-compact .btn{
  padding: 8px 12px;
  font-size: 12px;
}
body.is-compact .topbar-spacer{ height: 112px; }

@media(max-width: 680px){
  body.is-compact .topbar-spacer{ height: 148px; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero{
  border:1px solid var(--border);
  background: rgba(255,255,255,.92);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero-premium{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(900px 480px at 10% 20%, rgba(255,111,174,.20), transparent 60%),
    radial-gradient(900px 480px at 90% 20%, rgba(109,94,252,.22), transparent 60%),
    rgba(255,255,255,.92);
}
.hero-premium::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(12px 12px at 12% 22%, rgba(255,255,255,.75), transparent 70%),
    radial-gradient(10px 10px at 28% 12%, rgba(255,255,255,.6), transparent 70%),
    radial-gradient(12px 12px at 86% 18%, rgba(255,255,255,.65), transparent 70%),
    radial-gradient(14px 14px at 92% 72%, rgba(255,255,255,.55), transparent 70%);
  pointer-events:none;
  opacity:.8;
}
.hero-premium > *{ position:relative; }

.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(109,94,252,.18);
  background: rgba(109,94,252,.08);
  color:#372faa;
  font-weight:1000;
  font-size:12px;
}

.hero .title{
  font-size:30px;
  font-weight:1000;
  letter-spacing:.2px;
  line-height:1.15;
  margin-top:10px;
}
.hero .subtitle{
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
  max-width: 64ch;
  line-height:1.45;
}

.searchbar{
  display:flex;
  gap:10px;
  margin-top:14px;
  max-width: 760px;
}
.searchbar input{
  flex:1;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.94);
  font-weight: 900;
  outline: none;
}
.searchbar input:focus{
  border-color: rgba(109,94,252,.35);
  box-shadow: 0 0 0 4px rgba(109,94,252,.10);
}
.searchbar button{
  padding: 12px 16px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #6d5efc, #ff6fae);
  color: #fff;
  font-weight: 1000;
  cursor:pointer;
  box-shadow: 0 14px 35px rgba(109,94,252,.18);
}

.hero-actions{
  margin-top: 14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

@media(max-width: 520px){
  .hero .title{ font-size:24px; }
  .searchbar{ flex-direction:column; }
  .searchbar button{ width:100%; }
  .hero-actions{ display:grid; grid-template-columns:repeat(2,1fr); }
  .hero-actions .btn-cta{ grid-column:1 / -1; }
}

/* =========================================================
   SECTION HEAD + ADS
   ========================================================= */
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin: 6px 0 10px;
}
.section-title{
  font-weight:1000;
  font-size:16px;
  margin:0;
}
.section-sub{
  margin-top:4px;
  color: var(--muted);
  font-weight:800;
  font-size:12px;
}
.section-actions{ display:flex; gap:10px; align-items:center; }

.ad-slot{
  border: 1px dashed rgba(109,94,252,.25);
  background: rgba(109,94,252,.05);
  border-radius: var(--radius);
  padding: 14px;
}
.ad-label{ font-size:11px; font-weight:1000; color:#6d5efc; }
.ad-box{
  margin-top: 10px;
  height: 88px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.85);
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--muted);
  font-weight: 900;
}

/* =========================================================
   CATEGORY TILES (INI YANG HILANG DI CSS KAMU)
   ========================================================= */
.tile{
  display:block;
  background: rgba(255,255,255,.92);
  border:1px solid var(--border);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 14px 40px rgba(16,24,40,.08);
  min-height: 170px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.tile:hover{
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(16,24,40,.12);
  border-color: rgba(109,94,252,.20);
}

.tile-premium{
  background:
    radial-gradient(320px 180px at 12% 20%, rgba(109,94,252,.10), transparent 60%),
    radial-gradient(320px 180px at 88% 30%, rgba(255,111,174,.08), transparent 60%),
    rgba(255,255,255,.92);
}

.tile-inner{
  height:100%;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.tile-top{
  display:flex;
  align-items:center;
  gap:12px;
}

.emoji-bubble{
  width:44px;
  height:44px;
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  background: linear-gradient(135deg, rgba(109,94,252,.16), rgba(255,111,174,.12));
  border:1px solid rgba(109,94,252,.18);
  box-shadow: 0 12px 30px rgba(16,24,40,.10);
  flex:0 0 auto;
}

.tile .name{
  font-size:16px;
  font-weight:1000;
  letter-spacing:.1px;
  line-height:1.15;
}

.tile .desc{
  margin:0;
  font-size:12px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;

  display:-webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:hidden;

  min-height: 48px;
}

.tile-cta{
  margin-top:auto;
  font-weight:1000;
  font-size:12px;
  color: rgba(109,94,252,.95);
}

/* =========================================================
   POPULAR CARDS
   ========================================================= */
.card-premium{ padding:12px; }
.card-body{ padding:12px 2px 2px; }
.card-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top: 12px;
}

.thumb{
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 220px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(109,94,252,.10), rgba(255,111,174,.08));
}
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.thumb-empty{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#667085;
  font-weight:900;
}

.badge-soft{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(109,94,252,.18);
  background: rgba(109,94,252,.08);
  color:#372faa;
  font-weight:1000;
  font-size:12px;
}

/* ===== Compatibility minimal ===== */
.breadcrumb{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  font-weight: 900;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb a{ border-bottom: 1px dashed rgba(102,112,133,.35); }

.detail-grid{ display:grid; grid-template-columns: 1.1fr .9fr; gap:14px; }
.prompt-grid{ display:grid; grid-template-columns: 1.1fr .9fr; gap:14px; }

@media(max-width: 900px){
  .detail-grid{ grid-template-columns: 1fr; }
  .prompt-grid{ grid-template-columns: 1fr; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .tile, .btn, .btn-cta, .nav a, .topbar, .brand-badge{ transition:none !important; }
  .tile:hover, .btn:hover, .btn-cta:hover, .nav a:hover{ transform:none !important; }
}
