:root{
  --bg:#0b0e14;
  --panel:rgba(255,255,255,.05);
  --border:rgba(255,255,255,.11);
  --text:rgba(255,255,255,.93);
  --muted:rgba(255,255,255,.62);
  --muted2:rgba(255,255,255,.45);
  --accent:#7c5cff;
  --good:#2ee59d;
  --bad:#ff5c7a;
  --shadow:0 18px 60px rgba(0,0,0,.55);
  --font:ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;color:var(--text);font-family:var(--font);
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(124,92,255,.24), transparent 65%),
    radial-gradient(900px 600px at 80% 0%, rgba(92,225,255,.14), transparent 60%),
    var(--bg);
}
#app{height:100%;display:flex;flex-direction:column}
.topbar{
  height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;
  border-bottom:1px solid var(--border);background:rgba(0,0,0,.22);backdrop-filter:blur(10px);
}
.brand{display:flex;align-items:center;gap:12px}
.brandIcon{width:34px;height:34px}
.brandName{font-weight:760}.brandSub{font-size:12px;color:var(--muted);margin-top:1px}
.me{display:flex;align-items:center;gap:12px}
.meDot{width:10px;height:10px;border-radius:999px;background:var(--bad);box-shadow:0 0 0 4px rgba(255,92,122,.12)}
.meText{display:flex;flex-direction:column;line-height:1.1}
.meName{font-size:14px;font-weight:650}.meMeta{font-size:12px;color:var(--muted)}

.layout{flex:1;display:grid;grid-template-columns:1fr 320px;min-height:0}
.soundMain{display:flex;flex-direction:column;min-height:0;background:rgba(0,0,0,.08)}
.soundMainHeader{padding:14px 16px 12px;border-bottom:1px solid var(--border);background:rgba(255,255,255,.03)}
.panelTitle{font-size:14px;font-weight:760}.panelSub{font-size:12px;color:var(--muted);margin-top:2px}

