<style>
:root{
  --bg:#0b0f1a;
  --card:#12172a;
  --border:rgba(255,255,255,.08);
  --text:#e9eefc;
  --muted:#9aa4c7;
  --primary:#75feff;
  --secondary:#4dfdff;
  --third:#00bdbf;
  --logo-height-desktop: 60px;
  --logo-height-mobile: 50px;
}
*{box-sizing:border-box}
body{
  margin:0;
  padding-bottom:64px;
  font-family:Inter,system-ui,Arial;
  background:var(--bg);
  color:var(--text);
}
a{text-decoration:none;color:inherit}


.logo{
  background:var(--primary);
  color:#000;
  font-weight:800;
  padding:6px 10px;
  border-radius:8px;
}
.brand-name{font-weight:700}
.btn-primary{
  background:var(--primary);
  color:#000;
  padding:10px 14px;
  border-radius:10px;
  font-weight:600;
}
.hamburger{display:none;background:none;border:none;font-size:24px;color:#fff}

/* LAYOUT */
.layout{
  display:grid;
  grid-template-columns:260px minmax(0,1fr) 320px;
  gap:16px;
  padding:16px;
}

/* SIDEBAR */
.sidebar{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
}
.channel-list{display:flex;flex-direction:column;gap:6px}
.channel{
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.03);
  cursor:pointer;
}
.channel.active{
  background:rgba(255,182,42,.2);
  color:var(--primary);
}

/* PLAYER */
.player-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
}
.player{
  width:100%;
  aspect-ratio:16/9;
  background:#000;
  min-height:520px;
}
.player iframe{width:100%;height:100%;border:0}

/* CHAT */
.chat,.chat-mobile{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  display:flex;
  flex-direction:column;
}
.chat{
  height:calc(100vh - 96px);
  position:sticky;
  top:80px;
}
.chat-header{
  padding:12px;
  border-bottom:1px solid var(--border);
  display:flex;
  flex-direction:column;
  gap:8px;
}
.chat-title{font-weight:700}
.chat-user input,
.chat-input input{
  width:100%;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#0b0f1a;
  color:#fff;
}
.chat-messages{
  flex:1;
  padding:12px;
  overflow-y:auto;
  display:flex;
  flex-direction:column-reverse; /* 🔥 INI KUNCI */
  gap:8px;
  -webkit-overflow-scrolling:touch;
}
.chat-msg{
  background:rgba(255,255,255,.05);
  padding:8px 10px;
  border-radius:10px;
  font-size:13px;
}
.chat-msg .username{font-weight:600;color:var(--primary);margin-right:4px}
.chat-msg.system{font-weight:600;color:var(--primary);margin-right:4px}
.chat-input{
  display:flex;
  gap:8px;
  padding:10px;
  border-top:1px solid var(--border);
}
.chat-input button{
  padding:8px 14px;
  border-radius:10px;
  border:none;
  background:var(--primary);
  color:#000;
  font-weight:600;
  cursor:pointer;
}



/* MOBILE */
.chat-mobile{display:none}
@media(max-width:1100px){
  .layout{grid-template-columns:1fr}
  .chat{display:none}
  .hamburger{display:block}
  .sidebar{
    position:fixed;
    left:-260px;
    top:64px;
    width:260px;
    height:100vh;
    background:#0f1425;
    transition:.3s;
    z-index:999;
  }
  .sidebar.active{left:0}
}
@media(max-width:768px){
  .player-card{
    width:100vw;
    margin-left:calc(-50vw + 50%);
    border-radius:0;
  }
  .player{min-height:260px}
  .chat-mobile{display:flex;margin:16px}
}

/* FOOTER */
.mobile-footer{
  position:fixed;
  bottom:0;left:0;right:0;
  height:64px;
  display:flex;
  background:#0f1425;
  border-top:1px solid var(--border);
}
.mobile-footer button{
  flex:1;
  background:none;
  border:none;
  color:#fff;
}
</style>