/* =====================================================
   Sohbet odasi — sag alt kose balonu
   style.css degiskenlerini kullanir, kendi fallback'i vardir
   ===================================================== */

#st-chat {
  --c-bg:     var(--bg-1, #0c1117);
  --c-bg-2:   var(--bg-2, #11171f);
  --c-line:   var(--line, rgba(255,255,255,.06));
  --c-line-2: var(--line-strong, rgba(255,255,255,.12));
  --c-text:   var(--text, #e8edf2);
  --c-dim:    var(--text-dim, #9aa4b2);
  --c-mute:   var(--text-mute, #6b7686);
  --c-gold:   var(--gold, #d4af37);
  --c-gold-2: var(--gold-2, #f0c75e);
  --c-green:  var(--green, #22c55e);
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9990;
  font-family: var(--font-sans, Inter, system-ui, sans-serif);
  color: var(--c-text);
}

/* ---------- launcher ---------- */
#st-chat .stc-launcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px 13px 16px;
  border: 1px solid rgba(212, 175, 55, .35);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(212,175,55,.16), rgba(212,175,55,.05));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--c-gold-2);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: 0 18px 45px -18px rgba(0,0,0,.85);
  transition: transform .22s cubic-bezier(.2,.8,.3,1), border-color .22s, box-shadow .22s;
}
#st-chat .stc-launcher:hover {
  transform: translateY(-2px);
  border-color: rgba(212,175,55,.6);
  box-shadow: 0 22px 55px -18px rgba(212,175,55,.4);
}
#st-chat .stc-launcher svg { width: 20px; height: 20px; flex: none; }
#st-chat .stc-badge {
  position: absolute;
  top: -5px; right: -3px;
  min-width: 21px; height: 21px;
  padding: 0 6px;
  display: none;
  align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--c-green);
  color: #04140a;
  font-size: 11px; font-weight: 700;
  font-family: var(--font-mono, monospace);
  box-shadow: 0 0 0 3px var(--bg-0, #07090d);
}
#st-chat .stc-badge.on { display: flex; }

/* ---------- panel ---------- */
#st-chat .stc-panel {
  position: absolute;
  right: 0; bottom: calc(100% + 14px);
  width: 372px;
  height: min(560px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--c-line-2);
  border-radius: var(--radius-lg, 22px);
  background: linear-gradient(180deg, rgba(12,17,23,.97), rgba(7,9,13,.99));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 40px 90px -25px rgba(0,0,0,.9);
  opacity: 0;
  transform: translateY(12px) scale(.97);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s cubic-bezier(.2,.8,.3,1);
}
#st-chat.open .stc-panel { opacity: 1; transform: none; pointer-events: auto; }
#st-chat.open .stc-launcher { transform: scale(.94); opacity: .9; }

#st-chat .stc-head {
  display: flex; align-items: center; gap: 11px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--c-line);
  background: rgba(255,255,255,.015);
}
#st-chat .stc-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 0 4px rgba(34,197,94,.15);
  flex: none;
}
#st-chat .stc-title { font-size: 14px; font-weight: 600; letter-spacing: .2px; }
#st-chat .stc-sub { font-size: 11px; color: var(--c-mute); margin-top: 1px; }
#st-chat .stc-x {
  margin-left: auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--c-line); border-radius: 9px;
  background: transparent; color: var(--c-dim);
  cursor: pointer; font-size: 17px; line-height: 1;
  transition: background .18s, color .18s;
}
#st-chat .stc-x:hover { background: rgba(255,255,255,.05); color: var(--c-text); }

/* ---------- mesaj listesi ---------- */
#st-chat .stc-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 14px 6px;
  display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
}
#st-chat .stc-list::-webkit-scrollbar { width: 7px; }
#st-chat .stc-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.13); border-radius: 99px;
}

