/* Tierfy — kendine özgü sıcak koyu tema, turkuaz/kehribar vurgular */
:root {
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", ui-monospace, Consolas, monospace;
  --font-scale: 1;
  --bg-0: #0b1113;     /* şerit */
  --bg-1: #111a1c;     /* kenar çubuğu */
  --bg-2: #162224;     /* ana alan */
  --bg-3: #1c2b2e;     /* kartlar */
  --bg-4: #243538;     /* hover */
  --bg-5: #2d4246;
  --line: #ffffff12;
  --line-2: #ffffff1f;
  --text: #e6efed;
  --text-2: #b4c4c1;
  --muted: #7f9592;
  --accent: #14b8a6;
  --accent-2: #2dd4bf;
  --accent-soft: #14b8a626;
  --accent-ink: #04201d;
  --warm: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;
  --mention-bg: #f59e0b1a;
  --mention-line: #f59e0b;
  --radius: 12px;
  --shadow: 0 10px 40px #0008, 0 2px 8px #0005;
  color-scheme: dark;
}
:root[data-theme="midnight"] { --bg-0: #000; --bg-1: #07090a; --bg-2: #0c1011; --bg-3: #121819; --bg-4: #1a2224; --bg-5: #222c2e; }
:root[data-theme="light"] {
  --bg-0: #dfe7e5; --bg-1: #eef3f2; --bg-2: #fbfdfc; --bg-3: #ffffff; --bg-4: #e4ecea; --bg-5: #d5e0dd;
  --line: #0000000f; --line-2: #0000001c; --text: #12201f; --text-2: #34514d; --muted: #66807c;
  --accent-ink: #fff; --mention-bg: #f59e0b22; --shadow: 0 10px 30px #0002, 0 2px 6px #0001; color-scheme: light;
}
:root[data-accent="amber"] { --accent: #f59e0b; --accent-2: #fbbf24; --accent-soft: #f59e0b26; --accent-ink: #261600; }
:root[data-accent="rose"] { --accent: #f43f5e; --accent-2: #fb7185; --accent-soft: #f43f5e26; --accent-ink: #fff; }
:root[data-accent="violet"] { --accent: #8b5cf6; --accent-2: #a78bfa; --accent-soft: #8b5cf626; --accent-ink: #fff; }
:root[data-accent="sky"] { --accent: #0ea5e9; --accent-2: #38bdf8; --accent-soft: #0ea5e926; --accent-ink: #001826; }
:root[data-accent="lime"] { --accent: #84cc16; --accent-2: #a3e635; --accent-soft: #84cc1626; --accent-ink: #132000; }
:root[data-theme="light"] a, :root[data-theme="light"] .mention, :root[data-theme="light"] .embed-title, :root[data-theme="light"] .tc-count, :root[data-theme="light"] .link { color: color-mix(in srgb, var(--accent) 65%, #000); }
:root[data-theme="light"] .mention { background: color-mix(in srgb, var(--accent) 14%, transparent); }
:root[data-theme="light"] .mention:hover { color: var(--accent-ink); background: var(--accent); }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg-2); color: var(--text); font-family: var(--font); font-size: calc(15px * var(--font-scale)); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { opacity: .5; cursor: not-allowed; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
input, textarea, select { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-0); padding: 1px 5px; border-radius: 4px; }
kbd { font-family: var(--mono); font-size: .82em; background: var(--bg-0); border: 1px solid var(--line-2); border-bottom-width: 2px; padding: 2px 7px; border-radius: 5px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
.input:focus-visible, .composer-input:focus-visible, .edit-input:focus-visible { outline: none; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-5); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.upper { text-transform: uppercase; letter-spacing: .04em; font-weight: 600; font-size: .72rem; }
.ital { font-style: italic; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.grow { flex: 1; min-width: 0; }
.row-gap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pad { padding: 16px; }
.hidden { display: none !important; }
.red { color: var(--danger) !important; }
.ic { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ic svg { display: block; }
.rot-90 svg { transform: rotate(-90deg); }
.mobile-only { display: none !important; }

/* ---------- Butonlar ve formlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border-radius: 10px; font-weight: 600; font-size: .92rem; transition: background .15s, transform .05s, filter .15s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.secondary { background: var(--bg-5); }
.btn.secondary:hover { background: var(--bg-4); filter: brightness(1.2); }
.btn.ghost { color: var(--text-2); }
.btn.ghost:hover { text-decoration: underline; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(1.1); }
.btn.danger-outline { border: 1px solid var(--danger); color: var(--danger); }
.btn.danger-outline:hover { background: var(--danger); color: #fff; }
.btn.success { background: var(--success); color: #04220f; }
.btn.sm { padding: 6px 12px; font-size: .84rem; border-radius: 8px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-2); transition: background .12s, color .12s; flex-shrink: 0; }
.icon-btn:hover { background: var(--bg-4); color: var(--text); }
.icon-btn.on { color: var(--accent-2); }
.icon-btn.sm { width: 22px; height: 22px; border-radius: 6px; }
.icon-btn.danger:hover { color: var(--danger); }
.round-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-1); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); border: 1px solid var(--line); }
.round-btn:hover { color: var(--text); background: var(--bg-4); }
.round-btn.green:hover { color: var(--success); }
.round-btn.red:hover { color: var(--danger); }
.link { color: var(--accent-2); text-decoration: underline; }
.input { width: 100%; background: var(--bg-0); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.sm { padding: 6px 8px; font-size: .86rem; width: auto; }
textarea.input { resize: vertical; min-height: 44px; }
select.input { cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span:first-child { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle-row strong { font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.switch { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--bg-5); position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px #0005; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }
.color-input { width: 64px; height: 40px; border: 0; border-radius: 10px; padding: 0; background: none; cursor: pointer; }
input[type=range] { accent-color: var(--accent); width: 100%; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.badge.inline { margin-left: auto; }
.spinner { width: 28px; height: 28px; margin: 20px auto; border-radius: 50%; border: 3px solid var(--bg-5); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Avatar ve durum ---------- */
.avatar { position: relative; flex-shrink: 0; border-radius: 50%; }
.avatar img, .avatar-fallback { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; user-select: none; }
.avatar.group-av { background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.status-dot { position: absolute; right: -2px; bottom: -2px; border-radius: 50%; border: 3px solid var(--bg-1); background: var(--muted); }
.status-dot.static { position: static; display: inline-block; width: 10px; height: 10px; border: 0; vertical-align: middle; }
.s-online { background: #22c55e !important; }
.s-idle { background: #f59e0b !important; }
.s-dnd { background: #ef4444 !important; }
.s-offline { background: #6b7d7a !important; }

/* ---------- Giriş ekranı ---------- */
.auth-page { position: fixed; inset: 0; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg-0); }
.auth-art { position: relative; padding: 8vw; display: flex; flex-direction: column; justify-content: center; overflow: hidden; background: radial-gradient(1000px 600px at 20% 30%, #14b8a633, transparent), radial-gradient(700px 500px at 80% 80%, #f59e0b2b, transparent), var(--bg-0); }
.auth-art h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.02; margin: 0 0 16px; letter-spacing: -.03em; }
.auth-art p { color: var(--text-2); font-size: 1.1rem; max-width: 420px; }
.auth-waves { display: flex; gap: 6px; align-items: center; height: 120px; margin-bottom: 32px; }
.auth-waves span { width: 8px; border-radius: 8px; background: linear-gradient(var(--accent-2), var(--warm)); animation: wave 1.6s ease-in-out infinite; height: 20%; }
@keyframes wave { 0%, 100% { height: 15%; } 50% { height: 95%; } }
.auth-card { display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg-1); }
.auth-form { width: 100%; max-width: 400px; }
.auth-form h1 { margin: 12px 0 4px; font-size: 1.7rem; }
.auth-form > p { margin: 0 0 24px; }
.auth-logo svg { width: 56px; height: 56px; }
.auth-error { color: var(--danger); font-size: .9rem; min-height: 1.2em; margin-bottom: 8px; }
.auth-switch { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.splash { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--bg-0); }
.splash-logo svg { width: 72px; height: 72px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ---------- Yerleşim ---------- */
#app { position: fixed; inset: 0; display: grid; grid-template-columns: 76px 256px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
#main, #sidebar, #rail { min-height: 0; }
.main-col { min-height: 0; }
body.offline #app::before { content: "Bağlantı koptu — yeniden bağlanılıyor…"; position: fixed; top: 0; left: 0; right: 0; z-index: 90; background: var(--warm); color: #261600; text-align: center; font-weight: 700; font-size: .85rem; padding: 4px; }

/* Şerit */
#rail { background: var(--bg-0); padding: 12px 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; align-items: center; gap: 8px; scrollbar-width: none; }
#rail::-webkit-scrollbar { display: none; }
.rail-servers { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.rail-item { position: relative; width: 76px; display: flex; justify-content: center; }
.rail-btn { width: 48px; height: 48px; border-radius: 16px; background: var(--srv-color, var(--bg-3)); display: flex; align-items: center; justify-content: center; overflow: hidden; transition: border-radius .2s, transform .15s, box-shadow .2s; color: var(--text); position: relative; }
.rail-btn img { width: 100%; height: 100%; object-fit: cover; }
.rail-btn svg { width: 48px; height: 48px; }
.rail-btn.home { background: none; }
.rail-btn:hover { border-radius: 13px; transform: translateY(-1px); }
.rail-item.active .rail-btn { border-radius: 13px; box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 4px var(--accent); }
.rail-btn.add { background: var(--bg-3); color: var(--accent-2); border: 1px dashed var(--line-2); }
.rail-btn.add:hover { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.srv-initials { font-weight: 700; color: #fff; text-shadow: 0 1px 2px #0004; }
.rail-pill { position: absolute; left: 0; top: 50%; width: 4px; height: 0; border-radius: 0 4px 4px 0; background: var(--text); transform: translateY(-50%); transition: height .2s; }
.rail-item.unread .rail-pill { height: 8px; }
.rail-item:hover .rail-pill { height: 18px; }
.rail-item.active .rail-pill { height: 36px; background: var(--accent); }
.rail-item.muted .rail-btn { opacity: .55; }
.rail-item .badge { position: absolute; right: 10px; bottom: -2px; border: 3px solid var(--bg-0); height: 22px; min-width: 22px; border-radius: 11px; }
.rail-folder { display: flex; flex-direction: column; gap: 8px; align-items: center; border-radius: 16px; }
.rail-folder.open { background: color-mix(in srgb, var(--folder-color) 18%, transparent); padding-bottom: 8px; width: 56px; }
.folder-btn { background: color-mix(in srgb, var(--folder-color) 30%, var(--bg-3)) !important; }
.rail-folder.open .folder-btn { background: transparent !important; color: var(--folder-color); }
.folder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 7px; width: 100%; height: 100%; }
.fg-cell { border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; color: #fff; overflow: hidden; background: var(--bg-5); }
.fg-cell img { width: 100%; height: 100%; object-fit: cover; }
.rail-folder .rail-item { width: 56px; }
.rail-folder .rail-pill { left: -10px; }
.rail-sep { width: 32px; height: 2px; border-radius: 2px; background: var(--line-2); margin: 2px 0; flex-shrink: 0; }
.rail-item.drag-over::before { content: ""; position: absolute; top: -5px; left: 18px; right: 18px; height: 3px; background: var(--accent); border-radius: 3px; }
.rail-item.dm-unread .avatar { width: 48px !important; height: 48px !important; }

/* Kenar çubuğu */
#sidebar { background: var(--bg-1); display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); }
.sb-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.sb-header { height: 52px; flex-shrink: 0; display: flex; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line); font-weight: 700; gap: 8px; }
.server-head { width: 100%; justify-content: space-between; text-align: left; transition: background .15s; }
.server-head:hover { background: var(--bg-3); }
.search-head { padding: 0 10px; }
.fake-search { width: 100%; background: var(--bg-0); border-radius: 8px; padding: 7px 10px; text-align: left; font-size: .84rem; color: var(--muted); font-weight: 500; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 10px 8px; }
.sb-link { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); font-weight: 600; margin-bottom: 2px; }
.sb-link:hover { background: var(--bg-3); color: var(--text); }
.sb-link.active { background: var(--bg-4); color: var(--text); }
.sb-section { display: flex; align-items: center; justify-content: space-between; padding: 16px 6px 6px 10px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sb-section:hover { color: var(--text-2); }
.sb-empty { padding: 12px; font-size: .86rem; }
.dm-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; color: var(--text-2); position: relative; margin-bottom: 1px; }
.dm-item:hover { background: var(--bg-3); color: var(--text); }
.dm-item.active { background: var(--bg-4); color: var(--text); }
.dm-item.unread .dm-name { color: var(--text); font-weight: 700; }
.dm-text { flex: 1; min-width: 0; }
.dm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.dm-sub { font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-close { opacity: 0; }
.dm-item:hover .dm-close { opacity: 1; }
.cat-head { display: flex; align-items: center; gap: 2px; padding: 16px 4px 4px 2px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); cursor: pointer; user-select: none; }
.cat-head:hover { color: var(--text-2); }
.cat-head > span:not(.ic) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-head .icon-btn { opacity: 0; }
.cat-head:hover .icon-btn { opacity: 1; }
.cat-chev { transition: transform .15s; }
.cat-head.collapsed .cat-chev { transform: rotate(-90deg); }
.cat-head.drag-over, .ch-item.drag-over { box-shadow: inset 0 2px 0 var(--accent); }
.ch-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin: 1px 0; border-radius: 8px; color: var(--muted); cursor: pointer; position: relative; }
.ch-item:hover { background: var(--bg-3); color: var(--text-2); }
.ch-item.active { background: var(--bg-4); color: var(--text); }
.ch-item.unread { color: var(--text); font-weight: 600; }
.ch-item.unread::before { content: ""; position: absolute; left: -8px; top: 50%; width: 4px; height: 8px; border-radius: 0 4px 4px 0; background: var(--text); transform: translateY(-50%); }
.ch-item.muted { opacity: .5; }
.ch-item.connected { color: var(--success); }
.ch-icon { position: relative; display: inline-flex; opacity: .8; }
.ch-lock { position: absolute; right: -4px; top: -3px; background: var(--bg-1); border-radius: 50%; }
.ch-name { flex: 1; }
.ch-actions { display: none; gap: 2px; }
.ch-item:hover .ch-actions, .ch-item.active .ch-actions { display: inline-flex; }
.voice-users { padding-left: 28px; }
.ch-name .voice-status { display: block; font-size: 11px; color: var(--text-muted); font-weight: 400; line-height: 1.2; }
.vv-status { background: rgba(255,255,255,.08); border: 0; color: #e6efed; border-radius: 12px; padding: 3px 10px; font-size: 12px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.vv-status.empty { opacity: .6; }
.vv-status:disabled { cursor: default; }
.tts-tag { font-size: 11px; opacity: .8; }
.voice-user { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; font-size: .88rem; color: var(--text-2); cursor: pointer; }
.voice-user:hover { background: var(--bg-3); }
.voice-user span.ellipsis { flex: 1; }
.voice-user.speaking .avatar { box-shadow: 0 0 0 2px var(--success); }
.vu-icons { display: inline-flex; gap: 3px; color: var(--muted); align-items: center; }
.live-tag { background: var(--danger); color: #fff; font-size: 9px; font-weight: 800; padding: 1px 5px; border-radius: 4px; letter-spacing: .04em; }

/* Ses paneli ve kullanıcı paneli */
.voice-panel { border-top: 1px solid var(--line); padding: 8px 10px; background: var(--bg-1); }
.vp-top { display: flex; align-items: center; gap: 6px; }
.vp-info { flex: 1; min-width: 0; cursor: pointer; }
.vp-status { display: flex; gap: 6px; align-items: center; color: var(--success); font-weight: 700; font-size: .86rem; }
.vp-status.bad { color: var(--warm); }
.vp-where { font-size: .76rem; }
.vp-actions { display: flex; gap: 6px; margin-top: 8px; }
.vp-btn { flex: 1; height: 32px; border-radius: 8px; background: var(--bg-3); display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.vp-btn:hover { background: var(--bg-4); color: var(--text); }
.vp-btn.on { background: var(--accent); color: var(--accent-ink); }
.user-panel { height: 58px; flex-shrink: 0; display: flex; align-items: center; gap: 4px; padding: 0 8px; background: var(--bg-0); }
.up-me { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 4px; border-radius: 10px; text-align: left; }
.up-me:hover { background: var(--bg-3); }
.up-me .status-dot { border-color: var(--bg-0); }
.up-text { min-width: 0; }
.up-name { font-weight: 700; font-size: .88rem; }
.up-sub { font-size: .74rem; }
.up-btns { display: flex; }

/* ---------- Ana alan ---------- */
#main { display: flex; flex-direction: column; min-width: 0; background: var(--bg-2); }
.main-head { height: 52px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); z-index: 2; }
.main-head h3 { margin: 0; font-size: 1rem; white-space: nowrap; }
.head-ic { color: var(--muted); }
.head-sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 6px; flex-shrink: 0; }
.head-topic { color: var(--muted); font-size: .86rem; cursor: pointer; flex: 1; }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.search-box { position: relative; margin: 0 4px; }
.search-input { width: 150px; background: var(--bg-0); border: 0; border-radius: 8px; padding: 6px 30px 6px 10px; font-size: .84rem; outline: none; transition: width .2s; }
.search-input:focus { width: 240px; }
.search-box .ic { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.main-body { flex: 1; display: flex; min-height: 0; }
.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { padding: 4px 12px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: .9rem; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { background: var(--bg-4); color: var(--text); }
.tab.active { background: var(--bg-5); color: var(--text); }
.tab.add { background: var(--accent); color: var(--accent-ink); }
.tab.add.active { background: transparent; color: var(--accent-2); }
.empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; gap: 6px; }
.empty-art { font-size: 64px; filter: drop-shadow(0 6px 20px #0006); margin-bottom: 8px; }
.empty-art.sm { font-size: 40px; }
.empty-small { text-align: center; padding: 24px; }

/* ---------- Sohbet ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.messages { flex: 1; overflow-y: auto; overflow-x: hidden; outline: none; }
.messages-inner { padding: 0 0 18px; display: flex; flex-direction: column; min-height: 100%; justify-content: flex-end; }
.msg-loading { padding: 20px; }
.chan-welcome { padding: 32px 16px 16px; }
.chan-welcome h1 { margin: 10px 0 6px; font-size: 1.9rem; letter-spacing: -.02em; }
.chan-welcome p { margin: 2px 0; }
.cw-icon { width: 68px; height: 68px; border-radius: 50%; background: var(--bg-4); display: flex; align-items: center; justify-content: center; }
.date-divider, .new-divider { display: flex; align-items: center; margin: 18px 16px 6px; height: 0; border-top: 1px solid var(--line-2); justify-content: center; }
.date-divider span { background: var(--bg-2); padding: 0 8px; font-size: .74rem; font-weight: 600; color: var(--muted); transform: translateY(-1px); }
.new-divider { border-color: var(--danger); justify-content: flex-end; margin: 10px 16px 4px; }
.new-divider span { background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 4px 0 0 4px; transform: translateY(-1px); }
.msg { position: relative; padding: 2px 48px 2px 16px; margin-top: 16px; transition: background .1s; }
.msg.grouped { margin-top: 0; }
[data-density="compact"] .msg { margin-top: 4px; }
.msg:hover { background: #00000014; }
:root[data-theme="light"] .msg:hover { background: #0000000a; }
.msg.mentioned { background: var(--mention-bg); box-shadow: inset 2px 0 0 var(--mention-line); }
.msg.pending .msg-content { opacity: .55; }
.msg.failed .msg-content { color: var(--danger); }
.msg.flash { animation: flash 2s ease; }
@keyframes flash { 0%, 40% { background: var(--accent-soft); } 100% { background: transparent; } }
.msg-row { display: flex; gap: 14px; }
.msg-avatar { cursor: pointer; padding-top: 2px; }
.msg-avatar:active { transform: translateY(1px); }
.msg-time-hover { width: 40px; flex-shrink: 0; text-align: right; font-size: .68rem; color: var(--muted); opacity: 0; padding-top: 4px; }
.msg:hover .msg-time-hover { opacity: 1; }
.msg-body { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; }
.msg-author { font-weight: 650; cursor: pointer; }
.msg-author:hover { text-decoration: underline; }
.owner-crown { color: var(--warm); display: inline-flex; vertical-align: -1px; margin-left: 2px; }
.msg-time { font-size: .72rem; color: var(--muted); }
.msg-content { line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; white-space: normal; color: var(--text); }
.msg-content[data-progress]::after { content: " ⬆ " attr(data-progress); color: var(--muted); font-size: .8rem; }
.msg-content.jumbo { font-size: 2.6rem; line-height: 1.15; }
.msg-content.jumbo .emoji.custom { width: 48px; height: 48px; }
.msg-content blockquote { margin: 2px 0; padding: 0 0 0 12px; border-left: 4px solid var(--bg-5); }
.msg-content ul { margin: 2px 0; padding-left: 22px; }
.msg-content .md-h { margin: 6px 0 2px; }
.msg-content h3.md-h { font-size: 1.45rem; } .msg-content h4.md-h { font-size: 1.2rem; } .msg-content h5.md-h { font-size: 1.05rem; }
.md-sub { color: var(--muted); font-size: .78rem; display: block; }
.codeblock { background: var(--bg-0); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 6px 0; overflow-x: auto; font-family: var(--mono); font-size: .85rem; line-height: 1.5; white-space: pre; max-width: 100%; position: relative; }
.codeblock[data-lang]::before { content: attr(data-lang); position: absolute; right: 8px; top: 4px; font-size: .7rem; color: var(--muted); text-transform: uppercase; }
.codeblock code { background: none; padding: 0; font-size: inherit; }
code.inline { background: var(--bg-0); }
.spoiler { background: var(--bg-5); color: transparent; border-radius: 4px; cursor: pointer; transition: color .2s; padding: 0 2px; }
.spoiler.revealed { background: #ffffff14; color: inherit; }
.spoiler.revealed * { visibility: visible; }
.spoiler:not(.revealed) * { visibility: hidden; }
.mention { background: var(--accent-soft); color: var(--accent-2); border-radius: 4px; padding: 0 3px; font-weight: 600; cursor: pointer; }
.mention:hover { background: var(--accent); color: var(--accent-ink); }
.mention.me { background: #f59e0b33; color: #fcd34d; }
:root[data-theme="light"] .mention.me { color: #b45309; }
.emoji.custom { width: 22px; height: 22px; vertical-align: -5px; object-fit: contain; }
.emoji.custom.big { width: 32px; height: 32px; }
.edited { font-size: .7rem; color: var(--muted); }
.sys-icon { width: 40px; display: flex; justify-content: center; color: var(--success); padding-top: 2px; flex-shrink: 0; }
.msg.system .msg-body { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sys-text { color: var(--text-2); }
.msg.system { margin-top: 10px; }
.msg-reply { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); padding-left: 54px; margin-bottom: 4px; cursor: pointer; position: relative; min-width: 0; }
.msg-reply:hover .reply-text { color: var(--text); }
.reply-spine { position: absolute; left: 34px; top: 9px; width: 30px; height: 12px; border-left: 2px solid var(--bg-5); border-top: 2px solid var(--bg-5); border-top-left-radius: 6px; }
.msg-reply .avatar { margin-left: 18px; }
.reply-name { font-weight: 600; color: var(--text-2); white-space: nowrap; }
.reply-text { flex: 1; }
.msg-failed { font-size: .8rem; color: var(--danger); }
.attachments { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; align-items: flex-start; }
.att-img { max-width: min(420px, 100%); border-radius: 10px; overflow: hidden; cursor: zoom-in; position: relative; background: var(--bg-3); }
.att-img img { display: block; max-width: 100%; max-height: 360px; }
.spoiler-media { cursor: pointer; }
.spoiler-media img { filter: blur(40px); }
.spoiler-media::after { content: "SPOILER"; position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; background: #000c; color: #fff; padding: 6px 12px; border-radius: 20px; font-weight: 800; font-size: .78rem; letter-spacing: .06em; }
.att-video video { max-width: min(480px, 100%); max-height: 360px; border-radius: 10px; background: #000; }
.att-file { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; min-width: 260px; max-width: 440px; color: var(--accent-2); }
.att-file.audio { flex-direction: row; }
.att-meta { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.att-meta a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.att-meta audio { width: 260px; height: 32px; margin-top: 4px; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reaction { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 8px; background: var(--bg-3); border: 1px solid transparent; font-size: .9rem; height: 28px; }
.reaction:hover { border-color: var(--line-2); }
.reaction.mine { background: var(--accent-soft); border-color: var(--accent); }
.reaction.mine .r-count { color: var(--accent-2); }
.r-count { font-size: .8rem; font-weight: 700; color: var(--text-2); }
.reaction.add { opacity: 0; color: var(--muted); }
.msg:hover .reaction.add { opacity: 1; }
.msg-hover { position: absolute; right: 16px; top: -16px; display: none; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; box-shadow: var(--shadow); z-index: 3; }
.msg:hover .msg-hover { display: flex; }
.hb-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--text-2); }
.hb-btn:hover { background: var(--bg-4); color: var(--text); }
.hb-btn.emoji { font-size: 1.1rem; }
.hb-btn.danger:hover { color: var(--danger); }
.edit-box { margin: 4px 0; }
.edit-input { width: 100%; background: var(--bg-0); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: none; outline: none; line-height: 1.45; }
.edit-box .small { margin-top: 4px; }
.unread-bar { position: absolute; top: 8px; left: 16px; right: 16px; z-index: 4; display: flex; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); background: var(--accent); color: var(--accent-ink); font-size: .84rem; font-weight: 700; }
.ub-jump { flex: 1; text-align: left; padding: 6px 12px; }
.ub-read { padding: 6px 12px; border-left: 1px solid #0002; }
.ub-jump:hover, .ub-read:hover { background: #0001; }
.jump-bar { position: absolute; bottom: 92px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); padding: 6px 16px; border-radius: 20px; font-weight: 700; font-size: .84rem; box-shadow: var(--shadow); z-index: 4; }

/* Bağlantı önizlemeleri */
.embeds { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; align-items: flex-start; }
.embed { display: flex; gap: 14px; max-width: 520px; background: var(--bg-3); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 14px 12px; }
.embed-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.embed-site { font-size: .74rem; color: var(--muted); }
.embed-title { font-weight: 700; color: var(--accent-2); }
.embed-desc { font-size: .86rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.embed-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; flex-shrink: 0; cursor: zoom-in; }
.embed-img.big { max-width: 100%; max-height: 300px; border-radius: 6px; margin-top: 6px; cursor: zoom-in; }
.embed.yt { flex-direction: column; gap: 6px; border-left-color: #ef4444; width: min(440px, 100%); }
.yt-thumb { position: relative; cursor: pointer; border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 44px; border-radius: 12px; background: #000c; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.yt-thumb:hover .yt-play { background: #ef4444; }
.embed.yt iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 6px; }

/* Bot ve zengin embed */
.bot-tag { background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 4px; letter-spacing: .03em; align-self: center; }
.embed.rich { flex-direction: column; }
.embed-title.plain { font-weight: 700; }
.embed-desc.full { -webkit-line-clamp: unset; display: block; }
.embed-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.embed-field { grid-column: 1 / -1; }
.embed-field.inline { grid-column: auto; }
.ef-name { font-weight: 700; font-size: .84rem; }
.ef-value { font-size: .86rem; }
.hook-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.hook-card .input.sm { width: 220px; }
.hook-example pre { white-space: pre-wrap; word-break: break-all; }

/* İletilen mesaj, not */
.forwarded { border-left: 3px solid var(--bg-5); padding: 2px 0 2px 12px; margin: 4px 0; }
.fw-head { display: flex; align-items: center; gap: 4px; font-style: italic; }
.fw-ic svg { transform: scaleX(-1); }
.fw-src { margin-top: 4px; text-align: left; }
.fw-src:hover { text-decoration: underline; }
.fw-list { max-height: 300px; margin: 10px 0; }
.pc-note { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 6px; resize: none; padding: 4px; font-size: .84rem; color: var(--text-2); outline: none; }
.pc-note:focus { background: var(--bg-0); border-color: var(--line-2); }

/* Konular */
.thread-item { position: relative; display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 40px; margin: 1px 0; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: .9rem; }
.thread-item:hover { background: var(--bg-3); color: var(--text-2); }
.thread-item.active { background: var(--bg-4); color: var(--text); }
.thread-item.unread { color: var(--text); font-weight: 600; }
.thread-spine { position: absolute; left: 18px; top: -10px; width: 14px; height: 24px; border-left: 2px solid var(--bg-5); border-bottom: 2px solid var(--bg-5); border-bottom-left-radius: 8px; }
.thread-card { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; padding: 8px 12px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px; max-width: 480px; text-align: left; width: 100%; }
.thread-card:hover { border-color: var(--accent); }
.tc-head { display: flex; align-items: center; gap: 6px; }
.tc-count { margin-left: auto; color: var(--accent-2); font-size: .82rem; font-weight: 700; }
.tc-last { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--text-2); min-width: 0; }
.head-parent { color: var(--muted); font-weight: 600; }
.head-parent:hover { color: var(--text); text-decoration: underline; }
.tag { font-size: .72rem; background: var(--bg-4); color: var(--text-2); padding: 2px 8px; border-radius: 6px; font-weight: 700; }

/* Forum */
.forum { flex: 1; overflow-y: auto; padding: 16px 24px 24px; }
.forum-top { position: sticky; top: -16px; background: var(--bg-2); padding: 0 0 12px; z-index: 2; }
.forum-search { display: flex; gap: 10px; }
.forum-search .input { flex: 1; }
.forum-tabs { margin-top: 10px; }
.forum-guide { margin-top: 10px; padding: 10px 12px; background: var(--bg-3); border-radius: 10px; font-size: .88rem; }
.forum-list { display: flex; flex-direction: column; gap: 8px; }
.forum-card { display: flex; gap: 14px; text-align: left; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; width: 100%; }
.forum-card:hover { border-color: var(--line-2); background: var(--bg-4); }
.fc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fc-main h3 { margin: 0; font-size: 1.05rem; }
.fc-snippet { color: var(--text-2); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-meta { display: flex; gap: 8px; align-items: center; }
.fc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.fc-react { background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }
.fc-img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }

/* Anketler */
.poll { margin-top: 6px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 14px; max-width: 480px; }
.poll-q { font-weight: 700; font-size: 1.05rem; margin-bottom: 2px; }
.poll-opts { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 10px; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line-2); text-align: left; overflow: hidden; }
.poll-opt:hover:not(:disabled) { border-color: var(--accent); }
.poll-opt:disabled { cursor: default; opacity: 1; }
.poll-opt.chosen { border-color: var(--accent); }
.poll-opt.winner .poll-text { font-weight: 800; }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-soft); transition: width .4s; }
.poll-check { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.poll-opt.chosen .poll-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.poll-text { position: relative; flex: 1; }
.poll-pct { position: relative; font-size: .8rem; font-weight: 700; color: var(--text-2); }
.poll-foot .link { margin-left: 8px; }
.poll-inputs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.poll-inputs .input { flex: 1; }

/* Yazma alanı */
.composer-wrap { padding: 0 16px 0; flex-shrink: 0; }
.composer { background: var(--bg-3); border-radius: 14px; position: relative; border: 1px solid var(--line); }
.composer:focus-within { border-color: var(--line-2); }
.composer.disabled { opacity: .6; }
.composer-row { display: flex; align-items: flex-end; gap: 4px; padding: 6px 8px; }
.composer-attach { color: var(--muted); }
.composer-input { flex: 1; background: none; border: 0; outline: none; resize: none; padding: 7px 4px; line-height: 1.4; max-height: 320px; min-height: 22px; }
.char-count { font-size: .76rem; color: var(--muted); padding: 8px 4px; }
.typing-bar { height: 24px; display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-2); padding: 0 4px; }
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-2); animation: tdot 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; } .typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg-4); border-radius: 14px 14px 0 0; font-size: .86rem; }
.reply-bar > span:first-child { flex: 1; }
.reply-ping { font-size: .74rem; font-weight: 800; color: var(--muted); }
.reply-ping.on { color: var(--accent-2); }
.files-bar { display: flex; gap: 10px; padding: 12px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.file-card { width: 160px; flex-shrink: 0; background: var(--bg-2); border-radius: 10px; padding: 8px; position: relative; }
.file-card img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; display: block; }
.file-card-ic { height: 110px; display: flex; align-items: center; justify-content: center; color: var(--accent-2); }
.file-card-name { font-size: .8rem; margin-top: 6px; }
.file-card-actions { position: absolute; top: -8px; right: -8px; display: flex; gap: 2px; background: var(--bg-3); border-radius: 8px; padding: 2px; border: 1px solid var(--line-2); }
.file-progress { height: 4px; background: var(--bg-5); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.file-progress span { display: block; height: 100%; background: var(--accent); }
.suggest { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; z-index: 10; }
.sug-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; text-align: left; }
.sug-item.active, .sug-item:hover { background: var(--bg-4); }
.sug-item .muted { margin-left: auto; }
body.dragging-files .composer { outline: 3px dashed var(--accent); outline-offset: 4px; }

/* Üye listesi */
.members { width: 248px; flex-shrink: 0; background: var(--bg-1); overflow-y: auto; padding: 8px; border-left: 1px solid var(--line); }
.mem-group { margin: 18px 8px 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mem-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 10px; cursor: pointer; }
.mem-row:hover { background: var(--bg-3); }
.mem-row.dim { opacity: .45; }
.mem-row.dim:hover { opacity: 1; }
.mem-text { min-width: 0; flex: 1; }
.mem-name { font-weight: 550; display: flex; align-items: center; gap: 4px; }
.mem-sub { font-size: .74rem; }
.dm-profile { width: 300px; flex-shrink: 0; background: var(--bg-1); overflow-y: auto; border-left: 1px solid var(--line); }
.dp-banner { height: 110px; }
.dp-av { margin: -44px 0 0 16px; display: inline-block; border: 6px solid var(--bg-1); border-radius: 50%; }
.dp-av .status-dot { border-color: var(--bg-1); }
.dp-body { padding: 4px 16px 16px; }
.dp-body h2 { margin: 4px 0 0; }
.dp-status { margin-top: 8px; font-size: .9rem; }
.dp-section { background: var(--bg-3); border-radius: 12px; padding: 12px; margin-top: 12px; }
.dp-section h4 { margin: 0 0 6px; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.dp-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 8px; width: 100%; text-align: left; }
button.dp-row:hover { background: var(--bg-4); }
.mini-srv { width: 24px; height: 24px; border-radius: 7px; background: var(--bg-5); display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; }

/* Arkadaşlar */
.friends-page { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.friends-body { flex: 1; display: flex; min-height: 0; }
.friends-content { flex: 1; overflow-y: auto; padding: 16px 24px; min-width: 0; }
.search-wide { margin-bottom: 8px; }
.friend-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-top: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.friend-row:hover { background: var(--bg-3); border-top-color: transparent; }
.friend-row:hover + .friend-row { border-top-color: transparent; }
.fr-text { flex: 1; min-width: 0; }
.fr-un { opacity: 0; transition: opacity .1s; }
.friend-row:hover .fr-un { opacity: 1; }
.fr-actions { display: flex; gap: 8px; }
.add-friend { max-width: 720px; }
.add-friend h2 { margin: 4px 0; text-transform: uppercase; font-size: 1rem; letter-spacing: .03em; }
.add-row { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.add-row .input { flex: 1; }
.add-status { margin-top: 8px; font-size: .88rem; }
.add-status.ok { color: var(--success); } .add-status.err { color: var(--danger); }
.active-now { width: 340px; flex-shrink: 0; border-left: 1px solid var(--line); padding: 16px; overflow-y: auto; }
.active-now h3 { margin: 4px 0 16px; font-size: 1.2rem; }
.an-empty { text-align: center; padding: 16px; }
.an-card { display: flex; gap: 10px; align-items: center; background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; cursor: pointer; }
.an-card:hover { background: var(--bg-4); }
.an-avs { display: flex; }
.an-avs .avatar + .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--bg-3); }

/* Hoş geldin */
.welcome { max-width: 860px; margin: 24px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.welcome h1 { margin: 0; font-size: 1.8rem; letter-spacing: -.02em; }
.wel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; width: 100%; margin: 18px 0 10px; }
.wel-card { background: var(--bg-3); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wel-card h3 { margin: 4px 0 0; }
.wel-card p { margin: 0 0 10px; font-size: .9rem; flex: 1; }
.wel-ic { font-size: 40px; }
.wel-share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* Ses görünümü */
.voice-view { flex: 1; display: flex; min-height: 0; background: #070b0c; }
:root[data-theme="light"] .voice-view { background: #1a2224; color: #e6efed; }
.vv-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.voice-view.compact { flex: 0 0 auto; height: 42vh; min-height: 280px; border-bottom: 1px solid var(--line); }
.voice-view.compact .vv-controls { padding: 10px; }
.voice-view.compact .vc-btn { width: 44px; height: 44px; }
.vv-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; color: #e6efed; }
.vv-top .icon-btn { margin-left: auto; }
.vv-timer { margin-left: 4px; }
.vv-stage { flex: 1; display: flex; padding: 8px 16px; min-height: 0; overflow: hidden; }
.vv-stage.focus { flex-direction: column; gap: 10px; }
.vv-grid { flex: 1; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 10px; min-height: 0; }
.vv-grid .vv-tile { aspect-ratio: auto; min-height: 120px; }
.vv-tile { position: relative; background: #141d1f; border-radius: 16px; aspect-ratio: 16 / 9; overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: box-shadow .15s; min-height: 0; }
.vv-tile.speaking { box-shadow: 0 0 0 3px var(--success); }
.vv-tile.big { flex: 1; aspect-ratio: auto; }
.vv-tile video { width: 100%; height: 100%; object-fit: cover; }
.vv-tile.screen video { object-fit: contain; background: #000; }
.vv-tile video.mirror { transform: scaleX(-1); }
.vv-av { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.vv-name { position: absolute; left: 10px; bottom: 10px; background: #000a; color: #fff; padding: 4px 10px; border-radius: 8px; font-size: .84rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.vv-full { position: absolute; right: 8px; top: 8px; background: #000a; color: #fff; }
.vv-strip { display: flex; gap: 10px; height: 120px; overflow-x: auto; }
.vv-strip .vv-tile { height: 100%; flex-shrink: 0; }
.vv-empty { margin: auto; text-align: center; color: #e6efed; }
.vv-controls { display: flex; justify-content: center; gap: 12px; padding: 16px; }
.vc-btn { width: 52px; height: 52px; border-radius: 50%; background: #243538; color: #e6efed; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, transform .1s; }
.vc-btn:hover { background: #2d4246; transform: translateY(-1px); }
.vc-btn.on { background: #e6efed; color: #0b1113; }
.vc-btn.off { background: #ef444433; color: #fca5a5; }
.vc-btn.hang { background: var(--danger); color: #fff; }
.vv-chat { width: 380px; border-left: 1px solid #ffffff12; display: flex; flex-direction: column; background: var(--bg-2); color: var(--text); }
.call-box h2 { margin: 12px 0 0; }
.call-av.pulse .avatar { animation: ring 1.5s ease-out infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 #22c55e88; } 100% { box-shadow: 0 0 0 24px #22c55e00; } }

/* ---------- Açılır öğeler ---------- */
.overlay { position: fixed; inset: 0; background: #000b; display: flex; align-items: center; justify-content: center; z-index: 100; animation: fade .15s ease; padding: 16px; }
.overlay.out { opacity: 0; transition: opacity .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--bg-2); border-radius: 16px; width: 480px; max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow); animation: pop .18s cubic-bezier(.2,1.3,.5,1); border: 1px solid var(--line); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 20px 8px; }
.modal-head h2 { margin: 0; font-size: 1.3rem; }
.modal-head p { margin: 6px 0 0; font-size: .9rem; }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; background: var(--bg-1); border-radius: 0 0 16px 16px; }
.modal-foot.inline { background: none; padding: 16px 0 0; justify-content: space-between; }
.modal.lightbox { background: none; border: 0; box-shadow: none; width: auto; max-width: 92vw; }
.lightbox-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.lightbox-inner img { max-width: 92vw; max-height: 84vh; border-radius: 8px; }
.lightbox-link { color: #fff; opacity: .7; font-size: .86rem; }
.profile-modal { width: 340px; background: none; border: 0; }
.warn-box { background: #f59e0b1f; border-left: 4px solid var(--warm); padding: 10px 12px; border-radius: 8px; }
.ctx-menu { position: fixed; z-index: 200; background: var(--bg-0); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; min-width: 210px; max-width: 280px; max-height: 80vh; overflow-y: auto; box-shadow: var(--shadow); animation: pop .12s ease; }
.ctx-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; font-size: .88rem; font-weight: 500; color: var(--text-2); text-align: left; }
.ctx-item:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); }
.ctx-item.danger { color: var(--danger); }
.ctx-item.danger:hover { background: var(--danger); color: #fff; }
.ctx-item span:not(.ic) { flex: 1; }
.ctx-check { flex: 0 0 18px !important; width: 18px; height: 18px; border: 1px solid var(--line-2); border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; }
.ctx-item.checked .ctx-check { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ctx-hint { flex: 0 !important; color: var(--muted); font-size: .76rem; }
.ctx-sep { height: 1px; background: var(--line-2); margin: 4px 6px; }
.ctx-header { font-size: .7rem; text-transform: uppercase; color: var(--muted); padding: 6px 10px 2px; font-weight: 700; letter-spacing: .05em; }
.popover { position: fixed; z-index: 150; animation: pop .12s ease; }
.dropdown { background: var(--bg-0); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; min-width: 230px; box-shadow: var(--shadow); }
.dd-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 7px; font-size: .88rem; font-weight: 500; color: var(--text-2); text-align: left; }
.dd-item:hover { background: var(--accent); color: var(--accent-ink); }
.dd-item.accent { color: var(--accent-2); }
.dd-item.accent:hover { color: var(--accent-ink); }
.dd-item.danger { color: var(--danger); }
.dd-item.danger:hover { background: var(--danger); color: #fff; }
.dd-sep { height: 1px; background: var(--line-2); margin: 4px 6px; }
.status-opt { justify-content: flex-start; }
.status-opt .status-dot { width: 12px; height: 12px; }
.dd-profile { display: flex; gap: 12px; align-items: center; padding: 8px; }
.status-dd { width: 290px; }
.tooltip { position: fixed; z-index: 300; background: var(--bg-0); color: var(--text); padding: 6px 10px; border-radius: 8px; font-size: .82rem; font-weight: 600; pointer-events: none; box-shadow: var(--shadow); max-width: 260px; border: 1px solid var(--line-2); animation: fade .1s; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--bg-0); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: .9rem; animation: pop .2s; max-width: 90vw; }
.toast.t-error { border-color: var(--danger); }
.toast.t-success { border-color: var(--success); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .3s; }

/* Profil kartı */
.profile-card { width: 330px; background: var(--bg-1); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.pc-banner { height: 96px; }
.pc-av { margin: -46px 0 0 14px; display: inline-block; border: 6px solid var(--bg-1); border-radius: 50%; }
.pc-av .status-dot { border-color: var(--bg-1); }
.pc-body { padding: 0 16px 16px; }
.pc-body h2 { margin: 6px 0 0; font-size: 1.25rem; }
.pc-un { color: var(--text-2); font-size: .9rem; }
.pc-status { margin-top: 10px; background: var(--bg-3); padding: 8px 10px; border-radius: 10px; font-size: .88rem; }
.pc-sep { height: 1px; background: var(--line-2); margin: 12px 0; }
.pc-sec { margin-bottom: 12px; font-size: .9rem; }
.pc-sec h4 { margin: 0 0 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.pc-actions { display: flex; flex-direction: column; gap: 8px; }
.role-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.role-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--bg-3); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; font-size: .78rem; font-weight: 600; }
.role-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Emoji seçici */
.emoji-picker { width: 380px; height: 420px; background: var(--bg-0); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.emoji-top { padding: 10px; border-bottom: 1px solid var(--line); }
.emoji-search { padding: 7px 10px; }
.emoji-tabs { display: flex; padding: 4px 6px; gap: 2px; border-bottom: 1px solid var(--line); }
.emoji-tab { flex: 1; padding: 4px; border-radius: 6px; font-size: 1.1rem; filter: grayscale(.8); }
.emoji-tab:hover { background: var(--bg-3); filter: none; }
.emoji-grid { flex: 1; overflow-y: auto; padding: 6px 10px; }
.emoji-cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 8px 2px 4px; letter-spacing: .05em; position: sticky; top: -6px; background: var(--bg-0); }
.emoji-row { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; }
.emoji-btn { aspect-ratio: 1; font-size: 1.45rem; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.emoji-btn:hover { background: var(--bg-4); }
.emoji-btn img { width: 28px; height: 28px; object-fit: contain; }
.emoji-preview { padding: 8px 12px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--text-2); height: 36px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Arama, sabitlenmiş, gelen kutusu */
.search-results, .pins-pop { width: 420px; max-height: 70vh; overflow-y: auto; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; }
.sr-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; gap: 8px; }
.sr-item { width: 100%; text-align: left; padding: 10px; border-radius: 10px; background: var(--bg-2); margin-bottom: 6px; border: 1px solid var(--line); display: block; }
.sr-item:hover { border-color: var(--accent); }
.sr-meta { margin-bottom: 6px; }
.sr-msg { display: flex; gap: 10px; align-items: flex-start; }
.sr-msg > div { min-width: 0; flex: 1; }

/* Pencere içerikleri */
.tpl-btn { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; margin-bottom: 8px; text-align: left; }
.tpl-btn:hover { background: var(--bg-3); }
.tpl-btn strong { flex: 1; }
.tpl-ic { font-size: 1.6rem; }
.tpl-label { margin: 14px 0 8px; font-weight: 700; }
.join-box { text-align: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.join-box h3 { margin: 0 0 10px; }
.icon-upload { width: 84px; height: 84px; border-radius: 50%; border: 2px dashed var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font-size: .7rem; font-weight: 800; margin: 8px auto 16px; overflow: hidden; gap: 2px; }
.icon-upload:hover { border-color: var(--accent); color: var(--accent); }
.icon-upload img { width: 100%; height: 100%; object-fit: cover; }
.icon-upload.big { width: 110px; height: 110px; border-style: solid; border-color: transparent; color: #fff; font-size: 1.8rem; }
.type-pick { display: flex; flex-direction: column; gap: 8px; }
.type-opt { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-3); border-radius: 12px; text-align: left; border: 1px solid transparent; }
.type-opt > div { flex: 1; }
.type-opt.active { border-color: var(--accent); background: var(--accent-soft); }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); flex-shrink: 0; }
.radio.on { border: 6px solid var(--accent); }
.invite-friends { max-height: 200px; overflow-y: auto; margin-bottom: 16px; }
.if-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; }
.if-row:hover { background: var(--bg-3); }
.if-row > span, .if-row > code { flex: 1; }
.invite-opts { display: flex; gap: 16px; font-size: .84rem; color: var(--muted); }
.invite-opts label { display: flex; align-items: center; gap: 6px; }
.btn.success, .btn.primary.success { background: var(--success); color: #04220f; }
.invite-preview .modal-head { padding-bottom: 0; }
.ip-icon { width: 80px; height: 80px; border-radius: 24px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; color: #fff; overflow: hidden; margin-bottom: 12px; }
.ip-icon img { width: 100%; height: 100%; object-fit: cover; }
.invite-preview h2 { margin: 2px 0 8px; }
.ip-stats { font-size: .86rem; color: var(--muted); }
.new-group { width: 340px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; }
.new-group h3 { margin: 0; }
.new-group > p { margin: 2px 0 10px; }
.ng-list { max-height: 260px; overflow-y: auto; margin: 10px 0; }
.ng-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; cursor: pointer; }
.ng-row:hover { background: var(--bg-3); }
.ng-row > span { flex: 1; }
.ng-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.quick-switcher { width: 560px; background: var(--bg-1); }
.qs { padding: 20px; }
.qs h3 { margin: 0 0 12px; font-size: 1rem; text-align: center; color: var(--text-2); }
.qs-input { font-size: 1.1rem; padding: 14px; }
.qs-list { margin: 12px 0; max-height: 50vh; overflow-y: auto; }
.qs-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; text-align: left; }
.qs-item.active, .qs-item:hover { background: var(--bg-4); }
.qs-kind { width: 20px; color: var(--muted); text-align: center; }
.qs-sub { margin-left: auto; }
.help-list { display: flex; flex-direction: column; gap: 4px; }
.help-row { display: flex; gap: 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.help-row > :first-child { min-width: 170px; }

/* Etkinlikler */
.events-btn { margin: 8px 8px 0; padding: 8px 10px; border-radius: 10px; background: var(--bg-3); color: var(--text-2); font-weight: 600; font-size: .86rem; text-align: left; }
.events-btn:hover { background: var(--bg-4); color: var(--text); }
.events-btn.live { background: #22c55e22; color: var(--success); }
.events-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.event-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.event-card.active { border-color: var(--success); }
.event-card h3 { margin: 6px 0 4px; }
.event-card p { margin: 0 0 8px; white-space: pre-wrap; }
.ev-when { font-size: .8rem; font-weight: 700; color: var(--warm); }
.ev-when.live { color: var(--success); }
.ev-meta { display: flex; align-items: center; gap: 2px; font-size: .86rem; }
.ev-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); gap: 8px; flex-wrap: wrap; }

/* Keşfet */
.discover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 16px; max-height: 62vh; overflow-y: auto; padding: 2px; }
.disc-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.disc-card:hover { border-color: var(--line-2); transform: translateY(-2px); transition: transform .15s; }
.disc-banner { height: 70px; }
.disc-icon { position: absolute; top: 40px; left: 14px; width: 54px; height: 54px; border-radius: 16px; border: 4px solid var(--bg-1); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; overflow: hidden; }
.disc-icon img { width: 100%; height: 100%; object-fit: cover; }
.disc-body { padding: 30px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.disc-body h3 { margin: 0; font-size: 1rem; }
.disc-desc { flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }

/* ---------- Ayarlar ekranı ---------- */
.settings-screen { position: fixed; inset: 0; z-index: 90; display: flex; background: var(--bg-2); animation: fade .15s; }
.set-side { flex: 1 0 220px; background: var(--bg-1); display: flex; justify-content: flex-end; overflow-y: auto; }
.set-nav { width: 220px; padding: 60px 8px 20px 20px; }
.set-header { font-size: .72rem; font-weight: 800; text-transform: uppercase; color: var(--muted); padding: 6px 10px; letter-spacing: .05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-link { display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; margin-bottom: 2px; }
.set-link:hover { background: var(--bg-3); color: var(--text); }
.set-link.active { background: var(--bg-4); color: var(--text); }
.set-link.danger { color: var(--danger); }
.set-sep { height: 1px; background: var(--line-2); margin: 8px 10px; }
.set-main { flex: 1 1 800px; display: flex; overflow-y: auto; }
.set-content { flex: 1; max-width: 760px; padding: 60px 40px 80px; }
.set-content > h2 { margin: 0 0 20px; font-size: 1.3rem; }
.set-sub { margin: 28px 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.set-close { padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: sticky; top: 0; }
.acc-card { background: var(--bg-1); border-radius: 16px; overflow: hidden; }
.acc-banner { height: 100px; }
.acc-head { display: flex; align-items: center; gap: 16px; padding: 0 16px; margin-top: -30px; }
.acc-head .avatar { border: 6px solid var(--bg-1); border-radius: 50%; }
.acc-head h3 { flex: 1; margin: 30px 0 0; }
.acc-head .btn { margin-top: 30px; }
.acc-rows { background: var(--bg-3); margin: 16px; border-radius: 12px; padding: 4px 16px; }
.acc-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.acc-row:last-child { border: 0; }
.profile-edit { display: grid; grid-template-columns: 1fr 340px; gap: 32px; }
.profile-preview { margin-top: 8px; }
.theme-row, .accent-row { display: flex; gap: 12px; flex-wrap: wrap; }
.theme-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .84rem; }
.theme-swatch { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--line-2); }
.t-dark .theme-swatch { background: #162224; } .t-midnight .theme-swatch { background: #000; } .t-light .theme-swatch { background: #fbfdfc; }
.theme-opt.active .theme-swatch, .accent-opt.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.accent-opt { width: 40px; height: 40px; border-radius: 12px; border: 3px solid transparent; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.mic-meter { flex: 1; height: 10px; background: var(--bg-0); border-radius: 5px; overflow: hidden; min-width: 160px; }
.mic-meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--success), var(--warm)); transition: width .05s; }
.ov-top { display: flex; gap: 24px; align-items: flex-start; }
.ov-top .icon-upload { margin: 0 0 4px; }
.danger-zone { margin-top: 40px; padding: 16px; border: 1px solid #ef444455; border-radius: 12px; }
.danger-zone h3 { margin: 0 0 4px; }
.roles-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.role-list { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line); padding-right: 12px; }
.role-list > .btn, .role-list > select { margin-bottom: 8px; }
.role-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; text-align: left; color: var(--text-2); }
.role-item:hover { background: var(--bg-3); }
.role-item.active { background: var(--bg-4); color: var(--text); }
.role-item .ellipsis { flex: 1; }
.role-editor { min-width: 0; }
.re-head { display: flex; justify-content: space-between; align-items: center; }
.re-head h3 { margin: 0 0 10px; }
.role-editor .tabs { margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.swatches { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 8px; }
.perm-group { margin: 20px 0 4px; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.save-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 0; background: linear-gradient(transparent, var(--bg-2) 30%); margin-top: 16px; }
.tri-group { display: flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.tri { width: 32px; height: 28px; color: var(--muted); font-weight: 700; }
.tri + .tri { border-left: 1px solid var(--line-2); }
.tri.on { background: var(--bg-5); color: var(--text); }
.tri.red.on { background: var(--danger); color: #fff; }
.tri.green.on { background: var(--success); color: #04220f; }
.private-toggle { margin-bottom: 16px; }
.member-table { display: flex; flex-direction: column; margin-top: 12px; }
.mt-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-bottom: 1px solid var(--line); }
.audit-row { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--bg-1); border-radius: 10px; margin-bottom: 6px; }
.emoji-table { margin-top: 16px; }

/* ---------- Mobil ---------- */
.mobile-scrim { display: none; }
@media (max-width: 1100px) { .active-now { display: none; } .members, .dm-profile { width: 220px; } }
@media (max-width: 900px) { .members, .dm-profile { display: none; } .search-input { width: 100px; } .search-input:focus { width: 160px; } }
@media (max-width: 720px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  #rail { position: fixed; left: 0; top: 0; bottom: 0; width: 72px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  #sidebar { position: fixed; left: 72px; top: 0; bottom: 0; width: min(280px, calc(100vw - 72px)); z-index: 60; transform: translateX(calc(-100% - 72px)); transition: transform .2s; }
  body.show-sidebar #rail, body.show-sidebar #sidebar { transform: none; }
  body.show-sidebar .mobile-scrim { display: block; position: fixed; inset: 0; background: #0008; z-index: 55; }
  .mobile-only { display: inline-flex !important; }
  .head-topic, .head-sep { display: none; }
  .search-box { display: none; }
  .main-head .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .main-head .tabs::-webkit-scrollbar { display: none; }
  .friends-page .main-head h3 { display: none; }
  .main-head h3 { overflow: hidden; text-overflow: ellipsis; }
  .friends-content { padding: 12px; }
  .msg { padding-right: 12px; }
  .msg-hover { right: 8px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .set-side { flex: 0 0 auto; }
  .set-nav { width: 170px; padding: 20px 6px; }
  .set-content { padding: 20px 16px 60px; }
  .set-close { padding: 20px 8px; }
  .profile-edit, .roles-layout, .grid-2 { grid-template-columns: 1fr; }
  .vv-chat { display: none; }
  .emoji-picker { width: calc(100vw - 16px); }
  .search-results, .pins-pop { width: calc(100vw - 16px); }
}

/* ---------- Tierfy+ ---------- */
.plus-badge { display: inline-flex; margin-left: 4px; background: linear-gradient(135deg, #2dd4bf, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 900; cursor: default; }
.plus-hero { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: 18px; background: linear-gradient(135deg, #0f766e, #b45309); color: #fff; margin-bottom: 18px; }
.plus-hero.active { background: linear-gradient(135deg, #14b8a6, #f59e0b); }
.plus-hero h2 { margin: 0 0 4px; } .plus-hero p { margin: 0; opacity: .9; }
.plus-logo { font-size: 46px; width: 72px; height: 72px; border-radius: 22px; background: #0003; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.perk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.perk { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.perk.unlocked { border-color: var(--success); }
.perk-ic { font-size: 22px; }
.gift-codes { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.gift-codes code { font-size: .95rem; padding: 4px 8px; }
.plus-box { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; margin: 6px 0 16px; background: linear-gradient(135deg, #14b8a60f, #f59e0b0f); }
.plus-box.locked { opacity: .75; }
.plus-box-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.profile-card.themed, .dm-profile.themed { background: linear-gradient(180deg, var(--t1), var(--t2)); }
.profile-card.themed .pc-av, .dm-profile.themed .dp-av { border-color: color-mix(in srgb, var(--t1) 85%, #000); }
.profile-card.themed .pc-body, .dm-profile.themed .dp-body { color: #fff; }
.profile-card.themed .pc-un, .profile-card.themed .muted, .dm-profile.themed .muted { color: #ffffffbb; }
.profile-card.themed .pc-status, .profile-card.themed .role-pill, .dm-profile.themed .dp-section { background: #0000004d; border-color: transparent; }
.profile-card.themed .pc-sep { background: #ffffff33; }
.boost-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.boost-head h3 { margin: 0; }
.boost-gem { font-size: 34px; width: 60px; height: 60px; border-radius: 18px; background: linear-gradient(135deg, #8b5cf6, #ec4899); display: flex; align-items: center; justify-content: center; }
.boost-bar { position: relative; height: 10px; background: var(--bg-0); border-radius: 6px; margin: 8px 0 18px; }
.boost-bar > span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8b5cf6, #ec4899); border-radius: 6px; }
.boost-bar i { position: absolute; top: -4px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--bg-5); border: 3px solid var(--bg-2); }
.boost-bar i.on { background: #ec4899; }
.server-head.has-banner { height: 120px; align-items: flex-end; padding-bottom: 12px; background-size: cover; background-position: center; color: #fff; border-bottom: 0; }
.boost-pip { font-size: 13px; }
.dd-item.boost { color: #ec4899; }
.dd-item.boost:hover { background: #ec4899; color: #fff; }
.emoji-btn img.locked { filter: grayscale(1); opacity: .45; }

/* Rozetler */
.badge-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 2px; padding: 4px 6px; background: #0000002a; border-radius: 10px; width: fit-content; }
.ubadge { --bc: #8a9a9c; width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; background: color-mix(in srgb, var(--bc) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bc) 55%, transparent); cursor: default; color: var(--bc); font-weight: 900; }
.ubadge.owner { background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 0 10px #f59e0b88; animation: shine 3s ease-in-out infinite; }
@keyframes shine { 50% { box-shadow: 0 0 18px #fbbf24cc; } }
.ubadge.big { width: 40px; height: 40px; font-size: 22px; border-radius: 12px; }
.staff-tag { font-size: 9.5px; font-weight: 900; letter-spacing: .05em; padding: 1px 6px; border-radius: 5px; align-self: center; white-space: nowrap; }
.staff-tag.owner { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #3b2300; }
.staff-tag.admin { background: #3b82f6; color: #fff; }
.badge-admin { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.badge-admin .gift-codes code { cursor: pointer; }

/* Çıkartmalar, ses panosu, süper tepkiler */
.sticker { width: 160px; height: 160px; object-fit: contain; margin-top: 4px; display: block; }
.sticker-picker { height: 380px; }
.sticker-grid { flex: 1; overflow-y: auto; padding: 6px 10px; }
.sticker-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sticker-btn { aspect-ratio: 1; border-radius: 10px; padding: 6px; }
.sticker-btn:hover { background: var(--bg-4); }
.sticker-btn img { width: 100%; height: 100%; object-fit: contain; }
.sticker-btn.locked img { filter: grayscale(1); opacity: .45; }
.soundboard { width: 340px; max-height: 380px; overflow-y: auto; background: var(--bg-0); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 8px 10px; }
.sound-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sound-btn { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 10px; background: var(--bg-3); font-size: .84rem; text-align: left; min-width: 0; }
.sound-btn:hover { background: var(--accent); color: var(--accent-ink); }
.sound-btn.locked { opacity: .5; }
.sound-emoji { font-size: 18px; }
.sb-hint { padding: 8px 2px 2px; }
.sound-pop { position: absolute; top: 6px; right: 6px; font-size: 26px; animation: soundpop 1.6s ease forwards; pointer-events: none; z-index: 3; }
.voice-user { position: relative; }
@keyframes soundpop { 0% { transform: scale(.3); opacity: 0; } 15% { transform: scale(1.3); opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(-30px); opacity: 0; } }
.reaction.burst { background: linear-gradient(135deg, #14b8a633, #ec489933); border-color: #ec4899aa; }
.reaction.burst .r-emoji { animation: wiggle 2.4s ease-in-out infinite; display: inline-block; }
@keyframes wiggle { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-12deg) scale(1.15); } 92% { transform: rotate(10deg) scale(1.15); } }
.hb-btn.super { font-size: 16px; }
.burst-particle { position: fixed; z-index: 500; pointer-events: none; font-size: 20px; transform: translate(-50%, -50%); animation: burst .9s ease-out forwards; }
@keyframes burst { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.4); opacity: 0; } }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.asset-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.asset-card img { width: 96px; height: 96px; object-fit: contain; }
.asset-card .icon-btn { position: absolute; top: 4px; right: 4px; }

.ctx-quick { display: flex; justify-content: space-between; padding: 2px 2px 6px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }

.rules-gate { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--bg-3); border: 1px dashed var(--accent); border-radius: 14px; font-size: .9rem; }
.rules-body { max-height: 50vh; overflow-y: auto; background: var(--bg-1); border-radius: 10px; padding: 12px 14px; white-space: normal; }

/* ⋯ düğmeleri: masaüstünde üzerine gelince, dokunmatikte her zaman */
.more-btn { opacity: 0; transition: opacity .12s; }
.dm-item:hover .more-btn, .cat-head:hover .more-btn, .ch-item:hover .more-btn, .ch-item.active .more-btn, .voice-user:hover .more-btn, .mem-row:hover .more-btn, .more-btn:focus-visible { opacity: 1; }
@media (pointer: coarse) { .more-btn { opacity: .8; } .dm-close { opacity: 1; } }
.dm-acts { display: inline-flex; gap: 2px; }
.dm-item .dm-acts { opacity: 0; } .dm-item:hover .dm-acts, .dm-item.active .dm-acts { opacity: 1; }
@media (pointer: coarse) { .dm-item .dm-acts { opacity: 1; } }
.mem-row .more-btn { margin-left: auto; }
.voice-user .more-btn { margin-left: 2px; }
.sound-prev { font-size: 11px; opacity: .6; padding: 2px 4px; border-radius: 4px; }
.sound-prev:hover { opacity: 1; background: #0003; }

/* Sesli mesaj */
.rec-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
.rec-level { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transition: transform .1s; }
.rec-time { font-variant-numeric: tabular-nums; color: var(--text-2); }
.voice-msg { display: flex; align-items: center; gap: 10px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 24px; padding: 6px 12px 6px 6px; width: min(360px, 100%); }
.vm-play { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vm-wave { flex: 1; height: 30px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.vm-wave i { flex: 1; background: var(--bg-5); border-radius: 2px; min-width: 2px; }
.vm-wave i.on { background: var(--accent-2); }
.vm-time { font-size: .78rem; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.vm-speed { font-size: .72rem; font-weight: 800; color: var(--text-2); padding: 2px 6px; border-radius: 6px; background: var(--bg-2); }

/* Avatar çerçeveleri (Tierfy+) */
.avatar.deco::before { content: ""; position: absolute; inset: calc(var(--ds) * -0.09); border-radius: 50%; pointer-events: none; z-index: 1; padding: calc(var(--ds) * 0.06); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.avatar.deco::after { position: absolute; z-index: 2; pointer-events: none; font-size: calc(var(--ds) * 0.32); line-height: 1; }
.deco-neon::before { background: conic-gradient(#22d3ee, #a855f7, #ec4899, #22d3ee); animation: spin 3s linear infinite; filter: drop-shadow(0 0 4px #a855f7); }
.deco-alev::before { background: conic-gradient(from 180deg, #f97316, #ef4444, #facc15, #f97316); animation: spin 2s linear infinite; filter: drop-shadow(0 0 5px #f97316); }
.deco-altin::before { background: conic-gradient(#fde68a, #b45309, #fde68a, #f59e0b, #fde68a); animation: spin 6s linear infinite; }
.deco-gokkusagi::before { background: conic-gradient(red, orange, yellow, lime, cyan, blue, violet, red); animation: spin 4s linear infinite; }
.deco-buz::before { background: conic-gradient(#e0f2fe, #38bdf8, #e0f2fe, #7dd3fc, #e0f2fe); filter: drop-shadow(0 0 4px #7dd3fc); }
.deco-galaksi::before { background: conic-gradient(#1e1b4b, #7c3aed, #0ea5e9, #1e1b4b, #db2777, #1e1b4b); animation: spin 8s linear infinite; }
.deco-yaprak::before { background: conic-gradient(#14532d, #22c55e, #86efac, #22c55e, #14532d); }
.deco-kalp::before, .deco-yildiz::before, .deco-kedi::before { background: conic-gradient(#f9a8d4, #ec4899, #f9a8d4); }
.deco-yildiz::before { background: conic-gradient(#fef08a, #eab308, #fef08a); }
.deco-kedi::before { background: #fb923c; }
.deco-kalp::after { content: "💖"; right: -6%; top: -8%; animation: pulse 1.4s ease-in-out infinite; }
.deco-yildiz::after { content: "⭐"; left: -6%; top: -8%; animation: pulse 2s ease-in-out infinite; }
.deco-yaprak::after { content: "🍃"; right: -8%; bottom: -6%; }
.deco-kedi::after { content: "🐱"; left: 50%; top: -22%; transform: translateX(-50%); }
.avatar.deco .status-dot { z-index: 3; }
.deco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.deco-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 12px; border: 2px solid transparent; background: var(--bg-1); font-size: .74rem; color: var(--text-2); }
.deco-opt.on { border-color: var(--accent); color: var(--text); }
.deco-opt:hover:not(:disabled) { background: var(--bg-3); }
.deco-none { width: 44px; height: 44px; border-radius: 50%; border: 2px dashed var(--muted); display: flex; align-items: center; justify-content: center; color: var(--muted); }
/* Profil efektleri */
.profile-card, .dm-profile { position: relative; }
.fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; border-radius: inherit; }
.fx i { position: absolute; top: -10%; font-style: normal; animation: fxfall linear infinite; opacity: .85; font-size: 12px; }
@keyframes fxfall { from { transform: translateY(-20px) rotate(0); } to { transform: translateY(520px) rotate(220deg); } }
.fx-kar i { color: #fff; text-shadow: 0 0 4px #bae6fd; }
.fx-parilti i { color: #fde68a; animation-name: fxtwinkle; top: auto; }
.fx-parilti i:nth-child(odd) { top: 20%; } .fx-parilti i:nth-child(even) { top: 60%; } .fx-parilti i:nth-child(3n) { top: 40%; }
@keyframes fxtwinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.2); } }
.fx-konfeti i { font-size: 8px; } .fx-konfeti i:nth-child(4n) { color: #f43f5e; } .fx-konfeti i:nth-child(4n+1) { color: #22c55e; } .fx-konfeti i:nth-child(4n+2) { color: #3b82f6; } .fx-konfeti i:nth-child(4n+3) { color: #eab308; }
.fx-kabarcik i { color: #7dd3fc; top: auto; bottom: -10%; animation-name: fxrise; }
@keyframes fxrise { from { transform: translateY(20px); opacity: .9; } to { transform: translateY(-520px); opacity: 0; } }
.fx-yagmur i { color: #93c5fd; font-size: 14px; animation-duration: 1.1s !important; }
.fx-box { position: relative; width: 56px; height: 44px; border-radius: 10px; background: var(--bg-3); overflow: hidden; }
.fx-box .fx i { font-size: 9px; }
.reduce-motion .fx { display: none; }

.rem-item { display: flex; flex-direction: column; gap: 6px; }
.rem-item.fired { border-color: var(--accent); }
#toasts { pointer-events: none; }
