/*
 * Site sohbeti (sağ sütun / mobil çekmece) ve Yayın sayfası.
 * Renk yok: yalnız tema değişkenleri (var(--vurgu), --kart, --cizgi ...) ve onlardan türeyen tonlar.
 * app.css içindeki .btn / .btn-vurgu / .btn-ghost / .icon-btn / .ic sınıflarını kullanır.
 *
 * Gövde düzeni: body.sohbet-acik iken masaüstünde ana içerik sağdan 320px boşluk bırakır;
 * 900px ve altında panel sağdan kayan çekmece olur, 760px ve altında tam ekran.
 */
:root{
  --sohbet-g:320px;
  --sohbet-ust:59px;
}

/* ===== Gövde düzeni ===== */
@media (min-width:901px){
  body.sohbet-acik .main{margin-right:var(--sohbet-g)}
  body.sohbet-acik .fab-wrap{right:calc(var(--sohbet-g) + 20px)}
}
body.sohbet-hazir .main{transition:margin-right .25s ease}
[data-sohbet-ac][aria-expanded="true"]{background:var(--vurgu-a15);color:var(--vurgu)}

/* ===== Panel ===== */
.sohbet{position:fixed;top:0;right:0;bottom:0;z-index:35;display:flex;flex-direction:column;width:var(--sohbet-g);
  background:var(--zemin);border-left:1px solid var(--cizgi);
  transform:translateX(100%);visibility:hidden}
body.sohbet-hazir .sohbet{transition:transform .25s ease,visibility 0s linear .25s}
body.sohbet-acik .sohbet{transform:none;visibility:visible}
body.sohbet-hazir.sohbet-acik .sohbet{transition:transform .25s ease,visibility 0s}
.sohbet:focus{outline:0}
.sohbet [hidden]{display:none!important}

.sohbet-ust{display:flex;align-items:center;gap:10px;flex:none;height:var(--sohbet-ust);padding:0 14px 0 16px;border-bottom:1px solid var(--cizgi)}
.sohbet-ust h2{font-size:14px;font-weight:700}
.sohbet-ust-ic{color:var(--vurgu);width:22px;height:22px}
.sohbet-bilgi{margin-left:auto;border:0;background:none}
.sohbet-bilgi[aria-expanded="true"]{color:var(--vurgu-acik)}
.sohbet-kapat{display:none}

.sohbet-kurallar{flex:none;max-height:42%;overflow-y:auto;padding:12px 16px;border-bottom:1px solid var(--cizgi);background:var(--kart);font-size:12px;line-height:1.55;color:var(--ikincil)}
.sohbet-kurallar b{display:block;color:var(--metin);font-size:12px}
.sohbet-kurallar ol{margin:6px 0 0;padding-left:18px;list-style:decimal}
.sohbet-kurallar li+li{margin-top:3px}
.sohbet-kurallar p{margin-top:4px}

.sohbet-oda{flex:none;padding:12px 14px 4px}
.sohbet-rozet{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 11px;border-radius:999px;border:1px solid var(--vurgu-a45);background:var(--vurgu-a15);color:var(--vurgu-acik);font-size:11px;font-weight:700}

.sohbet-donuk{flex:none;margin:6px 14px 0;padding:7px 10px;border-radius:9px;border:1px solid var(--vurgu-a30);background:var(--vurgu-a8);color:var(--vurgu-acik);font-size:12px;font-weight:600}

/* ===== Mesaj listesi ===== */
.sohbet-govde{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}
.sohbet-liste{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:6px 14px 10px;scrollbar-width:thin;scrollbar-color:var(--cizgi) transparent}
.sohbet-liste:focus-visible{outline-offset:-2px}
.sohbet-bos{margin:24px 8px;text-align:center;font-size:12px;color:var(--ikincil)}

.msj{position:relative;margin:0 -6px;padding:5px 6px;border-radius:8px;font-size:13px;line-height:1.5;overflow-wrap:anywhere;word-break:break-word}
.msj:hover,.msj:focus-within{background:var(--vurgu-a8)}
.msj-benim{background:var(--vurgu-a8)}
.sohbet[data-oturum="1"] .msj{cursor:pointer}
.msj-sv{display:inline-block;min-width:20px;margin-right:6px;padding:0 5px;border-radius:5px;background:var(--kart2);border:1px solid var(--cizgi);color:var(--ikincil);font-size:10px;font-weight:700;line-height:16px;text-align:center;vertical-align:1px;font-variant-numeric:tabular-nums}
.msj-rol{display:inline-block;margin-right:6px;padding:0 6px;border-radius:5px;font-size:9px;font-weight:800;letter-spacing:.05em;line-height:16px;text-transform:uppercase;vertical-align:1px}
.msj-rol.admin{background:var(--vurgu);color:var(--zemin)}
.msj-rol.mod{background:var(--kazanc);color:var(--zemin)}
.msj-ad{font-weight:700}
.msj-metin{color:var(--metin)}
.msj-an{color:var(--vurgu-acik);font-weight:600}

