* { margin:0; padding:0; box-sizing:border-box; }
html, body { width:100%; height:100%; overflow:hidden; background:#87ceeb;
  font-family:'Segoe UI', system-ui, sans-serif; touch-action:none;
  user-select:none; -webkit-user-select:none; }
canvas { display:block; }

#loading { position:fixed; inset:0; background:linear-gradient(135deg,#1a2a6c,#2a9d8f);
  display:flex; align-items:center; justify-content:center; z-index:100; transition:opacity .6s; }
#loading.done { opacity:0; pointer-events:none; }
.load-box { text-align:center; color:#fff; }
.load-title { font-size:64px; font-weight:900; letter-spacing:8px; text-shadow:0 4px 0 rgba(0,0,0,.3); }
.load-sub { font-size:18px; opacity:.85; margin:6px 0 22px; letter-spacing:3px; }
.load-bar { width:260px; height:10px; background:rgba(255,255,255,.25); border-radius:6px; margin:0 auto; overflow:hidden; }
.load-fill { height:100%; width:40%; background:#ffd166; border-radius:6px; animation:slide 1.1s ease-in-out infinite alternate; }
@keyframes slide { from { margin-left:-40%; } to { margin-left:100%; } }

#hud { position:fixed; top:0; left:0; right:0; padding:12px 16px; z-index:10; pointer-events:none;
  display:flex; align-items:flex-start; justify-content:space-between; }
#title { background:rgba(20,20,30,.72); color:#fff; padding:8px 16px 8px 10px; border-radius:12px;
  display:flex; align-items:center; gap:10px; backdrop-filter:blur(4px); }
.title-text { font-size:20px; font-weight:800; letter-spacing:1px; line-height:1; }
.title-text span { display:block; font-weight:400; font-size:11px; opacity:.75; letter-spacing:2px; margin-top:3px; }

/* Logo block ala Roblox: kubus merah + stud di atas */
.blox-logo { position:relative; width:34px; height:30px; margin-top:8px;
  background:linear-gradient(180deg,#ff4d4d 0%,#d61f1f 60%,#a31212 100%);
  border-radius:6px; box-shadow:inset 0 2px 0 rgba(255,255,255,.35), 0 3px 6px rgba(0,0,0,.4); flex:none; }
.blox-logo .stud { position:absolute; top:-9px; left:50%; transform:translateX(-50%);
  width:16px; height:10px; background:linear-gradient(180deg,#ff6b6b,#d61f1f);
  border-radius:4px 4px 2px 2px; box-shadow:inset 0 2px 0 rgba(255,255,255,.4); }
.blox-logo.big { width:64px; height:56px; margin:0 auto 14px; border-radius:12px; }
.blox-logo.big .stud { width:30px; height:18px; top:-16px; border-radius:8px 8px 4px 4px; }
#stats { background:rgba(20,20,30,.72); color:#fff; padding:8px 16px; border-radius:12px;
  font-size:15px; display:flex; align-items:center; gap:6px; }
#topRight { display:flex; gap:8px; align-items:center; pointer-events:auto; }
#clock { background:rgba(20,20,30,.72); color:#ffd166; padding:8px 14px; border-radius:12px;
  font-size:15px; font-weight:700; display:flex; align-items:center; gap:7px; letter-spacing:.5px; }
#muteBtn { background:rgba(20,20,30,.72); border:2px solid rgba(255,255,255,.25);
  border-radius:12px; padding:7px 11px; cursor:pointer; backdrop-filter:blur(4px);
  display:flex; align-items:center; }
#muteBtn:hover { border-color:#ffd166; }
#muteBtn .hidden { display:none; }
#icoOff.hidden { display:none; }
#help { position:fixed; bottom:12px; left:50%; transform:translateX(-50%);
  background:rgba(20,20,30,.65); color:#eee; padding:8px 18px; border-radius:20px;
  font-size:13px; white-space:nowrap; backdrop-filter:blur(4px); }
#help b { color:#ffd166; }

#interact { position:fixed; bottom:64px; left:50%; transform:translateX(-50%);
  background:rgba(20,20,30,.8); color:#fff; padding:10px 20px; border-radius:14px;
  font-size:15px; display:none; z-index:10; border:2px solid #ffd166; }
#interact b { color:#ffd166; }

#dialog { position:fixed; bottom:110px; left:50%; transform:translateX(-50%);
  width:min(480px, 90vw); background:rgba(15,15,25,.92); border:2px solid #ffd166;
  border-radius:16px; padding:16px 20px; z-index:20; color:#fff;
  box-shadow:0 8px 32px rgba(0,0,0,.5); cursor:pointer; }
#dialog.hidden { display:none; }
#dialogName { color:#ffd166; font-weight:800; font-size:16px; margin-bottom:6px; }
#dialogText { font-size:15px; line-height:1.55; color:#f0f0f0; }
#dialogHint { margin-top:10px; font-size:11px; opacity:.5; text-align:right; }

#stick { position:fixed; bottom:90px; left:26px; width:110px; height:110px;
  border-radius:50%; background:rgba(255,255,255,.12); border:2px solid rgba(255,255,255,.35);
  display:none; z-index:15; }
#stickKnob { position:absolute; left:50%; top:50%; width:48px; height:48px; border-radius:50%;
  background:rgba(255,255,255,.5); transform:translate(-50%,-50%); }
@media (pointer:coarse) { #stick { display:block; } #help { display:none; } }
