/* Muhabbet - tema degiskenleri */
:root {
  --bg: #0f1220; --bg2: #161a2e; --bg3: #1e2340; --bg4: #2a3058; --rail: #0a0c18;
  --line: #2b3157; --text: #eef0ff; --dim: #9aa2cc;
  --accent: #ffb23e; --accent2: #ff6b8b; --accent-ink: #231200;
  --ok: #3ddc97; --bad: #ff5d6c; --link: #7cc4ff; --stage: #06070f;
  --grad: linear-gradient(135deg, var(--accent), var(--accent2));
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --r: 12px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f4fb; --bg2: #ffffff; --bg3: #efecf8; --bg4: #e1dcf2; --rail: #e9e5f5;
  --line: #d9d3ec; --text: #1c1a2e; --dim: #6a6688;
  --accent: #f08a00; --accent2: #ec4374; --accent-ink: #ffffff;
  --ok: #109e63; --bad: #d93a4c; --link: #1766c2; --stage: #1b1a2a;
  --shadow: 0 10px 30px rgba(60, 40, 120, .16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--bg3); border-radius: 10px; padding: 7px 13px; font-weight: 700; transition: transform .12s, background .15s, filter .15s, border-color .15s; }
button:hover { background: var(--bg4); }
button:active { transform: scale(.96); }
button.primary { background: var(--grad); color: var(--accent-ink); border-color: transparent; }
button.primary:hover { filter: brightness(1.1); background: var(--grad); }
button.ghost { background: transparent; }
button.ghost:hover { background: var(--bg3); }
button.danger, button.on { background: var(--bad); border-color: transparent; color: #fff; }
button.live { background: var(--ok); border-color: transparent; color: #04170e; }
button.mini { padding: 3px 9px; font-size: 13px; border-radius: 8px; }
button.icon { padding: 4px 7px; font-size: 16px; border-color: transparent; }
input, select { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Giris */
.auth { min-height: 100%; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(600px 400px at 15% 10%, rgba(255, 178, 62, .22), transparent 70%), radial-gradient(600px 420px at 90% 90%, rgba(255, 107, 139, .22), transparent 70%), var(--bg); }
.card { width: min(390px, 100%); background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 30px; display: grid; gap: 12px; box-shadow: var(--shadow); }
.card h1 { margin: 0; font-size: 34px; font-weight: 900; letter-spacing: 2px; display: flex; align-items: center; gap: 12px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card h1 .logo { width: 46px; height: 46px; border-radius: 12px; }
.sub { margin: 0 0 6px; color: var(--dim); }
label { display: grid; gap: 5px; font-size: 13px; color: var(--dim); font-weight: 700; }
.err { color: var(--bad); margin: 0; min-height: 1.2em; font-size: 13px; }

/* Ana duzen */
.app { height: 100%; display: grid; grid-template-columns: 72px 256px minmax(0, 1fr) 260px; }
.app.nopanel { grid-template-columns: 72px 256px minmax(0, 1fr); }
.app.nopanel #panel { display: none; }

#rail { background: var(--rail); padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; overflow-y: auto; }
.gbtn { width: 48px; height: 48px; border-radius: 50%; padding: 0; font-weight: 800; background: var(--bg3); border: 0; flex: none; overflow: hidden; display: inline-grid; place-items: center; transition: border-radius .2s, transform .15s, box-shadow .2s; }
.gbtn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gbtn:hover { border-radius: 16px; transform: translateY(-2px); }
.gbtn.sel { border-radius: 16px; box-shadow: 0 0 0 3px var(--accent); }
.gbtn.add { color: var(--ok); font-size: 24px; background: transparent; border: 2px dashed var(--line); }

#side { background: var(--bg2); display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
#groupHead { padding: 14px; border-bottom: 1px solid var(--line); }
#groupHead h2 { margin: 0 0 8px; font-size: 17px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--dim); flex-wrap: wrap; }
code { color: var(--accent); font-size: 13px; letter-spacing: 1px; font-weight: 800; }
#channels { flex: 1; overflow-y: auto; padding: 8px; }
.sect { display: flex; justify-content: space-between; align-items: center; color: var(--dim); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; margin: 14px 6px 6px; }
.ch { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--dim); padding: 7px 9px; border-radius: 9px; font-weight: 600; }
.ch:hover { background: var(--bg3); color: var(--text); }
.ch.sel { background: var(--bg4); color: var(--text); }
.ch.unread { color: var(--text); font-weight: 800; }
.ch.unread::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent2); flex: none; }
.ch .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch .del { display: none; color: var(--dim); padding: 0 2px; }
.ch:hover .del { display: inline; }
.ch .del:hover { color: var(--text); }
.vuser { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 28px; font-size: 13px; color: var(--dim); }
.vuser .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bg4); flex: none; transition: box-shadow .12s, background .12s; }
.vuser.speaking .dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 30%, transparent); }
.vuser.speaking { color: var(--text); }
.vuser .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 10px; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-weight: 800; }
.tag.live { color: #fff; background: var(--bad); border-color: transparent; }

#voiceBar { border-top: 1px solid var(--line); padding: 10px; background: var(--bg3); }
#voiceInfo { font-size: 12px; font-weight: 800; color: var(--ok); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#voiceInfo::before { content: '● '; }
.vbtns { display: flex; gap: 6px; justify-content: space-between; }
.vbtns .ibtn { flex: 1; background: var(--bg2); }
.vbtns .ibtn.on, .vbtns .ibtn.danger { background: var(--bad); }
.vbtns .ibtn.live { background: var(--ok); }
#userBar { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#userBar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#userBar .mine { display: flex; align-items: center; gap: 9px; min-width: 0; background: transparent; border: 0; padding: 2px; text-align: left; }
#userBar .mine:hover .av { box-shadow: 0 0 0 2px var(--accent); }

main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
#chatHead { min-height: 58px; padding: 9px 18px; border-bottom: 1px solid var(--line); font-weight: 900; font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Ekran paylasimi */
#stage { background: var(--stage); border-bottom: 1px solid var(--line); padding: 10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; max-height: 62vh; overflow: auto; }
.tile { position: relative; background: #000; border-radius: var(--r); overflow: hidden; flex: 1 1 360px; }
.tile video { width: 100%; max-height: 56vh; display: block; object-fit: contain; }
.tile span { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, .72); color: #fff; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.tile.self { flex: 0 0 300px; cursor: default; border: 2px solid var(--ok); }
.tile.self video { max-height: 180px; }
.tile.self span { top: 8px; bottom: auto; }
.tile.self .stop { position: absolute; left: 8px; bottom: 8px; z-index: 2; }
.tile .fs { position: absolute; right: 8px; bottom: 8px; z-index: 2; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .65); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 10px; }
.tile .fs:hover { background: var(--accent); color: var(--accent-ink); }
.tile:fullscreen { border: 0; border-radius: 0; display: grid; place-items: center; background: #000; cursor: default; }
.tile:fullscreen { width: 100vw; height: 100vh; flex: none; }
.tile:fullscreen video { width: 100%; height: 100%; max-height: none; object-fit: contain; }
.tile.self.big { flex: 1 1 100%; }
.tile.self.big video { max-height: 56vh; }
.tile:fullscreen .fs { right: 18px; bottom: 18px; width: 46px; height: 46px; }

/* Mesajlar */
#messages { flex: 1; overflow-y: auto; padding: 14px 18px; }
.msg { padding: 6px 8px; margin: 0 -8px; overflow-wrap: anywhere; display: flex; gap: 11px; align-items: flex-start; border-radius: 10px; animation: pop .18s ease-out; }
.msg:hover { background: color-mix(in srgb, var(--bg3) 55%, transparent); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg .body { min-width: 0; flex: 1; }
.msg .who { font-weight: 800; color: var(--accent); margin-right: 8px; }
.msg .who.me { color: var(--accent2); }
.msg time { color: var(--dim); font-size: 11px; }
.msg .tx { white-space: pre-wrap; }
.msg a { color: var(--link); }
.empty { color: var(--dim); text-align: center; margin-top: 15vh; padding: 0 20px; font-weight: 600; }
#composer { display: flex; gap: 8px; padding: 12px 18px 16px; }
#composer button { flex: none; }
#composer input { border-radius: 22px; padding-left: 16px; }
#composer .primary { border-radius: 22px; }
#btnEmoji, #btnRec { border-radius: 50%; width: 40px; height: 40px; padding: 0; }
#btnRec.on { width: auto; border-radius: 22px; padding: 0 12px; min-width: 84px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 30%, transparent); } }
#btnSticker { border-radius: 22px; }

.av { border-radius: 50%; flex: none; object-fit: cover; display: inline-grid; place-items: center; font-weight: 800; color: #fff; background: var(--bg4); overflow: hidden; }

/* Emoji / cikartma */
#picker { position: absolute; left: 18px; right: 18px; bottom: 74px; max-height: 300px; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 10px; z-index: 10; box-shadow: var(--shadow); display: grid; gap: 4px; animation: pop .15s ease-out; }
#picker.emoji { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
#picker.emoji button { border: 0; background: transparent; font-size: 23px; padding: 4px; }
#picker.emoji button:hover { background: var(--bg4); transform: scale(1.2); }
#picker.stickers { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; justify-items: center; }
#picker.stickers button { border: 0; background: transparent; padding: 4px; position: relative; }
#picker.stickers button:hover { background: var(--bg3); transform: translateY(-3px) rotate(2deg); }
#picker .ptitle { grid-column: 1 / -1; justify-self: start; color: var(--dim); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; margin: 4px 4px 0; }
#picker.stickers .addst { width: 96px; height: 96px; border: 2px dashed var(--line); border-radius: 22px; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--dim); font-size: 12px; margin: 8px 4px; }
#picker .addst .plus { font-size: 30px; line-height: 1; color: var(--ok); }
#picker .custom .rm { position: absolute; top: 0; right: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--bad); color: #fff; font-size: 12px; display: none; place-items: center; }
#picker .custom:hover .rm { display: grid; }
.sticker { width: 96px; height: 96px; border-radius: 24px; display: grid; place-items: center; align-content: center; gap: 2px; transform: rotate(-3deg); border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 4px 0 rgba(0, 0, 0, .3); margin: 4px 0; }
.sticker .e { font-size: 40px; line-height: 1; }
.sticker .c { font-size: 12px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); text-align: center; padding: 0 4px; }
.simg { max-width: 130px; max-height: 130px; display: block; margin: 4px 0; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
#picker .simg { width: 92px; height: 92px; object-fit: contain; margin: 4px 0; }

/* Sesli mesaj */
.vmsg { display: flex; width: fit-content; align-items: center; gap: 10px; background: var(--bg3); border: 1px solid var(--line); border-radius: 24px; padding: 5px 14px 5px 5px; margin-top: 4px; }
.vmsg button { width: 36px; height: 36px; border-radius: 50%; padding: 0; background: var(--grad); color: var(--accent-ink); border: 0; }
.vmsg .wave { width: 96px; height: 18px; background: repeating-linear-gradient(90deg, var(--dim) 0 2px, transparent 2px 5px); border-radius: 2px; opacity: .6; }
.vmsg.playing .wave { background: repeating-linear-gradient(90deg, var(--ok) 0 2px, transparent 2px 5px); opacity: 1; }
.vmsg span.d { font-size: 12px; color: var(--dim); font-weight: 700; }

/* Sag panel */
#panel { background: var(--bg2); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
#members { padding: 8px; overflow-y: auto; flex: 1; }
.mem { display: flex; align-items: center; gap: 9px; padding: 6px 8px; position: relative; border-radius: 10px; }
.mem:hover { background: var(--bg3); }
.mem.off { opacity: .55; }
.mem .pres { position: absolute; left: 29px; top: 26px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg2); background: #7a7f99; }
.mem.on .pres { background: var(--ok); }
.mem .who2 { min-width: 0; flex: 1; }
.mem .who2 b { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem .st { font-size: 11px; color: var(--dim); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem .acts { display: flex; gap: 4px; flex: none; flex-wrap: wrap; justify-content: flex-end; max-width: 110px; }
.addf { display: flex; gap: 6px; padding: 4px; }
.addf input { padding: 7px 11px; }
.hint { color: var(--dim); font-size: 12px; padding: 4px 8px; margin: 0; }

/* Pencereler */
dialog { background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 18px; padding: 22px; width: min(460px, 94vw); box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; }
dialog::backdrop { background: rgba(5, 6, 15, .65); backdrop-filter: blur(3px); }
dialog form, .settings { display: grid; gap: 14px; }
dialog h3 { margin: 0; font-weight: 900; font-size: 19px; }
dialog .row { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
dialog .row.left { justify-content: flex-start; }
.settings section { display: grid; gap: 10px; background: var(--bg3); border-radius: 14px; padding: 14px; }
.settings section button:not(.primary):not(.ghost) { background: var(--bg2); }
.settings h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--dim); }
.settings .check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); font-weight: 600; }
.settings .row.left input { flex: 1; min-width: 140px; width: auto; }
.settings span.gbtn { cursor: default; background: var(--bg4); }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--bg4); border: 1px solid var(--line); padding: 10px 18px; border-radius: 22px; z-index: 50; max-width: 90vw; font-weight: 700; box-shadow: var(--shadow); }
#conn { position: fixed; top: 0; left: 0; right: 0; background: var(--bad); color: #fff; text-align: center; padding: 4px; font-size: 13px; font-weight: 700; z-index: 60; }

@media (max-width: 900px) {
  .app, .app.nopanel { grid-template-columns: 58px 196px minmax(0, 1fr); }
  #panel { position: fixed; top: 0; right: 0; bottom: 0; width: 264px; z-index: 20; box-shadow: var(--shadow); }
  .gbtn { width: 42px; height: 42px; }
}
@media (max-width: 560px) {
  .app, .app.nopanel { grid-template-columns: 52px 142px minmax(0, 1fr); }
  #btnSticker { display: none; }
  #composer { padding: 10px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Secici sekmeleri */
#picker { padding-top: 0; }
#picker .ptabs { grid-column: 1 / -1; justify-self: stretch; display: flex; gap: 4px; overflow-x: auto; position: sticky; top: 0; background: var(--bg2); padding: 10px 0 8px; z-index: 2; }
#picker .ptabs button { flex: none; font-size: 13px; padding: 5px 11px; border-radius: 16px; background: var(--bg3); border: 1px solid var(--line); transform: none; white-space: nowrap; }
#picker .ptabs button:hover { background: var(--bg4); transform: none; }
#picker .ptabs button.sel { background: var(--grad); color: var(--accent-ink); border-color: transparent; }
.ch .lock { font-size: 11px; opacity: .8; }

/* Simge dugmeleri */
.ibtn { width: 40px; height: 40px; padding: 0; border-radius: 12px; display: inline-grid; place-items: center; flex: none; }
.ibtn svg { display: block; }
.ibtn.sel { background: var(--bg4); border-color: var(--accent); }
.ibtn.live { background: var(--ok); color: #04170e; border-color: transparent; }
.ibtn.ghost { border-color: transparent; }
.ibtn.big { width: 52px; height: 52px; border-radius: 50%; }
.ibtn.big svg { width: 24px; height: 24px; }
#chatTitle { display: flex; align-items: center; gap: 10px; min-width: 0; }
#chatTitle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#chatTitle small { color: var(--dim); font-weight: 600; font-size: 12px; }
#chatActs { display: flex; gap: 6px; flex: none; }

/* Sol ray: ana dugme ve okunmamis isareti */
.gbtn { position: relative; overflow: visible; }
.gbtn img { border-radius: inherit; }
.gbtn.home { background: transparent; border-radius: 16px; }
.gbtn.dot::after { content: ''; position: absolute; right: -2px; top: -2px; width: 13px; height: 13px; border-radius: 50%; background: var(--bad); border: 3px solid var(--rail); }
#rail .sep { width: 30px; height: 2px; background: var(--line); border-radius: 2px; flex: none; }

/* Arkadas listesi */
#groupHead .addf { padding: 0; }
.ch.friend { padding: 6px 8px; gap: 10px; }
.ch.friend .avwrap { position: relative; flex: none; display: inline-flex; }
.ch.friend .pres { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg2); background: #7a7f99; }
.ch.friend.on .pres { background: var(--ok); }
.ch.friend.off { opacity: .6; }
.ch.friend .nm b { display: block; color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.ch.friend .st { display: block; font-size: 11px; color: var(--dim); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

/* Arama karolari */
.tile.person { flex: 0 0 170px; height: 150px; display: grid; place-items: center; align-content: center; gap: 10px; background: var(--bg3); cursor: default; }
.tile.person span { position: static; background: none; color: var(--text); font-size: 14px; }
.tile.person .av { transition: box-shadow .12s; }
.tile.person.speaking .av { box-shadow: 0 0 0 4px var(--ok); }
.tile.cam { flex: 1 1 280px; max-width: 560px; }
.tile.cam video { max-height: 44vh; object-fit: cover; }
.tile.cam.mirror { flex: 0 0 220px; }
.tile.cam.mirror video { transform: scaleX(-1); max-height: 150px; }

/* Gelen arama */
#ring, #invite { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 12px 16px; box-shadow: var(--shadow); min-width: min(360px, 92vw); animation: ringin .25s ease-out, ringglow 1.4s infinite; }
#invite { top: 96px; animation: ringin .25s ease-out; }
.callbox .who2 { flex: 1; min-width: 0; }
.callbox .who2 b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.callbox .st { color: var(--dim); font-size: 13px; }
#ring .who2 { flex: 1; min-width: 0; }
#ring .who2 b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ring .st { color: var(--dim); font-size: 13px; }
@keyframes ringin { from { opacity: 0; transform: translate(-50%, -14px); } }
@keyframes ringglow { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 28%, transparent), var(--shadow); } }

.tile.person .av { position: static; padding: 0; border-radius: 50%; color: #fff; font-size: 34px; }
#groupHead .addf input { font-size: 13px; }

/* --- Surum 2 --- */
#btnGif { border-radius: 22px; font-size: 12px; font-weight: 900; padding: 0 11px; }
#btnAttach { border-radius: 50%; }
#composer { align-items: center; }
#composer > button { height: 40px; }
.msg .av.click, .who[role=button], .mem.click, .vuser[role=button] { cursor: pointer; }
.who[role=button]:hover { text-decoration: underline; }
.photo { max-width: min(340px, 100%); max-height: 300px; border-radius: 12px; display: block; margin-top: 4px; cursor: zoom-in; }
.gif { max-width: min(300px, 100%); max-height: 260px; border-radius: 12px; display: block; margin-top: 4px; }
.file { display: inline-flex; align-items: center; gap: 10px; background: var(--bg3); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px 8px 10px; margin-top: 4px; text-decoration: none; color: var(--text); max-width: 100%; }
.file:hover { border-color: var(--accent); }
.file .fi { font-size: 26px; }
.file .who2 { min-width: 0; }
.file b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.file .st { font-size: 11px; color: var(--dim); }
.viewer { display: grid; gap: 12px; }
.viewer img { max-width: 100%; max-height: 72vh; border-radius: 10px; justify-self: center; }
dialog:has(.viewer) { width: min(900px, 96vw); }
.btnlike { border: 1px solid var(--line); background: var(--bg3); border-radius: 10px; padding: 7px 13px; font-weight: 700; color: var(--text); text-decoration: none; }

/* Acilir menu */
#menu { position: fixed; z-index: 90; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); min-width: 220px; display: grid; gap: 2px; }
#menu .mhead { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
#menu .mi { text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; font-weight: 600; }
#menu .mi:hover { background: var(--bg4); }
#menu .mi.bad { color: var(--bad); }
#menu .mvol { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 6px 10px; color: var(--text); font-size: 13px; }
#menu .mvol input { grid-column: 1 / 2; padding: 0; }
input[type=range] { padding: 0; accent-color: var(--accent); background: transparent; border: 0; }

/* Katlanir basliklar ve arkadas satiri */
.sect.fold { cursor: pointer; user-select: none; }
.sect.fold:hover { color: var(--text); }
.ibtn.mini2 { width: 30px; height: 30px; border-radius: 9px; }
.ibtn.mini2 svg { width: 16px; height: 16px; }
.ch.friend { cursor: pointer; }

/* Ayarlar sekmeleri */
dialog:has(.settings.wide) { width: min(620px, 96vw); }
.stabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.stabs button { border: 0; background: transparent; color: var(--dim); padding: 7px 12px; border-radius: 10px; }
.stabs button:hover { background: var(--bg3); color: var(--text); }
.stabs button.sel { background: var(--grad); color: var(--accent-ink); }
.sbody { display: grid; gap: 12px; max-height: 62vh; overflow-y: auto; padding-right: 2px; }
.settings select { background: var(--bg2); }
.settings section > label { color: var(--dim); }
.meter { position: relative; height: 14px; background: var(--bg2); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--dim); transition: width .08s linear; }
.meter i.open { background: var(--ok); }
.meter b { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--accent2); }
.ver { margin: 0; font-weight: 900; font-size: 18px; color: var(--accent); }
.grow1 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.row.center { justify-content: center; }

/* Grup penceresi */
.gbody { display: grid; gap: 12px; }
.gbody form { display: grid; gap: 12px; }
.glist { display: grid; gap: 4px; max-height: 46vh; overflow-y: auto; }
.grow { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: var(--bg3); padding: 8px 10px; border-radius: 12px; }
.grow:hover { background: var(--bg4); }
.grow .who2 { flex: 1; min-width: 0; }
.grow .who2 b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow .st { font-size: 12px; color: var(--dim); }
.grow .gbtn { width: 38px; height: 38px; font-size: 13px; }

/* Profil */
.profile { display: grid; gap: 8px; justify-items: center; text-align: center; }
.profile h3 { font-size: 22px; }
.profile .bio { margin: 0; max-width: 340px; overflow-wrap: anywhere; }
.profile .pstat { margin: 0; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.pdot { width: 10px; height: 10px; border-radius: 50%; background: #7a7f99; }
.pdot.on { background: var(--ok); }
.profile .row { width: 100%; }

/* Yayin karti ve karo denetimleri */
.tile.offer { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; background: var(--bg3); padding: 12px 14px; cursor: default; border: 1px solid var(--line); }
.tile.offer .who2 small { display: block; color: var(--dim); }
.tile.offer .av { position: static; }
.tile .tbar { position: absolute; left: 8px; top: 8px; display: flex; align-items: center; gap: 6px; background: rgba(0, 0, 0, .65); border-radius: 10px; padding: 4px 8px; opacity: 0; transition: opacity .15s; }
.tile:hover .tbar, .tile:hover .tclose, .tile:focus-within .tbar { opacity: 1; }
.tile .tbar .spk { position: static; background: none; padding: 0; font-size: 13px; }
.tile .tbar input { width: 110px; }
.tile .tclose { position: absolute; right: 8px; top: 8px; width: 34px; height: 34px; background: rgba(0, 0, 0, .65); color: #fff; border-color: rgba(255, 255, 255, .25); opacity: 0; transition: opacity .15s; }
.tile .tclose:hover { background: var(--bad); }
@media (hover: none) { .tile .tbar, .tile .tclose { opacity: 1; } }

/* GIF secici */
#picker.gifs { display: block; padding: 10px; }
.gifbar { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.gifbar input { flex: 1; padding: 7px 11px; }
.gifgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.gifgrid button { border: 0; padding: 0; background: var(--bg3); border-radius: 10px; overflow: hidden; height: 100px; }
.gifgrid img { width: 100%; height: 100%; object-fit: cover; display: block; }
#btnLang { justify-self: center; }
@media (max-width: 700px) { #btnGif, #btnSticker { display: none; } }

/* --- Surum 4: daha derli toplu ve dengeli duzen --- */
body { font-size: 14px; }
.app { grid-template-columns: 68px 244px minmax(0, 1fr) 244px; }
.app.nopanel { grid-template-columns: 68px 244px minmax(0, 1fr); }
#groupHead { padding: 12px; display: grid; gap: 8px; }
#groupHead h2 { margin: 0; font-size: 16px; }
.ghead { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ghead h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.codechip { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border-radius: 10px; background: var(--bg3); border: 1px dashed var(--line); font-weight: 600; font-size: 12px; color: var(--dim); }
.codechip code { flex: 1; text-align: left; font-size: 13px; }
.codechip .cp { font-size: 11px; opacity: .8; }
.codechip:hover { border-color: var(--accent); color: var(--text); }
#channels { padding: 6px 8px 10px; }
.sect { margin: 14px 6px 4px; }
.ch { padding: 6px 9px; }
.vuser { padding: 3px 8px 3px 30px; border-radius: 8px; }
.vuser:hover { background: var(--bg3); }

/* Mesajlar: daha kompakt */
#chatHead { min-height: 52px; padding: 8px 18px; font-size: 15px; }
#messages { padding: 12px 18px; }
.msg { padding: 4px 8px; gap: 10px; }
.msg .who { font-size: 14px; }
.msg .tx { line-height: 1.4; }
.sticker { width: 76px; height: 76px; border-radius: 19px; border-width: 2px; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); margin: 3px 0; }
.sticker .e { font-size: 30px; }
.sticker .c { font-size: 10px; }
#picker .sticker { width: 92px; height: 92px; border-radius: 22px; }
#picker .sticker .e { font-size: 38px; }
#picker .sticker .c { font-size: 12px; }
.simg { max-width: 104px; max-height: 104px; }
.photo { max-width: min(280px, 100%); max-height: 220px; }
.gif { max-width: min(240px, 100%); max-height: 200px; }
.vmsg { padding: 4px 12px 4px 4px; }
.vmsg button { width: 32px; height: 32px; }
#composer { padding: 10px 18px 14px; gap: 6px; }
#composer > button { height: 38px; }
#btnEmoji, #btnRec, #btnAttach { width: 38px; height: 38px; }

/* Sag panel */
#members { padding: 10px 8px; }
.ptitle2 { font-weight: 900; font-size: 15px; padding: 4px 8px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.mem { padding: 5px 8px; }
.mem .acts { max-width: none; }

/* ---------- Surum 5: okunmamis sayilari, durum, mesaj islemleri ---------- */
.ch.unread::after { content: attr(data-n); width: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.gbtn.dot::after { content: attr(data-n); width: auto; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; color: #fff; font-size: 11px; font-weight: 800; line-height: 14px; text-align: center; box-sizing: border-box; right: -5px; top: -5px; }
.ch.friend.dnd .pres, .mem.dnd .pres, #userBar .mine.dnd .pres, .pdot.dnd { background: var(--bad); }
#userBar .mine { flex: 1; }
#userBar .mine .avwrap { position: relative; flex: none; display: inline-flex; }
#userBar .mine .pres { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg2); background: var(--ok); }
#userBar .mine.inv .pres { background: #7a7f99; }
#userBar .mine .nm { display: grid; min-width: 0; line-height: 1.2; }
#userBar .mine .st { color: var(--dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pstext { margin: 0; font-weight: 600; }
#typing { min-height: 18px; padding: 0 22px; font-size: 12px; color: var(--dim); font-style: italic; }
#replyBar { display: flex; align-items: center; gap: 8px; margin: 2px 18px 0; padding: 6px 10px; border-radius: 10px 10px 0 0; background: var(--bg3); border-left: 3px solid var(--accent); font-size: 13px; }
#replyBar .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg { position: relative; }
.msg .mact { position: absolute; right: 10px; top: -12px; display: none; gap: 2px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 2px; box-shadow: var(--shadow); z-index: 2; }
.msg:hover .mact, .msg:focus-within .mact { display: flex; }
.msg .mact button { border: 0; background: transparent; padding: 3px 7px; border-radius: 7px; font-size: 15px; line-height: 1.2; }
.msg .mact button:hover { background: var(--bg4); }
.msg .edited { color: var(--dim); font-size: 11px; margin-left: 6px; }
.msg .quote { color: var(--dim); font-size: 12.5px; border-left: 3px solid var(--line); padding: 1px 8px; margin: 2px 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.msg .quote:hover { color: var(--text); border-left-color: var(--accent); }
.msg.flash { background: color-mix(in srgb, var(--accent) 22%, transparent); transition: background .3s; }
.rxs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rx { border: 1px solid var(--line); background: var(--bg3); border-radius: 12px; padding: 1px 8px; font-size: 14px; display: inline-flex; gap: 5px; align-items: center; }
.rx span { font-size: 12px; font-weight: 800; color: var(--dim); }
.rx.mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.rx.mine span { color: var(--text); }
#menu .qrx { display: flex; gap: 2px; }
#menu .qrx button { border: 0; background: transparent; font-size: 20px; padding: 5px 7px; border-radius: 8px; }
#menu .qrx button:hover { background: var(--bg4); }
#menu .msep { color: var(--dim); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; padding: 8px 10px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
#composer input:disabled { opacity: .6; }
@media (hover: none) { .msg .mact { display: flex; position: static; margin-left: auto; box-shadow: none; border: 0; background: transparent; opacity: .7; } }

/* ---------- Surum 6: arama, ozellestirme, cikartma hareketleri ve gorsel cila ---------- */
/* Arka plan ve paneller */
body { background: radial-gradient(1100px 600px at 0% -10%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%), radial-gradient(900px 600px at 110% 110%, color-mix(in srgb, var(--accent2) 7%, transparent), transparent 60%), var(--bg); }
.app { background: transparent; }
#rail { background: linear-gradient(180deg, var(--rail), color-mix(in srgb, var(--rail) 85%, var(--accent2))); box-shadow: inset -1px 0 0 var(--line); }
#side, #panel { background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: blur(8px); }
#chatHead { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(10px); position: relative; }
#chatHead::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 55%, transparent), color-mix(in srgb, var(--accent2) 55%, transparent), transparent); }
.gbtn { box-shadow: 0 4px 12px rgba(0, 0, 0, .25); transition: border-radius .2s, transform .15s, box-shadow .2s; }
.gbtn.sel { box-shadow: 0 0 0 3px var(--accent), 0 6px 20px color-mix(in srgb, var(--accent) 40%, transparent); }
.gbtn.home.sel { box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 45%, transparent); }
.ch { transition: background .15s, color .15s, transform .12s; position: relative; }
.ch:hover { transform: translateX(2px); }
.ch.sel { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, var(--bg3)), var(--bg3)); }
.ch.sel::before { content: ''; position: absolute; left: -6px; top: 7px; bottom: 7px; width: 4px; border-radius: 4px; background: var(--grad); }
.sect { letter-spacing: 1px; }
/* Grup basligi: ana sohbete donus */
.ghead .gname { cursor: pointer; display: flex; align-items: center; gap: 6px; border-radius: 8px; padding: 2px 4px; margin-left: -4px; transition: background .15s; }
.ghead .gname:hover { background: var(--bg3); }
.ghead .gname.cur { background: transparent; }
.hbadge { background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; border-radius: 9px; min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
/* Mesajlar */
#messages { transition: background .3s; }
.msg { border-radius: 12px; }
.msg:hover { background: color-mix(in srgb, var(--bg3) 60%, transparent); }
.msg .tx { font-size: var(--mfs, 15px); }
.msg .av { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.msg .who.me { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
#messages.wp .msg { background: color-mix(in srgb, var(--bg2) 55%, transparent); margin: 4px -8px; backdrop-filter: blur(3px); }
#messages.wp .msg:hover { background: color-mix(in srgb, var(--bg2) 75%, transparent); }
#messages.wp .empty { background: color-mix(in srgb, var(--bg2) 70%, transparent); border-radius: 14px; padding: 14px; width: fit-content; margin-left: auto; margin-right: auto; }
/* Yazma alani: yuzen kapsul */
#composer { margin: 0 14px 12px; padding: 8px 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
#composer > button:not(.primary) { border-color: transparent; background: transparent; }
#composer > button:not(.primary):hover { background: var(--bg3); }
#composer input { border-color: transparent; background: var(--bg3); }
#composer:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
#replyBar { margin: 2px 26px 0; }
button.primary { box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
button.primary:hover { box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 45%, transparent); }
/* Pencereler */
dialog { background: color-mix(in srgb, var(--bg2) 96%, transparent); border-radius: 22px; animation: dlgin .18s ease-out; }
@keyframes dlgin { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.settings section { border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.stabs button.sel { box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--bg4), color-mix(in srgb, var(--accent) 35%, var(--bg4))); }
.card { background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: blur(10px); }
/* Sohbet ici arama */
#searchBar { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 92%, transparent); animation: pop .15s ease-out; }
#searchBar .sicon { color: var(--accent); display: inline-flex; }
#searchBar input { flex: 1; padding: 7px 12px; border-radius: 18px; }
#searchBar .scount { color: var(--dim); font-size: 12px; font-weight: 800; min-width: 64px; text-align: center; }
#searchBar .scount.none { color: var(--bad); }
mark.hl { background: #ff8a1f; color: #1d0e00; border-radius: 4px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
mark.hl.cur { background: #ff5e00; color: #fff; box-shadow: 0 0 0 2px #ffd0a6; }
/* Ozellestir */
.wpgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.wptile { height: 64px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); display: flex; align-items: flex-end; justify-content: center; padding: 4px; overflow: hidden; }
.wptile span { font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 6px; padding: 1px 6px; }
.wptile.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.swatches { gap: 10px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; padding: 0; border: 3px solid transparent; }
.swatch.sel { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg3), 0 4px 12px rgba(0, 0, 0, .3); }
.bigcode { font-size: 20px; font-weight: 900; letter-spacing: 3px; color: var(--accent); background: var(--bg2); border: 1px dashed var(--accent); border-radius: 10px; padding: 6px 12px; }
/* Gizlilik haklari ve kisayollar */
.plist, .keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plist li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
.plist .pi { flex: none; width: 22px; text-align: center; }
.keys li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
kbd { font: 800 12px/1 inherit; background: var(--bg2); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 7px; padding: 4px 7px; white-space: nowrap; }
/* Cikartma hareketleri: ilk gorunuste bir kez, ustune gelince tekrar */
.sticker { transition: transform .2s; }
.sticker .e { display: inline-block; }
.msg .sticker .e { animation: var(--sa) 1.1s ease-in-out 2; }
.sticker:hover .e, #picker.stickers button:hover .sticker .e { animation: var(--sa) 1s ease-in-out infinite; }
.sticker.a-bounce { --sa: st-bounce; } .sticker.a-wiggle { --sa: st-wiggle; } .sticker.a-pulse { --sa: st-pulse; }
.sticker.a-float { --sa: st-float; } .sticker.a-spin { --sa: st-spin; } .sticker.a-tada { --sa: st-tada; }
@keyframes st-bounce { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-9px); } 50% { transform: translateY(0) scale(1.08, .92); } 70% { transform: translateY(-4px); } }
@keyframes st-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(5deg); } }
@keyframes st-pulse { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.25); } 60% { transform: scale(.95); } }
@keyframes st-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(6deg); } }
@keyframes st-spin { 0% { transform: rotate(0); } 60% { transform: rotate(380deg); } 100% { transform: rotate(360deg); } }
@keyframes st-tada { 0%, 100% { transform: scale(1) rotate(0); } 10%, 20% { transform: scale(.9) rotate(-6deg); } 30%, 50%, 70% { transform: scale(1.15) rotate(6deg); } 40%, 60% { transform: scale(1.15) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .sticker .e, .msg .sticker .e { animation: none !important; } }
/* Surum 7: grup uyeleri ve yetkiler */
.mlist { display: grid; gap: 4px; max-height: 320px; overflow-y: auto; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--bg2); }
.mrow .who2 { flex: 1; min-width: 0; display: grid; }
.mrow .who2 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .st { color: var(--dim); font-size: 12px; }
.mrow .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.mrow button.bad { color: var(--bad); background: transparent; border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.settings h4.sub { margin-top: 6px; }
.perms { display: grid; gap: 6px; }
.check.perm { align-items: flex-start; background: var(--bg2); border-radius: 10px; padding: 8px 10px; line-height: 1.3; }
.check.perm input { margin-top: 2px; flex: none; }
.check.perm.fixed { opacity: .75; }
.check.perm .hint { font-size: 12px; font-weight: 600; }
.phead { display: flex; align-items: center; gap: 10px; }
/* Surum 8: resim buyutme kutusu */
.zoom { cursor: zoom-in; transition: transform .15s, box-shadow .15s; }
.zoom:hover { transform: scale(1.05); box-shadow: 0 0 0 3px var(--accent); }
#photo { padding: 14px; width: fit-content; max-width: 92vw; margin: auto; border-radius: 20px; position: relative; overflow: visible; text-align: center; }
#photo img { display: block; width: min(420px, 80vw, 70vh); height: min(420px, 80vw, 70vh); object-fit: cover; border-radius: 14px; background: var(--bg3); }
#photo .pcap { margin-top: 10px; font-weight: 900; font-size: 16px; }
#photo .pclose { position: absolute; top: -12px; right: -12px; width: 36px; height: 36px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: var(--bad); color: #fff; border: 3px solid var(--bg2); box-shadow: var(--shadow); }
#photo .pclose:hover { filter: brightness(1.1); }
.gcard { display: flex; align-items: center; gap: 14px; padding: 4px 2px; }
.gcard b { font-size: 18px; font-weight: 900; }
.gbtn.big { width: 64px; height: 64px; font-size: 20px; border-radius: 18px; }
.settings span.gbtn.zoom { cursor: zoom-in; }
/* Surum 10: davet baglantisi */
.ainv { margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 16%, var(--bg3)); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-weight: 700; font-size: 13.5px; line-height: 1.4; }
.linkrow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.linkrow input { flex: 1; min-width: 200px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
#groupHead .ghead .invbtn { margin-left: auto; flex: none; }

/* ===================== Surum 11 ===================== */
/* Emoji yazi tipi en sonda: harf, rakam ve bosluklar her zaman normal yazi tipinden gelir */
body { font-family: "Nunito", "Segoe UI", Roboto, Arial, "Noto Color Emoji", sans-serif; }
.rx span, .popt .on { font-family: "Nunito", "Segoe UI", Roboto, Arial, sans-serif; }
.emo, #picker.emoji button, .rx, .qrx button, .sticker .e { font-family: "Noto Color Emoji", "Segoe UI Emoji", "Apple Color Emoji", sans-serif; }

/* ---- Giris / kayit ekrani ---- */
.auth { position: relative; overflow: hidden; background: #070814; }
.aurora { position: absolute; inset: -20%; filter: blur(70px); opacity: .85; pointer-events: none; }
.aurora i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; mix-blend-mode: screen; animation: drift 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: radial-gradient(circle, #ff8a3d 0, transparent 60%); left: 0; top: 0; }
.aurora i:nth-child(2) { background: radial-gradient(circle, #ff3d8b 0, transparent 60%); right: 0; top: 10%; animation-duration: 26s; }
.aurora i:nth-child(3) { background: radial-gradient(circle, #6b4dff 0, transparent 60%); left: 20%; bottom: 0; animation-duration: 30s; }
.aurora i:nth-child(4) { background: radial-gradient(circle, #19c3ff 0, transparent 60%); right: 15%; bottom: 5%; animation-duration: 34s; opacity: .6; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, -4vh) scale(1.15); } 100% { transform: translate(-5vw, 5vh) scale(.95); } }
.authwrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 56px; align-items: center; width: min(980px, 100%); }
.hero { color: #fff; }
.hero .hlogo { width: 84px; height: 84px; border-radius: 24px; box-shadow: 0 18px 50px rgba(255, 90, 120, .45); animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-3deg); } }
.hero h1 { font-size: clamp(48px, 8vw, 86px); margin: 14px 0 4px; font-weight: 900; letter-spacing: 6px; background: linear-gradient(120deg, #fff 10%, #ffc06b 45%, #ff6b9b 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { color: rgba(255, 255, 255, .8); font-size: 18px; margin: 0 0 22px; }
.feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.feats li { display: flex; gap: 12px; align-items: center; color: rgba(255, 255, 255, .88); font-weight: 700; }
.feats li span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); font-size: 18px; }
.auth .card { background: rgba(18, 20, 40, .62); backdrop-filter: blur(22px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .14); border-radius: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); padding: 26px; color: #eef0ff; gap: 12px; }
.auth .card h2 { margin: 4px 0 0; font-size: 22px; font-weight: 900; }
.auth .card label { color: rgba(238, 240, 255, .75); }
.auth .card input { background: rgba(0, 0, 0, .3); border-color: rgba(255, 255, 255, .14); color: #fff; padding: 11px 14px; border-radius: 12px; }
.auth .card input:focus { border-color: #ffb23e; outline: none; box-shadow: 0 0 0 3px rgba(255, 178, 62, .25); }
.atabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: rgba(0, 0, 0, .3); padding: 4px; border-radius: 14px; }
.atabs button { border: 0; background: transparent; color: rgba(255, 255, 255, .7); border-radius: 10px; padding: 9px; }
.atabs button.sel { background: linear-gradient(135deg, #ffb23e, #ff6b8b); color: #231200; box-shadow: 0 6px 18px rgba(255, 107, 139, .35); }
.pwbox { position: relative; display: block; }
.pwbox input { padding-right: 46px !important; }
.pwbox .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: rgba(255, 255, 255, .7); padding: 6px; }
.pwmeter { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); position: relative; margin-top: -2px; }
.pwmeter i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; width: 0; transition: width .25s, background .25s; }
.pwmeter[data-s="1"] i { width: 20%; background: #ff5d6c; } .pwmeter[data-s="2"] i { width: 40%; background: #ff9f43; }
.pwmeter[data-s="3"] i { width: 60%; background: #ffd43b; } .pwmeter[data-s="4"] i { width: 80%; background: #8ce99a; } .pwmeter[data-s="5"] i { width: 100%; background: #3ddc97; }
.pwmeter span { position: absolute; right: 0; top: 9px; font-size: 11px; color: rgba(255, 255, 255, .7); font-weight: 700; }
.pwrules { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 2px; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.pwrules li.ok { color: #3ddc97; }
button.big { padding: 12px; font-size: 16px; border-radius: 14px; }
.aswitch { margin: 0; text-align: center; color: rgba(255, 255, 255, .7); font-size: 14px; }
.linkbtn { border: 0; background: transparent; color: #ffb23e; padding: 0; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.afoot { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.auth .err { color: #ff8a95; min-height: 0; margin: 0; }
@media (max-width: 820px) { .authwrap { grid-template-columns: 1fr; gap: 20px; } .hero { text-align: center; } .hero .feats { display: none; } .hero .hlogo { width: 64px; height: 64px; } }

/* ---- Sol ray: ØLVEX menusu ve uyeler dugmesi ---- */
.gbtn.home { position: relative; }
.gbtn.home .mepres { position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; background: var(--ok); border: 3px solid var(--rail); }
.gbtn.home .mepres.dnd { background: var(--bad); } .gbtn.home .mepres.inv { background: #7a7f99; }
.gbtn.mem { color: var(--text); flex-direction: column; gap: 0; display: grid; place-items: center; position: relative; }
.gbtn.mem svg { width: 22px; height: 22px; }
.gbtn.mem small { position: absolute; bottom: 3px; font-size: 9px; font-weight: 900; color: var(--dim); }
.gbtn.mem.sel { color: var(--accent); }
#menu .mhead.big { padding: 10px; gap: 10px; }
#menu .mhead .avwrap { position: relative; display: inline-flex; }
#menu .mhead .pres { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg2); background: var(--ok); }
#menu .mhead .pres.dnd { background: var(--bad); } #menu .mhead .pres.inv { background: #7a7f99; }
#menu .mhead .who2 { display: grid; } #menu .mhead .st { color: var(--dim); font-size: 12px; }
#menu .mi.msub { padding-left: 22px; font-size: 14px; }
#menu .tools { display: grid; grid-template-columns: repeat(3, 92px); gap: 6px; padding: 4px; }
#menu .tool { display: grid; place-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg3); font-size: 12px; font-weight: 800; }
#menu .tool:hover { background: var(--bg4); transform: translateY(-2px); border-color: var(--accent); }
#menu .tool .ti { font-size: 24px; font-family: "Noto Color Emoji", sans-serif; }
#menu .hint.tiny { font-size: 11px; text-align: center; padding: 2px 6px 4px; }

/* Uyeler acilir penceresi (sag panel kalkti) */
.app, .app.nopanel { grid-template-columns: 68px 244px minmax(0, 1fr); }
#panel, .app.nopanel #panel { display: none; position: fixed; left: 80px; top: 80px; width: 300px; max-height: min(460px, 80vh); overflow-y: auto; z-index: 70; border: 1px solid var(--line); border-radius: 18px; padding: 8px; background: color-mix(in srgb, var(--bg2) 96%, transparent); backdrop-filter: blur(14px); box-shadow: var(--shadow); animation: pop .15s ease-out; }
#panel.open, .app.nopanel #panel.open { display: block; }
#panel .ptitle2 { display: flex; justify-content: space-between; align-items: center; }
#userBar[hidden] { display: none !important; }

/* ---- Mesajlar: kendi mesajin sagda, baloncuklar ---- */
.msg { width: fit-content; max-width: min(78%, 720px); margin: 3px 0; padding: 2px 0; background: transparent !important; gap: 8px; }
.msg:hover { background: transparent; }
.msg .body { background: var(--bg2); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 4px 18px 18px 18px; padding: 6px 12px 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.msg.mine { margin-left: auto; flex-direction: row-reverse; }
.msg.mine .body { border-radius: 18px 4px 18px 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, var(--bg2)), color-mix(in srgb, var(--accent2) 22%, var(--bg2))); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.msg.mine .who { display: none; }
.msg.mine time { display: block; text-align: right; }
.msg.bare .body { background: transparent !important; border-color: transparent; box-shadow: none; padding: 0; }
.msg.mine .mact { right: auto; left: -6px; }
#messages.wp .msg { background: transparent !important; backdrop-filter: none; }
#messages.wp .msg .body { backdrop-filter: blur(6px); }
.msg .rxs { margin-top: 6px; }

/* Oylama */
.poll { min-width: min(320px, 70vw); display: grid; gap: 6px; padding: 4px 0; }
.poll .pq { font-weight: 900; font-size: 15.5px; }
.poll .ptype { color: var(--dim); font-size: 12px; font-weight: 700; margin-top: -2px; }
.popt { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 10px; text-align: left; border-radius: 12px; background: var(--bg3); padding: 9px 12px; border: 1px solid var(--line); }
.popt .bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 30%, transparent); transition: width .35s; z-index: 0; }
.popt .ot, .popt .on { position: relative; z-index: 1; }
.popt .on { color: var(--dim); font-size: 12px; font-weight: 800; white-space: nowrap; }
.popt.mine { border-color: var(--accent); }
.popt.top .bar { background: color-mix(in srgb, var(--accent2) 38%, transparent); }
.popt:disabled { cursor: default; opacity: .9; }
.poll .pfoot { display: flex; justify-content: space-between; align-items: center; color: var(--dim); font-size: 12px; font-weight: 700; }
.poll.closed .pq::after { content: ' 🔒'; }

/* Muzik */
.amsg, .mcard { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--bg3); border: 1px solid var(--line); min-width: min(300px, 70vw); text-decoration: none; color: inherit; }
.amsg .mi, .mcard .mi { font-size: 26px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--grad); font-family: "Noto Color Emoji", sans-serif; flex: none; }
.amsg .who2 { display: grid; gap: 4px; min-width: 0; } .amsg audio { width: 100%; height: 34px; }
.mcard { margin-top: 6px; } .mcard:hover { border-color: var(--accent); }
.mcard .who2 { display: grid; } .mcard .st { color: var(--dim); font-size: 12px; }

/* Sesli mesaj dugmesi */
#btnRec svg { width: 22px; height: 22px; }
#btnRec.rec { background: var(--bad); color: #fff; animation: recpulse 1.2s ease-in-out infinite; display: inline-flex; gap: 6px; align-items: center; width: auto; padding: 0 12px; }
#btnRec .rt { font-weight: 800; font-size: 13px; }
@keyframes recpulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 30%, transparent); } }
#btnMore svg { width: 22px; height: 22px; }

/* ---- Cikartmalar: 18+ neon kart ve argo hareketli yazi ---- */
.sticker.neo { background: linear-gradient(160deg, #12131f, #1d1f33) !important; border: 2px solid hsl(var(--h) 85% 60%); box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 6px 18px hsl(var(--h) 85% 45% / .35), inset 0 0 18px hsl(var(--h) 85% 50% / .18); transform: rotate(-2deg); border-radius: 18px; }
.sticker.neo .c, .sticker.txt .c { font-family: "Anton", "Impact", "Nunito", sans-serif; text-transform: uppercase; letter-spacing: .5px; font-weight: 400; }
.sticker.neo .c { color: hsl(var(--h) 95% 75%); text-shadow: 0 0 8px hsl(var(--h) 90% 50% / .7); font-size: 11.5px; line-height: 1.05; }
.sticker.txt { width: auto !important; min-width: 96px; max-width: 220px; height: auto !important; padding: 10px 14px; border-radius: 16px; border: 0; transform: rotate(-2deg); background: linear-gradient(135deg, hsl(var(--h) 90% 55%), hsl(calc(var(--h) + 50) 90% 45%)) !important; box-shadow: 0 8px 22px hsl(var(--h) 90% 40% / .45); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sticker.txt .e { font-size: 26px; }
.sticker.txt .c { font-size: 24px; color: #fff; line-height: 1; text-align: center; -webkit-text-stroke: 1.5px rgba(0, 0, 0, .55); paint-order: stroke fill; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.msg .sticker.txt { animation: var(--ta) .9s ease-in-out 3; }
.sticker.txt:hover, #picker button:hover .sticker.txt, .argogrid button:hover .sticker.txt { animation: var(--ta) .9s ease-in-out infinite; }
.sticker.txt.a-shake { --ta: t-shake; } .sticker.txt.a-zoom { --ta: t-zoom; } .sticker.txt.a-pulse { --ta: t-zoom; }
.sticker.txt.a-wiggle { --ta: t-wig; } .sticker.txt.a-glitch { --ta: t-glitch; } .sticker.txt.a-bounce { --ta: t-bounce; }
@keyframes t-shake { 0%, 100% { transform: rotate(-2deg) translate(0); } 20% { transform: rotate(-4deg) translate(-3px, 1px); } 40% { transform: rotate(1deg) translate(3px, -1px); } 60% { transform: rotate(-3deg) translate(-2px, 2px); } 80% { transform: rotate(0) translate(2px, 0); } }
@keyframes t-zoom { 0%, 100% { transform: rotate(-2deg) scale(1); } 50% { transform: rotate(-2deg) scale(1.15); } }
@keyframes t-wig { 0%, 100% { transform: rotate(-2deg); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(6deg); } }
@keyframes t-glitch { 0%, 100% { transform: rotate(-2deg); filter: none; } 20% { transform: rotate(-2deg) skewX(8deg); filter: hue-rotate(60deg); } 40% { transform: rotate(-2deg) translate(2px, -2px); } 60% { transform: rotate(-2deg) skewX(-6deg); filter: hue-rotate(-40deg); } }
@keyframes t-bounce { 0%, 100% { transform: rotate(-2deg) translateY(0); } 40% { transform: rotate(-2deg) translateY(-8px); } }
.argogrid { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 10px; }
.argogrid button { border: 0; background: transparent; padding: 2px; }
#picker.stickers .sticker.txt { min-width: 0; }
#picker.gifs .ptitle { font-weight: 900; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .6px; margin: 4px 0; }
@media (prefers-reduced-motion: reduce) { .sticker.txt, .msg .sticker.txt { animation: none !important; } }

/* ---- Kisi arama ---- */
.mem.found { background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 12px; margin-bottom: 4px; }
.profile.limited { text-align: center; }
.profile.limited .av { margin: 0 auto; }

/* ---- Tema cilasi: gruplar ve ayar pencereleri ---- */
dialog { border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
dialog::backdrop { background: radial-gradient(circle at 30% 20%, rgba(255, 140, 60, .18), transparent 50%), radial-gradient(circle at 70% 80%, rgba(255, 60, 140, .16), transparent 50%), rgba(5, 6, 15, .7); backdrop-filter: blur(6px); }
.settings h3 { font-size: 21px; }
.settings section { background: linear-gradient(160deg, color-mix(in srgb, var(--bg3) 92%, var(--accent)), var(--bg3)); border-radius: 16px; }
.settings section h4 { display: flex; align-items: center; gap: 8px; color: color-mix(in srgb, var(--accent) 70%, var(--dim)); }
.stabs { gap: 6px; border-bottom: 0; padding: 4px; background: var(--bg3); border-radius: 14px; }
.stabs button { border-radius: 10px; }
.grow { border-radius: 14px; transition: transform .15s, border-color .15s, background .15s; }
.grow:hover { transform: translateY(-2px); border-color: var(--accent); }
.glist { gap: 8px; }
.gbody form { gap: 12px; }
.mrow { transition: background .15s; } .mrow:hover { background: var(--bg4); }
#groupHead { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent); }
.ghead h2 { letter-spacing: .3px; }
.sect { color: color-mix(in srgb, var(--accent) 45%, var(--dim)); }
.ch[data-voice] { font-weight: 700; }
.vuser { border-radius: 8px; } .vuser:hover { background: var(--bg3); }
#voiceBar { background: linear-gradient(135deg, color-mix(in srgb, var(--ok) 14%, var(--bg2)), var(--bg2)); border-radius: 14px; margin: 6px; border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }

/* Surum 12: e-posta ve sifre kurtarma */
.forgot { margin: -4px 0 0; text-align: right; }
.forgot .linkbtn { font-size: 13px; color: rgba(255, 255, 255, .75); }
.ainfo { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(61, 220, 151, .12); border: 1px solid rgba(61, 220, 151, .35); color: #c9f7e2; font-size: 13.5px; line-height: 1.4; font-weight: 600; }
.auth .card input.codein { font-size: 24px; letter-spacing: 10px; text-align: center; font-weight: 900; }
.auth .card input[readonly] { opacity: .7; }

.ainv.warn { background: rgba(255, 93, 108, .14); border-color: rgba(255, 93, 108, .5); color: #ffd0d5; }