/* kullanıcı adı renkleri: yalnız tema değişkenlerinden türer */
.sk-0{color:var(--vurgu-acik)}
.sk-1{color:var(--vurgu2)}
.sk-2{color:var(--kazanc)}
.sk-3{color:color-mix(in srgb,var(--vurgu) 50%,var(--metin))}
.sk-4{color:color-mix(in srgb,var(--kazanc) 50%,var(--metin))}
.sk-5{color:color-mix(in srgb,var(--vurgu2) 50%,var(--metin))}

.msj-yanit{display:flex;align-items:center;gap:6px;min-width:0;margin-bottom:2px;font-size:11px;line-height:1.4;color:var(--ikincil);white-space:nowrap;overflow:hidden}
.msj-yanit .ic{flex:none}
.msj-yanit b{flex:none;font-weight:700}
.msj-yanit span{min-width:0;overflow:hidden;text-overflow:ellipsis}

/* mesaj üstü araçlar: yanıtla / sil / sustur */
.msj-islem{position:absolute;right:4px;top:-12px;z-index:2;display:flex;gap:2px;padding:2px;border-radius:9px;border:1px solid var(--cizgi);background:var(--kart2);box-shadow:0 6px 18px var(--siyah-a55);opacity:0;pointer-events:none;transition:opacity .15s}
.msj:hover .msj-islem,.msj:focus-within .msj-islem{opacity:1;pointer-events:auto}
.msj-islem button{display:grid;place-items:center;width:26px;height:26px;border-radius:7px;color:var(--ikincil)}
.msj-islem button:hover,.msj-islem button:focus-visible{background:var(--vurgu-a15);color:var(--vurgu-acik)}
.msj-islem button.tehlike:hover,.msj-islem button.tehlike:focus-visible{background:color-mix(in srgb,var(--kayip) 16%,transparent);color:var(--kayip)}

.sohbet-yeni{position:absolute;left:50%;bottom:10px;z-index:3;transform:translateX(-50%);display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 14px;border-radius:999px;border:1px solid var(--vurgu-a45);background:var(--kart2);color:var(--vurgu-acik);font-size:12px;font-weight:700;box-shadow:0 8px 22px var(--siyah-a70);white-space:nowrap}
.sohbet-yeni:hover{border-color:var(--vurgu)}

/* ===== Susturma kutusu (yalnız mod/admin) ===== */
.sohbet-sustur{flex:none;display:grid;gap:8px;margin:0 14px 8px;padding:12px;border-radius:12px;border:1px solid var(--vurgu-a30);background:var(--kart)}
.sohbet-sustur p{font-size:12px;color:var(--ikincil)}
.sohbet-sustur p b{color:var(--metin)}
.sohbet-sustur-satir{display:flex;gap:8px}
.sohbet-sustur-satir>*{min-width:0}
.sohbet-sustur-satir>.btn{flex:1}
.sohbet-sustur select,.sohbet-sustur input{height:34px;padding:0 10px;border-radius:9px;border:1px solid var(--cizgi);background:var(--zemin);color:var(--metin);font-size:12px}
.sohbet-sustur select{flex:none}
.sohbet-sustur input{flex:1}
.sohbet-sustur select:focus,.sohbet-sustur input:focus{outline:0;border-color:var(--vurgu-koyu);box-shadow:0 0 0 3px var(--vurgu-a15)}

/* ===== Alt: yazma alanı ===== */
.sohbet-alt{flex:none;display:grid;gap:8px;padding:10px 14px 14px;border-top:1px solid var(--cizgi);background:var(--zemin)}
.sohbet-not{font-size:11px;color:var(--ikincil)}
.sohbet-not a{color:var(--vurgu-acik);font-weight:700;text-decoration:underline}

.sohbet-giris{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;height:44px;padding:0 8px 0 14px;border-radius:12px;border:1px solid var(--cizgi);background:var(--kart);color:var(--ikincil);font-size:13px;text-align:left;transition:border-color .2s,color .2s}
.sohbet-giris:hover{border-color:var(--vurgu-a45);color:var(--metin)}
.sohbet-giris .ic{width:32px;height:32px;padding:8px;border-radius:9px;background:var(--vurgu-a15);color:var(--vurgu)}

