:root {
  --zemin: #f4f5f7; --yuzey: #ffffff; --metin: #15171c; --soluk: #6b7280; --cizgi: #e3e5ea;
  --ben: #1f6feb; --ben-metin: #ffffff; --o: #ffffff; --vurgu: #1f6feb; --kirmizi: #e5484d; --yesil: #2fb344;
  --gri: #9aa0aa; --sari: #e6a700;
}
@media (prefers-color-scheme: dark) {
  :root { --zemin: #0f1115; --yuzey: #181b21; --metin: #e8eaee; --soluk: #8b919c; --cizgi: #262a32;
    --ben: #2a6ae0; --o: #1d2128; --vurgu: #5b9bff; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--zemin); color: var(--metin);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column; height: 100dvh; overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
#ust {
  display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
  background: var(--yuzey); border-bottom: 1px solid var(--cizgi);
}
.baslik { font-weight: 600; font-size: 17px; flex: 1; }
.isik { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--soluk); }
.nokta { width: 9px; height: 9px; border-radius: 50%; background: var(--gri); }
.isik.acik .nokta { background: var(--yesil); }
.isik.yari .nokta { background: var(--sari); }
.ikon { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; flex: none; }
.ikon.kapali { opacity: .35; }
#akis { flex: 1; overflow-y: auto; padding: 12px 16px 8px; display: flex; flex-direction: column; gap: 8px;
  overscroll-behavior: contain; }
.balon { max-width: 85%; padding: 9px 12px; border-radius: 16px; word-wrap: break-word; overflow-wrap: anywhere; }
.balon.ben { align-self: flex-end; background: var(--ben); color: var(--ben-metin); border-bottom-right-radius: 5px; }
.balon.o { align-self: flex-start; background: var(--o); border: 1px solid var(--cizgi); border-bottom-left-radius: 5px; }
.balon.geri { opacity: .5; }
.balon.geri .metin { text-decoration: line-through; }
.sistem { align-self: center; font-size: 12.5px; color: var(--soluk); text-align: center; max-width: 90%; }
.metin { white-space: pre-wrap; }
.metin pre { white-space: pre; overflow-x: auto; font-size: 12px; margin: 4px 0; }
.alt { display: flex; gap: 10px; align-items: center; justify-content: flex-end; font-size: 11.5px; margin-top: 4px; opacity: .8; }
.balon.o .alt { justify-content: flex-start; color: var(--soluk); }
.alt button { font-size: 12.5px; text-decoration: underline; padding: 6px 0; min-height: 32px; }
.devami { color: var(--vurgu); font-size: 13.5px; padding: 6px 0; min-height: 32px; }
.secenekler { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.secenekler button { border: 1px solid var(--vurgu); color: var(--vurgu); border-radius: 18px; padding: 8px 14px; min-height: 40px; }
.secildi { margin-top: 6px; font-size: 13px; color: var(--yesil); }
.ekler { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ekler img, .ekler video { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.ekler .dosyaEk { padding: 8px; border-radius: 8px; background: rgba(0,0,0,.12); font-size: 13px; }
.sesOyna { font-size: 13px; padding: 6px 0; min-height: 32px; }
#alt { background: var(--yuzey); border-top: 1px solid var(--cizgi); padding: 6px 12px calc(env(safe-area-inset-bottom) + 8px); }
#hizli { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
#hizli button { flex: none; border: 1px solid var(--cizgi); border-radius: 16px; padding: 6px 14px; font-size: 14px; min-height: 36px; }
#tepsi { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 6px; }
.tepsiEk { position: relative; flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--cizgi);
  display: flex; align-items: center; justify-content: center; font-size: 11px; text-align: center; }
.tepsiEk img, .tepsiEk video { width: 100%; height: 100%; object-fit: cover; }
.tepsiEk button { position: absolute; top: 0; right: 0; width: 24px; height: 24px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; border-radius: 0 0 0 8px; }
#kayitSerit { display: flex; align-items: center; gap: 10px; padding: 4px 0 6px; }
.metinTus { color: var(--kirmizi); padding: 8px 4px; min-height: 40px; }
.kayitNokta { width: 10px; height: 10px; border-radius: 50%; background: var(--kirmizi); animation: nabiz 1s infinite; }
@keyframes nabiz { 50% { opacity: .3; } }
#sure { font-variant-numeric: tabular-nums; font-size: 14px; }
#dalga { flex: 1; min-width: 0; height: 36px; }
#giris { display: flex; align-items: flex-end; gap: 4px; }
#yazi { flex: 1; min-width: 0; resize: none; border: 1px solid var(--cizgi); border-radius: 20px; padding: 10px 14px;
  background: var(--zemin); color: var(--metin); font: inherit; max-height: 140px; }
.mikrofon { width: 60px; height: 60px; border-radius: 50%; background: var(--vurgu); color: #fff; font-size: 26px; flex: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.mikrofon.kayitta { background: var(--kirmizi); font-size: 24px; }
#eslemeGerekli { padding: 40px 24px; text-align: center; }
.kucuk { font-size: 14px; color: var(--soluk); }

.ik { width: 22px; height: 22px; display: block; }
.ikon { display: inline-flex; align-items: center; justify-content: center; color: var(--soluk); }
#sesTus { color: var(--metin); }
.mikrofon { display: inline-flex; align-items: center; justify-content: center; }
.mikrofon .ik { width: 26px; height: 26px; stroke-width: 2.2; }
.gonder { width: 40px; height: 40px; margin: 2px; border-radius: 50%; background: var(--vurgu); color: #fff !important; }
.gonder .ik { width: 20px; height: 20px; stroke-width: 2.5; }
.kucukIk { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; }
.sesOyna .kucukIk { fill: currentColor; stroke-width: 0; }
.metinTus { display: inline-flex; align-items: center; gap: 4px; }
.metinTus .ik { width: 16px; height: 16px; }
.dosyaEk .ik { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; }
.tepsiEk button { display: flex; align-items: center; justify-content: center; }
.tepsiEk button .ik { width: 14px; height: 14px; }
#sesAfis { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 150px);
  background: var(--vurgu); color: #fff; border-radius: 22px; padding: 12px 20px; font-size: 15px; box-shadow: 0 4px 16px rgba(0,0,0,.3);
  display: inline-flex; align-items: center; gap: 8px; z-index: 10; }
#sesAfis .kucukIk { fill: currentColor; stroke-width: 0; width: 14px; height: 14px; }