#st-chat .stc-msg { display: flex; gap: 9px; align-items: flex-start; }
#st-chat .stc-msg.mine { flex-direction: row-reverse; }
#st-chat .stc-av {
  width: 30px; height: 30px; flex: none;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  color: #06080c;
  text-transform: uppercase;
}
#st-chat .stc-bub { max-width: 78%; }
#st-chat .stc-meta {
  display: flex; gap: 7px; align-items: baseline;
  margin-bottom: 4px; font-size: 11px;
}
#st-chat .stc-msg.mine .stc-meta { flex-direction: row-reverse; }
#st-chat .stc-nick { font-weight: 600; }
#st-chat .stc-time { color: var(--c-mute); font-family: var(--font-mono, monospace); font-size: 10px; }
#st-chat .stc-text {
  padding: 9px 12px;
  border: 1px solid var(--c-line);
  border-radius: 13px;
  background: var(--c-bg-2);
  font-size: 13.5px; line-height: 1.55;
  word-break: break-word; white-space: pre-wrap;
}
#st-chat .stc-msg.mine .stc-text {
  background: linear-gradient(135deg, rgba(212,175,55,.15), rgba(212,175,55,.07));
  border-color: rgba(212,175,55,.28);
}
#st-chat .stc-msg.pending .stc-text { opacity: .6; border-style: dashed; }
#st-chat .stc-pendnote {
  margin-top: 5px; font-size: 10.5px; color: var(--c-mute);
  display: flex; align-items: center; gap: 5px;
}

#st-chat .stc-day {
  align-self: center;
  padding: 3px 11px; border-radius: 999px;
  border: 1px solid var(--c-line);
  background: rgba(255,255,255,.02);
  font-size: 10.5px; color: var(--c-mute);
  font-family: var(--font-mono, monospace);
}
#st-chat .stc-more {
  align-self: center; margin-bottom: 4px;
  padding: 5px 13px; border-radius: 999px;
  border: 1px solid var(--c-line); background: transparent;
  color: var(--c-dim); font-size: 11.5px; cursor: pointer;
  font-family: inherit;
}
#st-chat .stc-more:hover { border-color: var(--c-line-2); color: var(--c-text); }
#st-chat .stc-empty {
  margin: auto; text-align: center; padding: 26px 18px;
  color: var(--c-mute); font-size: 13px; line-height: 1.7;
}
#st-chat .stc-empty strong { display: block; color: var(--c-dim); margin-bottom: 6px; font-weight: 600; }

/* ---------- yazma alani ---------- */
#st-chat .stc-foot {
  border-top: 1px solid var(--c-line);
  padding: 11px 12px 12px;
  background: rgba(255,255,255,.015);
}
#st-chat .stc-nickrow { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
#st-chat .stc-nickrow label { font-size: 11px; color: var(--c-mute); flex: none; }
#st-chat input[type="text"],
#st-chat textarea {
  width: 100%;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: var(--c-bg-2);
  color: var(--c-text);
  font-family: inherit; font-size: 13px;
  padding: 9px 11px;
  outline: none;
  transition: border-color .18s;
}
#st-chat input[type="text"]:focus,
#st-chat textarea:focus { border-color: rgba(212,175,55,.45); }
#st-chat textarea { resize: none; min-height: 42px; max-height: 120px; line-height: 1.5; }
#st-chat .stc-sendrow { display: flex; gap: 8px; align-items: flex-end; }
#st-chat .stc-send {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid rgba(212,175,55,.4);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(212,175,55,.9), rgba(212,175,55,.65));
  color: #0a0a0a; cursor: pointer;
  transition: transform .16s, opacity .16s;
}
#st-chat .stc-send:hover { transform: translateY(-1px); }
#st-chat .stc-send:disabled { opacity: .4; cursor: not-allowed; transform: none; }
#st-chat .stc-send svg { width: 17px; height: 17px; }
#st-chat .stc-hint {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 7px; font-size: 10.5px; color: var(--c-mute);
}
#st-chat .stc-count { font-family: var(--font-mono, monospace); }
#st-chat .stc-count.warn { color: var(--c-gold); }
#st-chat .stc-err {
  margin-top: 8px; padding: 8px 11px;
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 9px;
  background: rgba(239,68,68,.1);
  color: #fca5a5; font-size: 11.5px;
  display: none;
}
#st-chat .stc-err.on { display: block; }
#st-chat .stc-ok {
  margin-top: 8px; padding: 8px 11px;
  border: 1px solid rgba(212,175,55,.3);
  border-radius: 9px;
  background: rgba(212,175,55,.08);
  color: var(--c-gold-2); font-size: 11.5px;
  display: none;
}
#st-chat .stc-ok.on { display: block; }
#st-chat .stc-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; opacity: 0;
}