.sohbet-yanit-bar{display:flex;align-items:center;gap:8px;min-width:0;padding:6px 6px 6px 10px;border-radius:10px;border:1px solid var(--cizgi);border-left:3px solid var(--vurgu);background:var(--kart);font-size:12px;color:var(--ikincil)}
.sohbet-yanit-bar>.ic{flex:none}
.sohbet-yanit-metin{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sohbet-yanit-metin b{margin-right:6px;color:var(--metin)}
.sohbet-yanit-bar .icon-btn{flex:none;width:24px;height:24px;border:0;background:none}

.sohbet-form{display:grid;gap:4px;margin:0}
.sohbet-kutu{display:flex;align-items:flex-end;gap:8px;padding:5px 5px 5px 12px;border-radius:12px;border:1px solid var(--cizgi);background:var(--kart);transition:border-color .2s,box-shadow .2s}
.sohbet-kutu:focus-within{border-color:var(--vurgu-koyu);box-shadow:0 0 0 3px var(--vurgu-a15)}
.sohbet-kutu textarea{flex:1;min-width:0;max-height:100px;padding:6px 0;border:0;outline:0;resize:none;background:none;color:var(--metin);font:inherit;font-size:13px;line-height:20px}
.sohbet-kutu textarea::placeholder{color:var(--ikincil)}
.sohbet-kutu textarea:disabled{cursor:not-allowed}
.sohbet-gonder{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:9px;background:var(--vurgu-grad);color:var(--zemin);transition:box-shadow .2s,opacity .2s}
.sohbet-gonder:hover:not(:disabled){box-shadow:var(--golge-vurgu)}
.sohbet-gonder:disabled{opacity:.4;cursor:not-allowed}
.sohbet-meta{display:flex;justify-content:space-between;gap:10px;min-height:16px;font-size:11px;line-height:16px}
.sohbet-hata{color:var(--kayip)}
.sohbet-hata.ok{color:var(--kazanc)}
.sohbet-say{margin-left:auto;color:var(--ikincil);font-variant-numeric:tabular-nums}
.sohbet-say.az{color:var(--kayip)}

/* ===== Perde (yalnız çekmece kipinde) ===== */
.sohbet-perde{display:none}

/* ===== Çekmece: 900px ve altı ===== */
@media (max-width:900px){
  .sohbet{z-index:55;width:min(400px,100vw);box-shadow:-20px 0 60px var(--siyah-a70)}
  .sohbet-kapat{display:grid;border:0;background:none}
  .sohbet-perde{position:fixed;inset:0;z-index:54;display:block;background:var(--siyah-a55);opacity:0;visibility:hidden;transition:opacity .25s,visibility 0s linear .25s}
  body.sohbet-acik .sohbet-perde{opacity:1;visibility:visible;transition:opacity .25s,visibility 0s}
  body.sohbet-acik{overflow:hidden}
}

/* ===== Mobil: tam ekran, sohbet düğmesi görünür ===== */
@media (max-width:760px){
  .sohbet{width:100vw;border-left:0}
  .icon-btn.hide-sm[data-sohbet-ac]{display:grid}
  .sohbet-kutu textarea{font-size:16px}
  .sohbet-alt{padding-bottom:max(14px,env(safe-area-inset-bottom))}
  .msj{font-size:14px}
}

@media (prefers-reduced-motion:reduce){
  .sohbet,.sohbet-perde,.main{transition:none!important}
}

/* =====================================================================
 *  Yayın sayfası (/yayin)
 * ===================================================================== */
.yy{padding-bottom:10px}
.yy [hidden]{display:none!important}

.yy-oynatici{position:relative;aspect-ratio:16/9;border-radius:16px;overflow:hidden;border:1px solid var(--cizgi);background:var(--siyah);box-shadow:0 20px 50px var(--siyah-a55)}
.yy-oynatici iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.yy-yok{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:10px;padding:24px;text-align:center;background:radial-gradient(circle at 50% 0%,var(--vurgu-a15),transparent 60%),var(--kart);color:var(--ikincil);font-size:14px}
.yy-yok .ic{width:36px;height:36px;color:var(--vurgu)}

.yy-serit{display:flex;align-items:center;flex-wrap:wrap;gap:12px 16px;margin-top:14px}
.yy-rozet{display:inline-flex;align-items:center;gap:8px;flex:none;height:32px;padding:0 14px;border-radius:999px;border:1px solid var(--cizgi);background:var(--kart);color:var(--ikincil);font-size:12px;font-weight:800;letter-spacing:.05em;white-space:nowrap}
.yy-rozet .yy-ek{font-weight:600;letter-spacing:0;color:var(--ikincil)}
.yy-nokta{display:none;width:9px;height:9px;border-radius:50%;background:var(--kayip);box-shadow:0 0 8px var(--kayip)}
.yy-rozet.canli{border-color:color-mix(in srgb,var(--kayip) 55%,transparent);background:color-mix(in srgb,var(--kayip) 12%,var(--kart));color:var(--kayip)}
.yy-rozet.canli .yy-nokta{display:block;animation:yy-nabiz 1.4s ease-in-out infinite}
.yy-rozet.canli .yy-ek{color:var(--metin)}
@keyframes yy-nabiz{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.8)}}

