:root { --bg: #f4f6f8; --surface: #ffffff; --surface-hover: #f9f9f9; --primary: #6B904A; --primary-dim: rgba(107, 144, 74, 0.1); --text: #1a1a1a; --muted: #8A9E91; --border: #eaeaea; --gold: #D4AF37; --red: #E07A5F; }
body.dark-mode { --bg: #121212; --surface: #1a1a1a; --surface-hover: #2a2a2a; --primary: #6B904A; --primary-dim: rgba(107, 144, 74, 0.15); --text: #ffffff; --muted: #9ca3af; --border: #333333; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; } 
body { background-color: var(--bg); color: var(--text); font-family: 'Plus Jakarta Sans', sans-serif; margin: 0; padding: 0 0 80px 0; min-height: 100vh; overflow-x: hidden; transition: 0.3s; }
a { text-decoration: none; color: inherit; }

.top-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; width:100%; transition: 0.3s; }
.brand { font-size: 18px; font-weight: 800; letter-spacing: -0.5px; display:flex; align-items:center; } .brand span { color: var(--primary); }
.top-nav { display: flex; gap: 16px; align-items: center; }
.top-nav a { font-size: 12px; font-weight: 700; color: var(--muted); transition: 0.3s; position: relative; }

/* RESPONSIVE CONTAINER DESKTOP FIX */
.container { padding: 16px; width: 100%; max-width: 900px; margin: auto; }

/* GRID SYSTEM UNTUK KATEGORI */
.menu-list { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
.menu-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; cursor: pointer; transition: 0.2s; position: relative; overflow: hidden; }
.menu-card:hover { border-color: var(--primary); background: var(--surface-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

/* ICON CSS */
.category-icon-wrapper { width: 42px; height: 42px; border-radius: 10px; background: var(--primary-dim); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-right: 14px; transition: 0.3s; overflow: hidden; }
.category-icon-wrapper svg.stroke-icon { width: 22px; height: 22px; }
.menu-card:hover .category-icon-wrapper { background: var(--primary); color: #fff; }
.subcategory-icon-wrapper { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-hover); border: 1px solid var(--border); color: var(--muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-right: 12px; overflow: hidden; }

.menu-text { flex: 1; min-width: 0; }
.menu-title { font-size: 14px; font-weight: 800; color: var(--text); display:flex; align-items:center; flex-wrap:wrap;}
.menu-subtitle { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* THREADS LIST */
.threads-container { display: flex; flex-direction: column; gap: 10px; }
.thread-card { background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; cursor: pointer; transition: 0.2s; text-decoration: none; color: var(--text); }
.tc-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tc-ava { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-hover); border: 1px solid var(--border); object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--primary); overflow:hidden;}
.tc-ava img { width:100%; height:100%; object-fit:cover; }
.tc-user { font-size: 12px; font-weight: 800; color: var(--primary); }
.tc-time { font-size: 10px; color: var(--muted); font-weight: 600; margin-left: auto; }
.tc-title { font-size: 15px; font-weight: 900; line-height: 1.4; margin-bottom: 4px; }
.tc-desc { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tc-footer { display: flex; align-items: center; gap: 8px; border-top: 1px dashed var(--border); padding-top: 10px; flex-wrap:wrap;}
.tc-badge { background: var(--primary-dim); color: var(--primary); font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 100px; border:1px solid rgba(107,144,74,0.2);}
.tc-live-badge { background: rgba(224, 122, 95, 0.1); color: var(--red); font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 100px; border: 1px solid rgba(224, 122, 95, 0.3); }

/* OTHER COMPONENTS */
.gm-panel { background: var(--surface-hover); border: 1px dashed var(--primary); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.gm-title { font-size: 11px; font-weight: 800; color: var(--primary); margin-bottom: 8px; display:flex; align-items:center; gap:6px; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 10px 10px 12px 10px; z-index: 1000; transition: 0.3s; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 10px; font-weight: 700; transition: 0.3s; }
.nav-item svg { width: 22px !important; height: 22px !important; stroke: currentColor; stroke-width: 2.2; fill: none;}
.nav-item.active { color: var(--text); }
.nav-item.active svg { stroke: var(--primary); fill: var(--primary-dim); }
.back-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--text); background: var(--surface); padding: 8px 14px; border: 1px solid var(--border); border-radius: 100px; margin-bottom: 16px; text-decoration: none;}
.native-audio-box { background: linear-gradient(135deg, #1e293b, #0f172a); border-radius: 12px; padding: 24px; text-align: center; color: #fff; margin-bottom: 16px; border: 1px solid #334155; position: relative; overflow: hidden;}
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.modal-content { background-color: var(--surface); margin: 10% auto; padding: 20px; border: 1px solid var(--border); border-radius: 12px; width: 90%; max-width: 500px; }
.modal-close { color: var(--muted); float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.inline-form-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.cti-trigger { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--surface-hover); border: 1px dashed var(--primary); border-radius: 12px; cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 600; transition: 0.3s; }
.cti-trigger:hover { border-color: var(--primary); background: var(--primary-dim); }
.search-box { display: flex; gap: 8px; margin-bottom: 16px; width: 100%; }
.search-input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 100px; font-size: 12px; outline: none; background: var(--surface); color: var(--text); }
.search-input:focus { border-color: var(--primary); }
.search-btn { background: var(--primary); color: #fff; border: none; padding: 10px 16px; border-radius: 100px; font-size: 12px; font-weight: 800; cursor: pointer; transition: 0.2s; }
.ql-container { min-height: 150px; font-size: 13px; font-family: inherit; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; border-color: var(--border) !important; background: var(--surface);}
.ql-toolbar { background: var(--surface-hover); border-color: var(--border) !important; border-top-left-radius: 8px; border-top-right-radius: 8px; }
.ql-editor { color: var(--text); }
@keyframes flash { 50% { opacity:0; } }

/* Media Queries untuk Desktop */
@media (min-width: 768px) {
    .menu-list { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .bottom-nav { max-width: 900px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); border-radius: 16px 16px 0 0; }
    .form-balas-desktop { border-left: 1px solid var(--border); border-right: 1px solid var(--border); max-width: 900px !important; }
    .locked-bar-desktop { border-left: 1px solid var(--border); border-right: 1px solid var(--border); max-width: 900px !important; }
}
