:root {
  --bg: #07090a;            /* sohbet zemini — neredeyse siyah */
  --rail: #0a0e0c;          /* sol liste */
  --panel: #0d1311;         /* baslik, composer, modal */
  --input: #121a16;         /* girdi alanlari */
  --accent: #2be06a;        /* neon yesil */
  --accent-glow: #5cffa0;   /* parlak varyant (glow) */
  --accent-strong: #123a23; /* giden balon (koyu yesil) */
  --bubble-in: #0d1311;     /* gelen balon */
  --text: #cfe0d6;          /* yesilimsi beyaz */
  --muted: #5f7268;
  --line: #1b2620;
  --ok: #19e3e3;            /* siyan detay */
  --err: #ff5c5c;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'Inter', 'Segoe UI', -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }   /* sayfa kendisi kaymasin (focus vb. yukari kaydirmasin) */
body { font-family: var(--sans); background: var(--bg); color: var(--text); overflow: hidden; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-thumb { background: #1f2d26; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #2a3d33; }
button { font-family: inherit; }

/* ============ GIRIS ============ */
.auth-wrap { height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; background: var(--bg); }
.auth-bg { position: absolute; inset: 0;
  background:
    radial-gradient(620px 360px at 50% -8%, rgba(43,224,106,.07), transparent 70%),
    linear-gradient(rgba(43,224,106,.045) 1px, transparent 1px) 0 0 / 100% 3px,
    linear-gradient(90deg, rgba(43,224,106,.05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(43,224,106,.05) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--bg);
}
.auth-back { position: absolute; top: 22px; left: 24px; font-family: var(--mono); font-size: 13px; color: var(--muted); z-index: 2; transition: .15s; }
.auth-back:hover { color: var(--accent); }
.auth-card { position: relative; z-index: 2; width: 380px; padding: 34px 30px; border-radius: 6px;
  background: linear-gradient(180deg, #0e1512, var(--panel)); border: 1px solid #1f3528;
  box-shadow: 0 0 0 1px rgba(43,224,106,.08), 0 24px 80px rgba(0,0,0,.7), 0 0 60px rgba(43,224,106,.05); text-align: center; }
.auth-card::before { content: '> secure-session --init'; position: absolute; top: 12px; left: 18px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .5px; color: rgba(43,224,106,.45); }
.auth-brand { font-family: var(--mono); font-weight: 800; font-size: 24px; letter-spacing: 2px; margin-top: 8px; }
.auth-mark { color: var(--accent); margin-right: 4px; text-shadow: 0 0 14px rgba(43,224,106,.6); }
.sub { color: var(--muted); font-size: 13px; margin: 8px 0 22px; font-family: var(--mono); }
.tabs { display: flex; gap: 4px; background: var(--input); padding: 4px; border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--line); }
.tab { flex: 1; padding: 10px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; font-family: var(--mono); transition: .2s; }
.tab.active { background: var(--accent); color: #04140b; box-shadow: 0 0 18px rgba(43,224,106,.4); }
.auth-card input { width: 100%; padding: 14px 16px; margin-bottom: 11px; border-radius: 7px; border: 1px solid var(--line); background: var(--input); color: var(--text); font-size: 15px; outline: none; transition: .15s; }
.auth-card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43,224,106,.16); }
.primary { width: 100%; padding: 14px; border: 0; border-radius: 7px; background: var(--accent); color: #04140b; font-size: 15px; font-weight: 700; cursor: pointer; transition: .15s; box-shadow: 0 0 20px rgba(43,224,106,.25); }
.primary:hover { filter: brightness(1.08); }
.primary:disabled { opacity: .6; cursor: wait; }
.primary.sm { width: auto; padding: 10px 20px; font-size: 14px; }
.secondary { border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 15px; font-weight: 600; transition: .15s; }
.secondary:hover { background: rgba(255,255,255,.07); }
.secondary.sm { padding: 9px 18px; font-size: 14px; }
.danger { border: 0; border-radius: 10px; background: rgba(255,92,92,.14); color: var(--err); cursor: pointer; font-weight: 600; }
.danger.sm { padding: 10px 18px; font-size: 14px; margin-top: 18px; }
.error { color: var(--err); font-size: 13px; min-height: 18px; margin-top: 8px; }
.hint { color: var(--muted); font-size: 11.5px; margin-top: 14px; line-height: 1.5; }

/* ============ LAYOUT ============ */
.app { position: fixed; inset: 0; display: grid; grid-template-columns: 64px var(--rail-w, 240px) 4px 1fr; grid-template-rows: 100%; overflow: hidden; }   /* viewport'a SABIT: her ekran boyutunda tam oturur, composer dahil sigar */
.rail-resize { cursor: col-resize; background: transparent; transition: background .15s; z-index: 5; }
.rail-resize:hover, .rail-resize.dragging { background: var(--accent); opacity: .35; }

/* ---- sol liste ---- */
.rail { background: var(--rail); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.rail-head { display: flex; align-items: center; gap: 4px; padding: 10px 10px 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.brand { font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: .5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-dot { color: var(--accent); }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; transition: .15s; display: grid; place-items: center; flex: none; }
.icon-btn:hover { background: var(--input); color: var(--text); }
.search-wrap { padding: 8px 12px; background: var(--rail); flex-shrink: 0; }
.search { width: 100%; padding: 9px 16px; border-radius: 8px; border: 0; background: var(--input); color: var(--text); font-size: 14px; outline: none; }
.search::placeholder { color: var(--muted); }
.conv-list { list-style: none; flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px; }
.conv { display: flex; align-items: center; gap: 12px; padding: 8px 10px; cursor: pointer; transition: background .12s; border-radius: 9px; margin-bottom: 2px; position: relative; }
.conv:hover { background: var(--panel); }
.conv.active { background: var(--input); }
.conv.active::before { content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%); width: 4px; height: 62%; background: var(--accent); border-radius: 0 3px 3px 0; box-shadow: 0 0 10px rgba(43,224,106,.5); }
.conv.has-unread::after { content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%); width: 4px; height: 30%; background: #fff; border-radius: 0 3px 3px 0; }
.conv.active.has-unread::after { display: none; }
.conv-body { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.conv-name { font-weight: 500; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: 11.5px; color: var(--muted); flex: none; }
.conv-preview { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.badge { background: var(--accent); color: #04140b; font-size: 11.5px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px; }

.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; flex: none; font-size: 16px; position: relative; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.avatar.lg { width: 80px; height: 80px; font-size: 32px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.avatar .pres { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); border: 2.5px solid var(--rail); }
.avatar .pres.on { background: var(--accent); }
/* user panel (alt bar): daha kompakt */
.user-panel .avatar { width: 32px; height: 32px; font-size: 13px; }
.user-panel .avatar .pres { width: 10px; height: 10px; border-width: 2px; }
.avatar-edit { position: relative; width: 80px; height: 80px; }
.avatar-upload { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #04140b; display: grid; place-items: center; cursor: pointer; font-size: 14px; border: 2px solid var(--rail); }
.avatar-upload:hover { filter: brightness(1.08); }
.link-btn { background: none; border: 0; color: var(--err); font-size: 12.5px; cursor: pointer; padding: 6px 0 0; }
.link-btn:hover { text-decoration: underline; }

.user-panel { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--rail); flex-shrink: 0; }
.user-meta { flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-status { font-size: 12px; color: var(--accent); }

/* ---- sohbet ---- */
.chat { height: 100%; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; position: relative;
  background: var(--bg); }
.drop-overlay { position: absolute; inset: 0; z-index: 100; background: rgba(43,224,106,.12); border: 2.5px dashed var(--accent); border-radius: 12px; margin: 8px; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: var(--accent); pointer-events: none; }
.drop-overlay.hidden { display: none; }
.chat::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    linear-gradient(rgba(43,224,106,.05) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(43,224,106,.05) 1px, transparent 1px) 0 0 / 32px 100%,
    radial-gradient(900px 500px at 80% -10%, rgba(43,224,106,.05), transparent 70%); }
.empty-state { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); gap: 14px; position: relative; z-index: 1; border-bottom: 5px solid var(--accent); }
.empty-emoji { width: 110px; height: 110px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-size: 50px; }
.chat-view { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 1; }
.chat-head { display: flex; align-items: center; gap: 13px; padding: 9px 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.head-meta { flex: 1; min-width: 0; }
.head-title { font-weight: 600; font-size: 16px; }
.head-sub { font-size: 12.5px; color: var(--muted); }
.lock-pill { font-size: 11px; color: var(--accent); background: rgba(43,224,106,.12); padding: 4px 10px; border-radius: 20px; }

.messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 0; display: flex; flex-direction: column; gap: 2px; }   /* Discord stili: full-width sol hizali (8% padding KALDIRILDI) */
.day-sep { align-self: center; font-size: 12px; color: var(--text); background: var(--panel); padding: 6px 14px; border-radius: 8px; margin: 12px 0; box-shadow: 0 1px 1px rgba(0,0,0,.2); }
.new-msg-sep { display: flex; align-items: center; gap: 10px; margin: 8px 16px; color: #f23f43; font-size: 12px; font-weight: 600; }
.new-msg-sep::before, .new-msg-sep::after { content: ''; flex: 1; height: 1px; background: #f23f43; opacity: .4; }
.new-msg-sep span { white-space: nowrap; }
.row { display: flex; gap: 8px; max-width: 70%; margin-top: 2px; }   /* mesaj animasyonu KALDIRILDI (karisma/kasma yapmasin) */
.row[data-pending="1"] { opacity: .5; }   /* sunucu onayini bekleyen optimistic mesaj */
/* "asagi in" butonu */
.jump-btn { position: absolute; right: 24px; bottom: 86px; z-index: 6; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.55); transition: color .15s, border-color .15s, transform .12s; }
.jump-btn:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.jump-btn.hidden { display: none; }
.jb-count { position: absolute; top: -7px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #04140b; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.jb-count.hidden { display: none; }
/* sunucu ekle: Olustur / Katil sekmeleri */
.ns-tabs { display: flex; gap: 4px; background: var(--input); padding: 4px; border-radius: 8px; margin-bottom: 16px; border: 1px solid var(--line); }
.ns-tab { flex: 1; padding: 9px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; font-family: var(--mono); transition: .15s; }
.ns-tab.active { background: var(--accent); color: #04140b; box-shadow: 0 0 16px rgba(43,224,106,.35); }
.ns-pane.hidden { display: none; }
/* ---- arkadas sistemi ---- */
.fr-tab { flex: 1; padding: 9px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; font-size: 13.5px; font-weight: 600; font-family: var(--mono); transition: .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.fr-tab.active { background: var(--accent); color: #04140b; box-shadow: 0 0 16px rgba(43,224,106,.35); }
.fr-pane.hidden { display: none; }
.fr-count { background: var(--err); color: #fff; font-size: 11px; min-width: 17px; height: 17px; border-radius: 9px; display: inline-grid; place-items: center; padding: 0 4px; }
.fr-count.hidden { display: none; }
.fr-list { list-style: none; max-height: 52vh; overflow-y: auto; margin: 0; padding: 0; }
.fr-sec { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); padding: 12px 4px 6px; }
.fr-empty { padding: 26px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.fr-row { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-top: 1px solid var(--line); }
.fr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fr-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-user { color: var(--muted); font-size: 12.5px; }
.fr-actions { display: flex; gap: 7px; flex: none; }
.fr-act { border: 1px solid var(--line); background: var(--input); color: var(--text); border-radius: 7px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; }
.fr-act.primary { background: var(--accent); color: #04140b; border-color: var(--accent); }
.fr-act.primary:hover { filter: brightness(1.1); }
.fr-act.danger { color: var(--err); }
.fr-act.danger:hover { background: rgba(255,92,92,.12); border-color: var(--err); }
.fr-pendlbl { color: var(--muted); font-size: 12.5px; font-style: italic; align-self: center; margin-right: 4px; }
.fr-badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--err); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--rail); }
/* ---- tek-gorumluk (view once) ---- */
.comp-btn.on { color: var(--accent); }
#viewonce-btn { font-size: 17px; }
#viewonce-btn.on { text-shadow: 0 0 12px rgba(43,224,106,.7); }
.vo-ph { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 14px; border-radius: 10px; border: 1px dashed #2a4133; background: rgba(43,224,106,.06); color: var(--text); font-size: 14px; user-select: none; transition: .15s; }
.vo-ph:hover { background: rgba(43,224,106,.12); border-color: var(--accent); }
.vo-eye { font-size: 17px; }
.vo-ph .vo-sub { color: var(--muted); font-size: 12px; }
.vo-tag { font-size: 11px; color: var(--accent); background: rgba(43,224,106,.1); border: 1px solid rgba(43,224,106,.25); padding: 1px 6px; border-radius: 6px; vertical-align: 1px; }
.vo-burned { display: inline-block; margin-left: 6px; color: var(--muted); font-size: 11.5px; font-style: italic; }
/* ---- rozet kutuphanesi ---- */
.bl-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; max-height: 46vh; overflow-y: auto; }
.bl-cell { width: 100%; aspect-ratio: 1; border: 1px solid var(--line); background: var(--input); border-radius: 9px; cursor: pointer; display: grid; place-items: center; padding: 6px; transition: .12s; }
.bl-cell:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 14px rgba(43,224,106,.2); transform: translateY(-1px); }
.bl-cell img { width: 100%; height: 100%; object-fit: contain; }
.row.in { align-self: flex-start; }
.row.out { align-self: flex-end; flex-direction: row-reverse; }
.row .avatar.sm { align-self: flex-end; }
.row.grouped { margin-top: 1px; }
.row.grouped .avatar { visibility: hidden; }
.col { display: flex; flex-direction: column; min-width: 0; }
.row.out .col { align-items: flex-end; }
.sender { font-size: 12.5px; font-weight: 600; margin: 4px 0 2px 4px; }
.bubble { position: relative; padding: 6px 9px 7px; border-radius: 8px; font-size: 14.3px; line-height: 1.34;
  word-break: break-word; background: var(--bubble-in); box-shadow: 0 1px 1px rgba(0,0,0,.18); max-width: 100%; }
.row.in:not(.grouped) .bubble { border-top-left-radius: 0; }
.row.out:not(.grouped) .bubble { border-top-right-radius: 0; }
.row.out .bubble { background: var(--accent-strong); }
/* kuyruk */
.bubble::before { content: ''; position: absolute; top: 0; width: 9px; height: 9px; }
.row.in:not(.grouped) .bubble::before { left: -8px; border-top: 9px solid var(--bubble-in); border-left: 9px solid transparent; }
.row.out:not(.grouped) .bubble::before { right: -8px; border-top: 9px solid var(--accent-strong); border-right: 9px solid transparent; }
.row.grouped .bubble::before { display: none; }
.bubble.locked { font-style: italic; color: var(--muted); background: rgba(32,44,51,.6); box-shadow: none; }
.bubble.locked::before { display: none; }
.btext { white-space: pre-wrap; }
.bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
.row.in .bubble a { color: var(--ok); }
.meta { float: right; font-size: 11px; color: var(--muted); margin: 7px -2px -2px 12px; user-select: none; line-height: 1; }
.row.out .meta { color: rgba(233,237,239,.55); }
.ticks { margin-left: 3px; letter-spacing: -2px; }
.typing { height: 18px; padding: 2px 16px 0; color: var(--accent); font-size: 12.5px; position: relative; z-index: 1; text-align: left; }
.typing-dots { display: inline-flex; gap: 1px; margin-left: 1px; }
.typing-dots span { animation: typingBounce 1.2s infinite; display: inline-block; }
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-3px)} }
.composer { display: flex; align-items: center; gap: 8px; padding: 9px 16px; background: var(--panel); position: relative; z-index: 1; }
.composer input, .composer textarea { flex: 1; padding: 12px 18px; border-radius: 9px; border: 0; background: var(--input); color: var(--text); font-size: 15px; outline: none; font-family: inherit; }
.composer textarea { resize: none; min-height: 44px; max-height: 160px; overflow-y: auto; line-height: 1.45; display: block; align-self: center; }
.composer input::placeholder, .composer textarea::placeholder { color: var(--muted); }
.comp-btn { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; flex: none; transition: .15s; }
.comp-btn:hover { background: var(--input); }
.send { width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--accent); color: #04140b; font-size: 18px; cursor: pointer; transition: .15s; flex: none; }
.send:hover { filter: brightness(1.08); }

/* reaksiyonlar */
.react-btn { align-self: center; opacity: 0; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--panel); color: var(--muted); cursor: pointer; font-size: 15px; transition: .15s; flex: none; }
.row:hover .react-btn { opacity: 1; }
.react-btn:hover { color: var(--accent); }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reacts:empty { display: none; }
.rchip { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1px 7px; font-size: 12px; cursor: pointer; user-select: none; line-height: 1.5; }
.rchip.mine { border-color: var(--accent); background: rgba(43,224,106,.16); }
.rchip:hover { filter: brightness(1.1); }

/* emoji & reaksiyon popoverlari */
.emoji-pop { position: fixed; z-index: 60; width: 296px; max-height: 280px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.emoji-pop button { border: 0; background: transparent; font-size: 21px; padding: 4px 0; border-radius: 8px; cursor: pointer; }
.emoji-pop button:hover { background: var(--input); }
.ep-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 4px 2px 2px; }
.ep-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.react-pop { position: fixed; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 5px 8px; display: flex; gap: 3px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.react-pop button { border: 0; background: transparent; font-size: 22px; padding: 4px 6px; border-radius: 50%; cursor: pointer; transition: transform .12s; }
.react-pop button:hover { transform: scale(1.25); background: var(--input); }

/* hover araç çubuğu */
.msg-tools { align-self: center; display: flex; gap: 1px; opacity: 0; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 2px; box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: opacity .12s; flex: none; }
.row:hover .msg-tools { opacity: 1; pointer-events: auto; }
.mt { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; display: grid; place-items: center; }
.mt:hover { background: var(--input); color: var(--text); }

/* alinti (yanit) */
.quote { display: flex; flex-direction: column; gap: 1px; border-left: 3px solid var(--accent); background: rgba(0,0,0,.18); border-radius: 5px; padding: 4px 9px; margin-bottom: 5px; cursor: pointer; max-width: 100%; }
.row.out .quote { background: rgba(0,0,0,.16); border-left-color: rgba(255,255,255,.55); }
.q-name { font-size: 12px; font-weight: 700; color: var(--accent); }
.row.out .q-name { color: rgba(255,255,255,.85); }
.q-text { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.out .q-text { color: rgba(233,237,239,.7); }

/* markdown + mention + edited + silinmis */
.bubble code { font-family: var(--mono); font-size: 12.5px; background: rgba(0,0,0,.28); padding: 1px 5px; border-radius: 5px; }
.bubble b { font-weight: 700; } .bubble i { font-style: italic; } .bubble s { opacity: .7; }
.mention { color: var(--accent); font-weight: 600; background: rgba(43,224,106,.14); padding: 0 3px; border-radius: 4px; }
.row.out .mention { color: #d6fff0; background: rgba(255,255,255,.18); }
.mention.me { background: rgba(43,224,106,.32); }
.edited { font-size: 10px; color: var(--muted); }
.bubble.deleted { font-style: italic; color: var(--muted); background: rgba(32,44,51,.5); box-shadow: none; }
.bubble.deleted::before { display: none; }
.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%,100% { background: transparent; } 25% { background: rgba(43,224,106,.12); } }

/* yanit/duzenle cubugu */
.compose-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--panel); border-top: 1px solid var(--line); position: relative; z-index: 1; }
.cb-accent { width: 3px; align-self: stretch; background: var(--accent); border-radius: 3px; }
.cb-text { flex: 1; min-width: 0; }
.cb-title { font-size: 13px; font-weight: 600; color: var(--accent); }
.cb-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* grup bilgi hero */
.gi-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 6px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.gi-name { font-size: 20px; font-weight: 600; }
.gi-meta { font-size: 13px; color: var(--muted); }

/* okundu tiki */
.ticks.read { color: #53bdeb; }

/* ekler */
.att-img { display: block; margin-bottom: 4px; }
.att-img img { max-width: min(260px, 60vw); max-height: 300px; border-radius: 10px; display: block; }
.att-audio { display: block; width: 240px; max-width: 60vw; margin-bottom: 4px; height: 40px; }
.att-file { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin-bottom: 4px; border-radius: 10px; background: rgba(0,0,0,.22); text-decoration: none; color: inherit; }
.att-ic { font-size: 22px; }
.att-info { display: flex; flex-direction: column; min-width: 0; }
.att-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.att-size { font-size: 11.5px; opacity: .7; }

/* ek onizleme (gonderim oncesi) */
.attach-preview { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--panel); border-top: 1px solid var(--line); position: relative; z-index: 1; }
.ap-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.ap-ic { font-size: 24px; }
.ap-name { font-weight: 600; font-size: 13.5px; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-size { color: var(--muted); font-size: 12px; flex: 1; }

/* sesli mesaj kayit */
.comp-btn.recording { color: var(--err); animation: recpulse 1s ease infinite; }
@keyframes recpulse { 50% { opacity: .4; } }

/* sabitlenen mesaj cubugu */
.pinned-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 1; }
.pin-ic { font-size: 15px; }
.pin-body { flex: 1; min-width: 0; cursor: pointer; border-left: 2px solid var(--accent); padding-left: 10px; }
.pin-label { font-size: 11.5px; color: var(--accent); font-weight: 600; }
.pin-text { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* arama cubugu */
.search-bar { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 1; }
.search-bar input { flex: 1; padding: 9px 14px; border-radius: 8px; border: 0; background: var(--input); color: var(--text); font-size: 14px; outline: none; }
.search-count { font-size: 12.5px; color: var(--muted); min-width: 48px; text-align: center; }
.search-hit .bubble, .search-hit .dc-content { outline: 1px solid rgba(83,189,235,.4); border-radius: 4px; }
.search-current .bubble, .search-current .dc-content { outline: 2px solid var(--ok); background: rgba(83,189,235,.12); border-radius: 4px; }
mark.sh { background: rgba(255,200,0,.35); color: inherit; border-radius: 2px; padding: 0 1px; }

/* mention popover */
.mention-pop { position: fixed; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 -8px 30px rgba(0,0,0,.45); max-height: 240px; overflow-y: auto; }
.mention-pop button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: var(--text); padding: 7px 9px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500; text-align: left; }
.mention-pop button.sel, .mention-pop button:hover { background: var(--input); }
.slash-item { flex-direction: row; }
.slash-name { font-weight: 600; color: var(--accent); min-width: 100px; }
.slash-desc { color: var(--muted); font-size: 13px; }

/* SVG ikonlar */
.ico { display: block; }
.icon-btn .ico, .comp-btn .ico, .send .ico, .mt .ico { margin: 0 auto; }
.set-tab { display: flex; align-items: center; justify-content: center; gap: 7px; }
.popmenu button { display: flex; align-items: center; gap: 11px; }
.st-ic, .pm-ic, .lp-ic, .cam-ic, .pin-ic { display: inline-flex; }
.lock-pill { display: inline-flex; align-items: center; gap: 5px; }
.empty-emoji svg { color: var(--accent); }
.att-ic { display: inline-flex; opacity: .85; }
.att-ic .ico { width: 26px; height: 26px; }

/* ozel sesli mesaj oynatici */
.voice { display: flex; align-items: center; gap: 11px; min-width: 210px; max-width: 60vw; padding: 3px 2px 2px; margin-bottom: 3px; }
.voice-play { width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.2); color: #fff; }
.row.in .voice-play { background: var(--accent); color: #04140b; }
.voice-play:hover { filter: brightness(1.1); }
.voice-bar { flex: 1; height: 4px; border-radius: 3px; position: relative; background: rgba(255,255,255,.28); }
.row.in .voice-bar { background: rgba(255,255,255,.14); }
.voice-prog { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: #fff; }
.row.in .voice-prog { background: var(--accent); }
.voice-time { font-size: 11.5px; opacity: .8; min-width: 32px; }

/* ===== modal animasyonu ===== */
.modal { animation: modalIn .2s cubic-bezier(.2,.8,.2,1); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }

/* ===== tiklanabilir profil ===== */
.clickable-av, .sender, .chat-head.clickable { cursor: pointer; }

/* ===== PROFIL KARTI ===== */
.pf-modal { overflow: hidden; }
.pf-banner { height: 100px; position: relative; }
.pf-close { position: absolute; top: 12px; right: 12px; color: #fff; background: rgba(0,0,0,.28); }
.pf-close:hover { background: rgba(0,0,0,.45); }
.pf-body { padding: 0 22px 22px; text-align: center; overflow-y: auto; max-height: calc(86vh - 100px); }
.avatar.xl { width: 96px; height: 96px; font-size: 36px; margin: -50px auto 10px; border: 4px solid var(--rail); }
.pf-name { font-size: 22px; font-weight: 700; }
.pf-user { color: var(--muted); font-size: 14px; margin-top: 2px; }
.pf-pres { color: var(--accent); font-size: 13px; margin-top: 4px; }
.pf-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.pf-act { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 11px 4px; border: 0; border-radius: 12px; background: var(--input); color: var(--accent); cursor: pointer; font-size: 11.5px; font-weight: 600; transition: .15s; }
.pf-act:hover { filter: brightness(1.12); transform: translateY(-1px); }
.pf-act.soon { color: var(--muted); cursor: default; }
.pf-act.soon:hover { transform: none; filter: none; }
.pf-act.done { color: var(--ok); }
.pf-section { text-align: left; margin-bottom: 14px; }
.pf-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.pf-about { font-size: 14.5px; background: var(--input); padding: 10px 12px; border-radius: 10px; }
.pf-meta { text-align: left; border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 14px; }
.pf-meta-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13.5px; color: var(--muted); }
.pf-meta-row code { background: var(--input); padding: 3px 7px; border-radius: 6px; font-size: 12px; color: var(--text); }
.pf-block { width: 100%; border: 0; border-radius: 10px; padding: 12px; background: rgba(255,92,92,.13); color: var(--err); font-weight: 600; cursor: pointer; }
.pf-block:hover { background: rgba(255,92,92,.22); }

/* etiketler */
.tag-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-chip { border: 1px solid var(--line); background: transparent; color: var(--text); padding: 6px 13px; border-radius: 16px; cursor: pointer; font-size: 13px; transition: .12s; }
.tag-chip.on { background: var(--accent); color: #04140b; border-color: var(--accent); }
.tag-chip.fav.on { background: #f5b50a; color: #1a1400; border-color: #f5b50a; }

/* konusma listesinde favori/etiket/rol */
.fav-star { color: #f5b50a; }
.conv-tag { font-size: 10.5px; background: var(--input); color: var(--muted); padding: 1px 6px; border-radius: 8px; margin-left: 6px; vertical-align: middle; }
.role { font-size: 10.5px; background: var(--accent); color: #04140b; padding: 1px 6px; border-radius: 7px; margin-left: 4px; }

/* ===== toggle / segment ===== */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14.5px; }
.set-pane .toggle-row:last-of-type { border-bottom: 0; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider { position: absolute; inset: 0; background: var(--input); border-radius: 24px; transition: .2s; }
.slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.seg { display: inline-flex; background: var(--input); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 16px; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.seg button.on { background: var(--accent); color: #04140b; }

/* ===== AMOLED + yazi boyutu + balon stili ===== */
body.amoled { --bg: #000; --rail: #050506; --panel: #0b0c0d; --input: #141518; }
body[data-msg-size="small"] .bubble { font-size: 13px; }
body[data-msg-size="large"] .bubble { font-size: 16.5px; }
body[data-bubble="classic"] .bubble { border-radius: 9px; }
body[data-bubble="classic"] .bubble::before { display: none; }
body.hide-presence .pres { display: none; }

/* ============ MODAL ============ */
.modal-wrap { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 50; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 480px; max-width: 92vw; max-height: 86vh; background: var(--rail); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.sm-modal { width: 420px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--panel); }
.modal-head h2 { font-size: 17px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; }
.set-tabs { display: flex; gap: 6px; margin-bottom: 20px; }
.set-tab { flex: 1; padding: 10px; border: 0; background: var(--input); color: var(--muted); border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600; transition: .15s; }
.set-tab.active { background: var(--accent); color: #04140b; }
.profile-preview { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.field-label { display: block; font-size: 12.5px; color: var(--accent); margin: 14px 0 7px; font-weight: 600; }
.field { width: 100%; padding: 12px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--input); color: var(--text); font-size: 14.5px; outline: none; }
.field:focus { border-color: var(--accent); }
.color-grid, .bg-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: .12s; }
.swatch:hover { transform: scale(1.12); }
.swatch.sel { border-color: var(--text); box-shadow: 0 0 0 2px var(--accent); }
.bg-grid .swatch { border-radius: 9px; width: 52px; height: 38px; }
.theme-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 20px; border: 1px solid var(--line); background: var(--input); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; transition: .14s; }
.theme-chip:hover { border-color: var(--accent); }
.tc-dot { width: 12px; height: 12px; border-radius: 50%; }
.css-area { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; resize: vertical; min-height: 96px; white-space: pre; }
.row-actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.save-status { font-size: 13px; color: var(--accent); }
.sec-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sec-row code { background: var(--input); padding: 4px 8px; border-radius: 7px; font-size: 12.5px; letter-spacing: .5px; font-family: var(--mono); }
.people-list { list-style: none; margin-top: 14px; max-height: 50vh; overflow-y: auto; }
.person { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.person:hover { background: var(--input); }
.person .pname { font-weight: 600; font-size: 14.5px; }
.person .puser { font-size: 12px; color: var(--muted); }

/* ---- menu / davet ---- */
.new-wrap { position: relative; }
.popmenu { position: absolute; right: 0; top: 44px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; z-index: 30; box-shadow: 0 12px 30px rgba(0,0,0,.5); min-width: 190px; }
.popmenu button { display: block; width: 100%; text-align: left; padding: 11px 14px; border: 0; background: transparent; color: var(--text); border-radius: 8px; cursor: pointer; font-size: 14px; }
.popmenu button:hover { background: var(--input); }
.empty-state h3 { font-size: 22px; font-weight: 400; color: var(--text); }
.empty-state p { max-width: 360px; font-size: 14px; }
.chat-head.clickable { cursor: pointer; }
.chat-head.clickable:hover { background: #25333b; }
.invite-row { display: flex; gap: 8px; }
.invite-row .field { flex: 1; font-size: 13px; }
.join-preview { margin: 14px 0; padding: 14px; border-radius: 10px; background: var(--input); font-size: 14px; }
.join-preview.ok { border: 1px solid var(--accent); }

@media (max-width: 720px) {
  .app { grid-template-columns: 60px 1fr; }
  .app.show-chat .rail, .app.show-chat .server-rail { display: none; }
  .app.show-chat .chat { grid-column: 1 / -1; }
  .app:not(.show-chat) .chat { display: none; }
  .messages { padding: 14px 0; }
  .row { max-width: 85%; }
}


/* ============================================================
   TELEGRAM-FAITHFUL  group-info + profile redesign
   (winner base + judge grafts: AMOLED hairline, flex scroll,
    Copy->Copied pill, masked identity-gradient hero, fp trust row)
   Append to styles.css. Uses theme vars only.
   ============================================================ */

/* ---- container (overrides .modal / .sm-modal width for these two modals) ---- */
#group-info .modal.info-modal,
#profile-modal .modal.info-modal {
  width: 460px;
  max-width: 94vw;
  max-height: 86vh;
  background: var(--rail);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  position: relative;
  box-shadow: 0 30px 90px rgba(0,0,0,.62);
}
#profile-modal .modal.info-modal { width: 420px; }

/* single flex scroll child (graft #2 — no negative-margin hack) */
.info-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--input) transparent;
  padding: 0 0 4px;
}
.info-scroll::-webkit-scrollbar { width: 8px; }
.info-scroll::-webkit-scrollbar-thumb { background: var(--input); border-radius: 8px; border: 2px solid var(--rail); }
.info-scroll::-webkit-scrollbar-thumb:hover { background: var(--line); }

/* ---- 40px member-row avatar: avatarHtml passes size 'sm' (30px), upsize here ---- */
.mrow .avatar.sm { width: 40px; height: 40px; font-size: 16px; }
.mrow .avatar.sm .pres { width: 12px; height: 12px; border-width: 2.5px; }
/* presence ring matches the card bg inside info-cards */
.info-card .avatar .pres { border-color: var(--panel); }
/* clickable avatar micro-zoom */
.mrow .clickable-av { transition: transform .15s ease; }
.mrow .clickable-av:hover { transform: scale(1.05); }

/* ---- generic icon button (header / section actions) ---- */
.info-modal .ic-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background .14s, color .14s, transform .1s;
}
.info-modal .ic-btn:hover { background: rgba(255,255,255,.06); color: var(--text); }
.info-modal .ic-btn:active { transform: scale(.92); }
.info-modal .ic-btn.sm { width: 32px; height: 32px; border-radius: 8px; }

/* ============================================================
   STICKY GLASS HEADER (two-stage)
   ============================================================ */
.gi-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  height: 56px; display: flex; align-items: center;
  padding: 0 10px 0 18px;
  background: transparent;
  box-shadow: 0 0 0 transparent;
  transition: box-shadow .22s ease, background .22s ease;
}
.gi-bar .gi-bar-x { margin-left: auto; }
.gi-bar-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  opacity: 0; transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 78%; pointer-events: none;
}
/* JS toggles .scrolled (>40px) and .titled (>120px) on .gi-bar */
.gi-bar.scrolled {
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line), 0 8px 18px rgba(0,0,0,.28);
}
.gi-bar.titled .gi-bar-title { opacity: 1; transform: translateY(0); }
/* bar floats over the hero/banner (absolute) — give the group hero a little top room */
#gi-hero { padding-top: 14px; }
/* profile bar floats over the banner, glass only on scroll */
.pf-bar .gi-bar-x { color: #fff; background: rgba(0,0,0,.28); }
.pf-bar .gi-bar-x:hover { background: rgba(0,0,0,.45); color: #fff; }
.pf-bar.scrolled .gi-bar-x { color: var(--muted); background: transparent; }
.pf-bar.scrolled .gi-bar-x:hover { background: rgba(255,255,255,.06); color: var(--text); }

/* ============================================================
   GROUP HERO  (masked identity gradient — graft #4)
   ============================================================ */
.gi-hero {
  position: relative; isolation: isolate;
  text-align: center; padding: 0 20px 18px;
}
.gi-hero-bg {
  --idc: var(--accent);
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 90% at 50% -10%,
      color-mix(in srgb, var(--idc) 55%, transparent) 0%, transparent 70%),
    linear-gradient(180deg,
      color-mix(in srgb, var(--idc) 26%, var(--panel)) 0%, var(--panel) 78%);
  -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
}
.gi-hero-inner { position: relative; z-index: 1; padding-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gi-hero .avatar.lg {
  box-shadow: 0 6px 22px rgba(0,0,0,.4);
  border: 4px solid color-mix(in srgb, var(--panel) 88%, #000);
}
.gi-title { font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--text); letter-spacing: -.2px; }
.gi-sub { font-size: 13px; color: var(--muted); }
.gi-sub .gi-dot-sep { opacity: .55; }
.gi-sub .gi-online { color: var(--accent); font-weight: 600; }
.gi-desc {
  font-size: 14px; line-height: 1.45; color: var(--text);
  max-width: 320px; margin: 2px auto 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================================
   GROUPED CARDS + SECTION LABELS
   ============================================================ */
.info-card {
  background: var(--panel);
  border-radius: 12px;
  margin: 0 12px 8px;
  overflow: hidden;
  animation: cardIn .26s cubic-bezier(.2,.8,.2,1) backwards;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }
.card-hint {
  font-size: 12px; color: var(--muted);
  padding: 0 18px 8px; margin: -4px 0 8px;
}
.info-modal .sec-label {
  display: block;
  font-size: 11px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--muted);
  padding: 16px 18px 8px; margin: 0;
}
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 12px 8px 18px;
}
.sec-head .sec-label { padding: 0; }
.sec-actions { display: flex; gap: 2px; }

/* ============================================================
   ACTION ROW (invite link, leave, block) — 56px
   ============================================================ */
.act-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 56px; padding: 0 14px;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  color: var(--text); transition: background .12s, transform .08s;
}
.act-row:hover { background: rgba(255,255,255,.03); }
.act-row:active { transform: scale(.995); }
.act-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.act-title { font-size: 15px; font-weight: 500; color: var(--text); }
.act-sub {
  font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.act-row.danger .act-title { color: var(--err); }
.act-row.danger:hover { background: rgba(255,92,92,.07); }

/* tinted rounded icon tiles */
.tile {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; transition: background .12s;
}
.tile-accent { background: rgba(43,224,106,.14); color: var(--accent); }
.tile-danger { background: rgba(255,92,92,.13); color: var(--err); }
.act-row:hover .tile-accent,
.sm-row:hover .tile-accent { background: rgba(43,224,106,.22); }
.act-row.danger:hover .tile-danger { background: rgba(255,92,92,.2); }

/* ghost / morphing pill button (Copy -> Copied, Save) — graft #3 */
.pill-btn {
  flex: none; font-size: 13px; font-weight: 600; color: var(--accent);
  background: rgba(43,224,106,.12); border: 0;
  padding: 7px 14px; border-radius: 20px; cursor: pointer;
  transition: background .14s, color .14s, transform .1s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.pill-btn:hover { background: rgba(43,224,106,.22); }
.pill-btn:active { transform: scale(.95); }
.pill-btn.solid { background: var(--accent); color: #04140b; }
.pill-btn.solid:hover { filter: brightness(1.08); background: var(--accent); }
.pill-btn .pill-copy { display: inline-flex; align-items: center; gap: 6px; }
.pill-btn .pill-done { display: none; align-items: center; gap: 5px; }
.pill-btn.done { color: var(--accent); background: rgba(43,224,106,.26); }
.pill-btn.done .pill-copy { display: none; }
.pill-btn.done .pill-done { display: inline-flex; }

/* ============================================================
   SHARED-MEDIA ROW (.sm-row) — 52px — used in BOTH modals
   ============================================================ */
.sm-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%; height: 52px; padding: 0 12px;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  position: relative; transition: background .12s, transform .08s; color: var(--text);
}
.sm-row:hover { background: rgba(255,255,255,.03); }
.sm-row:active { transform: scale(.995); }
.sm-row + .sm-row::before {
  content: ""; position: absolute; left: 62px; right: 0; top: 0;
  height: 1px; background: var(--line);
}
.sm-text { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; color: var(--text); }
.sm-text b { font-weight: 600; }
.sm-chev {
  flex: none; color: var(--muted); opacity: .45;
  display: grid; place-items: center; transform: rotate(-90deg);
}

/* ============================================================
   MEMBER ROW (.mrow) — the standout, 56px
   ============================================================ */
.mlist { list-style: none; margin: 0; padding: 0; }
.mrow {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 12px;
  cursor: pointer; position: relative;
  transition: background .12s, transform .08s;
  animation: rowIn .22s ease backwards;
  animation-delay: calc(var(--i, 0) * 18ms);
}
.mrow:hover { background: rgba(255,255,255,.03); }
.mrow:active { transform: scale(.99); }
.mrow:not(:last-child)::after {
  content: ""; position: absolute; left: 64px; right: 0; bottom: 0;
  height: 1px; background: var(--line);
}
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }

.mrow-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mrow-name {
  font-size: 15px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mrow-name .name-txt { overflow: hidden; text-overflow: ellipsis; }
.mrow-name .fav-star { color: #f5b50a; flex: none; display: inline-grid; }
.mrow-name .fav-star svg { fill: #f5b50a; stroke: #f5b50a; }
.mrow-name .you-tag { font-size: 12px; color: var(--muted); font-weight: 400; flex: none; }
.mrow-sub {
  font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mrow-sub.on { color: var(--accent); }

.owner-pill {
  flex: none; font-size: 11px; font-weight: 600; letter-spacing: .3px;
  color: var(--accent); background: rgba(43,224,106,.14);
  padding: 3px 10px; border-radius: 20px;
}
.mrow-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* member search */
.gi-search-wrap {
  display: flex; align-items: center; gap: 8px;
  margin: 0 12px 8px; padding: 0 12px;
  height: 42px; background: var(--input); border-radius: 10px;
  animation: rowIn .18s ease;
}
.gi-search-ic { color: var(--muted); display: grid; place-items: center; }
.gi-search {
  flex: 1; background: transparent; border: 0; outline: none;
  color: var(--text); font-size: 14px; font-family: var(--sans);
}
.gi-search::placeholder { color: var(--muted); }

.gi-safe { height: 24px; }

/* ============================================================
   PROFILE MODAL
   ============================================================ */
.pf-modal .pf-banner {
  --u-color: var(--accent);
  height: 120px; position: relative; flex: none;
  background: linear-gradient(135deg,
              color-mix(in srgb, var(--accent) 55%, #000),
              color-mix(in srgb, var(--u-color) 70%, #000));
}
.pf-modal .pf-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.28) 100%);
}
.pf-hero {   /* Discord tarzi: sol hizali, avatar banner'a sol-alttan biner */
  display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  padding: 0 18px 4px;
}
#profile-modal .avatar.xl {
  width: 84px; height: 84px; font-size: 32px;
  margin: -44px 0 8px; border: 5px solid var(--rail);
  box-shadow: 0 8px 26px rgba(0,0,0,.5);
}
.pf-name { font-size: 21px; font-weight: 700; color: var(--text); letter-spacing: -.2px; text-align: left; }
.pf-user { color: var(--muted); font-size: 14px; margin-top: 2px; }
.pf-pres { color: var(--accent); font-size: 13px; margin-top: 4px; min-height: 16px; }

/* action grid — tiled buttons (graft #3) */
#profile-modal .pf-actions {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 16px 12px; margin: 0;
}
#profile-modal .pf-act {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 4px 10px; border: 0; border-radius: 14px;
  background: var(--panel); color: var(--text); cursor: pointer;
  font-size: 11.5px; font-weight: 600;
  transition: transform .12s, background .15s; filter: none;
}
.pf-act-ico {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--input); color: var(--muted);
  transition: background .15s, color .15s;
}
#profile-modal .pf-act:hover { transform: translateY(-2px); background: var(--panel); filter: none; }
#profile-modal .pf-act.primary { color: var(--accent); }
.pf-act.primary .pf-act-ico { background: rgba(43,224,106,.16); color: var(--accent); }
#profile-modal .pf-act.primary:hover .pf-act-ico { background: rgba(43,224,106,.26); }
#profile-modal .pf-act.soon { color: var(--muted); cursor: default; }
#profile-modal .pf-act.soon:hover { transform: none; }
#profile-modal .pf-act.done { color: var(--accent); }
#profile-modal .pf-act.done .pf-act-ico { background: rgba(43,224,106,.16); color: var(--accent); }

/* about / mini-labelled cards */
.pf-card .card-inner { padding: 12px 16px 14px; }
.card-mini-label {
  font-size: 11px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
#profile-modal .pf-about { font-size: 14.5px; line-height: 1.5; color: var(--text); background: transparent; padding: 0; border-radius: 0; white-space: pre-wrap; }

/* personal settings cluster — inset-divided rows */
.set-row { padding: 12px 16px; position: relative; }
.set-row.col { display: flex; flex-direction: column; }
.set-row + .set-row::before {
  content: ""; position: absolute; left: 16px; right: 0; top: 0;
  height: 1px; background: var(--line);
}
.inline-edit { display: flex; gap: 8px; align-items: center; }
.ie-input, .ie-area {
  flex: 1; width: 100%; background: var(--input); border: 1px solid transparent;
  border-radius: 9px; padding: 9px 12px; color: var(--text);
  font-size: 14px; font-family: var(--sans); outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.ie-area { resize: vertical; min-height: 56px; line-height: 1.4; }
.ie-input:focus, .ie-area:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(43,224,106,.18); }
.ie-input::placeholder, .ie-area::placeholder { color: var(--muted); }
.set-row .tag-grid { display: flex; flex-wrap: wrap; gap: 7px; }

/* meta / info card */
.meta-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 8px 16px; position: relative;
}
.meta-row + .meta-row::before {
  content: ""; position: absolute; left: 16px; right: 0; top: 0;
  height: 1px; background: var(--line);
}
.meta-k { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.meta-v { font-size: 14px; font-weight: 600; color: var(--text); }
.meta-code {
  font-family: var(--mono); font-size: 12px; color: var(--text);
  background: var(--input); padding: 4px 9px; border-radius: 7px;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* fingerprint trust row (graft #5) */
.fp-row { min-height: 58px; align-items: center; }
.fp-row .fp-badge {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(43,224,106,.14); color: var(--accent);
}
.fp-kcol { display: flex; flex-direction: column; gap: 2px; }
.fp-ktitle { font-size: 14px; color: var(--text); font-weight: 500; }
.fp-enc { font-size: 11.5px; color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.fp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(43,224,106,.18); animation: fpPulse 2s ease-in-out infinite; }
@keyframes fpPulse { 50% { box-shadow: 0 0 0 5px rgba(43,224,106,.08); } }

/* ============================================================
   AMOLED card separation (graft #1 — REQUIRED)
   ============================================================ */
body.amoled .info-card,
body.amoled #profile-modal .pf-act,
body.amoled .gi-search-wrap,
body.amoled .gi-hero .gi-hero-inner > .avatar { box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
body.amoled .gi-bar.scrolled,
body.amoled .pf-bar.scrolled { background: color-mix(in srgb, var(--panel) 88%, transparent); }

/* ============================================================
   reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .info-card, .mrow, .gi-search-wrap, .fp-dot { animation: none; }
  .gi-bar, .gi-bar-title, .pf-act, .mrow, .act-row, .sm-row, .tile, .pill-btn, .ic-btn, .clickable-av { transition: none; }
}


/* ===================== WEBRTC CALL OVERLAY ===================== */
.call-overlay { position: fixed; inset: 0; z-index: 200; background: #0a0f14; }
.call-remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0a0f14; z-index: 0; }
.call-overlay:not(.video-call) .call-remote-video { display: none; }
.call-btn.on { background: var(--accent); color: #04140b; }
.call-remote-av { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -58%); z-index: 1; }
.call-remote-av .avatar.xl { width: 132px; height: 132px; font-size: 50px; border: 0; box-shadow: 0 14px 44px rgba(0,0,0,.55); }
.call-local-video { position: absolute; right: 18px; top: 18px; width: 150px; height: 200px; object-fit: cover; border-radius: 14px; background: #16202a; z-index: 3; box-shadow: 0 8px 24px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12); }
.call-top { position: absolute; top: 0; left: 0; right: 0; z-index: 4; text-align: center; padding: 34px 16px 18px; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); pointer-events: none; }
.call-name { font-size: 25px; font-weight: 700; color: #fff; letter-spacing: -.2px; }
.call-status { font-size: 15px; color: rgba(255,255,255,.72); margin-top: 5px; }
.call-timer { font-size: 15px; color: rgba(255,255,255,.88); margin-top: 2px; font-variant-numeric: tabular-nums; }
.call-controls, .call-incoming { position: absolute; bottom: 44px; left: 0; right: 0; z-index: 4; display: flex; justify-content: center; gap: 28px; }
.call-btn { width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.15); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .15s, transform .1s; }
.call-btn:hover { background: rgba(255,255,255,.26); }
.call-btn:active { transform: scale(.92); }
.call-btn.off { background: #fff; color: #0a0f14; }
.call-btn.hang { background: #f2374b; }
.call-btn.hang:hover { background: #ff4d61; }
.call-btn.accept { background: #1bbf6b; }
.call-btn.accept:hover { background: #25d97c; }
@media (max-width: 560px) {
  .call-local-video { width: 108px; height: 150px; }
  .call-btn { width: 58px; height: 58px; }
}


/* ===================== MOBILE / RESPONSIVE ===================== */
.chat-back { display: none !important; }
@supports (height: 100dvh) { .app, .auth-wrap, .call-overlay { height: 100dvh; } }

/* boot acilis ekrani (login flash onleyici) */
.boot { position: fixed; inset: 0; z-index: 500; background: var(--bg); display: grid; place-content: center; justify-items: center; gap: 22px; }
.boot-brand { font-family: var(--mono); font-weight: 800; font-size: 26px; letter-spacing: 2px; color: var(--text); }
.boot-mark { color: var(--accent); }
.boot-spin { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--input); border-top-color: var(--accent); animation: bootspin .8s linear infinite; }
@keyframes bootspin { to { transform: rotate(360deg); } }

/* tablet: kenar cubugunu biraz daralt */
@media (min-width: 861px) and (max-width: 1100px) { .app { grid-template-columns: 64px var(--rail-w, 240px) 4px 1fr; } }

@media (max-width: 860px) {
  .app { grid-template-columns: 60px 1fr; }
  .app.show-chat .rail, .app.show-chat .server-rail { display: none; }
  .app.show-chat .chat { grid-column: 1 / -1; }
  .app:not(.show-chat) .chat { display: none; }
  .chat-back { display: grid !important; margin-right: 2px; }
  .rail { width: 100%; }
  .messages { padding: 12px 0; }
  .row { max-width: 86%; }
  .chat-head { padding: 9px 12px; }
  .composer { gap: 5px; padding: 8px 10px; }
  .comp-btn { width: 38px; height: 38px; font-size: 18px; }
  .auth-card { width: 92vw; max-width: 380px; padding: 28px 22px; }
  /* genel modallar */
  .modal { width: 96vw; }
  .modal-body { padding: 16px; }
  /* profil/grup kartlari tam ekran */
  #group-info .modal.info-modal, #profile-modal .modal.info-modal {
    width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0;
  }
  .pf-actions { gap: 6px; }
  /* arama ekrani kontrolleri */
  .call-controls, .call-incoming { gap: 16px; bottom: 30px; }
  .call-local-video { width: 100px; height: 140px; right: 12px; top: 12px; }
  .call-name { font-size: 21px; }
}
@media (max-width: 380px) {
  .comp-btn { width: 34px; height: 34px; }
  .call-btn { width: 54px; height: 54px; }
}


/* ===================== MAVI ONAY ROZETI ===================== */
.vbadge { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; flex: none; }
.sender .vbadge, .mrow-name .vbadge { width: 14px; height: 14px; vertical-align: -2px; }
.pf-name .vbadge { width: 21px; height: 21px; vertical-align: -3px; }
.head-title .vbadge { width: 17px; height: 17px; }


/* ===================== SOHBETTE ARAMA KAYDI (Discord stili) ===================== */
.row.call-row { padding: 2px 0 2px 4px; }
.call-log { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.cl-ic { display: inline-grid; place-items: center; color: var(--accent); flex: none; }
.cl-ic.missed { color: var(--err); }
.cl-name { font-weight: 600; color: var(--text); }
.cl-text { color: var(--muted); }
.cl-time { font-size: 11px; color: var(--muted); opacity: .6; margin-left: 2px; }


/* ===================== MEDIA VIEWER (lightbox) + VIDEO ===================== */
.att-img { cursor: zoom-in; display: block; margin-bottom: 4px; }
.att-img img { display: block; }
.att-video { max-width: min(320px, 70vw); max-height: 360px; border-radius: 10px; display: block; margin-bottom: 4px; background: #000; }
/* ---- custom video player (Discord tarzi) ---- */
.vplayer { position: relative; max-width: min(400px, 72vw); border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 4px; line-height: 0; }
.vp-video { width: 100%; max-height: 380px; display: block; background: #000; }
.vp-overlay { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; background: linear-gradient(transparent 60%, rgba(0,0,0,.05)); }
.vp-bigplay { width: 58px; height: 58px; border-radius: 50%; background: rgba(7,9,10,.6); display: grid; place-items: center; color: #fff; transition: opacity .15s, transform .15s; backdrop-filter: blur(2px); }
.vplayer:hover .vp-bigplay { transform: scale(1.06); }
.vplayer.playing .vp-bigplay { opacity: 0; }
.vplayer.playing:hover .vp-bigplay { opacity: .85; }
.vp-ctrl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 9px; padding: 8px 11px;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); opacity: 0; transition: opacity .15s; line-height: 1; }
.vplayer:hover .vp-ctrl, .vplayer.playing .vp-ctrl { opacity: 1; }
.vp-btn { background: none; border: 0; color: #fff; cursor: pointer; padding: 2px; display: grid; place-items: center; opacity: .92; }
.vp-btn:hover { opacity: 1; color: var(--accent); }
.vp-time { color: #fff; font-size: 11.5px; font-variant-numeric: tabular-nums; font-family: var(--mono); opacity: .9; flex: none; }
.vp-bar { flex: 1; height: 5px; background: rgba(255,255,255,.25); border-radius: 3px; cursor: pointer; position: relative; }
.vp-bar:hover { height: 7px; }
.vp-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-radius: 3px; box-shadow: 0 0 8px rgba(43,224,106,.5); }
.vp-fill::after { content: ''; position: absolute; right: -5px; top: 50%; transform: translateY(-50%); width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(43,224,106,.6); }
.vplayer:fullscreen { display: grid; place-items: center; max-width: none; width: 100%; height: 100%; }
.vplayer:fullscreen .vp-video { max-height: 100vh; height: 100%; object-fit: contain; }
button.att-file { cursor: pointer; }
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,.92); display: flex; flex-direction: column; animation: fade .15s; }
.lb-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.lb-name { flex: 1; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-btn { color: #fff; background: rgba(255,255,255,.12); }
.lb-btn:hover { background: rgba(255,255,255,.26); color: #fff; }
.lb-content { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 16px 20px; }
.lb-content img, .lb-content video { max-width: 94vw; max-height: 84vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-content iframe { width: min(960px, 94vw); height: 84vh; background: #fff; border: 0; border-radius: 8px; }

/* arama kaydi: ortali, duz (WhatsApp tarzi) */
.row.call-row { align-self: center; max-width: 92%; margin: 5px 0; }
.call-log { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 16px; padding: 7px 14px; }

/* ===== Resmi Bylock duyuru kanali ===== */
.channel-av { background: linear-gradient(135deg, #2be06a, #16a085); color: #04130b; font-weight: 800; font-size: 19px; display: flex; align-items: center; justify-content: center; }
.conv-channel .conv-name { font-weight: 700; }
.readonly-bar { padding: 13px 16px; margin: 0; text-align: center; color: var(--muted, #8a9a93); font-size: 13px; background: var(--panel, #0d1311); border-top: 1px solid var(--line, #1b2620); }

/* ===== Buyuk emoji / medya balon ===== */
.bubble.media { background: transparent !important; box-shadow: none !important; padding: 2px 0 !important; }
.bubble.media .meta { position: absolute; right: 8px; bottom: 6px; background: rgba(0,0,0,.45); padding: 2px 7px; border-radius: 10px; color: #fff; }
.bubble.media { position: relative; }
.btext.jumbo-text { font-size: 3.1rem; line-height: 1.12; display: inline-block; padding: 2px 6px 14px 2px; }
.sticker-img img { width: 150px; height: 150px; object-fit: contain; display: block; }
.gif-wrap { border-radius: 14px; overflow: hidden; max-width: 260px; }
.gif-wrap .gif { width: 100%; max-width: 260px; max-height: 320px; display: block; border-radius: 14px; cursor: zoom-in; }

/* ===== Sticker & GIF picker ===== */
.sticker-pop { position: absolute; bottom: 70px; left: 12px; right: 12px; max-width: 380px; height: 340px; background: var(--panel, #0d1311); border: 1px solid var(--line, #1b2620); border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.5); z-index: 40; display: flex; flex-direction: column; overflow: hidden; }
.sp-tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line, #1b2620); }
.sp-tab { flex: 1; padding: 9px; border: none; border-radius: 9px; background: transparent; color: var(--muted, #8a9a93); font-weight: 600; cursor: pointer; font-size: 14px; }
.sp-tab.on { background: var(--accent, #2be06a); color: #04130b; }
.sp-pane { flex: 1; overflow-y: auto; padding: 10px; }
.sp-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sp-label { color: var(--muted, #8a9a93); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.sp-create { background: var(--accent, #2be06a); color: #04130b; border: none; border-radius: 8px; padding: 5px 11px; font-weight: 700; cursor: pointer; font-size: 13px; }
.sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.st-cell { position: relative; aspect-ratio: 1; border: none; border-radius: 12px; background: rgba(255,255,255,.04); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 34px; transition: transform .1s, background .15s; }
.st-cell:hover { background: rgba(255,255,255,.1); transform: scale(1.06); }
.st-cell img { width: 78%; height: 78%; object-fit: contain; }
.st-del { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; background: #ff5c5c; color: #fff; border-radius: 50%; font-size: 13px; line-height: 18px; display: none; }
.st-cell.custom:hover .st-del { display: block; }
.gif-search { width: 100%; padding: 9px 12px; margin-bottom: 9px; border-radius: 10px; border: 1px solid var(--line, #1b2620); background: var(--input, #121a16); color: var(--text, #cfe0d6); outline: none; }
.gif-grid { columns: 2; column-gap: 8px; }
.gif-cell { width: 100%; border: none; padding: 0; margin: 0 0 8px; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.04); cursor: pointer; display: inline-block; }
.gif-cell img { width: 100%; display: block; }
.gif-load { color: var(--muted, #8a9a93); text-align: center; padding: 30px; font-size: 14px; }
@media (max-width: 560px) { .sticker-pop { left: 6px; right: 6px; bottom: 66px; } }
.chat-view { position: relative; }   /* sticker/GIF paneli buna gore konumlanir */

/* ===================== DISCORD TARZI SUNUCULAR ===================== */
.server-rail { width: 64px; flex: 0 0 64px; background: #05070699; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; border-right: 1px solid var(--line, #1b2620); overflow-y: auto; }
.srv-icon { width: 42px; height: 42px; border-radius: 14px; border: none; background: var(--panel, #0d1311); color: var(--text, #cfe0d6); font-weight: 800; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-radius .15s, background .15s; position: relative; overflow: visible; flex: 0 0 auto; }
.srv-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }   /* img kendini kirpar; badge cerceve disinda kalir */
/* DM avatar pill'leri (sol rayda, Discord gibi) */
.dm-icon { padding: 0; }
.dm-icon .avatar { width: 100% !important; height: 100% !important; border-radius: inherit !important; font-size: 16px; overflow: hidden; }
.dm-icon .avatar img, .dm-icon .avatar video { width: 100%; height: 100%; object-fit: cover; }
.dm-icon .pres { display: none; }   /* sol rayda online nokta gizli (zaten avatar pill) */
.srv-icon > .srv-badge { bottom: -4px; right: -4px; min-width: 19px; height: 19px; border-width: 3px; z-index: 3; }   /* cerceve disinda, ust koste */
.srv-sep { height: 2px; width: 30px; margin: 5px auto; background: var(--line); border-radius: 2px; flex: 0 0 auto; }
.srv-icon:hover { border-radius: 12px; background: var(--accent, #2be06a); color: #04130b; }
.srv-icon.on { border-radius: 12px; }
.srv-icon.on::before { content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%); width: 4px; height: 22px; background: var(--accent, #2be06a); border-radius: 0 4px 4px 0; }
.srv-icon.home { background: var(--accent, #2be06a); color: #04130b; }
.srv-icon.add { background: var(--panel, #0d1311); color: var(--accent, #2be06a); font-size: 26px; }
.srv-icon.add:hover { background: var(--accent, #2be06a); color: #04130b; }
.srv-sep { width: 32px; height: 2px; background: var(--line, #1b2620); border-radius: 2px; flex: 0 0 auto; }
.server-icons { display: flex; flex-direction: column; gap: 8px; align-items: center; }

.server-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.server-top { display: flex; align-items: center; gap: 4px; padding: 12px 10px 12px 14px; border-bottom: 1px solid var(--line, #1b2620); position: relative; cursor: pointer; transition: background .12s; }
.server-top:hover { background: rgba(255,255,255,.04); }
.server-name { font-weight: 800; font-size: 15px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-top .popmenu { top: 44px; right: 8px; left: auto; cursor: default; }
.channel-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1; min-height: 0; }
.chan-cat { display: flex; align-items: center; justify-content: space-between; color: var(--muted, #6f8278); font-size: 11px; font-weight: 700; letter-spacing: .6px; padding: 12px 6px 4px; text-transform: uppercase; }
.cat-add { background: none; border: none; color: var(--muted, #6f8278); font-size: 17px; cursor: pointer; line-height: 1; padding: 0 4px; }
.cat-add:hover { color: var(--accent, #2be06a); }
.chan { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-radius: 8px; cursor: pointer; color: var(--muted, #8a9a93); font-size: 15px; }
.chan:hover { background: rgba(255,255,255,.05); color: var(--text, #cfe0d6); }
.chan.active { background: rgba(43,224,106,.14); color: #fff; }
.chan-hash { opacity: .6; font-size: 14px; }
.chan-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan .badge { background: var(--accent, #2be06a); color: #04130b; }
.chan.voice.joined { color: var(--accent, #2be06a); }
.voice-part { display: flex; align-items: center; gap: 7px; padding: 3px 9px 3px 26px; color: var(--muted, #8a9a93); font-size: 13px; }
.voice-part .avatar { width: 22px; height: 22px; font-size: 10px; }

.voice-bar { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #0a130d; border-top: 1px solid var(--line, #1b2620); }
.vb-live { color: var(--accent, #2be06a); font-size: 12px; font-weight: 700; }
.vb-chan { color: var(--muted, #8a9a93); font-size: 12px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-btn { background: rgba(255,255,255,.06); border: none; border-radius: 8px; width: 32px; height: 32px; color: var(--text, #cfe0d6); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.vb-btn.leave { background: #ff5c5c; color: #fff; }
.vb-btn.off { color: #ff5c5c; }

.chan-type { display: flex; gap: 8px; margin-bottom: 14px; }
.ct-opt { flex: 1; padding: 12px; border-radius: 10px; border: 1px solid var(--line, #1b2620); background: var(--input, #121a16); color: var(--text, #cfe0d6); cursor: pointer; font-weight: 600; }
.ct-opt.on { border-color: var(--accent, #2be06a); background: rgba(43,224,106,.12); }
.srvmem-list { list-style: none; margin: 0; padding: 0; }
.srvmem { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line, #1b2620); }
.sm-name { flex: 1; font-weight: 600; }
.role-sel { background: var(--input, #121a16); color: var(--text, #cfe0d6); border: 1px solid var(--line, #1b2620); border-radius: 7px; padding: 4px 6px; }
.role-tag { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted, #8a9a93); font-weight: 700; }
.role-tag.owner { color: #f1c40f; }
.role-tag.admin { color: var(--accent, #2be06a); }
.kick-btn { background: none; border: none; color: #ff5c5c; cursor: pointer; padding: 4px; }

@media (max-width: 860px) {
  .server-rail { width: 60px; flex-basis: 60px; }
  .srv-icon { width: 42px; height: 42px; }
  .app.show-chat .server-rail { display: none; }
}

/* ===== Sunucu uye paneli (sag) + konusma cemberi ===== */
.app.has-members { grid-template-columns: 64px var(--rail-w, 240px) 4px 1fr 230px; }
.member-rail { background: var(--rail, #0b100e); border-left: 1px solid var(--line, #1b2620); overflow-y: auto; padding: 12px 8px; }
.mr-title { font-weight: 800; font-size: 14px; padding: 4px 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-cat { color: var(--muted, #6f8278); font-size: 11px; font-weight: 700; letter-spacing: .6px; padding: 12px 8px 4px; text-transform: uppercase; }
.mr-list { list-style: none; margin: 0; padding: 0; }
.mr-list.dim .mr-member { opacity: .5; }
.mr-member { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.mr-member:hover { background: rgba(255,255,255,.05); }
.mr-member .avatar { width: 34px; height: 34px; font-size: 13px; transition: box-shadow .08s; }
.mr-name { flex: 1; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-name.role-owner { color: #f1c40f; }
.mr-name.role-admin { color: var(--accent, #2be06a); }
.mr-crown { font-size: 12px; }
.mr-crown.owner { color: #f1c40f; }
.mr-crown.admin { color: var(--accent, #2be06a); }

/* konusurken yesil cember */
.voice-part .vp-av { display: inline-flex; border-radius: 50%; }
.voice-part.speaking .avatar, .mr-member.speaking .avatar { box-shadow: 0 0 0 2px #2be06a, 0 0 8px rgba(43,224,106,.6); }

@media (max-width: 1150px) {
  .app.has-members { grid-template-columns: 64px var(--rail-w, 240px) 4px 1fr; }
  .member-rail { display: none; }
}
@media (max-width: 860px) { .member-rail { display: none; } .app.has-members { grid-template-columns: 60px 1fr; } }

/* ===== Davet karti (sohbette zengin onizleme) ===== */
.invite-card { max-width: 360px; margin-top: 4px; background: var(--panel, #0d1311); border: 1px solid var(--line, #1b2620); border-radius: 12px; padding: 12px 14px; }
.row.out .invite-card { margin-left: auto; }
.ic-top { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--muted, #8a9a93); text-transform: uppercase; margin-bottom: 9px; }
.ic-row { display: flex; align-items: center; gap: 12px; }
.ic-icon { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, #2be06a, #16a085); color: #04130b; font-weight: 800; font-size: 18px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ic-meta { flex: 1; min-width: 0; }
.ic-name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 4px; }
.ic-name .vbadge { width: 17px; height: 17px; }
.ic-sub { display: flex; align-items: center; gap: 6px; color: var(--muted, #8a9a93); font-size: 13px; margin-top: 2px; }
.ic-dot { width: 9px; height: 9px; border-radius: 50%; background: #2be06a; display: inline-block; }
.ic-join { background: #2bb24a; color: #fff; border: none; border-radius: 8px; padding: 9px 18px; font-weight: 700; cursor: pointer; flex: 0 0 auto; font-size: 14px; }
.ic-join:hover { background: #249a40; }
.ic-join:disabled { background: #2a3a30; color: var(--muted, #8a9a93); cursor: default; }
.ic-load, .ic-bad { color: var(--muted, #8a9a93); font-size: 13px; padding: 4px 0; }

/* ===== Invite friends modal ===== */
.invite-people { list-style: none; margin: 8px 0 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.inv-row { display: flex; align-items: center; gap: 11px; padding: 8px 4px; border-bottom: 1px solid var(--line, #1b2620); }
.inv-info { flex: 1; min-width: 0; }
.inv-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-user { display: block; color: var(--muted, #8a9a93); font-size: 12px; }
.inv-btn { background: var(--accent, #2be06a); color: #04130b; border: none; border-radius: 8px; padding: 7px 16px; font-weight: 700; cursor: pointer; flex: 0 0 auto; }
.inv-btn.joined, .inv-btn:disabled { background: #2a3a30; color: var(--muted, #8a9a93); cursor: default; }
.invite-link-row { display: flex; gap: 8px; margin-top: 6px; }
.invite-link-row .field { flex: 1; }

/* ===== Profil kartinda sunucu rol bolumu ===== */
.pf-server-body { display: flex; flex-direction: column; gap: 10px; }
.pf-role-cur { display: flex; gap: 8px; align-items: center; }
.pf-role-cur .role-tag { font-size: 13px; padding: 4px 12px; border-radius: 20px; background: rgba(255,255,255,.06); }
.pf-role-cur .role-tag.owner { color: #f1c40f; }
.pf-role-cur .role-tag.admin { color: var(--accent, #2be06a); }
.pf-role-btn { background: rgba(255,255,255,.06); color: var(--text, #cfe0d6); border: 1px solid var(--line, #1b2620); border-radius: 10px; padding: 11px; font-weight: 600; cursor: pointer; text-align: center; }
.pf-role-btn:hover { background: rgba(255,255,255,.1); }
.pf-role-btn.kick { color: #ff5c5c; border-color: rgba(255,92,92,.3); }
.pf-role-btn.kick:hover { background: rgba(255,92,92,.12); }

/* ===== Server Settings modal ===== */
.ss-modal { max-width: 560px; width: 92vw; }
.ss-tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--line, #1b2620); }
.ss-tab { padding: 12px 14px; border: none; background: none; color: var(--muted, #8a9a93); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ss-tab.on { color: var(--text, #cfe0d6); border-bottom-color: var(--accent, #2be06a); }
.ss-tab.danger.on { border-bottom-color: #ff5c5c; color: #ff5c5c; }
.ss-body { padding-top: 16px; }
.ss-pane.hidden { display: none; }
.ss-icon-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.ss-icon { width: 72px; height: 72px; border-radius: 20px; background: linear-gradient(135deg, #2be06a, #16a085); color: #04130b; font-weight: 800; font-size: 26px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.ss-icon img { width: 100%; height: 100%; object-fit: cover; }
.ss-icon-actions { display: flex; flex-direction: column; gap: 6px; }
.ghost { background: rgba(255,255,255,.06); color: var(--muted, #8a9a93); border: 1px solid var(--line, #1b2620); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-weight: 600; }
.ss-chan-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 700; color: var(--muted, #8a9a93); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.ss-addchan { background: var(--accent, #2be06a); color: #04130b; border: none; border-radius: 7px; padding: 5px 10px; font-weight: 700; cursor: pointer; font-size: 12px; }
.ss-channels { list-style: none; margin: 0; padding: 0; }
.ss-chan { display: flex; align-items: center; gap: 9px; padding: 10px 8px; border-bottom: 1px solid var(--line, #1b2620); }
.ss-chan-ic { opacity: .6; width: 18px; text-align: center; }
.ss-chan-name { flex: 1; font-weight: 600; }
.ss-chan-btn { background: none; border: none; color: var(--muted, #8a9a93); cursor: pointer; padding: 5px; border-radius: 6px; }
.ss-chan-btn:hover { background: rgba(255,255,255,.08); color: var(--text, #cfe0d6); }
.ss-chan-btn.del:hover { color: #ff5c5c; }
.danger-btn { background: #ff5c5c; color: #fff; border: none; border-radius: 10px; padding: 12px 18px; font-weight: 700; cursor: pointer; margin-top: 10px; }
.danger-btn:hover { background: #e64949; }

/* ===== Profil banner (Discord gibi) ===== */
.banner-edit { position: relative; height: 110px; border-radius: 14px; overflow: hidden; margin-bottom: 14px; background: var(--panel, #0d1311); }
.banner-preview { position: absolute; inset: 0; background-size: cover; background-position: center; }
.banner-upload { position: absolute; bottom: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.55); color: #fff; padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; backdrop-filter: blur(4px); }
.banner-rm { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pf-banner.has-img { background-size: cover !important; background-position: center !important; }

/* ===================== MOBİL — Discord bileşenleri (telefon) ===================== */
@media (max-width: 860px) {
  /* sunucu rail biraz daralt */
  .server-rail { width: 56px; flex-basis: 56px; padding: 8px 0; gap: 7px; }
  .srv-icon { width: 40px; height: 40px; border-radius: 13px; font-size: 16px; }
  .app, .app.has-members { grid-template-columns: 56px 1fr; }
  .member-rail { display: none; }
  /* kanal paneli */
  .server-top { padding: 12px 12px 10px; }
  .chan { padding: 10px 9px; font-size: 16px; }              /* dokunma hedefi buyuk */
  .voice-part { padding: 5px 9px 5px 24px; }
  .voice-bar { padding: 10px 12px; }
  /* Server Settings -> tam ekran */
  #server-settings .modal.ss-modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; display: flex; flex-direction: column; }
  .ss-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 12px; flex: 0 0 auto; }
  .ss-tab { white-space: nowrap; padding: 13px 12px; }
  .ss-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .ss-icon { width: 64px; height: 64px; }
  .srvmem { gap: 8px; padding: 11px 2px; }
  .srvmem .role-sel { font-size: 12px; padding: 5px 5px; }
  .srvmem .sm-name { font-size: 14px; }
  /* davet modali */
  .invite-people { max-height: 50vh; }
  .inv-btn { padding: 9px 14px; }
  .invite-link-row { flex-wrap: wrap; }
  .invite-link-row .field { min-width: 0; }
  /* davet karti */
  .invite-card { max-width: 100%; }
  .ic-join { padding: 10px 16px; }
  /* yeni kanal tip secimi */
  .chan-type { flex-direction: row; }
  /* sticker/gif paneli tam genislik */
  .sticker-pop { left: 4px; right: 4px; max-width: none; }
  .sticker-grid { grid-template-columns: repeat(4, 1fr); }
  /* profil banner ayar alani */
  .banner-edit { height: 96px; }
}
@media (max-width: 420px) {
  .server-rail { width: 50px; flex-basis: 50px; }
  .app, .app.has-members { grid-template-columns: 50px 1fr; }
  .srv-icon { width: 38px; height: 38px; }
  .ss-tab { padding: 12px 9px; font-size: 14px; }
  .sticker-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===================== SPOTIFY ===================== */
.mr-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mr-col .mr-name { flex: initial; }
.mr-spt { font-size: 11px; color: #1DB954; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-spotify-wrap { margin: 0 14px 12px; }
.spt-card { background: linear-gradient(180deg, rgba(29,185,84,.10), rgba(29,185,84,.02)); border: 1px solid rgba(29,185,84,.3); border-radius: 16px; padding: 14px; }
.spt-head { color: #1DB954; font-size: 11px; font-weight: 800; letter-spacing: .5px; display: flex; align-items: center; gap: 6px; margin-bottom: 11px; }
.spt-head svg { width: 14px; height: 14px; }
.spt-body { display: flex; gap: 13px; align-items: center; }
.spt-art { width: 62px; height: 62px; border-radius: 9px; object-fit: cover; flex: 0 0 auto; }
.spt-meta { min-width: 0; }
.spt-song { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spt-artist { color: var(--muted, #8a9a93); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spt-actions { display: flex; gap: 8px; margin-top: 13px; }
.spt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 10px; padding: 10px 14px; font-weight: 700; cursor: pointer; font-size: 14px; text-decoration: none; }
.spt-btn svg { width: 15px; height: 15px; }
.spt-btn.listen { background: #1DB954; color: #04130b; }
.spt-btn.listen:hover { background: #1ed760; }
.spt-btn.open { background: rgba(255,255,255,.07); color: var(--text, #cfe0d6); }
.set-spotify { margin-top: 4px; }
.sp-set-row { display: flex; align-items: center; justify-content: space-between; }
.sp-set-on { display: inline-flex; align-items: center; gap: 7px; color: #1DB954; font-weight: 700; }
.sp-set-on svg { width: 15px; height: 15px; }
.sp-set-now { margin-top: 6px; font-size: 13px; color: var(--text, #cfe0d6); }

/* Spotify embed oynatici (sohbette) */
.spt-embed { width: 100%; max-width: 400px; border: none; border-radius: 12px; margin-top: 4px; display: block; }
.row.out .spt-embed { margin-left: auto; }
@media (max-width: 860px) { .spt-embed { max-width: 100%; } }
.sp-set-err { color: #ffb84d; font-weight: 700; }
.ms-or { color: var(--muted, #8a9a93); font-size: 12px; text-align: center; margin: 12px 0 8px; }
.ms-row { display: flex; gap: 8px; }
.ms-row .field { flex: 1; min-width: 0; }

/* ===================== DISCORD STİLİ MESAJLAR (sunucu kanalı + grup) ===================== */
.row.dc { display: flex; align-items: flex-start; align-self: stretch; max-width: 100%; padding: 2px 14px; margin: 0; position: relative; }
.row.dc:hover { background: rgba(255,255,255,.035); }
.row.dc:not(.grouped) { margin-top: 14px; }
.dc-avwrap { width: 40px; flex: 0 0 40px; margin-right: 10px; cursor: pointer; }
.dc-avwrap .avatar { width: 40px !important; height: 40px !important; font-size: 15px; }
.dc-gutter { width: 40px; flex: 0 0 40px; margin-right: 14px; display: flex; justify-content: center; }
.dc-htime { font-size: 10px; color: var(--muted); opacity: 0; padding-top: 4px; white-space: nowrap; }
.row.dc.grouped:hover .dc-htime { opacity: .65; }
.dc-body { flex: 1; min-width: 0; }
.dc-head { display: flex; align-items: baseline; gap: 7px; margin-bottom: 2px; flex-wrap: wrap; }
.dc-name { font-weight: 700; font-size: 15px; cursor: pointer; }
.dc-name:hover { text-decoration: underline; }
.dc-head .vbadge { width: 16px; height: 16px; align-self: center; }
.dc-time { font-size: 11px; color: var(--muted); font-weight: 400; }
.dc-content { font-size: 15px; line-height: 1.46; color: var(--text); word-break: break-word; }
.dc-content.locked { color: var(--muted); font-style: italic; }
.dc-content.media { background: transparent; }
.dc-content .att-img, .dc-content .att-video, .dc-content .gif-wrap, .dc-content .sticker-img { margin-top: 4px; }
.row.dc .reacts { margin-top: 4px; }
.row.dc .reacts:empty { margin: 0; }
.row.dc .msg-tools { position: absolute; top: -12px; right: 14px; }
@media (max-width: 860px) {
  .row.dc { padding: 2px 8px; }
  .dc-avwrap, .dc-gutter { width: 36px; flex-basis: 36px; margin-right: 10px; }
  .dc-avwrap .avatar { width: 36px !important; height: 36px !important; }
}

/* Ozel rozet (isim yaninda) */
.ubadge { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; object-fit: contain; flex: none; }
.sys-badge { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; flex: none; cursor: default; }
.dc-head .sys-badge { width: 16px; height: 16px; align-self: center; vertical-align: 0; }
.sender .sys-badge, .mrow-name .sys-badge { width: 14px; height: 14px; vertical-align: -2px; }
.pf-name .sys-badge { width: 20px; height: 20px; vertical-align: -3px; }
.head-title .sys-badge { width: 16px; height: 16px; }
/* sunucu/grup discord satiri: dc-head bir flex (align-items:baseline) -> badge dogrudan flex child,
   bu yuzden vertical-align ise yaramaz; align-self ile dikeyde ortalanir ve isimle orantili buyutulur */
.dc-head .ubadge { width: 18px; height: 18px; align-self: center; vertical-align: 0; }
.sender .ubadge, .mrow-name .ubadge { width: 15px; height: 15px; vertical-align: -3px; }
.mr-name + .ubadge { width: 15px; height: 15px; }
.pf-name .ubadge { width: 20px; height: 20px; vertical-align: -3px; }
.badge-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge-prev { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.05); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.badge-prev img { width: 100%; height: 100%; object-fit: contain; }
/* coklu rozet listesi */
.badge-list { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px; }
.badge-chip { position: relative; width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: visible; flex: 0 0 auto; }
.badge-chip img { width: 30px; height: 30px; object-fit: contain; }
.badge-rm-x { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--err); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.badge-rm-x:hover { filter: brightness(1.15); }

/* Discord kanal basligi: yuvarlak avatar yerine # */
.head-hash { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 500; color: var(--muted, #6f8278); background: none; flex: 0 0 auto; }
/* sunucuda server-panel en uste otururken ust bosluk */
.server-panel { padding-top: 2px; }

/* ===== Discord ek özellikler ===== */
/* @mention vurgusu (seni etiketleyince) */
.row.dc.mentioned { background: rgba(241,196,15,.07); box-shadow: inset 3px 0 0 #f1c40f; }
.row.in.mentioned .bubble, .row.out.mentioned .bubble { box-shadow: inset 3px 0 0 #f1c40f; }
.mention.all { background: rgba(88,101,242,.28); color: #aab4ff; border-radius: 4px; padding: 0 3px; font-weight: 600; }
/* spoiler ||gizli|| */
.spoiler { background: #20262b; color: transparent; border-radius: 4px; padding: 0 4px; cursor: pointer; transition: color .12s, background .12s; user-select: none; }
.spoiler.revealed { background: rgba(255,255,255,.08); color: inherit; cursor: text; user-select: text; }
/* kod blogu ```...``` */
.codeblock { background: #0a0f0c; border: 1px solid var(--line,#1b2620); border-radius: 8px; padding: 9px 12px; margin: 5px 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
/* okunmamis kanal */
.chan.unread { color: #fff; font-weight: 700; }
.chan.unread .chan-hash { opacity: .95; }
.chan.unread::before { content: ''; position: absolute; left: 2px; width: 4px; height: 8px; background: #fff; border-radius: 0 3px 3px 0; }
.chan { position: relative; }

/* ===== Yükleme göstergesi ===== */
.upload-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--panel,#0d1311); border-top: 1px solid var(--line,#1b2620); }
.ub-ic { color: var(--accent,#2be06a); display: flex; }
.ub-ic svg { width: 16px; height: 16px; }
.ub-name { font-size: 13px; color: var(--text,#cfe0d6); max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 0 auto; }
.ub-track { flex: 1; height: 6px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; }
.ub-fill { height: 100%; background: var(--accent,#2be06a); border-radius: 4px; transition: width .15s ease; }
.ub-pct { font-size: 12px; color: var(--muted,#8a9a93); white-space: nowrap; min-width: 96px; text-align: right; flex: 0 0 auto; }

.dc-content.deleted { color: var(--muted,#8a9a93); font-style: italic; font-size: 14px; }
.mention[data-uid] { cursor: pointer; }
.mention[data-uid]:hover { filter: brightness(1.2); text-decoration: underline; }

/* Oto-güncelleme toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: #0d1311; border: 1px solid var(--accent,#2be06a); color: var(--text,#cfe0d6); padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 9999; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; box-shadow: 0 12px 34px rgba(0,0,0,.55); max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* konuşma çemberi yumuşak geçiş */
.voice-part .avatar, .mr-member .avatar { transition: box-shadow .18s ease; }

/* ===== Havalı "çekiç" güncelleme event'i ===== */
.update-overlay { position: fixed; inset: 0; background: rgba(5,7,6,.95); backdrop-filter: blur(7px); z-index: 100000; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; }
.update-overlay.show { opacity: 1; }
.up-box { text-align: center; }
.up-anvil { position: relative; width: 150px; height: 120px; margin: 0 auto 26px; }
.up-logo { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font-size: 56px; color: var(--accent,#2be06a); text-shadow: 0 0 20px rgba(43,224,106,.6); animation: upShake .62s infinite; }
.up-hammer { position: absolute; left: 46%; top: -4px; font-size: 60px; transform-origin: 72% 82%; animation: upSwing .62s infinite ease-in-out; }
.up-spark { position: absolute; left: 50%; bottom: 36px; width: 8px; height: 8px; transform: translateX(-50%); border-radius: 50%; background: #fff; box-shadow: 0 0 16px 6px #2be06a; opacity: 0; animation: upSpark .62s infinite; }
@keyframes upSwing { 0%{transform:rotate(-52deg)} 44%{transform:rotate(10deg)} 56%{transform:rotate(10deg)} 100%{transform:rotate(-52deg)} }
@keyframes upShake { 0%,40%,100%{transform:translateX(-50%)} 50%{transform:translateX(-50%) translateY(3px) scale(.96)} }
@keyframes upSpark { 0%,44%{opacity:0;transform:translateX(-50%) scale(.3)} 52%{opacity:1;transform:translateX(-50%) scale(1.5)} 72%,100%{opacity:0;transform:translateX(-50%) scale(.5)} }
.up-title { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 800; font-size: 22px; color: #fff; letter-spacing: 1px; }
.up-sub { color: var(--muted,#8a9a93); font-size: 14px; margin-top: 7px; }
.up-track { width: 230px; height: 6px; background: rgba(255,255,255,.08); border-radius: 4px; margin: 20px auto 0; overflow: hidden; }
.up-fill { height: 100%; width: 0; background: linear-gradient(90deg,#2be06a,#5cffa0); border-radius: 4px; animation: upFill 2.4s linear forwards; }
@keyframes upFill { to { width: 100%; } }

/* ===== Sinematik güncelleme event'i (gelişmiş) ===== */
.up-scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(43,224,106,.045) 0 1px, transparent 1px 3px); pointer-events: none; animation: upScan 8s linear infinite; }
@keyframes upScan { to { background-position: 0 200px; } }
.up-anvil.hit { animation: upHit .14s ease; }
@keyframes upHit { 0%{transform:translate(0,0)} 30%{transform:translate(-4px,2px)} 70%{transform:translate(4px,1px)} 100%{transform:translate(0,0)} }
.up-particle { position: absolute; left: 50%; bottom: 38px; width: 5px; height: 5px; border-radius: 50%; background: #9bffc7; box-shadow: 0 0 9px 2px #2be06a; animation: upParticle .62s ease-out forwards; }
@keyframes upParticle { from { transform: translate(0,0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.up-pct { font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--accent,#2be06a); font-size: 15px; margin-top: 12px; letter-spacing: 1px; font-weight: 700; }
.up-log { margin: 14px auto 0; max-width: 290px; min-height: 74px; text-align: left; color: #6fd99a; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; line-height: 1.75; opacity: .82; white-space: pre-wrap; }
.up-fill { animation-duration: 2.8s !important; }
.up-title.glitch { position: relative; text-shadow: 0 0 14px rgba(43,224,106,.55); }
.up-title.glitch::before, .up-title.glitch::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; text-align: center; overflow: hidden; }
.up-title.glitch::before { color: #19e3e3; animation: upGlitch1 1.6s infinite linear alternate; }
.up-title.glitch::after { color: #ff5c7a; animation: upGlitch2 1.9s infinite linear alternate; }
@keyframes upGlitch1 { 0%,92%,100%{clip-path:inset(0 0 100% 0);transform:translate(0)} 93%{clip-path:inset(10% 0 58% 0);transform:translate(-2px)} 96%{clip-path:inset(40% 0 30% 0);transform:translate(2px)} }
@keyframes upGlitch2 { 0%,90%,100%{clip-path:inset(100% 0 0 0);transform:translate(0)} 91%{clip-path:inset(58% 0 20% 0);transform:translate(2px)} 95%{clip-path:inset(20% 0 52% 0);transform:translate(-2px)} }

/* ===== Voice: küçük çember + mute göstergesi + Discord bar ===== */
.voice-part { padding: 2px 8px 2px 22px !important; gap: 8px !important; font-size: 14px !important; }
.voice-part .avatar { width: 20px !important; height: 20px !important; font-size: 9px !important; }
.voice-part .avatar .pres { display: none; }
.voice-part.speaking .avatar { box-shadow: 0 0 0 2px #23a559 !important; }
.mr-member.speaking .avatar { box-shadow: 0 0 0 2px #23a559; }
.vp-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-mute { color: #ed4245; display: inline-flex; align-items: center; }
.vp-mute svg { width: 13px; height: 13px; }
.vc-count { margin-left: auto; font-size: 11px; color: var(--muted,#6f8278); padding-right: 2px; }
.voice-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #0a130d; border-top: 1px solid var(--line,#1b2620); }
.vb-info { flex: 1; min-width: 0; }
.vb-live { display: flex; align-items: center; gap: 6px; color: #3ba55d; font-size: 13px; font-weight: 700; }
.vb-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ba55d; box-shadow: 0 0 6px #3ba55d; flex: 0 0 auto; }
.vb-chan { display: block; color: var(--muted,#8a9a93); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.vb-btn { width: 34px; height: 34px; border: none; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--text,#cfe0d6); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.vb-btn:hover { background: rgba(255,255,255,.12); }
.vb-btn.off { color: #ed4245; }
.vb-btn.leave { background: #ed4245; color: #fff; }
.vb-btn.leave:hover { background: #c93b3e; }
.vb-btn svg { width: 18px; height: 18px; }

/* ===== Discord voice paneli (2 satır + aksiyon butonları) ===== */
.voice-bar { display: block !important; padding: 10px !important; background: #0a130d; border-top: 1px solid var(--line,#1b2620); }
.vc-top { display: flex; align-items: center; gap: 8px; }
.vc-stat { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.vc-txt { min-width: 0; }
.vc-live { color: #3ba55d; font-weight: 700; font-size: 13px; }
.vc-where { color: var(--muted,#8a9a93); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-ico { width: 34px; height: 34px; border: none; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--text,#cfe0d6); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.vc-ico.leave { color: #ed4245; }
.vc-ico.leave:hover { background: #ed4245; color: #fff; }
.vc-ico svg { width: 18px; height: 18px; }
.vc-acts { display: flex; gap: 6px; margin-top: 8px; }
.vc-act { flex: 1; height: 36px; border: none; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--text,#cfe0d6); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.vc-act:hover { background: rgba(255,255,255,.12); }
.vc-act.on { background: var(--accent,#2be06a); color: #04130b; }
.vc-act.off { color: #ed4245; }
.vc-act svg { width: 18px; height: 18px; }
/* video sahnesi */
.voice-stage { position: fixed; right: 16px; bottom: 16px; width: min(520px, 60vw); background: #0a0f0c; border: 1px solid var(--line,#1b2620); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.6); z-index: 5000; overflow: hidden; }
.vstage-head { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; color: var(--muted,#8a9a93); font-size: 12px; border-bottom: 1px solid var(--line,#1b2620); }
.vstage-head .icon-btn { color: var(--muted,#8a9a93); }
.vstage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px; padding: 6px; max-height: 60vh; overflow-y: auto; }
.vtile { position: relative; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; }
.vtile video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.vtile-name { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 6px; }
@media (max-width: 860px) { .voice-stage { right: 8px; left: 8px; bottom: 8px; width: auto; } }

/* ===== Discord tarzı voice ekranı (ana alan) ===== */
.voice-bar { flex: 0 0 auto; }
.server-panel { flex: 1 1 0; }
.voice-view { display: flex; flex-direction: column; height: 100%; min-height: 0; background: #0b0f0d; }
.voice-view.hidden { display: none; }
.vv-top { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line,#1b2620); flex: 0 0 auto; }
.vv-back { display: none; background: none; border: none; color: var(--text,#cfe0d6); cursor: pointer; padding: 4px; }
.vv-back svg { width: 20px; height: 20px; }
.vv-title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 7px; }
.vv-title svg { width: 16px; height: 16px; color: var(--muted,#8a9a93); }
.vv-sub { color: var(--muted,#8a9a93); font-size: 13px; margin-left: auto; }
.vv-stage { flex: 1; min-height: 0; padding: 16px; display: flex; flex-direction: column; }
.vv-grid { flex: 1; min-height: 0; display: grid; gap: 10px; align-content: center; justify-items: stretch; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.vv-grid.n1 { grid-template-columns: minmax(0, 760px); justify-content: center; }
.vv-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vv-grid.n3, .vv-grid.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vv-tile { position: relative; background: #16191c; border-radius: 12px; overflow: hidden; aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; min-height: 0; border: 2px solid transparent; cursor: pointer; transition: border-color .15s; }
.vv-tile.speaking { border-color: #23a559; }
.vv-tile video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vv-tile.hasvid { background: #000; }
.vv-av .avatar { width: 84px !important; height: 84px !important; font-size: 30px; }
.vv-label { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.62); color: #fff; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 8px; }
.vv-mute { color: #ed4245; display: inline-flex; }
.vv-mute svg { width: 13px; height: 13px; }
.vv-focus { flex: 1; min-height: 0; display: flex; }
.vv-focus .vv-tile { width: 100%; aspect-ratio: auto; }
.vv-strip { display: flex; gap: 8px; padding-top: 10px; flex: 0 0 auto; overflow-x: auto; }
.vv-strip .vv-tile { width: 170px; aspect-ratio: 16/10; flex: 0 0 auto; }
.vv-controls { display: flex; justify-content: center; gap: 12px; padding: 14px; border-top: 1px solid var(--line,#1b2620); flex: 0 0 auto; }
.vv-ctl { width: 48px; height: 48px; border: none; border-radius: 50%; background: #2b2f33; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.vv-ctl:hover { filter: brightness(1.15); }
.vv-ctl.on { background: var(--accent,#2be06a); color: #04130b; }
.vv-ctl.off { background: #fff; color: #ed4245; }
.vv-ctl.leave { background: #ed4245; color: #fff; }
.vv-ctl svg { width: 20px; height: 20px; }
@media (max-width: 860px) { .vv-back { display: inline-flex; } .vv-grid { grid-template-columns: 1fr !important; } .vv-sub { display: none; } }

/* voice bağlantı paneli: .voice-bar sınıf çakışmasını (sesli mesaj oynatıcısı height:4px) ID ile ez */
#voice-bar { height: auto !important; flex: 0 0 auto !important; min-height: 0 !important; overflow: visible !important; background: #0a130d !important; }
#voice-bar.hidden { display: none !important; }

/* voice-view taşma düzeltmesi: tile'lar konteyner yüksekliğine sığsın (aspect-ratio yerine grid 1fr) */
.voice-view { height: auto !important; flex: 1 1 0 !important; min-height: 0 !important; }
.vv-stage { overflow: hidden !important; }
.vv-grid { grid-auto-rows: 1fr !important; align-content: stretch !important; }
.vv-grid.n1 { grid-template-columns: 1fr !important; }
.vv-grid.n2 { grid-template-columns: 1fr 1fr !important; }
.vv-grid.n3, .vv-grid.n4 { grid-template-columns: 1fr 1fr !important; }
.vv-grid.n5, .vv-grid.n6, .vv-grid.n7, .vv-grid.n8, .vv-grid.n9 { grid-template-columns: repeat(3, 1fr) !important; }
.vv-tile { aspect-ratio: auto !important; min-height: 0; }
.vv-strip { height: 110px; flex: 0 0 110px !important; }
.vv-strip .vv-tile { height: 100%; width: 175px; }
@media (max-width: 860px) { .vv-grid { grid-template-columns: 1fr !important; grid-auto-rows: minmax(140px, 1fr) !important; } }

/* ===================== KOMPAKT MOD (Discord yoğunluğu) ===================== */
/* ikon butonları küçült */
.icon-btn { width: 32px; height: 32px; font-size: 16px; }
.icon-btn svg, .icon-btn .ico { width: 20px; height: 20px; }
.comp-btn { width: 34px; height: 34px; font-size: 18px; }
.comp-btn svg, .comp-btn .ico { width: 20px; height: 20px; }
.send { width: 38px; height: 38px; }
.send svg, .send .ico { width: 19px; height: 19px; }
.composer { padding: 9px 14px; gap: 5px; }
.composer input, .composer textarea { padding: 9px 14px; font-size: 14px; }
/* başlık daha sıkı */
.chat-head { padding: 7px 14px; gap: 10px; }
.head-title { font-size: 15px; }
.head-avatar, #head-avatar.avatar { width: 36px; height: 36px; font-size: 14px; }
/* DM/grup listesi daha sıkı */
.conv { padding: 7px 10px; gap: 10px; }
.conv > .avatar, .conv .avatar { width: 40px; height: 40px; font-size: 15px; }
.conv-name { font-size: 14px; }
.conv-preview { font-size: 12px; }
/* üye listesi yoğun */
.mr-member { padding: 4px 7px; gap: 8px; }
.mr-member .avatar { width: 24px !important; height: 24px !important; font-size: 10px; }
.mr-name { font-size: 13px; }
.mr-title { font-size: 13px; }
.member-rail { padding: 10px 6px; }
/* kanal listesi sıkı */
.chan { padding: 5px 8px; font-size: 14px; }
.chan-cat { padding: 10px 6px 3px; font-size: 10px; }
.server-name { font-size: 15px; }
/* sohbet mesajları biraz sıkı (okunur kalsın) */
.dc-avwrap, .dc-gutter { width: 38px; flex-basis: 38px; margin-right: 12px; }
.dc-avwrap .avatar { width: 38px !important; height: 38px !important; font-size: 14px; }
.dc-name { font-size: 14px; }
.dc-content { font-size: 14.5px; }
.row.dc:not(.grouped) { margin-top: 11px; }
/* sunucu rail biraz incelt */
.srv-icon { width: 42px; height: 42px; }

/* ===================== ŞIK / SESSİZ / DARK UPDATE EKRANI ===================== */
.update-overlay { position: fixed; inset: 0; background: radial-gradient(circle at 50% 44%, #0a1410 0%, #050706 72%); z-index: 100000; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .4s; }
.update-overlay.show { opacity: 1; }
.up-grid { position: absolute; inset: 0; background-image: radial-gradient(rgba(43,224,106,.07) 1px, transparent 1px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(circle at 50% 44%, #000 0%, transparent 62%); mask-image: radial-gradient(circle at 50% 44%, #000 0%, transparent 62%); }
.up-box { position: relative; text-align: center; }
.up-orb { position: relative; width: 112px; height: 112px; margin: 0 auto 30px; display: flex; align-items: center; justify-content: center; }
.up-ring, .up-ring2 { position: absolute; border-radius: 50%; border: 2px solid transparent; }
.up-ring { inset: 0; border-top-color: #2be06a; border-right-color: rgba(43,224,106,.35); animation: upSpin 1.1s linear infinite; }
.up-ring2 { inset: 13px; border-bottom-color: #19e3e3; border-left-color: rgba(25,227,227,.3); animation: upSpin 1.7s linear infinite reverse; }
@keyframes upSpin { to { transform: rotate(360deg); } }
.up-logo { font-size: 42px; color: #2be06a; text-shadow: 0 0 26px rgba(43,224,106,.75); animation: upPulse 1.6s ease-in-out infinite; }
@keyframes upPulse { 0%,100%{transform:scale(1);opacity:.92} 50%{transform:scale(1.09);opacity:1} }
.up-title { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 19px; color: #cfe0d6; letter-spacing: .5px; font-weight: 400; }
.up-title b { color: #fff; font-weight: 700; }
.up-sub { color: #5f7268; font-size: 13px; margin-top: 9px; font-family: 'JetBrains Mono', ui-monospace, monospace; }
.up-bar { width: 220px; height: 3px; background: rgba(255,255,255,.07); border-radius: 3px; margin: 24px auto 0; overflow: hidden; }
.up-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #2be06a, #5cffa0); border-radius: 3px; box-shadow: 0 0 12px rgba(43,224,106,.6); animation: upBar 2.4s ease-in-out forwards; }
@keyframes upBar { 0%{width:0} 55%{width:72%} 100%{width:100%} }

/* ===================== DISCORD 1:1 BOYUTLAR ===================== */
.app { grid-template-columns: 64px var(--rail-w, 240px) 4px 1fr; }
.app.has-members { grid-template-columns: 64px var(--rail-w, 240px) 4px 1fr 230px; }
.srv-icon { width: 42px; height: 42px; border-radius: 14px; }
.member-rail { padding: 8px; }
.mr-member { padding: 1px 8px !important; gap: 12px !important; min-height: 42px; border-radius: 4px; }
.mr-member .avatar { width: 32px !important; height: 32px !important; font-size: 13px; }
.mr-name { font-size: 16px !important; font-weight: 500; }
.mr-spt { font-size: 12px; }
.mr-cat { font-size: 12px; padding: 18px 8px 4px; }
.mr-title { font-size: 12px; }
.chan { padding: 6px 8px !important; font-size: 16px !important; border-radius: 4px; }
.chan-hash { font-size: 18px; }
.chan-cat { font-size: 12px !important; padding: 18px 8px 4px !important; }
.server-name { font-size: 16px !important; }
.server-top { padding: 12px 14px; }
.dc-avwrap, .dc-gutter { width: 40px !important; flex-basis: 40px !important; margin-right: 10px !important; }
.dc-avwrap .avatar { width: 40px !important; height: 40px !important; font-size: 15px; }
.dc-name { font-size: 16px !important; }
.dc-content { font-size: 16px !important; line-height: 1.375 !important; }
.dc-time { font-size: 12px; }
.row.dc:not(.grouped) { margin-top: 17px !important; }
.row.dc { padding: 2px 16px; }
.conv { padding: 6px 8px !important; gap: 12px !important; }
.conv > .avatar, .conv .avatar { width: 32px !important; height: 32px !important; font-size: 13px; }
.conv-name { font-size: 16px !important; }
.conv-preview { font-size: 13px !important; }
.composer input, .composer textarea { font-size: 16px !important; padding: 11px 16px !important; }
.comp-btn { width: 40px !important; height: 40px !important; }
.comp-btn svg, .comp-btn .ico { width: 24px !important; height: 24px !important; }
.send svg, .send .ico { width: 22px !important; height: 22px !important; }
.icon-btn svg, .icon-btn .ico { width: 24px !important; height: 24px !important; }
.chat-head { padding: 0 16px !important; min-height: 49px; }
.head-title { font-size: 16px !important; }
@media (max-width: 860px) { .app { grid-template-columns: 60px 1fr; } .app.has-members { grid-template-columns: 60px 1fr; } }

/* ===== Mesaj alanı tam-genişlik (Discord) — büyük %8 yatay padding'i kaldır ===== */
.messages { padding: 16px 0 !important; }
.row.in, .row.out { padding-left: 16px !important; padding-right: 16px !important; }
.day-sep, .typing, .row.call-row { margin-left: 16px; margin-right: 16px; }
.row.dc { padding: 2px 16px !important; }
@media (max-width: 860px) {
  .messages { padding: 12px 0 !important; }
  .row.dc { padding: 2px 10px !important; }
  .row.in, .row.out { padding-left: 10px !important; padding-right: 10px !important; }
}

/* ===== Durum (presence) sistemi ===== */
.pres.online { background: #23a559 !important; }
.pres.idle { background: #f0b232 !important; }
.pres.dnd { background: #f23f43 !important; }
.pres.offline { background: #80848e !important; }
.user-panel { position: relative; }
.me-presence { background: none; border: none; padding: 0; cursor: pointer; flex: 0 0 auto; }
.user-meta { cursor: pointer; min-width: 0; flex: 1; }
.user-status { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#presence-menu { bottom: 58px; left: 8px; right: 8px; top: auto; padding: 6px; }
#presence-menu button[data-st] { display: flex; align-items: center; width: 100%; }
.pdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 9px; flex: 0 0 auto; }
.pdot.online { background: #23a559; } .pdot.idle { background: #f0b232; } .pdot.dnd { background: #f23f43; } .pdot.offline { background: #80848e; }
.pm-sep { height: 1px; background: var(--line); margin: 6px 0; }
.pm-custom { display: flex; gap: 6px; padding: 4px; }
.pm-custom input { flex: 1; min-width: 0; background: var(--input); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; color: var(--text); font-size: 13px; outline: none; }
.pm-custom button { background: var(--accent); color: #04130b; border: none; border-radius: 7px; padding: 0 12px; font-weight: 700; cursor: pointer; }
.mr-status { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Bildirim & sessize alma ===== */
.ctx-menu { position: fixed; z-index: 9999; background: var(--panel,#0d1311); border: 1px solid var(--line,#1b2620); border-radius: 10px; padding: 6px; min-width: 180px; box-shadow: 0 12px 34px rgba(0,0,0,.5); }
.ctx-menu button { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text,#cfe0d6); padding: 9px 12px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.ctx-menu button:hover { background: var(--input,#121a16); }
.ctx-menu button.danger { color: #ed4245; }
.srv-icon { position: relative; }
.srv-badge { position: absolute; bottom: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; background: #f23f43; color: #fff; border-radius: 10px; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 3px solid #050706; }
.srv-pip { position: absolute; left: -5px; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; background: #fff; border-radius: 0 4px 4px 0; }
.srv-icon.muted { opacity: .45; }
.badge.mention { background: #f23f43 !important; color: #fff !important; }
.chan.muted, .conv.muted { opacity: .5; }
.chan.muted.active, .conv.muted.active { opacity: 1; }
.chan.chan-dragging { opacity: .35; }
.chan.chan-drop-above { border-top: 2px solid var(--accent, #2be06a); }
.chan.chan-drop-below { border-bottom: 2px solid var(--accent, #2be06a); }
.conv-muted { font-size: 11px; opacity: .7; }
.conv.has-unread .conv-name { color: #fff; font-weight: 700; }

/* push-to-talk butonu + ipucu */
#vv-ptt { font-size: 12px; font-weight: 800; letter-spacing: .5px; }
.vv-ptt-hint { text-align: center; color: var(--muted,#8a9a93); font-size: 12px; padding: 0 0 10px; }
.vv-ptt-hint b { color: var(--accent,#2be06a); background: rgba(255,255,255,.08); padding: 1px 7px; border-radius: 4px; }

/* ===== Durum kutusu (column) + üye butonu + mobil ===== */
.pm-custom { flex-direction: column !important; gap: 7px !important; padding: 6px 8px !important; }
.pm-custom input { width: 100% !important; box-sizing: border-box; padding: 10px 12px !important; font-size: 14px !important; }
.pm-custom button { width: 100% !important; padding: 9px !important; }
/* üye butonu: masaüstünde gizli (panel zaten görünür), dar ekranda görünür */
#members-btn { display: none; }
@media (max-width: 1150px) { #members-btn { display: grid; } }
.member-rail.open { display: block !important; position: fixed; top: 0; right: 0; bottom: 0; width: min(290px, 84vw); z-index: 6000; box-shadow: -14px 0 44px rgba(0,0,0,.6); padding: 12px 10px; overflow-y: auto; }

/* ===================== TAM MOBİL UYUMLULUK ===================== */
@media (max-width: 860px) {
  .app, .app.has-members { grid-template-columns: 58px 1fr !important; }
  .server-rail { width: 58px; flex-basis: 58px; }
  .srv-icon { width: 44px; height: 44px; }
  .member-rail { display: none; }
  /* sohbet görünümünde sol panelleri gizle, sohbeti tam yap */
  .app.show-chat .rail, .app.show-chat .server-rail { display: none !important; }
  .app.show-chat .chat { grid-column: 1 / -1 !important; }
  .app:not(.show-chat) .chat { display: none; }
  .chat-back { display: grid !important; }
  /* server panel başlık + kanallar dokunmaya uygun */
  .server-top { padding: 12px 12px; }
  .chan { padding: 9px 10px !important; }
  .chan-cat { padding: 14px 8px 4px !important; }
  /* voice ekranı */
  .vv-controls { gap: 12px; padding: 16px 10px; }
  .vv-ctl { width: 50px; height: 50px; }
  .vv-grid { grid-template-columns: 1fr !important; grid-auto-rows: minmax(150px, 1fr) !important; }
  .vv-top { padding: 11px 12px; }
  /* durum & bağlam menüleri */
  #presence-menu { left: 6px; right: 6px; bottom: 62px; }
  .ctx-menu { min-width: 200px; }
  .ctx-menu button { padding: 13px 14px; font-size: 15px; }
  /* tüm tepe modalleri tam ekran */
  .modal-wrap .modal.sm-modal, .modal-wrap .modal:not(.info-modal):not(.ss-modal) { width: 96vw; max-width: 96vw; }
  /* composer + header dokunma */
  .composer { padding: 8px 10px !important; gap: 4px; }
  .comp-btn { width: 38px !important; height: 38px !important; }
  .icon-btn { width: 36px; height: 36px; }
  /* mesaj alanı kenar */
  .row.dc { padding: 2px 10px !important; }
  .dc-avwrap, .dc-gutter { width: 38px !important; flex-basis: 38px !important; margin-right: 11px !important; }
}
@media (max-width: 420px) {
  .app, .app.has-members { grid-template-columns: 50px 1fr !important; }
  .server-rail { width: 50px; flex-basis: 50px; }
  .srv-icon { width: 40px; height: 40px; }
}

/* ===== Mobil composer taşma + yatay scroll kesme ===== */
html, body { overflow-x: hidden; max-width: 100vw; }
.app { max-width: 100vw; overflow: hidden; }
@media (max-width: 860px) {
  .composer { box-sizing: border-box; width: 100%; max-width: 100%; padding: 8px 8px !important; gap: 2px !important; }
  .composer input, .composer textarea { min-width: 0; flex: 1 1 auto; padding: 9px 12px !important; }
  .comp-btn { width: 34px !important; height: 34px !important; flex: 0 0 auto; }
  .comp-btn svg, .comp-btn .ico { width: 22px !important; height: 22px !important; }
  .send { width: 38px !important; height: 38px !important; flex: 0 0 auto; margin-left: 2px; }
  .chat-view, #chat-view { max-width: 100%; overflow-x: hidden; }
  .messages { max-width: 100%; }
  .row, .row.dc { max-width: 100%; box-sizing: border-box; }
  .dc-content, .bubble { max-width: 100%; overflow-wrap: anywhere; }
  /* başlık sığsın */
  .chat-head { padding: 0 8px !important; gap: 6px; }
  .lock-pill { font-size: 11px; padding: 4px 8px; }
  .head-meta { min-width: 0; flex: 1; }
  .head-title, .head-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 380px) {
  .lock-pill { display: none; }   /* çok dar: E2E rozetini gizle, yer aç */
}

/* ===================== HER TELEFONA OTOMATİK (safe-area / çentik) ===================== */
/* en güvenli dinamik yükseklik zinciri: vh -> dvh */
.app, .auth-wrap, .call-overlay { height: 100vh; height: 100dvh; }
@media (max-width: 980px) {
  /* alt çubuk/home indicator güvenli alanı */
  .composer { padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important; }
  .user-panel { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .vv-controls { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .voice-bar { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  /* üst çentik güvenli alanı */
  .chat-head { padding-top: calc(env(safe-area-inset-top) + 2px); }
  .server-rail { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  .server-top, .rail-head { padding-top: calc(12px + env(safe-area-inset-top)); }
  /* sol/sağ çentik (yatay) */
  .composer { padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
}

/* ===== Spotify ilerleme çubuğu + animasyonlu avatar/banner ===== */
.spt-prog { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.spt-t1, .spt-t2 { font-size: 11px; color: var(--muted,#8a9a93); min-width: 34px; font-variant-numeric: tabular-nums; }
.spt-t2 { text-align: right; }
.spt-bar { flex: 1; height: 4px; background: rgba(255,255,255,.16); border-radius: 3px; overflow: hidden; }
.spt-fill { height: 100%; width: 0; background: #1DB954; border-radius: 3px; transition: width .5s linear; }
.spt-btn.stop { background: rgba(255,255,255,.1); color: var(--text,#cfe0d6); }
.avatar video { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.pf-banner-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===== OWN PROFILE VIEW (data-self attribute) ===== */
#profile-modal[data-self="1"] #pf-message,
#profile-modal[data-self="1"] #pf-call,
#profile-modal[data-self="1"] #pf-video,
#profile-modal[data-self="1"] #pf-share { display: none; }
#profile-modal[data-self="1"] #pf-edit-profile { display: flex !important; }
#profile-modal[data-self="1"] #pf-personal { display: none; }
#profile-modal[data-self="1"] #pf-block { display: none; }
#profile-modal[data-self="1"] .fp-row { display: none; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║   BYLOCK PROFESSIONAL REDESIGN  —  Discord / Guilded 1:1 style  ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* ── 1. Remove busy grid pattern from chat background ── */
.chat::before { display: none; }

/* ── 2. Composer: Discord pill ── */
/* Pill container — floats above transparent bottom area */
.composer {
  display: flex !important;
  align-items: flex-end !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 16px 20px !important;
  background: #1a2420 !important;
  border-radius: 12px !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 2 !important;
}

/* Reorder: attach | textarea | [mic emoji sticker viewonce] | send */
#attach-btn  { order: 1; margin: 5px 0 5px 6px !important; }
#msg-input   { order: 2; flex: 1 1 auto !important; min-width: 0 !important; }
#mic-btn     { order: 3; }
#emoji-btn   { order: 4; }
#sticker-btn { order: 5; }
#viewonce-btn{ order: 6; }
#composer .send { order: 7; }

/* Transparent textarea — blends into pill */
.composer textarea, .composer input {
  background: transparent !important;
  border-radius: 0 !important;
  padding: 14px 6px 14px 4px !important;
  min-height: 52px !important;
  max-height: 160px !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
  align-self: stretch !important;
  border: 0 !important;
}

/* Icon buttons inside pill — flat */
.comp-btn {
  width: 40px !important; height: 40px !important;
  border-radius: 8px !important; margin: 6px 1px !important;
  background: transparent !important; color: #7a8e86 !important;
}
.comp-btn:hover { background: rgba(255,255,255,.07) !important; color: var(--text) !important; }
.comp-btn svg, .comp-btn .ico { width: 22px !important; height: 22px !important; }

/* Send button — icon, not circle; accent on hover */
#composer .send {
  width: 40px !important; height: 40px !important;
  border-radius: 8px !important; margin: 6px 6px 6px 2px !important;
  background: transparent !important; color: var(--muted) !important;
  box-shadow: none !important; transition: color .15s, background .15s !important;
}
#composer .send:hover {
  background: rgba(43,224,106,.12) !important;
  color: var(--accent) !important; filter: none !important;
}
#composer .send svg, #composer .send .ico { width: 22px !important; height: 22px !important; }

/* ── 3. Reply/edit bar connects to pill (rounded top, flat bottom) ── */
.compose-bar {
  margin: 0 16px !important;
  padding: 8px 14px !important;
  border-radius: 12px 12px 0 0 !important;
  background: #151e19 !important;
  border: none !important;
  border-bottom: 1px solid rgba(43,224,106,.12) !important;
}
#compose-bar:not(.hidden) + #composer {
  border-radius: 0 0 12px 12px !important;
  margin-top: 0 !important;
}

/* ── 4. Attach preview also connects ── */
#attach-preview:not(.hidden) {
  margin: 0 16px !important;
  padding: 10px 14px !important;
  border-radius: 12px 12px 0 0 !important;
  background: #151e19 !important;
  border: none !important;
  border-bottom: 1px solid var(--line) !important;
}
#attach-preview:not(.hidden) ~ #composer {
  border-radius: 0 0 12px 12px !important;
  margin-top: 0 !important;
}

/* ── 5. Chat header — 49px exactly, shadow ── */
.chat-head {
  min-height: 49px !important;
  padding: 0 16px !important;
  border-bottom: 1px solid var(--line) !important;
  background: var(--panel) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.25) !important;
  z-index: 3 !important;
}

/* ── 6. Sidebar rail header — matches chat header height ── */
.rail-head {
  height: 49px !important; min-height: 49px !important;
  padding: 0 12px 0 16px !important;
  border-bottom: 1px solid var(--line) !important;
  background: var(--rail) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.2) !important;
}
.brand { font-size: 15px !important; letter-spacing: .5px; }

/* ── 7. Conversation items — auto height, 8px vertical padding ── */
.conv-list { padding: 4px 6px !important; }
.conv {
  height: auto !important; min-height: 42px !important;
  max-height: none !important;
  padding: 5px 8px !important; gap: 10px !important;
  border-radius: 6px !important; margin-bottom: 1px !important;
  align-items: center !important;
}

/* ── 8. Conv active/hover — clean Discord-style ── */
.conv::before, .conv::after { display: none !important; }
.conv.has-unread::after { display: none !important; }
.conv.active { background: rgba(255,255,255,.08) !important; }
.conv.active .conv-name { color: #fff; font-weight: 700; }
.conv:not(.active):hover { background: rgba(255,255,255,.04) !important; }
/* Left pip indicators */
.conv.active .conv-name::before {
  content: ''; display: inline-block;
  width: 0; /* handled by server rail pips instead */
}

/* ── 9. Day separator — Discord horizontal rule ── */
.day-sep {
  display: flex !important; align-items: center !important;
  align-self: stretch !important;
  margin: 20px 16px 8px !important;
  font-size: 12px !important; font-weight: 600 !important;
  color: var(--muted) !important;
  background: transparent !important;
  padding: 0 !important; border-radius: 0 !important;
  box-shadow: none !important;
  white-space: nowrap;
}
.day-sep::before, .day-sep::after {
  content: '' !important; flex: 1 !important;
  height: 1px !important; background: var(--line) !important;
}
.day-sep::before { margin-right: 8px !important; }
.day-sep::after  { margin-left: 8px !important; }
.day-sep span { flex: 0 0 auto; }

/* ── 10. User panel — Discord 52px with clean spacing ── */
.user-panel {
  height: 52px !important; min-height: 52px !important;
  padding: 0 8px !important; gap: 2px !important;
  background: var(--rail) !important;
  border-top: 1px solid rgba(0,0,0,.35) !important;
}
.me-presence { margin-right: 6px !important; padding: 3px !important; border-radius: 8px; }
.me-presence:hover { background: rgba(255,255,255,.06); }
.user-name { font-size: 14px !important; font-weight: 600 !important; line-height: 1.2 !important; }
.user-status { font-size: 12px !important; }
/* Settings button compact */
#open-settings.icon-btn {
  width: 32px !important; height: 32px !important;
  border-radius: 6px !important;
}
#open-settings svg, #open-settings .ico { width: 20px !important; height: 20px !important; }

/* ── 11. Sidebar search — compact Discord style ── */
.search-wrap { padding: 8px 8px 4px !important; }
.search {
  height: 28px !important; padding: 0 8px !important;
  border-radius: 4px !important; font-size: 13px !important;
}

/* ── 12. Readonly bar (channel, non-E2E) — floating above composer ── */
.readonly-bar {
  margin: 0 16px 12px !important;
  border-radius: 8px !important;
  background: rgba(43,224,106,.06) !important;
  color: var(--muted) !important;
  border: 1px solid rgba(43,224,106,.14) !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  text-align: center !important;
}

/* ── 13. Typing indicator tighter ── */
.typing { padding: 0 16px 6px !important; height: 20px !important; line-height: 20px !important; }

/* ── 14. Pinned bar and search bar consistent ── */
.pinned-bar { padding: 8px 16px !important; }
.search-bar { padding: 6px 14px !important; }

/* ── 15. Better message hover (very subtle) ── */
.row.dc:hover { background: rgba(255,255,255,.025) !important; }

/* ── 16. Lock pill — more refined ── */
.lock-pill {
  font-size: 11px !important; padding: 3px 9px !important;
  background: rgba(43,224,106,.07) !important;
  border: 1px solid rgba(43,224,106,.18) !important;
  border-radius: 6px !important; letter-spacing: .2px;
}

/* ── 17. Context menu — tighter Discord feel ── */
.ctx-menu { border-radius: 8px !important; }
.ctx-menu button { border-radius: 4px !important; padding: 8px 12px !important; font-size: 14px !important; }

/* ── 18. Popmenu — same refinement ── */
.popmenu { border-radius: 8px !important; padding: 4px !important; }
.popmenu button { border-radius: 4px !important; padding: 8px 12px !important; }

/* ── 19. Chat background subtle depth ── */
.chat { background: var(--bg) !important; }
.chat-view { background: var(--bg) !important; }

/* ── 20. Empty state — no border, subtle ── */
.empty-state { border-bottom: none !important; }

/* ── 21. Server rail gap consistent ── */
.server-rail { gap: 6px !important; }

/* ── 22. Composer bottom area background — clean ── */
/* Remove old panel background that creates a visual band */
.composer + .readonly-bar { background: none; }

/* ── 23. Upload bar inside the "compose zone" ── */
#upload-bar:not(.hidden) {
  margin: 0 16px !important;
  border-radius: 0 !important;
  background: #151e19 !important;
  border: none !important;
  border-bottom: 1px solid var(--line) !important;
}
#upload-bar:not(.hidden) ~ #composer { border-radius: 0 0 12px 12px !important; margin-top: 0 !important; }

/* ── 24. New messages divider spacing ── */
.new-msg-sep { margin: 6px 16px !important; }

/* ── 25. Vanity URL row in server settings ── */
.vanity-row { display: flex; align-items: center; gap: 8px; }
.vanity-prefix { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; flex: 0 0 auto; }
.vanity-input { flex: 1; font-family: var(--mono); font-size: 14px; }
.ghost { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 14px; }
.ghost.sm { padding: 10px 16px; }
.ghost:hover { border-color: var(--accent); color: var(--text); }

/* ── Mobile adjustments ── */
@media (max-width: 860px) {
  .composer { margin: 0 8px 10px !important; border-radius: 10px !important; }
  #compose-bar:not(.hidden) + #composer { border-radius: 0 0 10px 10px !important; }
  #attach-preview:not(.hidden) ~ #composer { border-radius: 0 0 10px 10px !important; }
  .compose-bar { margin: 0 8px !important; border-radius: 10px 10px 0 0 !important; }
  #attach-preview:not(.hidden) { margin: 0 8px !important; border-radius: 10px 10px 0 0 !important; }
  .day-sep { margin: 14px 10px 6px !important; }
  .readonly-bar { margin: 0 8px 10px !important; }
  .user-panel { height: 52px !important; min-height: 52px !important; }
}

/* ===================== IMAGE EDITOR ===================== */
.ie-modal { width: 560px; max-width: 98vw; }
.ie-body { display: flex; flex-direction: column; }
.ie-canvas-wrap { background: #0a0a0a; display: flex; justify-content: center; align-items: center; overflow: hidden; }
#ie-canvas { display: block; cursor: grab; touch-action: none; }
#ie-canvas:active { cursor: grabbing; }
.ie-controls { display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--border); }
.ie-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-top: 1px solid var(--border); }
.ie-reset-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13px; padding: 4px 0; }
.ie-reset-btn:hover { text-decoration: underline; }
