:root{
  --rail:#1e1f22;
  --sidebar:#2b2d31;
  --chat:#313338;
  --chat-alt:#2e3035;
  --modal:#313338;
  --modal-side:#2b2d31;
  --input:#1e1f22;
  --hover:#35373c;
  --active:#404249;
  --text:#f2f3f5;
  --text-muted:#949ba4;
  --text-dim:#80848e;
  --header:#b5bac1;
  --brand:#5865f2;
  --brand-hover:#4752c4;
  --green:#23a55a;
  --yellow:#f0b232;
  --red:#f23f43;
  --danger:#da373c;
  --border:#3f4147;
  --link:#00a8fc;
  --radius:8px;
  --font:"gg sans","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:var(--font);
  background:var(--chat);
  color:var(--text);
  overflow:hidden;
  font-size:16px;
  -webkit-font-smoothing:antialiased;
}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,textarea,select{font-family:inherit;font-size:14px}
a{color:var(--link);text-decoration:none}
a:hover{text-decoration:underline}
.hidden{display:none !important}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-thumb{background:#1a1b1e;border-radius:4px}
::-webkit-scrollbar-track{background:transparent}

/* -------------------------------------------------- Masaüstü başlık çubuğu */
.titlebar{display:none}
/* Masaüstünde gövdeyi dikey flex yap: başlık çubuğu + uygulama (taşma olmaz) */
html.is-desktop body{display:flex;flex-direction:column;height:100vh}
html.is-desktop .titlebar{
  display:flex;align-items:center;justify-content:center;
  flex:0 0 32px;position:relative;z-index:1000;
  background:var(--rail);border-bottom:1px solid #111214;
  -webkit-app-region:drag;user-select:none;
}
.titlebar .tb-center{
  font-family:var(--font);font-size:14px;font-weight:600;letter-spacing:.2px;
  color:var(--header);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:55vw;padding:0 12px;
}
/* Masaüstünde içeriği 32px aşağı it (başlık çubuğu için) */
html.is-desktop .app{flex:1 1 auto;height:auto;min-height:0;width:100%}
html.is-desktop .auth-screen{top:32px}
html.is-desktop .conn-error{top:32px}

/* --------------------------------------------------- Açılış / yükleme ekranı */
.splash{
  position:fixed;inset:0;z-index:3000;display:flex;align-items:center;justify-content:center;
  background:radial-gradient(900px 620px at 50% 18%,#2a2d5a 0%,#15161f 55%,#0f1015);
  transition:opacity .35s ease;
}
.splash.hide{opacity:0;pointer-events:none}
.splash-inner{display:flex;flex-direction:column;align-items:center;gap:12px}
.splash-logo{
  width:64px;height:64px;border-radius:18px;box-shadow:0 12px 40px rgba(0,0,0,.5);
  animation:splashPulse 1.8s ease-in-out infinite;
}
@keyframes splashPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
.splash-name{font-size:22px;font-weight:800;letter-spacing:-.5px;color:#fff}
.splash-spinner{
  width:30px;height:30px;border-radius:50%;margin-top:6px;
  border:3px solid rgba(255,255,255,.15);border-top-color:var(--brand);animation:spin 1s linear infinite;
}
.splash-text{font-size:14px;color:var(--text-muted)}

/* ------------------------------------------------------------ GİRİŞ */
.auth-screen{
  position:fixed;inset:0;display:flex;align-items:center;justify-content:center;
  background:radial-gradient(1100px 700px at 15% -10%,#4b56d6 0%,transparent 55%),
             radial-gradient(1000px 700px at 100% 110%,#6b3fb0 0%,transparent 50%),
             linear-gradient(135deg,#1a1b2e,#15161f 55%,#0f1015);
  padding:24px;z-index:50;overflow:hidden;
}
/* Arka plan hareketli ışık lekeleri */
.auth-bg{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.auth-bg .blob{position:absolute;border-radius:50%;filter:blur(70px);opacity:.5;animation:blobFloat 18s ease-in-out infinite}
.auth-bg .b1{width:420px;height:420px;background:#5865f2;top:-120px;left:-80px}
.auth-bg .b2{width:380px;height:380px;background:#7b3ff2;bottom:-140px;right:-60px;animation-delay:-6s}
.auth-bg .b3{width:300px;height:300px;background:#23a55a;top:40%;left:55%;opacity:.28;animation-delay:-11s}
@keyframes blobFloat{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(40px,-30px) scale(1.08)}66%{transform:translate(-30px,25px) scale(.95)}}

.auth-layout{
  position:relative;z-index:1;display:flex;width:100%;max-width:880px;
  background:rgba(43,45,49,.72);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.08);border-radius:18px;overflow:hidden;
  box-shadow:0 30px 80px rgba(0,0,0,.55);
}

/* Sol tanıtım paneli */
.auth-hero{
  flex:1 1 46%;padding:38px 34px;display:flex;flex-direction:column;justify-content:space-between;
  background:linear-gradient(160deg,rgba(88,101,242,.28),rgba(123,63,242,.10) 60%,transparent);
  border-right:1px solid rgba(255,255,255,.07);min-width:0;
}
.auth-hero-top{display:flex;align-items:center;gap:12px}
.auth-logo{width:44px;height:44px;border-radius:12px;box-shadow:0 6px 20px rgba(0,0,0,.35)}
.auth-logo-name{font-size:22px;font-weight:800;letter-spacing:-.4px}
.auth-hero-mid h1{font-size:32px;line-height:1.15;letter-spacing:-.8px;margin:0 0 14px}
.auth-hero-mid>p{color:#c7cbd6;font-size:15px;line-height:1.55;margin-bottom:22px;max-width:340px}
.auth-hero-feats{list-style:none;display:flex;flex-direction:column;gap:12px}
.auth-hero-feats li{display:flex;align-items:center;gap:12px;font-size:14.5px;color:#e6e8ee}
.auth-hero-feats .hf-ico{
  width:34px;height:34px;flex-shrink:0;border-radius:9px;background:rgba(255,255,255,.08);
  display:flex;align-items:center;justify-content:center;font-size:17px;
}
.auth-hero-foot{
  display:inline-flex;align-items:center;gap:8px;align-self:flex-start;margin-top:26px;
  color:#c7cbd6;font-size:13.5px;font-weight:600;padding:9px 14px;border-radius:10px;
  background:rgba(0,0,0,.25);border:1px solid rgba(255,255,255,.08);transition:background .15s,color .15s;
}
.auth-hero-foot:hover{background:rgba(0,0,0,.4);color:#fff;text-decoration:none}

/* Sağ form kartı */
.auth-card{
  flex:1 1 54%;background:transparent;padding:40px 38px;width:100%;max-width:460px;
  display:flex;flex-direction:column;
}
.auth-brand-sm{display:none;align-items:center;gap:10px;font-size:20px;font-weight:800;margin-bottom:18px}
.auth-brand-sm img{width:32px;height:32px;border-radius:9px}
.auth-card h2{font-size:25px;margin-bottom:6px;letter-spacing:-.4px}
.auth-sub{color:var(--text-muted);font-size:15px;margin-bottom:26px}
.field{display:block;margin-bottom:16px}
.field>span{display:block;font-size:12px;font-weight:700;text-transform:uppercase;color:var(--header);margin-bottom:8px;letter-spacing:.02em}
.field i{color:var(--red);font-style:normal}
.input-wrap{position:relative;display:flex;align-items:center}
.input-wrap .input-ico{position:absolute;left:12px;color:var(--text-dim);pointer-events:none}
.field input,.field select,.field textarea{
  width:100%;background:rgba(0,0,0,.32);border:1px solid rgba(255,255,255,.06);border-radius:10px;
  padding:12px 12px 12px 40px;color:var(--text);outline:none;font-size:15px;
  transition:border-color .15s,background .15s,box-shadow .15s;
}
.field textarea,.field select{padding-left:12px}
.field input::placeholder{color:var(--text-dim)}
.field input:focus{border-color:var(--brand);background:rgba(0,0,0,.45);box-shadow:0 0 0 3px rgba(88,101,242,.22)}
.input-wrap input[type="password"],.input-wrap input[name="password"]{padding-right:42px}
.pw-toggle{
  position:absolute;right:6px;top:50%;transform:translateY(-50%);width:32px;height:32px;
  display:flex;align-items:center;justify-content:center;border-radius:8px;color:var(--text-dim);
}
.pw-toggle:hover{color:var(--text);background:rgba(255,255,255,.06)}
.pw-toggle.on{color:var(--brand)}
.auth-remember{display:flex;align-items:center;gap:8px;margin:2px 0 14px;font-size:14px;color:var(--text-muted);cursor:pointer;user-select:none}
.auth-remember input{width:16px;height:16px;accent-color:var(--brand);cursor:pointer}
.auth-error{color:var(--red);font-size:13px;margin-bottom:12px;min-height:16px}
.auth-submit{margin-top:4px;border-radius:10px;font-size:15px;font-weight:600}
/* Sunucuya bağlanılamadı ekranı (oturumu silmeden) */
.conn-error{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#1a1b2e,#15161f 55%,#0f1015);padding:20px}
.conn-error.hidden{display:none}
.conn-card{background:rgba(43,45,49,.85);border:1px solid rgba(255,255,255,.08);border-radius:16px;
  padding:34px;max-width:400px;width:100%;text-align:center;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.conn-card h2{font-size:20px;margin:14px 0 8px}
.conn-card p{color:var(--text-muted);font-size:14px;margin-bottom:20px;line-height:1.5}
.conn-card .btn{margin:4px}
.conn-spinner{width:40px;height:40px;margin:0 auto;border-radius:50%;
  border:3px solid rgba(255,255,255,.15);border-top-color:var(--brand);animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.auth-switch{margin-top:16px;font-size:14px;color:var(--text-muted);text-align:center}

@media (max-width:760px){
  .auth-layout{max-width:440px;flex-direction:column}
  .auth-hero{display:none}
  .auth-brand-sm{display:flex}
  .auth-card{max-width:none;padding:32px 26px}
}
.btn{padding:9px 16px;border-radius:3px;font-size:14px;font-weight:500;transition:background .15s}
.btn-block{width:100%;padding:12px}
.btn-primary{background:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-hover)}
.btn-secondary{background:#4e5058;color:#fff}
.btn-secondary:hover{background:#6d6f78}
.btn-danger{background:var(--danger);color:#fff}
.btn-danger:hover{background:#a12d2f}
.btn-ghost{color:var(--text);background:transparent}
.btn-ghost:hover{text-decoration:underline}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* ------------------------------------------------------------ DÜZEN */
.app{display:flex;height:100vh;width:100vw;overflow:hidden}

/* Sunucu rayı */
.guild-rail{
  width:72px;background:var(--rail);display:flex;flex-direction:column;align-items:center;
  padding:12px 0;gap:8px;overflow-y:auto;overflow-x:hidden;flex-shrink:0;
}
.guild-rail::-webkit-scrollbar{width:0}
.guild-list{display:flex;flex-direction:column;align-items:center;gap:8px;width:100%}
.guild-pill{
  width:48px;height:48px;border-radius:24px;background:var(--sidebar);color:var(--text);
  display:flex;align-items:center;justify-content:center;font-weight:600;font-size:17px;
  transition:border-radius .15s,background .15s;position:relative;flex-shrink:0;
}
.guild-pill img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.guild-pill:hover,.guild-pill.active{border-radius:16px;background:var(--brand);color:#fff}
/* Ana buton (Direkt Mesajlar): logo soluk-gri dursun, hover/aktifte renklensin (Discord gibi) */
.guild-pill.home img{filter:grayscale(1) opacity(.55);transition:filter .18s}
.guild-pill.home:hover img,.guild-pill.home.active img{filter:none}
.guild-pill.add{color:var(--green);font-size:24px;font-weight:400}
.guild-pill.add:hover{background:var(--green);color:#fff}
.guild-pill::before{
  content:'';position:absolute;left:-16px;width:8px;background:#fff;border-radius:0 4px 4px 0;
  height:0;transition:height .15s;
}
.guild-pill:hover::before{height:20px}
.guild-pill.active::before{height:40px}
.guild-pill.has-unread::before{height:10px}
/* Kanal etiket sayısı badge'i (kırmızı) */
.chan-badge{position:static;border:none;margin-left:auto;flex-shrink:0}
.guild-pill .badge{
  position:absolute;bottom:-2px;right:-2px;background:var(--red);color:#fff;font-size:11px;
  min-width:18px;height:18px;border-radius:9px;display:flex;align-items:center;justify-content:center;
  border:3px solid var(--rail);padding:0 4px;font-weight:700;
}
.rail-sep{width:32px;height:2px;background:#35363c;border-radius:1px;flex-shrink:0}

/* Kenar çubuğu */
.sidebar{width:240px;background:var(--sidebar);display:flex;flex-direction:column;flex-shrink:0}
/* Sunucu banner (kanal listesi üstü) */
.guild-banner{height:118px;background-size:cover;background-position:center;border-radius:8px;margin:8px;flex-shrink:0}
/* Ayarlar banner önizleme */
.banner-prev{height:130px;border-radius:8px;background-size:cover;background-position:center;background-color:var(--input);
  display:flex;align-items:center;justify-content:center;color:var(--text-dim);font-size:13px}
.banner-prev.empty{border:1px dashed var(--border)}
.sidebar-head{
  height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;
  font-weight:600;font-size:15px;box-shadow:0 1px 0 rgba(0,0,0,.2);cursor:pointer;flex-shrink:0;
}
.sidebar-head:hover{background:var(--hover)}
.sidebar-head span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-body{flex:1;overflow-y:auto;padding:8px 0 8px 8px}
.cat{margin-top:16px}
.cat-head{
  display:flex;align-items:center;gap:2px;padding:4px 8px 4px 0;color:var(--text-dim);
  font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.02em;cursor:pointer;
}
.cat-head:hover{color:var(--text)}
.cat-head .caret{transition:transform .15s;flex-shrink:0}
.cat-head.collapsed .caret{transform:rotate(-90deg)}
.cat-head .cat-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cat-head .cat-add{opacity:0;font-size:18px;line-height:1;padding:0 4px}
.cat-head:hover .cat-add{opacity:1}
.chan{
  display:flex;align-items:center;gap:6px;padding:6px 8px;margin:1px 8px 1px 0;border-radius:4px;
  color:var(--text-muted);font-size:15px;cursor:pointer;position:relative;
}
.chan:hover{background:var(--hover);color:var(--header)}
.chan.active{background:var(--active);color:#fff}
.chan .chan-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chan .chan-icon{flex-shrink:0;opacity:.7}
.chan .chan-actions{display:flex;gap:4px;opacity:0}
.chan:hover .chan-actions,.chan.active .chan-actions{opacity:1}
.chan .chan-actions button{padding:0;color:var(--text-muted);display:flex}
.chan .chan-actions button:hover{color:#fff}
.chan.unread{color:#fff;font-weight:500}
.chan.unread::before{content:'';position:absolute;left:-8px;top:50%;transform:translateY(-50%);width:8px;height:8px;background:#fff;border-radius:0 4px 4px 0}
.voice-users{margin:0 8px 4px 20px}
.voice-user{
  display:flex;align-items:center;gap:8px;padding:3px 6px;border-radius:4px;cursor:pointer;font-size:14px;color:var(--text-muted);
}
.voice-user:hover{background:var(--hover)}
.voice-user .avatar{width:24px;height:24px;font-size:10px}
.voice-user .vu-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.voice-user .vu-icons{display:flex;gap:3px;color:var(--text-dim)}
.voice-user .vu-icons .on{color:var(--red)}
.voice-user.speaking .avatar{box-shadow:0 0 0 2px var(--green)}

/* Ses paneli */
.voice-panel{
  background:#232428;padding:8px;display:flex;align-items:center;justify-content:space-between;gap:6px;
  border-bottom:1px solid rgba(0,0,0,.2);overflow:hidden;
}
.voice-panel-info{min-width:0;flex:1 1 auto;overflow:hidden}
.voice-status{
  color:var(--green);font-weight:600;font-size:14px;display:flex;align-items:center;gap:4px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.voice-where{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.voice-panel-actions{display:flex;gap:2px;flex:0 0 auto}

/* Kullanıcı paneli */
/* Oyun algılama çubuğu (masaüstü) */
.game-bar{background:#232428;border-top:1px solid var(--border);padding:8px 10px;display:flex;align-items:center;gap:8px;flex-shrink:0}
.game-bar .gb-info{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
.game-bar .gb-ico{font-size:18px;flex-shrink:0}
.game-bar .gb-text{min-width:0}
.game-bar .gb-name{font-size:13px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.game-bar .gb-sub{font-size:11px;color:var(--text-muted)}
.game-bar .gb-live{flex-shrink:0;background:var(--brand);color:#fff;font-size:12px;font-weight:600;padding:6px 12px;border-radius:6px;transition:background .15s}
.game-bar .gb-live:hover{background:var(--brand-hover)}
.game-bar .gb-live.on{background:var(--danger)}
.game-bar .gb-live.on:hover{background:#a12d2f}
.user-panel{background:#232428;padding:8px;display:flex;align-items:center;gap:4px;flex-shrink:0}
.up-user{display:flex;align-items:center;gap:8px;flex:1;padding:4px;border-radius:4px;cursor:pointer;min-width:0}
.up-user:hover{background:var(--hover)}
.up-meta{min-width:0;flex:1}
.up-name{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.up-tag{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.up-actions{display:flex;flex:0 0 auto}
.icon-btn{
  width:32px;height:32px;border-radius:4px;display:flex;align-items:center;justify-content:center;
  color:var(--text-muted);flex-shrink:0;
}
.icon-btn:hover{background:var(--hover);color:var(--text)}
.icon-btn.on{color:var(--text)}
.icon-btn.off{color:var(--red);position:relative}
.icon-btn.off::after{
  content:'';position:absolute;width:2px;height:26px;background:var(--red);
  transform:rotate(45deg);border-radius:1px;box-shadow:-2px 0 0 #232428;
}
.icon-btn.danger:hover{background:var(--danger);color:#fff}
.icon-btn.active-btn{background:var(--brand);color:#fff}

/* Avatar */
.avatar{
  width:32px;height:32px;border-radius:50%;background:var(--brand);flex-shrink:0;
  display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;color:#fff;
  overflow:hidden;position:relative;text-transform:uppercase;
}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar.lg{width:80px;height:80px;font-size:30px}
.avatar.md{width:40px;height:40px;font-size:16px}
.avatar.sm{width:32px;height:32px}
.status-dot{
  position:absolute;bottom:-2px;right:-2px;width:12px;height:12px;border-radius:50%;
  border:3px solid var(--sidebar);box-sizing:content-box;
}
.status-dot.online{background:var(--green)}
.status-dot.idle{background:var(--yellow)}
.status-dot.dnd{background:var(--red)}
.status-dot.offline{background:#80848e}
.avatar-wrap{position:relative;flex-shrink:0}

/* Ana alan */
.main{flex:1;display:flex;flex-direction:column;background:var(--chat);min-width:0}
.chan-head{
  height:48px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;
  box-shadow:0 1px 0 rgba(0,0,0,.2);flex-shrink:0;z-index:2;
}
.chan-head-left{display:flex;align-items:center;gap:8px;min-width:0;font-weight:600}
.chan-head-left .topic{
  font-size:14px;font-weight:400;color:var(--text-muted);border-left:1px solid var(--border);
  padding-left:8px;margin-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.chan-head-right{display:flex;align-items:center;gap:8px}
.search-box input{
  background:var(--input);border:none;border-radius:4px;padding:5px 8px;color:var(--text);
  width:140px;outline:none;font-size:13px;
}
.main-body{flex:1;display:flex;min-height:0}
.content{flex:1;display:flex;flex-direction:column;min-width:0}

/* Sahne (video / ses) */
.stage{
  background:#1a1b1e;display:flex;flex-direction:column;padding:12px;gap:8px;
  min-height:220px;max-height:70%;position:relative;
}
.stage-grid{
  flex:1;min-height:0;display:grid;gap:8px;overflow:hidden;
  grid-template-columns:repeat(var(--cols,1),minmax(0,1fr));
  grid-template-rows:repeat(var(--rows,1),minmax(0,1fr));
  place-items:stretch;
}
.tile{
  background:#202225;border-radius:8px;position:relative;overflow:hidden;cursor:pointer;
  display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;
}
.tile.speaking{box-shadow:inset 0 0 0 2px var(--green)}
.tile video{width:100%;height:100%;object-fit:contain;background:#1a1b1e}
.tile[data-kind="cam"] video{object-fit:cover}
.tile .tile-name{
  position:absolute;left:8px;bottom:8px;background:rgba(0,0,0,.6);padding:2px 8px;border-radius:4px;
  font-size:13px;display:flex;align-items:center;gap:6px;max-width:90%;z-index:2;
}
.tile .tile-badge{position:absolute;right:8px;top:8px;background:rgba(0,0,0,.6);padding:2px 6px;border-radius:4px;font-size:11px;z-index:2}
/* Tile üzerindeki kontroller (üzerine gelince görünür) */
.tile-controls{position:absolute;top:8px;left:8px;display:flex;gap:6px;opacity:0;transition:opacity .12s;z-index:3}
.tile:hover .tile-controls,.tile.spotlight .tile-controls{opacity:1}
.tile-controls button{
  width:30px;height:30px;border-radius:7px;background:rgba(0,0,0,.55);color:#fff;
  display:flex;align-items:center;justify-content:center;
}
.tile-controls button:hover{background:rgba(0,0,0,.85)}
/* Odak (spotlight) modu: seçili yayın büyür, diğerleri altta küçük şeritte */
.stage.spotlight .stage-grid{display:flex;flex-wrap:wrap;align-content:flex-start;gap:8px}
.stage.spotlight .tile{order:2;flex:0 0 auto;width:auto;height:76px;aspect-ratio:16/9;border-radius:6px}
.stage.spotlight .tile.spotlight{
  order:1;flex:1 1 100%;width:100%;height:calc(100% - 84px);min-height:0;aspect-ratio:auto;
}
/* Tek yayın varsa (alttaki katılımcı şeridi boşsa) tam yüksekliği kapla — boş siyah kalmasın */
.stage.spotlight .tile.spotlight:only-child{height:100%}
.stage.spotlight .tile.spotlight video{object-fit:contain}
.tile video::-webkit-media-controls{display:none!important}
/* Tam ekran: masaüstünde pencere FS, tarayıcıda sahne FS + her ikisinde maximize dolgusu */
.stage.maximized{position:fixed;inset:0;z-index:2000;max-height:none;border-radius:0;padding:14px}
.stage:fullscreen{width:100vw;height:100vh;max-height:none;border-radius:0;background:#1a1b1e;padding:14px}
.stage:-webkit-full-screen{width:100vw;height:100vh;max-height:none;border-radius:0;background:#1a1b1e;padding:14px}
.stage-exit{
  display:none;flex:0 0 auto;width:32px;height:32px;border-radius:8px;
  background:rgba(255,255,255,.12);color:#fff;align-items:center;justify-content:center;
}
.stage-exit:hover{background:rgba(255,255,255,.22)}
.stage.maximized .stage-exit{display:flex}
.tile:fullscreen video,.tile:-webkit-full-screen video{object-fit:contain}
/* Video yokken sahne yalnızca kontrol çubuğuna küçülür */
.stage.bar-only{min-height:0;padding:8px 12px;background:#232428}
.stage.bar-only .stage-grid{display:none}
.stage-bar{display:flex;justify-content:center;gap:8px;padding-top:4px}
.stage.bar-only .stage-bar{padding-top:8px}
.stage-bar .icon-btn{width:40px;height:40px;border-radius:20px;background:#2b2d31}
.stage-bar .icon-btn:hover{background:#3f4147}
.stage-bar .icon-btn.danger{background:var(--danger);color:#fff}
.stage-head{display:flex;align-items:center;justify-content:space-between;color:var(--text-muted);font-size:13px}

/* Mesajlar */
.messages{flex:1;overflow-y:auto;padding:16px 0 0;display:flex;flex-direction:column}
.msg{padding:2px 48px 2px 72px;position:relative;margin-top:0}
.msg:hover{background:rgba(0,0,0,.06)}
.msg.grouped{margin-top:0}
.msg.first{margin-top:16px;padding-top:2px}
.msg .msg-avatar{position:absolute;left:16px;top:2px}
.msg .msg-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.msg .msg-author{font-weight:600;font-size:15px;cursor:pointer}
.msg .msg-author:hover{text-decoration:underline}
.msg .msg-time{font-size:12px;color:var(--text-dim)}
.msg .msg-body{font-size:15px;line-height:1.4;color:#dbdee1;white-space:pre-wrap;word-wrap:break-word}
.msg .msg-body code{background:#2b2d31;padding:1px 4px;border-radius:3px;font-family:Consolas,monospace;font-size:13px}
.msg .msg-body pre{background:#2b2d31;border:1px solid #1e1f22;padding:8px;border-radius:4px;margin:4px 0;overflow-x:auto}
.msg .msg-body pre code{background:none;padding:0}
.msg .msg-body .mention{background:rgba(88,101,242,.3);color:#c9cdfb;border-radius:3px;padding:0 2px;font-weight:500;cursor:pointer}
.msg .msg-body .mention:hover{background:var(--brand);color:#fff}

/* ---- Bahsetme (mention) besteci çipi + otomatik tamamlama ---- */
.mention-chip{background:rgba(88,101,242,.32);color:#c9cdfb;border-radius:4px;padding:0 3px;font-weight:600;white-space:nowrap}
#composer{position:relative}
.mention-pop{position:absolute;left:12px;right:12px;bottom:calc(100% + 6px);z-index:60;
  background:var(--bg-float,#111214);border:1px solid var(--border);border-radius:10px;
  box-shadow:0 12px 32px rgba(0,0,0,.5);overflow:hidden;max-height:280px;overflow-y:auto}
.mention-pop.hidden{display:none}
.mention-item{display:flex;align-items:center;gap:10px;padding:7px 10px;cursor:pointer}
.mention-item.active{background:var(--brand)}
.mention-item.active .mention-sub{color:rgba(255,255,255,.8)}
.mention-item .mention-badge{width:32px;height:32px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;background:var(--brand)}
.mention-meta{min-width:0}
.mention-name{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mention-sub{font-size:12px;color:var(--text-muted)}

/* ---- Bağlantı koptu uyarı çubuğu ---- */
.conn-banner{position:fixed;top:-44px;left:50%;transform:translateX(-50%);z-index:9999;
  display:flex;align-items:center;gap:10px;background:#f0b232;color:#000;font-weight:600;
  font-size:13px;padding:8px 16px;border-radius:0 0 10px 10px;box-shadow:0 6px 20px rgba(0,0,0,.4);
  transition:top .25s ease}
.conn-banner.show{top:0}
.conn-spin{width:14px;height:14px;border:2px solid rgba(0,0,0,.35);border-top-color:#000;
  border-radius:50%;animation:connspin .7s linear infinite;flex-shrink:0}
@keyframes connspin{to{transform:rotate(360deg)}}
.msg .edited{font-size:10px;color:var(--text-dim);margin-left:4px}
.custom-emoji{width:22px;height:22px;vertical-align:-4px;object-fit:contain}
.msg-timestamp-hover{
  position:absolute;left:16px;top:4px;font-size:11px;color:var(--text-dim);width:52px;text-align:right;display:none;
}
.msg.grouped:hover .msg-timestamp-hover{display:block}
.msg-actions{
  position:absolute;right:16px;top:-16px;background:var(--chat-alt);border:1px solid rgba(0,0,0,.2);
  border-radius:4px;display:none;box-shadow:0 0 4px rgba(0,0,0,.2);
}
.msg:hover .msg-actions{display:flex}
.msg-actions button{width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:var(--text-muted)}
.msg-actions button:hover{background:var(--hover);color:var(--text)}
.msg-reply-ref{
  display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-muted);margin-bottom:2px;
  margin-left:-52px;padding-left:52px;position:relative;
}
.msg-reply-ref .ref-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.8}
.attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.attachments img,.attachments video{max-width:min(400px,100%);max-height:300px;border-radius:6px;cursor:pointer;display:block}
.attach-file{
  background:var(--chat-alt);border:1px solid var(--border);border-radius:4px;padding:8px 12px;
  display:flex;align-items:center;gap:8px;font-size:14px;
}
.reactions{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.reaction{
  background:rgba(255,255,255,.05);border:1px solid transparent;border-radius:8px;padding:2px 6px;
  font-size:13px;display:flex;gap:4px;align-items:center;cursor:pointer;
}
.reaction:hover{border-color:var(--text-dim)}
.reaction.mine{background:rgba(88,101,242,.2);border-color:var(--brand);color:#c9cdfb}
.sys-msg{padding:4px 48px 4px 72px;color:var(--text-muted);font-size:14px;position:relative}
.sys-msg .sys-icon{position:absolute;left:38px;color:var(--green)}
.day-divider{display:flex;align-items:center;gap:8px;margin:16px 16px 8px;color:var(--text-dim);font-size:12px;font-weight:600}
.day-divider::before,.day-divider::after{content:'';flex:1;height:1px;background:var(--border)}
.chan-intro{padding:16px}
.chan-intro h2{font-size:32px;margin-bottom:8px}
.chan-intro p{color:var(--text-muted);font-size:16px}
.chan-intro .intro-icon{
  width:68px;height:68px;border-radius:50%;background:var(--hover);display:flex;align-items:center;
  justify-content:center;margin-bottom:8px;
}

/* Yazıyor */
.typing-row{height:24px;padding:0 16px;font-size:13px;color:var(--text);display:flex;align-items:center;gap:6px}
.typing-row b{font-weight:600}

/* Besteci */
.composer{padding:0 16px 24px}
.reply-bar{
  background:var(--chat-alt);padding:6px 12px;border-radius:8px 8px 0 0;font-size:13px;
  color:var(--text-muted);display:flex;justify-content:space-between;align-items:center;
}
.attach-preview{background:var(--chat-alt);padding:8px;border-radius:8px 8px 0 0;display:flex;gap:8px;flex-wrap:wrap}
.attach-chip{background:var(--input);border-radius:6px;padding:6px 8px;font-size:12px;display:flex;gap:6px;align-items:center;max-width:200px}
.attach-chip img{width:40px;height:40px;object-fit:cover;border-radius:4px}
.composer-inner{background:#383a40;border-radius:8px;display:flex;align-items:flex-end;padding:0 8px}
.composer-input{
  flex:1;padding:11px 8px;max-height:280px;overflow-y:auto;outline:none;font-size:15px;line-height:1.4;
  word-break:break-word;
}
.composer-input:empty::before{content:attr(data-ph);color:var(--text-dim);pointer-events:none}
.composer .icon-btn{margin-bottom:4px}
.send-btn{color:var(--brand);flex-shrink:0}
.send-btn:hover{background:var(--brand);color:#fff}
.send-btn.ready{color:#fff;background:var(--brand)}
.send-btn.ready:hover{background:var(--brand-hover)}
.composer.disabled .composer-inner{opacity:.5;pointer-events:none}
.composer-note{font-size:13px;color:var(--text-muted);padding:12px;background:#383a40;border-radius:8px;text-align:center}

/* Üye listesi */
.members{width:240px;background:var(--sidebar);overflow-y:auto;padding:16px 8px;flex-shrink:0}
.member-group{
  font-size:12px;font-weight:700;text-transform:uppercase;color:var(--text-dim);
  padding:16px 8px 4px;letter-spacing:.02em;
}
.member{
  display:flex;align-items:center;gap:12px;padding:5px 8px;border-radius:4px;cursor:pointer;
}
.member:hover{background:var(--hover)}
.member .m-name{font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.member .m-sub{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.member .m-meta{min-width:0;flex:1}
.member.offline{opacity:.4}
.member.gradient{transition:filter .12s ease, box-shadow .12s ease}
.member.gradient:hover{filter:brightness(1.25)}

/* ---- Rol arka planları (hazır animasyonlu tasarımlar) ---- */
.rolebg{position:relative;overflow:hidden;color:#fff}
.rolebg>*{position:relative;z-index:2}
.rolebg .m-name{color:#fff !important;text-shadow:0 1px 2px rgba(0,0,0,.55)}
.rolebg .m-sub{color:rgba(255,255,255,.85) !important}
.rolebg .crown{color:#fff !important}
/* akan renk geçişi */
@keyframes bgShift{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
/* holografik parlama süpürmesi */
.rolebg::after{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(60deg,transparent 35%,rgba(255,255,255,.28) 50%,transparent 65%);
  transform:translateX(-130%);animation:bgSheen 4.5s ease-in-out infinite}
@keyframes bgSheen{0%{transform:translateX(-130%)}55%,100%{transform:translateX(130%)}}

.rbg-holo{background:linear-gradient(120deg,#8b5cf6,#22d3ee,#ec4899,#8b5cf6);background-size:300% 300%;animation:bgShift 7s ease infinite}
.rbg-aurora{background:linear-gradient(120deg,#0ea5e9,#22c55e,#14b8a6,#6366f1,#0ea5e9);background-size:300% 300%;animation:bgShift 9s ease infinite}
.rbg-sunset{background:linear-gradient(120deg,#f97316,#ef4444,#ec4899,#a855f7,#f97316);background-size:300% 300%;animation:bgShift 8s ease infinite}
.rbg-ocean{background:linear-gradient(120deg,#0369a1,#0891b2,#22d3ee,#0e7490,#0369a1);background-size:300% 300%;animation:bgShift 8s ease infinite}
.rbg-ember{background:linear-gradient(120deg,#7f1d1d,#dc2626,#f59e0b,#dc2626,#7f1d1d);background-size:300% 300%;animation:bgShift 6s ease infinite}
.rbg-neon{background:linear-gradient(120deg,#d946ef,#06b6d4,#3b82f6,#d946ef);background-size:300% 300%;animation:bgShift 5.5s ease infinite}
/* galeri hücreleri hover'da hafif büyür */
.bgcell{transition:transform .12s ease}
.bgcell:hover{transform:translateY(-2px)}
@media (prefers-reduced-motion: reduce){.rolebg,.rolebg::after{animation:none}}
.member .crown{color:var(--yellow);flex-shrink:0}

/* DM listesi */
.dm-item{display:flex;align-items:center;gap:12px;padding:6px 8px;margin:1px 8px 1px 0;border-radius:4px;cursor:pointer;color:var(--text-muted)}
.dm-item:hover{background:var(--hover);color:var(--text)}
.dm-item.active{background:var(--active);color:#fff}
.dm-item .dm-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}
.sidebar-btn{
  display:flex;align-items:center;gap:12px;padding:8px;margin:0 8px 8px 0;border-radius:4px;
  cursor:pointer;color:var(--text-muted);font-weight:500;width:calc(100% - 8px);
}
.sidebar-btn:hover{background:var(--hover);color:var(--text)}
.sidebar-btn.active{background:var(--active);color:#fff}

/* ------------------------------------------------------------ MODAL */
.modal-back{
  position:fixed;inset:0;background:rgba(0,0,0,.75);display:flex;align-items:center;justify-content:center;
  z-index:100;padding:20px;
}
.modal{
  background:var(--modal);border-radius:8px;max-width:520px;width:100%;max-height:90vh;
  display:flex;flex-direction:column;box-shadow:0 8px 24px rgba(0,0,0,.35);overflow:hidden;
}
.modal.wide{max-width:800px}
.modal-head{padding:20px 16px 8px;text-align:center}
.modal-head h3{font-size:22px;margin-bottom:6px}
.modal-head p{color:var(--text-muted);font-size:14px}
.modal-body{padding:0 16px 16px;overflow-y:auto;flex:1}
.modal-foot{padding:16px;background:#2b2d31;display:flex;justify-content:flex-end;gap:8px;flex-shrink:0}
.modal-foot.between{justify-content:space-between}

/* Tam ekran ayarlar */
.settings-shell{position:fixed;inset:0;background:var(--modal);z-index:100;display:flex}
.settings-nav{
  width:230px;background:var(--modal-side);padding:60px 6px 60px 20px;overflow-y:auto;flex-shrink:0;
  display:flex;flex-direction:column;align-items:flex-end;
}
.settings-nav-inner{width:192px}
.settings-nav h4{
  font-size:12px;font-weight:700;text-transform:uppercase;color:var(--text-dim);padding:6px 10px;margin-top:16px;
}
.settings-nav .nav-item{
  padding:6px 10px;border-radius:4px;color:var(--header);font-size:15px;cursor:pointer;margin-bottom:2px;
  display:flex;justify-content:space-between;align-items:center;
}
.settings-nav .nav-item:hover{background:var(--hover);color:var(--text)}
.settings-nav .nav-item.active{background:var(--active);color:#fff}
.settings-nav .nav-item.danger{color:var(--red)}
.settings-nav .sep{height:1px;background:var(--border);margin:8px 10px}
.settings-main{flex:1;overflow-y:auto;padding:60px 40px 80px;position:relative;max-width:900px}
.settings-close{position:absolute;top:60px;right:40px;text-align:center;color:var(--text-muted);cursor:pointer}
.settings-close .x{
  width:36px;height:36px;border:2px solid var(--text-muted);border-radius:50%;
  display:flex;align-items:center;justify-content:center;font-size:20px;
}
.settings-close:hover .x{border-color:#fff;color:#fff}
.settings-main h2{font-size:20px;margin-bottom:20px}
.settings-main h3{font-size:12px;text-transform:uppercase;color:var(--header);font-weight:700;margin:24px 0 8px}
.settings-sep{height:1px;background:var(--border);margin:24px 0}

/* Formlar */
.row{display:flex;gap:16px;align-items:center}
.row.between{justify-content:space-between}
.row.wrap{flex-wrap:wrap}
.grow{flex:1}
.muted{color:var(--text-muted);font-size:14px}
.small{font-size:12px}
.switch{
  width:40px;height:24px;background:#72767d;border-radius:12px;position:relative;cursor:pointer;
  transition:background .15s;flex-shrink:0;
}
.switch.on{background:var(--green)}
.switch::after{
  content:'';position:absolute;top:4px;left:4px;width:16px;height:16px;background:#fff;border-radius:50%;
  transition:transform .15s;
}
.switch.on::after{transform:translateX(16px)}
.switch.tri{background:#72767d}
.perm-row{
  display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:12px 0;
  border-bottom:1px solid var(--border);
}
.perm-row .perm-info{flex:1}
.perm-row .perm-name{font-size:15px;font-weight:500;margin-bottom:4px}
.perm-row .perm-desc{font-size:13px;color:var(--text-muted)}
.tri-switch{display:flex;background:var(--input);border-radius:4px;overflow:hidden;flex-shrink:0}
.tri-switch button{width:36px;height:28px;display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:16px}
.tri-switch button.sel[data-v="deny"]{background:var(--red);color:#fff}
.tri-switch button.sel[data-v="neutral"]{background:#4e5058;color:#fff}
.tri-switch button.sel[data-v="allow"]{background:var(--green);color:#fff}

.range{width:100%;-webkit-appearance:none;height:8px;border-radius:4px;background:#4e5058;outline:none}
.range::-webkit-slider-thumb{
  -webkit-appearance:none;width:20px;height:20px;border-radius:50%;background:#fff;cursor:pointer;
  box-shadow:0 2px 6px rgba(0,0,0,.3);
}
.meter{height:12px;background:var(--input);border-radius:6px;overflow:hidden;margin-top:8px;position:relative}
.meter-fill{height:100%;background:var(--green);width:0%;transition:width .05s linear}
.meter-th{position:absolute;top:0;bottom:0;width:2px;background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.5);transition:left .12s;pointer-events:none}
.chip-list{display:flex;flex-wrap:wrap;gap:6px}
.chip{
  background:var(--input);border-radius:4px;padding:4px 8px;font-size:13px;display:flex;align-items:center;gap:6px;
}
.chip .dot{width:10px;height:10px;border-radius:50%}
.chip .x{cursor:pointer;color:var(--text-muted);font-size:14px;line-height:1}
.chip .x:hover{color:#fff}
.role-list{background:var(--input);border-radius:4px;overflow:hidden}
.role-item{
  display:flex;align-items:center;gap:8px;padding:10px 12px;cursor:pointer;border-bottom:1px solid rgba(0,0,0,.2);
}
.role-item:hover{background:var(--hover)}
.role-item.active{background:var(--active)}
.role-item .dot{width:12px;height:12px;border-radius:50%;flex-shrink:0}
.role-item .role-name{flex:1;font-size:15px}
.role-item .role-count{font-size:13px;color:var(--text-muted)}
.tabs{display:flex;gap:24px;border-bottom:1px solid var(--border);margin-bottom:16px}
.tab{padding:8px 0;color:var(--text-muted);cursor:pointer;font-size:15px;border-bottom:2px solid transparent;margin-bottom:-1px}
.tab:hover{color:var(--text)}
.tab.active{color:#fff;border-color:var(--brand)}
.table{width:100%;border-collapse:collapse;font-size:14px}
.table th{text-align:left;color:var(--text-dim);font-size:12px;text-transform:uppercase;padding:8px}
.table td{padding:8px;border-top:1px solid var(--border)}
.list-empty{color:var(--text-muted);text-align:center;padding:40px;font-size:15px}

/* Bağlam menüsü */
.ctx{
  position:fixed;background:#111214;border-radius:4px;padding:6px 8px;min-width:200px;z-index:200;
  box-shadow:0 8px 16px rgba(0,0,0,.24);font-size:14px;
}
.ctx-item{
  padding:6px 8px;border-radius:2px;cursor:pointer;display:flex;align-items:center;justify-content:space-between;
  gap:8px;color:var(--header);
}
.ctx-item:hover{background:var(--brand);color:#fff}
.ctx-item.danger{color:var(--red)}
.ctx-item.danger:hover{background:var(--danger);color:#fff}
.ctx-sep{height:1px;background:var(--border);margin:4px 0}
.ctx-label{padding:6px 8px;color:var(--text-dim);font-size:11px;text-transform:uppercase;font-weight:700}
.ctx .range{margin:4px 0 8px}

/* Kullanıcı kartı */
.popout{
  position:fixed;background:#232428;border-radius:8px;width:300px;z-index:200;overflow:hidden;
  box-shadow:0 8px 16px rgba(0,0,0,.24);
}
.popout-banner{height:60px}
.popout-body{padding:0 16px 16px;position:relative}
.popout-avatar{margin-top:-40px;border:6px solid #232428;border-radius:50%;width:80px;height:80px}
.popout-name{font-size:20px;font-weight:700;margin-top:8px}
.popout-tag{font-size:14px;color:var(--text-muted)}
.popout-card{background:#111214;border-radius:8px;padding:12px;margin-top:12px}
.popout-card h5{font-size:12px;text-transform:uppercase;color:var(--header);margin-bottom:6px;font-weight:700}
.popout-card p{font-size:14px;color:#dbdee1;white-space:pre-wrap;word-break:break-word}
.popout input.msgbox{
  width:100%;background:var(--input);border:1px solid var(--border);border-radius:4px;padding:8px;
  color:var(--text);outline:none;margin-top:12px;
}

/* Bildirim */
.toast-root{position:fixed;top:20px;left:50%;transform:translateX(-50%);z-index:300;display:flex;flex-direction:column;gap:8px}
.toast{
  background:#111214;color:#fff;padding:12px 18px;border-radius:6px;font-size:14px;
  box-shadow:0 4px 12px rgba(0,0,0,.4);border-left:4px solid var(--brand);animation:slide .2s ease;
}
.toast.error{border-color:var(--red)}
.toast.success{border-color:var(--green)}
@keyframes slide{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:none}}

/* Görsel önizleme */
.lightbox{position:fixed;inset:0;background:rgba(0,0,0,.85);z-index:300;display:flex;align-items:center;justify-content:center;padding:40px}
.lightbox img,.lightbox video{max-width:100%;max-height:100%;border-radius:6px}

/* ------------------------------------------------------------ DUYARLI */

.mobile-only{display:none}
.scrim{display:none}

@media (max-width:1000px){
  .members{width:220px}
  .sidebar{width:220px}
}

/* Tablet: üye listesi çekmeceye döner */
@media (max-width:860px){
  .members{
    position:fixed;top:0;right:0;height:100%;width:260px;z-index:20;
    transform:translateX(100%);transition:transform .2s ease;
    box-shadow:-4px 0 16px rgba(0,0,0,.5);
    padding-top:calc(16px + env(safe-area-inset-top));
  }
  .members.open{transform:none}
  .members.hidden{display:block}
}

/* Telefon */
@media (max-width:760px){
  html,body{height:100dvh}
  .app{height:100dvh}
  .mobile-only{display:flex}

  .guild-rail,.sidebar{
    position:fixed;top:0;height:100dvh;z-index:20;
    transition:transform .22s ease;
  }
  .guild-rail{
    left:0;width:68px;transform:translateX(-100%);
    padding-top:calc(12px + env(safe-area-inset-top));
  }
  .sidebar{
    left:68px;width:calc(100vw - 68px);max-width:300px;transform:translateX(-380px);
    box-shadow:6px 0 20px rgba(0,0,0,.5);
  }
  .sidebar-head{padding-top:env(safe-area-inset-top);height:calc(48px + env(safe-area-inset-top))}

  .app.drawer-open .guild-rail,
  .app.drawer-open .sidebar{transform:none}

  .scrim{
    display:block;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:15;
    opacity:0;pointer-events:none;transition:opacity .2s;
  }
  .app.drawer-open .scrim,
  .app.members-open .scrim{opacity:1;pointer-events:auto}

  .main{width:100vw}
  .chan-head{
    padding:0 8px;gap:4px;
    height:calc(48px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);
  }
  .chan-head-left .topic{display:none}
  .search-box{display:none}

  /* Mesajlar: dokunma hedefleri büyür, kenar boşlukları daralır */
  .msg{padding:2px 12px 2px 56px}
  .msg .msg-avatar{left:10px}
  .msg-actions{top:-14px;right:8px}
  .msg-actions button{width:36px;height:36px}
  .sys-msg{padding:4px 12px 4px 56px}
  .sys-msg .sys-icon{left:28px}

  .composer{padding:0 8px calc(10px + env(safe-area-inset-bottom))}
  .composer-input{font-size:16px} /* iOS'ta odaklanınca yakınlaşmayı önler */
  .user-panel{padding-bottom:calc(8px + env(safe-area-inset-bottom))}

  .chan-intro h2{font-size:24px}
  .chan-intro p{font-size:15px}
  .stage{max-height:50%;padding:8px}
  .stage-bar .icon-btn{width:48px;height:48px;border-radius:24px}

  /* Ayar pencereleri tam ekran ve tek sütun olur */
  .settings-shell{flex-direction:column}
  .settings-nav{
    width:100%;padding:calc(12px + env(safe-area-inset-top)) 12px 12px;
    align-items:stretch;flex-direction:row;overflow-x:auto;flex-shrink:0;
    border-bottom:1px solid var(--border);
  }
  .settings-nav-inner{width:auto;display:flex;gap:6px;align-items:center}
  .settings-nav h4{display:none}
  .settings-nav .sep{display:none}
  .settings-nav .nav-item{white-space:nowrap}
  .settings-main{padding:20px 16px calc(60px + env(safe-area-inset-bottom))}
  .settings-close{top:16px;right:16px}

  .modal{max-height:88dvh}
  .ctx{max-width:calc(100vw - 24px)}
  .popout{width:calc(100vw - 24px);max-width:320px}
  .perm-row{gap:10px}
}

/* Giriş ekranındaki indirme bağlantısı */
.auth-download{margin-top:auto;padding-top:20px;text-align:center}
.auth-download a{
  display:inline-flex;align-items:center;gap:8px;color:var(--text-muted);font-size:13.5px;
  padding:8px 14px;border-radius:8px;transition:background .15s,color .15s;
}
.auth-download a:hover{background:rgba(255,255,255,.06);color:var(--text);text-decoration:none}
/* Geniş ekranda indirme linki sol panelde; kartta yalnızca dar ekranda göster */
@media (min-width:761px){ .auth-card .auth-download{display:none} }

/* Yeni sürüm bildirimi */
.update-bar{
  position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:300;
  background:#111214;border:1px solid var(--border);border-radius:10px;
  padding:12px 14px;display:flex;align-items:center;gap:10px;font-size:14px;
  box-shadow:0 8px 24px rgba(0,0,0,.5);max-width:calc(100vw - 32px);
  animation:slide .2s ease;
}
.update-bar .btn{padding:7px 14px;white-space:nowrap}
@media (max-width:600px){ .update-bar{bottom:auto;top:12px;flex-wrap:wrap;justify-content:center} }