.soundboardSection{display:flex;flex-direction:column;gap:10px;padding:12px;min-height:0}
.soundboardMainSection{flex:1}
.chatSection{
  border-top:1px solid var(--border);
  background:rgba(255,255,255,.02);
  padding:10px 12px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  min-height:220px;
  max-height:42vh;
}
.chatHeaderRow{display:flex;align-items:baseline;gap:8px}
.chatTitle{font-size:14px;font-weight:800}
.chatHint{font-size:11px;color:var(--muted2)}
.chatScroll{flex:1;min-height:120px;overflow:auto;padding-right:4px}
.chatList{display:flex;flex-direction:column;gap:8px}
.chatRow{display:flex;flex-direction:column;gap:2px}
.chatRowMine .chatUser{color:#b9a8ff}
.chatRowGrouped .chatMeta{display:none}
.chatMeta{display:flex;align-items:baseline;gap:7px}
.chatUser{font-size:13px;font-weight:760}
.chatTime{font-size:11px;color:var(--muted2)}
.chatText{font-size:13px;line-height:1.35;white-space:pre-wrap;word-break:break-word;color:rgba(255,255,255,.9)}
.chatSystem{font-size:11px;color:var(--muted2);padding:2px 0}
.chatEmpty{font-size:12px;color:var(--muted);padding:2px 0}
.chatTyping{font-size:11px;color:var(--muted2);min-height:14px}
.chatComposer{display:flex;gap:8px}
.chatInput{
  width:100%;
  min-height:38px;
  max-height:100px;
  border-radius:11px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  padding:8px 12px;
  outline:none;
  resize:vertical;
  font-family:var(--font);
}
.chatInput:focus{border-color:rgba(124,92,255,.58);box-shadow:0 0 0 3px rgba(124,92,255,.16)}
.chatSendBtn{height:38px;min-width:84px}
.soundboardTitle{font-size:13px;font-weight:800}
.soundboardHint{font-size:11px;color:var(--muted2)}
.soundSearch,.soundLabelInput,.adminPassword,.emojiModalInput,.emojiPickerSearch,.modalInput{
  width:100%;height:38px;border-radius:11px;border:1px solid var(--border);background:rgba(255,255,255,.06);
  color:var(--text);padding:0 12px;outline:none;
}
.soundSearch:focus,.soundLabelInput:focus,.adminPassword:focus,.emojiModalInput:focus,.emojiPickerSearch:focus,.modalInput:focus{
  border-color:rgba(124,92,255,.58);box-shadow:0 0 0 3px rgba(124,92,255,.16);
}
.soundVolRow{display:flex;align-items:center;gap:10px}
.soundVolLabel{font-size:12px;color:var(--muted)} .soundVolRow input[type="range"]{flex:1;accent-color:var(--accent)}
.soundVolVal{font-size:12px;color:var(--muted2);width:40px;text-align:right}
.soundDropzone{
  border:1px dashed rgba(255,255,255,.2);border-radius:13px;padding:11px 12px;text-align:center;cursor:pointer;background:rgba(255,255,255,.03);
}
.soundDropzone:hover{border-color:rgba(124,92,255,.5);background:rgba(124,92,255,.08)}
.soundDropzoneDisabled{opacity:.55;pointer-events:none}
.soundDropzoneActive{border-color:rgba(92,225,255,.55);background:rgba(92,225,255,.08)}
.soundDropText{font-size:12px;color:rgba(255,255,255,.8);font-weight:650}
.uploadStatus{font-size:12px;color:var(--muted);min-height:16px}
.soundboardScroll{flex:1;min-height:120px;overflow:auto}
.soundboard{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.soundEmpty{font-size:12px;color:var(--muted);padding:8px 4px}
.soundPad{border-radius:14px;border:1px solid rgba(255,255,255,.1);background:linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));overflow:hidden}
.soundPadPlaying{border-color:rgba(124,92,255,.65);box-shadow:0 0 0 3px rgba(124,92,255,.18)}
.soundPadRow{display:flex}
.soundPadBtn{
  flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:12px;border:none;background:transparent;color:var(--text);text-align:left;cursor:pointer
}
.soundPadBtn:hover{background:rgba(255,255,255,.05)}
.soundPadEmoji{font-size:46px;line-height:1;margin-bottom:2px}
.soundPadLabel{font-size:13px;font-weight:780;line-height:1.2;word-break:break-word}
.soundPadMeta{font-size:11px;color:var(--muted2)}
.soundPadMore,.soundPadDelete{
  width:40px;border:none;border-left:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.04);cursor:pointer;color:rgba(255,255,255,.85);font-size:24px
}
.soundPadMore:hover{background:rgba(255,255,255,.11)}
.soundPadDelete{color:rgba(255,255,255,.56)} .soundPadDelete:hover{background:rgba(255,92,122,.14);color:#fff}

.members{border-left:1px solid var(--border);background:rgba(0,0,0,.16);display:flex;flex-direction:column;min-height:0}
.channelsSection{padding:10px;display:flex;flex-direction:column;gap:8px}
.channelsHeader{font-size:12px;font-weight:850;color:var(--muted2);text-transform:uppercase;letter-spacing:.04em}
.channelList{display:flex;flex-direction:column;gap:4px}
.channelBtn{
  width:100%;
  text-align:left;
  border:1px solid transparent;
  background:rgba(255,255,255,.03);
  color:var(--text);
  height:30px;
  border-radius:8px;
  cursor:pointer;
  font-size:13px;
  padding:0 10px;
}
.channelBtn:hover{background:rgba(255,255,255,.08)}
.channelBtnActive{
  background:rgba(124,92,255,.24);
  border-color:rgba(124,92,255,.5);
}
.adminSection{padding:10px;display:flex;flex-direction:column;gap:8px}
.adminTitleRow{display:flex;justify-content:space-between;align-items:center}
.adminTitle{font-size:12px;font-weight:850}.adminState{font-size:11px;color:var(--muted2)}
.adminAuthRow{display:flex;gap:8px}.adminActions{display:flex;gap:8px}.adminActions .btnGhost{flex:1}
.membersDivider{height:1px;background:var(--border)}
.membersHeader{padding:12px 12px 10px;border-bottom:1px solid var(--border);background:rgba(255,255,255,.03)}
.memberList{flex:1;min-height:0;padding:10px;overflow:auto;display:flex;flex-direction:column;gap:8px}
.member{display:flex;align-items:center;gap:10px;padding:10px;border-radius:12px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03)}
.memberDot{width:10px;height:10px;border-radius:999px;background:var(--good);box-shadow:0 0 0 4px rgba(46,229,157,.12)}
.memberName{font-weight:700}.memberMeta{margin-left:auto;font-size:12px;color:var(--muted2)}
.memberKick{margin-left:auto;height:26px;padding:0 8px;border-radius:8px;border:1px solid rgba(255,92,122,.35);background:rgba(255,92,122,.12);color:#fff;font-size:11px;cursor:pointer}
.memberKick:hover{background:rgba(255,92,122,.24)}
.membersFooter{padding:10px;border-top:1px solid var(--border);font-size:11px;color:var(--muted2)}

.btn,.btnGhost,.btnPrimary{
  height:34px;padding:0 12px;border-radius:11px;border:1px solid var(--border);background:rgba(255,255,255,.06);color:var(--text);cursor:pointer;font-weight:700
}
.btn:hover,.btnGhost:hover{background:rgba(255,255,255,.1)}
.btnPrimary{border-color:rgba(124,92,255,.5);background:linear-gradient(180deg, rgba(124,92,255,.46), rgba(124,92,255,.22))}
.btnGhost{background:rgba(255,255,255,.03)}

.modalBackdrop,.emojiModalBackdrop{position:fixed;inset:0;background:rgba(0,0,0,.55)}
.modal,.emojiModal{
  position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(460px,calc(100vw - 24px));
  border-radius:14px;border:1px solid rgba(255,255,255,.14);background:rgba(10,12,18,.94);box-shadow:var(--shadow);padding:14px;
}
.modalTitle,.emojiModalTitle{font-size:16px;font-weight:800}
.modalBody{padding:4px 0 8px}.modalRow{display:flex;flex-direction:column;gap:6px}.modalLabel{font-size:12px;color:var(--muted)}
.modalActions,.emojiModalActions{display:flex;justify-content:flex-end;gap:10px;margin-top:12px}
.emojiModalSub{margin-top:4px;color:var(--muted);font-size:13px}
.emojiModalMeta{margin-top:8px;font-size:13px;color:rgba(255,255,255,.84)}
.emojiModalVotes{margin-top:10px;max-height:150px;overflow:auto;display:flex;flex-direction:column;gap:6px}
.emojiModalVoteItem{display:flex;justify-content:space-between;padding:6px 10px;border-radius:10px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09)}
.emojiModalVotesEmpty{color:var(--muted);font-size:12px;padding:6px 2px}
.emojiModalInputLabel{display:block;margin-top:10px;font-size:12px;color:var(--muted)}
.emojiModalInputRow{display:flex;gap:8px;align-items:center}
.emojiPickerToggle{width:44px;padding:0;font-size:22px}
.emojiPickerPanel{margin-top:8px;border:1px solid var(--border);border-radius:10px;background:rgba(255,255,255,.04);padding:8px}
.emojiPickerGrid{margin-top:8px;max-height:170px;overflow:auto;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px}
.emojiPickerBtn{height:32px;border-radius:8px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);cursor:pointer;font-size:20px}
.emojiPickerBtn:hover{background:rgba(255,255,255,.12)}

@media (max-width:980px){
  .layout{grid-template-columns:1fr}
  .members{display:none}
}