.yy-baslik{flex:1;min-width:180px;font-size:17px;font-weight:700;line-height:1.3;overflow-wrap:anywhere}
.yy-yayinci{display:flex;align-items:center;gap:10px;flex:none;margin-left:auto}
.yy-logo{display:grid;place-items:center;height:44px;padding:0 14px;border-radius:12px;border:1px solid var(--cizgi);background:var(--kart)}
.yy-logo svg{height:30px;width:auto;max-width:150px}
.yy-ad{font-size:14px;font-weight:700}
.yy-kick{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px;border-radius:10px;border:1px solid var(--cizgi);background:var(--kart);font-size:13px;font-weight:700;transition:border-color .2s,color .2s}
.yy-kick:hover{border-color:var(--vurgu-a45);color:var(--vurgu-acik)}

.yy-bolum{margin-top:32px}
.yy-bolum h2{margin-bottom:14px;font-size:18px;font-weight:700}
.yy-paneller{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
.yy-panel{position:relative;display:block;aspect-ratio:1/1;border-radius:16px;overflow:hidden;border:1px solid var(--cizgi);background:var(--kart);transition:transform .2s,border-color .2s,box-shadow .2s}
.yy-panel:hover,.yy-panel:focus-visible{transform:translateY(-3px);border-color:var(--vurgu-a45);box-shadow:var(--golge-vurgu)}
.yy-panel img{width:100%;height:100%;object-fit:cover}
.yy-panel-metin{display:grid;place-content:center;gap:10px;height:100%;padding:20px;text-align:center;background:radial-gradient(circle at 50% 0%,var(--vurgu-a22),transparent 65%),var(--kart)}
.yy-panel-metin b{font-family:var(--font-baslik);font-style:var(--baslik-stil);text-transform:var(--baslik-harf);font-weight:400;font-size:28px;line-height:1.05;letter-spacing:.5px;color:var(--vurgu-acik)}
.yy-panel-metin .ic{justify-self:center;color:var(--ikincil)}
.yy-avatar{width:44px;height:44px;border-radius:50%;object-fit:cover;border:2px solid var(--vurgu-a45);flex:none}

/* Kick kanalı olmayan site: kanal kartı */
.yy-kanal{display:flex;align-items:center;gap:24px;padding:28px;border-radius:18px;border:1px solid var(--cizgi);background:radial-gradient(circle at 0% 0%,var(--vurgu-a15),transparent 55%),var(--kart);box-shadow:0 20px 50px var(--siyah-a55)}
.yy-kanal-gorsel{display:grid;place-items:center;flex:none;width:128px;height:128px;border-radius:50%;overflow:hidden;border:3px solid var(--vurgu-a45);background:var(--zemin)}
.yy-kanal-gorsel img{width:100%;height:100%;object-fit:cover}
.yy-kanal-gorsel b{font-family:var(--font-baslik);font-size:56px;font-weight:400;color:var(--vurgu-acik)}
.yy-kanal-logo svg{width:96px;height:auto;max-height:72px}
.yy-kanal-govde{min-width:0}
.yy-kanal-etiket{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--vurgu-acik)}
.yy-kanal h1{margin:4px 0 8px;font-family:var(--font-baslik);font-style:var(--baslik-stil);text-transform:var(--baslik-harf);font-weight:400;font-size:40px;line-height:1.05;overflow-wrap:anywhere}
.yy-kanal p{max-width:56ch;color:var(--ikincil);font-size:14px;line-height:1.55}
.yy-aglar{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.yy-ag{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 14px;border-radius:10px;border:1px solid var(--cizgi);background:var(--zemin);font-size:13px;font-weight:700;transition:border-color .2s,color .2s}
.yy-ag .ic{color:var(--vurgu)}
.yy-ag:hover{border-color:var(--vurgu-a45);color:var(--vurgu-acik)}
.yy-bos{padding:30px 16px;text-align:center;color:var(--ikincil);border:1px dashed var(--cizgi);border-radius:14px;background:var(--kart);font-size:14px}

@media (max-width:760px){
  .yy-kanal{flex-direction:column;align-items:flex-start;gap:16px;padding:20px}
  .yy-kanal-gorsel{width:88px;height:88px}
  .yy-kanal h1{font-size:30px}
  .yy-yayinci{margin-left:0;width:100%}
  .yy-paneller{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .yy-panel-metin b{font-size:22px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;overflow-wrap:anywhere}
}
@media (prefers-reduced-motion:reduce){
  .yy-rozet.canli .yy-nokta{animation:none}
}