/* ---------- mobil ---------- */
@media (max-width: 520px) {
  #st-chat { right: 14px; bottom: 14px; left: 14px; }
  #st-chat .stc-launcher { margin-left: auto; }
  #st-chat .stc-panel {
    width: auto; left: 0; right: 0;
    height: min(74vh, calc(100vh - 120px));
  }
  #st-chat .stc-launcher span.stc-lbl { display: none; }
  #st-chat .stc-launcher { padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  #st-chat .stc-panel, #st-chat .stc-launcher, #st-chat .stc-send { transition: none; }
}

/* =====================================================
   Anasayfa hero — canli sohbet akisi
   ===================================================== */

.hero-chat {
  margin-top: 34px;
  border: 1px solid var(--line, rgba(255,255,255,.06));
  border-radius: var(--radius-lg, 22px);
  background: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,.005));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 720px;
  overflow: hidden;
}
.hero-chat[hidden] { display: none; }

.hero-chat .hc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line, rgba(255,255,255,.06));
}
.hero-chat .hc-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green, #22c55e);
  box-shadow: 0 0 0 4px rgba(34,197,94,.18);
  animation: pulse 2s infinite;
  flex: none;
}
.hero-chat .hc-title {
  font-size: 13px; font-weight: 600; letter-spacing: .2px;
  color: var(--text, #e8edf2);
}
.hero-chat .hc-live {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase;
  color: var(--green, #22c55e);
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid rgba(34,197,94,.28);
  background: rgba(34,197,94,.08);
}
.hero-chat .hc-total {
  font-family: var(--font-mono, monospace);
  font-size: 11px; color: var(--text-mute, #6b7686);
}
.hero-chat .hc-join {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border: 1px solid rgba(212,175,55,.35);
  border-radius: 999px;
  background: rgba(212,175,55,.08);
  color: var(--gold-2, #f0c75e);
  font: 600 12.5px/1 var(--font-sans, Inter, system-ui, sans-serif);
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, border-color .18s, transform .18s;
}
.hero-chat .hc-join:hover {
  background: rgba(212,175,55,.16);
  border-color: rgba(212,175,55,.6);
  transform: translateY(-1px);
}

.hero-chat .hc-stream {
  padding: 12px 18px 14px;
  max-height: 208px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 9px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 26px);
  mask-image: linear-gradient(180deg, transparent 0, #000 26px);
}
.hero-chat .hc-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 13.5px;
  line-height: 1.5;
  min-width: 0;
}
.hero-chat .hc-row.in { animation: hcIn .45s cubic-bezier(.2,.8,.3,1); }
@keyframes hcIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.hero-chat .hc-av {
  width: 22px; height: 22px; flex: none;
  border-radius: 7px;
  display: grid; place-items: center;
  align-self: center;
  font-size: 10.5px; font-weight: 700; color: #06080c;
  text-transform: uppercase;
}
.hero-chat .hc-nick {
  font-weight: 600; font-size: 13px; flex: none;
  max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-chat .hc-text {
  color: var(--text-dim, #9aa4b2);
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-chat .hc-time {
  flex: none;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px; color: var(--text-mute, #6b7686);
}
.hero-chat .hc-empty {
  padding: 8px 0 6px;
  color: var(--text-mute, #6b7686);
  font-size: 13px;
}

@media (max-width: 640px) {
  .hero-chat .hc-head { flex-wrap: wrap; gap: 8px; padding: 12px 14px; }
  .hero-chat .hc-join { margin-left: 0; width: 100%; justify-content: center; }
  .hero-chat .hc-stream { padding: 12px 14px; max-height: 176px; }
  .hero-chat .hc-nick { max-width: 90px; }
  .hero-chat .hc-time { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-chat .hc-row.in { animation: none; }
  .hero-chat .hc-dot { animation: none; }
}
