:root {
  --bg-servers: #1e1f22;
  --bg-sidebar: #2b2d31;
  --bg-main: #313338;
  --bg-input: #383a40;
  --bg-hover: #35373c;
  --bg-active: #404249;
  --bg-panel: #232428;
  --text: #dbdee1;
  --text-muted: #949ba4;
  --text-strong: #f2f3f5;
  --blurple: #5865f2;
  --green: #23a559;
  --red: #da373c;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg-main); color: var(--text); font-family: "gg sans", "Segoe UI", "Noto Sans", Arial, sans-serif; font-size: 15px; }
button { font-family: inherit; }
.hidden { display: none !important; }

/* ---- Giris ---- */
.login { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 20% 20%, #5865f2 0, #3c45a5 40%, #23272a 100%); }
.login-card { width: 420px; max-width: 92vw; background: var(--bg-main); border-radius: 8px; padding: 32px; box-shadow: 0 8px 24px rgba(0,0,0,.4); text-align: center; }
.login-logo { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--blurple); color: #fff; display: grid; place-items: center; font-size: 30px; font-weight: 800; }
.login-card h1 { color: var(--text-strong); margin: 0 0 6px; font-size: 24px; }
.login-card p { color: var(--text-muted); margin: 0 0 20px; }
.login-card label { display: block; text-align: left; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.login-card input { width: 100%; padding: 10px; border: 0; border-radius: 4px; background: #1e1f22; color: var(--text-strong); font-size: 16px; outline: none; margin-bottom: 20px; }
.login-card button, .voice-join button, .modal-actions button { width: 100%; padding: 12px; border: 0; border-radius: 4px; background: var(--blurple); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; }
.login-card button:hover, .voice-join button:hover, .modal-actions button:hover { background: #4752c4; }

/* ---- Yerlesim ---- */
.app { display: grid; grid-template-columns: 72px 240px 1fr 240px; height: 100vh; overflow: hidden; }

.servers { background: var(--bg-servers); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 8px; }
.server-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-main); color: var(--text); display: grid; place-items: center; font-weight: 700; cursor: pointer; transition: border-radius .15s, background .15s; position: relative; }
.server-icon:hover, .server-icon.active { border-radius: 16px; background: var(--blurple); color: #fff; }
.server-icon.active::before { content: ""; position: absolute; left: -16px; width: 8px; height: 40px; background: #fff; border-radius: 0 4px 4px 0; }
.server-icon.home { background: var(--blurple); color: #fff; border-radius: 16px; font-size: 22px; text-decoration: none; }
.server-icon.home:hover { filter: brightness(1.12); }
.server-icon.add { color: var(--green); font-size: 26px; font-weight: 400; }
.server-icon.add:hover { background: var(--green); color: #fff; }
.server-sep { width: 32px; height: 2px; background: var(--bg-active); border-radius: 1px; }
.server-list { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.server-icon.has-img { background-size: cover; background-position: center; color: transparent; }
.server-icon.has-img:hover, .server-icon.has-img.active { background-color: transparent; }
.srv-voice { position: absolute; right: -4px; bottom: -4px; font-size: 11px; background: var(--bg-servers); border-radius: 50%; padding: 2px; line-height: 1; color: #fff; }
.icon-pick { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.icon-prev { width: 80px; height: 80px; border-radius: 50%; background: #1e1f22 center/cover no-repeat; display: grid; place-items: center; font-size: 28px; cursor: pointer; border: 2px dashed #4e5058; }
.icon-prev:hover { border-color: var(--blurple); }
.icon-prev.busy { opacity: .5; cursor: progress; }
.invite-card { display: flex; align-items: center; gap: 14px; background: #2b2d31; padding: 14px; border-radius: 8px; margin: 8px 0 4px; }
.invite-card .server-icon::before { display: none; }
.audit-row { padding: 8px 4px; border-bottom: 1px solid #3f4147; font-size: 14px; line-height: 1.4; }
#genBody select.ss-input { margin-bottom: 4px; }

.sidebar { background: var(--bg-sidebar); display: flex; flex-direction: column; min-width: 0; }
.server-header { height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: var(--text-strong); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.channels { flex: 1; overflow-y: auto; padding: 8px 8px; }
.cat { font-size: 12px; font-weight: 700; color: var(--text-muted); padding: 16px 8px 4px; letter-spacing: .02em; }
.channel { display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin: 1px 0; border-radius: 4px; color: var(--text-muted); cursor: pointer; user-select: none; }
.channel:hover { background: var(--bg-hover); color: var(--text); }
.channel.active { background: var(--bg-active); color: var(--text-strong); }
.channel .ic { width: 20px; text-align: center; font-size: 18px; opacity: .8; }
.voice-users { padding-left: 30px; }
.voice-user { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 4px; color: var(--text-muted); font-size: 14px; }
.voice-user .avatar { width: 24px; height: 24px; font-size: 11px; }
.voice-user .flags { margin-left: auto; font-size: 12px; display: flex; gap: 3px; }
.live { background: var(--red); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 3px; }

.voice-panel { display: flex; align-items: center; gap: 4px; padding: 8px; background: var(--bg-panel); border-bottom: 1px solid #1e1f22; }
.vp-info { flex: 1; min-width: 0; }
.vp-status { color: var(--green); font-weight: 700; font-size: 13px; }
.vp-channel { color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.user-panel { display: flex; align-items: center; gap: 6px; padding: 8px; background: var(--bg-panel); }
.up-names { flex: 1; min-width: 0; }
.up-name { color: var(--text-strong); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-tag { color: var(--text-muted); font-size: 12px; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 4px; background: transparent; cursor: pointer; font-size: 16px; display: grid; place-items: center; position: relative; }
.icon-btn:hover { background: var(--bg-active); }
.icon-btn.off::after { content: ""; position: absolute; width: 22px; height: 2px; background: var(--red); transform: rotate(-45deg); }
.icon-btn.on { background: rgba(35,165,89,.25); }
.icon-btn.danger:hover { background: rgba(218,55,60,.3); }

.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; transition: box-shadow .1s; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.speaking { box-shadow: 0 0 0 2px var(--bg-sidebar), 0 0 0 4px var(--green); }

/* ---- Ana alan ---- */
.main { display: flex; flex-direction: column; min-width: 0; background: var(--bg-main); }
.main-header { height: 48px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px; font-weight: 700; color: var(--text-strong); box-shadow: 0 1px 0 rgba(0,0,0,.25); z-index: 1; }
.hash { color: var(--text-muted); font-size: 22px; font-weight: 400; }

.text-view { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.messages { flex: 1; overflow-y: auto; padding: 16px 0 8px; }
.msg { display: flex; gap: 16px; padding: 2px 16px; margin-top: 16px; }
.msg.cont { margin-top: 0; }
.msg:hover { background: #2e3035; }
.msg .avatar { margin-top: 2px; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg-body { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: baseline; gap: 8px; }
.msg-name { font-weight: 600; }
.msg-time { font-size: 12px; color: var(--text-muted); }
.msg-text { white-space: pre-wrap; word-wrap: break-word; line-height: 1.375; }
.msg-img { max-width: 400px; max-height: 300px; border-radius: 8px; margin-top: 4px; cursor: zoom-in; display: block; }
.welcome { padding: 16px; }
.welcome .big { width: 68px; height: 68px; border-radius: 50%; background: var(--bg-active); display: grid; place-items: center; font-size: 40px; color: var(--text-strong); }
.welcome h2 { color: var(--text-strong); font-size: 30px; margin: 8px 0; }
.welcome p { color: var(--text-muted); margin: 0; }
.typing { height: 20px; padding: 0 16px; font-size: 13px; color: var(--text-muted); }
.composer { margin: 0 16px 24px; display: flex; align-items: center; background: var(--bg-input); border-radius: 8px; padding: 0 12px; }
.composer input { flex: 1; padding: 12px 8px; border: 0; background: transparent; color: var(--text); font-size: 15px; outline: none; }
.attach { width: 24px; height: 24px; border-radius: 50%; background: #b5bac1; color: var(--bg-input); display: grid; place-items: center; font-weight: 800; cursor: pointer; }

/* ---- Ses gorunumu ---- */
.voice-view { flex: 1; display: flex; flex-direction: column; background: #000; position: relative; min-height: 0; padding: 16px; gap: 12px; }
.stage { flex: 1; display: none; min-height: 0; }
.stage.has { display: flex; }
.stage video { width: 100%; height: 100%; object-fit: contain; background: #000; border-radius: 8px; }
.tiles { flex: 1; display: flex; flex-wrap: wrap; gap: 12px; align-content: center; justify-content: center; overflow: auto; }
.stage.has + .tiles { flex: none; max-height: 140px; }
.tile { width: 280px; aspect-ratio: 16/9; background: var(--bg-sidebar); border-radius: 8px; display: grid; place-items: center; position: relative; overflow: hidden; cursor: default; }
.stage.has + .tiles .tile { width: 200px; }
.tile .avatar { width: 80px; height: 80px; font-size: 30px; }
.stage.has + .tiles .tile .avatar { width: 48px; height: 48px; font-size: 18px; }
.tile.speaking { box-shadow: inset 0 0 0 3px var(--green); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.tile.stream { cursor: pointer; }
.tile-name { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); padding: 2px 8px; border-radius: 4px; font-size: 13px; color: #fff; display: flex; gap: 6px; align-items: center; }
.tile-watch { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .15s; color: #fff; font-weight: 700; }
.tile.stream:hover .tile-watch { opacity: 1; }
.voice-controls { display: flex; justify-content: center; gap: 16px; flex: none; }
.round { width: 56px; height: 56px; border-radius: 50%; border: 0; background: #2b2d31; font-size: 22px; cursor: pointer; position: relative; }
.round:hover { background: #3a3c42; }
.round.danger { background: var(--red); }
.round.off::after { content: ""; position: absolute; left: 14px; top: 27px; width: 28px; height: 3px; background: var(--red); transform: rotate(-45deg); }
.round.on { background: var(--green); }
.voice-join { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #000; text-align: center; }
.voice-join .vj-icon { font-size: 56px; }
.voice-join h2 { color: var(--text-strong); margin: 8px 0; }
.voice-join p { color: var(--text-muted); }
.voice-join button { width: auto; padding: 12px 32px; background: var(--green); }
.voice-join button:hover { background: #1a8b4a; }

/* ---- Uyeler ---- */
.members { background: var(--bg-sidebar); overflow-y: auto; padding: 8px; }
.member-cat { font-size: 12px; font-weight: 700; color: var(--text-muted); padding: 16px 8px 4px; }
.member { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 4px; }
.member:hover { background: var(--bg-hover); }
.member .avatar { width: 32px; height: 32px; font-size: 13px; position: relative; }
.member .avatar.online-dot::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 3px solid var(--bg-sidebar); }
.member.offline { opacity: .45; }
.member.offline:hover { opacity: .8; }
.member.offline .avatar { filter: grayscale(.6); }
.member-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-sub { font-size: 12px; color: var(--text-muted); }

/* ---- Modal ---- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: grid; place-items: center; z-index: 10; }
.modal-card { width: 440px; max-width: 92vw; background: var(--bg-main); border-radius: 8px; padding: 24px; }
.modal-card h2 { color: var(--text-strong); margin: 0 0 16px; }
.modal-card label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin: 16px 0 8px; }
.modal-card label.chk { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 400; color: var(--text); }
.modal-card select { width: 100%; padding: 10px; background: #1e1f22; color: var(--text); border: 0; border-radius: 4px; font-size: 14px; }
.meter { position: relative; height: 10px; background: #1e1f22; border-radius: 4px; overflow: hidden; }
#meterBar { height: 100%; width: 0; background: var(--green); transition: width .08s; }
.meter:has(.meter-thr:not(.hidden)) #meterBar { background: #6d6f78; }
.meter:has(.meter-thr:not(.hidden)) #meterBar.pass { background: var(--green); }
.meter-thr { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 2px #000; transition: left .2s; }
.sens-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #b5bac1; }
.sens-row input[type=range] { flex: 1; accent-color: var(--accent, #5865f2); }
.link-btn { background: none; border: 0; color: #00a8fc; cursor: pointer; font-size: 12px; padding: 0 4px; }
.link-btn:hover { text-decoration: underline; }
.modal-actions { margin-top: 24px; }
.modal-actions.two { display: flex; gap: 10px; }
.login-error { color: #fa777c; font-size: 13px; min-height: 18px; margin: 8px 0 4px; }
.login-switch { font-size: 13px; color: var(--text-muted); margin: 12px 0 0; text-align: left; }
.login-switch a { color: #00a8fc; text-decoration: none; }
.login-switch a:hover { text-decoration: underline; }
.ping { font-weight: 500; font-size: 11px; margin-left: 4px; }
.ping.good { color: #23a55a; } .ping.mid { color: #f0b232; } .ping.bad { color: #f23f43; }
.voice-user .ping { margin-left: auto; margin-right: 4px; }
.voice-user { cursor: pointer; }
.ptt-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.key-btn { padding: 8px 14px; background: #1e1f22; color: var(--text-strong); border: 2px solid #3f4147; border-radius: 6px; font-weight: 700; cursor: pointer; min-width: 70px; }
.key-btn.listening { border-color: var(--blurple); color: var(--blurple); }
a.dl-app { display: block; margin-top: 16px; padding: 10px; text-align: center; background: #248046; color: #fff; border-radius: 4px; font-weight: 600; text-decoration: none; }
a.dl-app:hover { background: #1a6334; }
a.dl-app.hidden, .dl-app-wrap.hidden { display: none; }
.dl-app-wrap a.dl-app { margin-top: 0; }
.danger-btn { width: 100%; padding: 10px; background: transparent; color: #f23f43; border: 1px solid #f23f43; border-radius: 4px; font-weight: 600; cursor: pointer; }
.danger-btn:hover { background: #f23f43; color: #fff; }
.user-menu { position: fixed; z-index: 30; width: 240px; background: #111214; border-radius: 8px; padding: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.5); color: var(--text); font-size: 14px; }
.user-menu h3 { margin: 0 0 10px; color: var(--text-strong); font-size: 15px; }
.user-menu .um-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--text-muted); margin: 10px 0 6px; text-transform: uppercase; }
.user-menu input[type=range] { width: 100%; accent-color: var(--blurple); }
.user-menu label.um-chk { display: flex; align-items: center; gap: 8px; margin-top: 8px; cursor: pointer; }
.user-menu .um-reset { margin-top: 10px; background: none; border: 0; color: #00a8fc; cursor: pointer; padding: 0; font-size: 13px; }
.tile .tile-flag { position: absolute; top: 6px; right: 8px; font-size: 14px; }
.modal-actions button.ghost { background: transparent; color: var(--text); }
.modal-actions button.ghost:hover { background: var(--bg-hover); }
.hint { margin-top: 10px; font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.hint.warn { color: #faa61a; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; padding: 12px 0; border: 2px solid transparent; border-radius: 6px; background: #1e1f22; color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; }
.seg button:hover { background: var(--bg-hover); }
.seg button.sel { border-color: var(--blurple); background: rgba(88,101,242,.18); color: var(--text-strong); }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 20; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 4px; }

/* ---- Roller / yonetim ---- */
.server-header { cursor: pointer; }
.server-header:hover { background: var(--bg-hover); }
.badge { margin-left: 4px; font-size: 12px; flex: none; }
.ch-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-gear { flex: none; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 0 2px; opacity: 0; }
.channel:hover .ch-gear, .channel.active .ch-gear { opacity: .8; }
.ch-gear:hover { opacity: 1 !important; color: var(--text-strong); }
.channel.locked .ic { font-size: 14px; }
.channel.drop { background: rgba(88,101,242,.35); outline: 2px dashed var(--blurple); color: var(--text-strong); }
.voice-user[draggable=true] { cursor: grab; }
.vu-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-mute { filter: hue-rotate(-30deg) saturate(3); }
.msg { position: relative; }
.msg-del { position: absolute; right: 16px; top: -6px; display: none; border: 1px solid #1e1f22; background: var(--bg-main); border-radius: 6px; padding: 2px 6px; cursor: pointer; font-size: 14px; }
.msg:hover .msg-del { display: block; }
.msg-del:hover { background: rgba(218,55,60,.3); }
.user-menu .um-btn { display: block; width: 100%; text-align: left; margin-top: 6px; padding: 8px 10px; border: 0; border-radius: 4px; background: #2b2d31; color: var(--text); cursor: pointer; font-size: 14px; }
.user-menu .um-btn:hover { background: var(--blurple); color: #fff; }
.user-menu .um-btn.primary { background: var(--green); color: #fff; font-weight: 600; text-align: center; }
.user-menu .um-btn.primary:hover { background: #1a8b4a; }
.user-menu .um-btn.warn:hover { background: #c27c0e; }
.user-menu .um-btn.danger { color: #f23f43; }
.user-menu .um-btn.danger:hover { background: #da373c; color: #fff; }
.user-menu .um-sec { margin: 14px 0 2px; padding-top: 10px; border-top: 1px solid #2b2d31; font-size: 11px; font-weight: 800; color: var(--text-muted); letter-spacing: .04em; }
.user-menu .um-select { width: 100%; padding: 8px; background: #1e1f22; color: var(--text); border: 0; border-radius: 4px; font-size: 14px; }
.user-menu .um-hint { margin-top: 8px; font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.user-menu { max-height: 85vh; overflow-y: auto; }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 40; background: #111214; color: var(--text-strong); padding: 12px 18px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.5); font-size: 14px; max-width: 90vw; transition: opacity .4s; }
.toast.gone { opacity: 0; }

.modal-card.wide { width: 720px; max-height: 90vh; display: flex; flex-direction: column; }
.ss-body { margin-top: 16px; overflow-y: auto; min-height: 260px; flex: 1; }
.ss-input { width: 100%; padding: 10px; background: #1e1f22; color: var(--text); border: 0; border-radius: 4px; font-size: 15px; outline: none; }
.ss-roles { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.ss-role-list { display: flex; flex-direction: column; gap: 4px; }
.ss-role { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--text); cursor: pointer; text-align: left; font-size: 14px; }
.ss-role small { margin-left: auto; color: var(--text-muted); font-size: 11px; }
.ss-role:hover { background: var(--bg-hover); }
.ss-role.sel { background: var(--bg-active); color: var(--text-strong); }
.ss-role.new { color: #00a8fc; }
.ss-role-edit label { margin-top: 0; }
.ss-role-edit > label:not(.ss-perm) { margin: 4px 0 8px; }
.ss-row { display: flex; gap: 10px; margin-bottom: 16px; }
.ss-color { width: 48px; height: 40px; border: 0; padding: 0; background: none; cursor: pointer; }
label.ss-perm { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; margin: 0; border-bottom: 1px solid #3f4147; cursor: pointer; font-weight: 400; color: var(--text); font-size: 14px; }
label.ss-perm input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--blurple); flex: none; }
label.ss-perm b { display: block; color: var(--text-strong); font-size: 14px; }
label.ss-perm span { display: block; color: var(--text-muted); font-size: 12px; }
.danger-text { color: #f23f43 !important; }
.ss-member { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid #3f4147; }
.ss-member .avatar { width: 36px; height: 36px; font-size: 14px; }
.ss-member.banned { opacity: .6; }
.ss-m-info { flex: 1; min-width: 0; }
.ss-m-name { font-weight: 600; color: var(--text-strong); }
.ss-member > button { padding: 8px 12px; border: 0; border-radius: 4px; cursor: pointer; font-weight: 600; background: transparent; color: var(--text); }
.ss-member > button:hover { background: var(--bg-hover); }
.ban-tag { margin-left: 6px; font-size: 10px; font-weight: 800; background: var(--red); color: #fff; padding: 1px 5px; border-radius: 3px; }
.ss-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { --c: #99aab5; padding: 3px 10px; border-radius: 12px; border: 1px solid var(--c); background: transparent; color: var(--text-muted); cursor: pointer; font-size: 12px; }
.chip.on { background: var(--c); color: #fff; font-weight: 600; }
.hdr-btn { border: 0; background: transparent; color: var(--text); font-size: 20px; cursor: pointer; padding: 4px 6px; border-radius: 4px; }
.hdr-btn:hover { background: var(--bg-hover); }
.m-only { display: none; }
#mMembers { margin-left: auto; }

@media (max-width: 1000px) { .app { grid-template-columns: 72px 220px 1fr; } .members { display: none; } }

/* ---- Telefon: tek ekran, kanal listesi <-> sohbet/ses, uyeler yandan kayar ---- */
@media (max-width: 700px) {
  .app { grid-template-columns: 64px 1fr; grid-template-rows: 1fr; height: 100dvh; }
  .servers { grid-column: 1; grid-row: 1; overflow-y: auto; }
  .server-icon { width: 44px; height: 44px; flex: none; }
  .server-icon.active::before { left: -10px; width: 5px; }
  .sidebar { grid-column: 2; grid-row: 1; min-height: 0; }
  .main { grid-column: 1 / -1; grid-row: 1; min-height: 0; }
  .main { display: none; }
  body.m-main .sidebar, body.m-main .servers { display: none; }
  body.m-main .main { display: flex; }
  .m-only { display: inline-block; }
  .members { display: block; position: fixed; top: 0; right: 0; bottom: 0; width: 82vw; max-width: 320px; z-index: 25; transform: translateX(105%); transition: transform .2s; box-shadow: -8px 0 24px rgba(0,0,0,.5); }
  body.m-members .members { transform: none; }
  .channel, .voice-user, .member { padding-top: 9px; padding-bottom: 9px; }
  .ch-gear { opacity: .7; font-size: 18px; padding: 0 6px; }
  .voice-view { padding: 8px; }
  .stage.has { min-height: 45vh; }
  .tile, .stage.has + .tiles .tile { width: calc(50% - 6px); }
  .tile .avatar { width: 56px; height: 56px; font-size: 22px; }
  .msg-img { max-width: 100%; }
  .msg-del { display: block; opacity: .6; top: 0; }
  .user-menu { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-height: 80vh; border-radius: 14px 14px 0 0; padding: 16px 16px 24px; }
  .modal-card.wide { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .ss-roles { grid-template-columns: 1fr; }
  .ss-role-list { flex-direction: row; flex-wrap: wrap; }
  .composer { margin: 0 8px 12px; }
}

/* ---------- Faz 1: mesajlasma ---------- */
.text-view { position: relative; }
.msg { position: relative; }
.msg-actions { position: absolute; right: 16px; top: -14px; display: none; gap: 2px; background: var(--bg-sidebar); border: 1px solid #1e1f22; border-radius: 6px; padding: 2px; z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.msg:hover .msg-actions { display: flex; }
.msg-actions button { border: 0; background: transparent; color: var(--text); cursor: pointer; padding: 4px 7px; border-radius: 4px; font-size: 15px; }
.msg-actions button:hover { background: var(--bg-active); }
.msg-actions button.danger:hover { background: var(--red); }
.msg-reply { font-size: 13px; color: var(--text-muted); margin: 0 0 2px; padding-left: 8px; border-left: 2px solid var(--bg-active); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.msg-reply:hover { color: var(--text); }
.msg-reply b { color: var(--text); font-weight: 600; }
.msg.cont .msg-reply + * { margin-top: 0; }
.mention { background: rgba(88,101,242,.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.mention.me { background: rgba(250,166,26,.25); color: #fbd38d; }
.msg.mentioned { background: rgba(250,166,26,.08); box-shadow: inset 2px 0 0 #faa61a; }
.msg.mentioned:hover { background: rgba(250,166,26,.13); }
.msg-text a { color: #00a8fc; text-decoration: none; }
.msg-text a:hover { text-decoration: underline; }
.edited { font-size: 11px; color: var(--text-muted); }
.pin-ic { font-size: 12px; }
.msg-edit { width: 100%; box-sizing: border-box; background: var(--bg-input); color: var(--text); border: 0; border-radius: 6px; padding: 8px 10px; font: inherit; resize: none; outline: none; margin-top: 2px; }
.edit-hint { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.msg-video { max-width: min(480px, 100%); max-height: 320px; border-radius: 8px; margin-top: 4px; display: block; background: #000; }
.msg-audio { margin-top: 4px; display: block; max-width: 100%; }
.msg-file { display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; padding: 10px 12px; background: var(--bg-sidebar); border: 1px solid #1e1f22; border-radius: 8px; color: var(--text); text-decoration: none; max-width: 400px; }
.msg-file:hover { border-color: var(--blurple); }
.mf-ic { font-size: 26px; }
.mf-info { display: flex; flex-direction: column; min-width: 0; }
.mf-info b { color: #00a8fc; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-info small { color: var(--text-muted); font-size: 12px; }
.mf-dl { margin-left: auto; font-size: 18px; color: var(--text-muted); }
.reply-bar { margin: 0 16px; padding: 6px 12px; background: var(--bg-sidebar); border-radius: 8px 8px 0 0; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; }
.reply-bar span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar button { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 14px; }
.reply-bar:not(.hidden) + .composer { border-top-left-radius: 0; border-top-right-radius: 0; }
.mention-pop { position: absolute; left: 16px; right: 16px; bottom: 76px; background: var(--bg-sidebar); border: 1px solid #1e1f22; border-radius: 8px; padding: 6px; z-index: 5; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.mp-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.mp-item.sel, .mp-item:hover { background: var(--bg-active); }
.avatar.xs { width: 22px; height: 22px; font-size: 11px; }
.avatar.lg { width: 68px; height: 68px; font-size: 28px; }
.drop-hint { position: absolute; inset: 8px; border: 3px dashed var(--blurple); border-radius: 12px; background: rgba(49,51,56,.88); display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--text-strong); z-index: 10; pointer-events: none; }
.new-divider { display: flex; align-items: center; margin: 12px 16px 0; border-top: 1px solid var(--red); height: 0; justify-content: flex-end; }
.new-divider span { background: var(--red); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 3px; transform: translateY(-50%); }
.load-more { text-align: center; color: var(--text-muted); font-size: 13px; padding: 8px; }
.flash { animation: flash 1.8s ease-out; }
@keyframes flash { 0%, 30% { background: rgba(88,101,242,.35); } 100% { background: transparent; } }
.hdr-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.hdr-tools.hidden { display: none; }
.hdr-tools .hdr-btn { font-size: 17px; }
.search-input { width: 160px; background: var(--bg-servers); border: 0; border-radius: 4px; padding: 5px 8px; color: var(--text); font: inherit; font-size: 13px; font-weight: 400; outline: none; transition: width .15s; }
.search-input:focus { width: 240px; }
.side-panel { position: fixed; top: 48px; right: 0; bottom: 0; width: 380px; max-width: 100vw; background: var(--bg-sidebar); border-left: 1px solid #1e1f22; z-index: 8; display: flex; flex-direction: column; box-shadow: -4px 0 16px rgba(0,0,0,.3); }
.sp-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #1e1f22; gap: 8px; }
.sp-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); }
.sp-body { flex: 1; overflow-y: auto; padding: 8px; }
.sp-item { background: var(--bg-main); border-radius: 6px; margin-bottom: 8px; padding: 4px 0 8px; cursor: pointer; }
.sp-item:hover { outline: 1px solid var(--blurple); }
.sp-item .msg { margin-top: 4px; padding: 2px 10px; gap: 10px; }
.sp-item .msg:hover { background: transparent; }
.sp-item .msg-img, .sp-item .msg-video { max-width: 100%; max-height: 160px; }
.sp-ch { font-size: 11px; font-weight: 700; color: var(--text-muted); padding: 2px 10px; }
.server-icon.dm-home { font-size: 22px; }
.server-icon.dm-home.active, .server-icon.dm-home:hover { background: var(--blurple); }
.server-header.no-menu { cursor: default; }
.server-header.no-menu .chev { display: none; }
.dm-row { gap: 10px; padding: 5px 8px; }
.dm-row .ch-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-empty { padding: 8px; }
.badge-count { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; padding: 0 4px; text-align: center; margin-left: auto; box-sizing: border-box; }
.srv-badge { position: absolute; right: -4px; bottom: -4px; margin: 0; border: 3px solid var(--bg-servers); height: 22px; line-height: 16px; border-radius: 11px; }
.channel.unread { color: var(--text-strong); font-weight: 600; }
.channel.unread:not(.active)::before { content: ""; position: absolute; left: -8px; width: 4px; height: 8px; background: #fff; border-radius: 0 4px 4px 0; }
.channel { position: relative; }
.server-icon.unread:not(.active)::before { content: ""; position: absolute; left: -16px; width: 8px; height: 8px; background: #fff; border-radius: 0 4px 4px 0; }
.chk-row { display: flex !important; align-items: center; gap: 8px; text-transform: none; font-weight: 400; font-size: 14px; color: var(--text); margin: 6px 0 !important; cursor: pointer; }
@media (max-width: 700px) {
  .search-input { width: 90px; } .search-input:focus { width: 140px; }
  .side-panel { width: 100vw; }
  .msg-actions { top: -10px; right: 8px; }
}

/* ---------- Faz 2: profil, durum, seviye ---------- */
.avatar.has-img { background-size: cover !important; background-position: center !important; color: transparent; }
.avatar { position: relative; }
.avatar.clickable, .msg-name.clickable { cursor: pointer; }
.msg-name.clickable:hover { text-decoration: underline; }
.avatar.online-dot::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); border: 3px solid var(--bg-sidebar); }
.avatar.online-dot.st-idle::after { background: #f0b232; }
.avatar.online-dot.st-dnd::after { background: #f23f43; }
.avatar.online-dot.st-invisible::after { background: #80848e; }
.user-panel .avatar.online-dot::after { border-color: var(--bg-panel); }
#meAvatar, .up-names { cursor: pointer; }
.up-tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-ic { display: inline-block; position: relative; width: 10px; height: 10px; margin-right: 8px; vertical-align: middle; }
.st-ic.online-dot::after { right: 0; bottom: 0; width: 10px; height: 10px; border: 0; }
.pcard { margin: -12px -12px 8px; border-radius: 8px 8px 0 0; overflow: hidden; position: relative; }
.pc-banner { height: 60px; }
.pc-av { position: absolute; left: 14px; top: 22px; width: 72px; height: 72px; font-size: 30px; border: 5px solid #111214; box-sizing: content-box; }
.pc-av.online-dot::after { width: 14px; height: 14px; border: 4px solid #111214; right: 0; bottom: 0; }
.pc-body { padding: 44px 14px 4px; }
.pc-name { font-size: 18px; font-weight: 700; color: var(--text-strong); display: flex; align-items: center; gap: 6px; }
.pc-status { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pc-stext { font-size: 13px; margin-top: 8px; color: var(--text); word-break: break-word; }
.pc-sec { font-size: 11px; font-weight: 800; color: var(--text-muted); margin: 12px 0 4px; letter-spacing: .02em; }
.pc-about { font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.pc-level { font-size: 12px; }
.pc-lv-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.pc-lv-top b { color: var(--text-strong); }
.pc-lv-top span { color: var(--text-muted); }
.pc-bar { height: 6px; background: var(--bg-active); border-radius: 3px; overflow: hidden; }
.pc-bar > div { height: 100%; background: linear-gradient(90deg, var(--blurple), #eb459e); border-radius: 3px; }
.pc-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.pc-role { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-sidebar); border-radius: 4px; padding: 2px 6px; font-size: 12px; }
.pc-dates { font-size: 12px; color: var(--text); }
.user-menu { width: 280px; }
.pe-about { resize: vertical; font: inherit; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; cursor: pointer; }
.lb-row:hover { background: var(--bg-hover); }
.lb-row.me { background: rgba(88,101,242,.15); }
.lb-rank { width: 28px; text-align: center; font-weight: 800; color: var(--text-muted); font-size: 16px; }
.lb-info { flex: 1; min-width: 0; }
.lb-info b { display: block; margin-bottom: 4px; color: var(--text-strong); }

/* ---------- Faz 3: zaman asimi ---------- */
.composer.locked { opacity: .6; }
.composer.locked input { cursor: not-allowed; }
.composer.locked .attach { pointer-events: none; }
.ban-tag.to-tag { background: #f0b232; color: #111; }

/* ---------- Faz 4: yan yana yayinlar ---------- */
.stage.has { display: grid; gap: 8px; grid-template-columns: 1fr; grid-auto-rows: minmax(0, 1fr); }
.stage[data-n="2"] { grid-template-columns: 1fr 1fr; }
.stage[data-n="3"], .stage[data-n="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.stage-cell { position: relative; min-width: 0; min-height: 0; background: #000; border-radius: 8px; overflow: hidden; }
.stage-cell video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.stage-cell:fullscreen { border-radius: 0; }
.stage-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.stage-cell:hover .stage-tools { opacity: 1; }
.stage-tools button { border: 0; background: rgba(0,0,0,.65); color: #fff; width: 32px; height: 32px; border-radius: 6px; cursor: pointer; font-size: 16px; }
.stage-tools button:hover { background: var(--blurple); }
.tile-solo { position: absolute; top: 6px; right: 6px; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 4px; cursor: pointer; opacity: 0; transition: opacity .15s; z-index: 1; }
.tile.stream:hover .tile-solo { opacity: 1; }
.tile-solo:hover { background: var(--blurple); }
@media (max-width: 700px) {
  .stage[data-n="2"] { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .stage-tools { opacity: 1; }
}

/* ---------- Faz 5 ---------- */
.pc-game { font-size: 13px; margin-top: 8px; color: #23a55a; font-weight: 600; }
#deskOpts select.ss-input { width: auto; flex: 1; }

/* ---- Faz 6: anket, zar, yazi-tura, XO, kelime zinciri ---- */
.composer .poll-btn { order: 3; background: transparent; border: 0; width: 28px; font-size: 18px; margin-left: 4px; filter: grayscale(.4); }
.composer .poll-btn:hover { filter: none; }
.composer input { order: 2; }
.sp-card { margin-top: 4px; background: #2b2d31; border: 1px solid #1e1f22; border-left: 4px solid var(--blurple); border-radius: 8px; padding: 10px 12px; max-width: 420px; }
.sp-title { font-weight: 700; margin-bottom: 4px; word-break: break-word; }
.sp-sub { font-size: 13px; color: var(--muted, #b5bac1); margin: 4px 0; }
.sp-sub.hot { color: #57f287; font-weight: 700; }
.sp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted, #b5bac1); margin-top: 6px; }
.sp-btn { background: #4e5058; color: #fff; border: 0; border-radius: 4px; padding: 6px 10px; cursor: pointer; font-size: 13px; }
.sp-btn:hover { background: #6d6f78; }
.sp-zar { border-left-color: #fee75c; }
.sp-dice { display: flex; flex-wrap: wrap; gap: 6px; }
.die { min-width: 38px; height: 38px; padding: 0 6px; display: grid; place-items: center; background: #f2f3f5; color: #111; border-radius: 8px; font-weight: 800; font-size: 18px; box-shadow: inset 0 -3px 0 #c4c9ce; }
.sp-yazitura { border-left-color: #f0b232; }
.sp-coin { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #4a3300; background: radial-gradient(circle at 35% 35%, #ffe08a, #d4a017); box-shadow: inset 0 0 0 4px #b8860b; animation: coinflip .6s ease-out; }
.sp-coin.tura { background: radial-gradient(circle at 35% 35%, #e8e8e8, #a0a0a0); box-shadow: inset 0 0 0 4px #808080; color: #222; }
@keyframes coinflip { from { transform: rotateY(720deg) scale(.6); } to { transform: none; } }
.sp-anket { border-left-color: #57f287; }
.poll-opt { position: relative; display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 4px 0; padding: 8px 10px; border: 1px solid #3f4147; border-radius: 6px; background: #1e1f22; color: var(--text); cursor: pointer; overflow: hidden; text-align: left; font-size: 14px; }
.poll-opt:not(:disabled):hover { border-color: var(--blurple); }
.poll-opt:disabled { cursor: default; opacity: 1; color: var(--text); }
.poll-opt.mine { border-color: var(--blurple); }
.poll-opt.win { border-color: #57f287; }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: rgba(88, 101, 242, .3); transition: width .3s; }
.poll-opt.win .poll-bar { background: rgba(87, 242, 135, .25); }
.poll-t, .poll-n { position: relative; }
.poll-n { font-size: 12px; color: var(--muted, #b5bac1); margin-left: 10px; white-space: nowrap; }
.poll-edit input { margin-bottom: 6px; }
.sp-xo { border-left-color: #eb459e; }
.xo-grid { display: grid; grid-template-columns: repeat(3, 56px); gap: 4px; margin: 6px 0; }
.xo-cell { width: 56px; height: 56px; border: 0; border-radius: 6px; background: #1e1f22; font-size: 26px; cursor: pointer; }
.xo-cell:not(:disabled):hover { background: #3f4147; }
.xo-cell:disabled { cursor: default; opacity: 1; color: inherit; }
.xo-cell.win { background: rgba(87, 242, 135, .3); }
.sp-kelime { border-left-color: #00a8fc; max-width: 520px; }
.kz-chain { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.kz-w { background: #1e1f22; padding: 2px 8px; border-radius: 10px; font-size: 13px; }
.kz-w.mine { background: rgba(88, 101, 242, .35); }
.kz-w:not(:last-child)::after { content: ' →'; color: #6d6f78; }
.kz-scores { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; margin: 4px 0; }
.kz-row { display: flex; gap: 6px; margin-top: 6px; }
.kz-input { flex: 1; min-width: 0; padding: 6px 8px; background: #1e1f22; color: var(--text); border: 1px solid #3f4147; border-radius: 4px; outline: none; }
.kz-input:focus { border-color: var(--blurple); }
/* ---- otomatik arayuz guncellemesi ---- */
.update-bar { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; align-items: center; gap: 12px; background: var(--blurple); color: #fff; padding: 6px 8px 6px 14px; border-radius: 0 0 8px 8px; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.update-bar button { background: #fff; color: var(--blurple); border: 0; border-radius: 4px; padding: 5px 10px; font-weight: 700; cursor: pointer; }