* { box-sizing: border-box; }
/* `display:grid/flex` kuralları `hidden` özniteliğini ezmesin */
[hidden] { display: none !important; }
:root {
  --glass: rgba(20, 22, 30, 0.55);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f3f1ec;
  --muted: rgba(243, 241, 236, 0.65);
  --accent: #f4a261;
  --focus: #e76f51;
  --break: #2a9d8f;
  --away: #8d99ae;
}
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: #111;
  overflow: hidden;
}
#bg, #bgShade { position: fixed; inset: 0; z-index: -2; }
#bg { background-size: cover; background-position: center; transition: background-image .6s; }
/* YouTube arka planı: 16:9 videoyu ekranı tamamen kaplayacak şekilde büyüt */
#bgVideo { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; background: #000; }
#bgVideo iframe {
  position: absolute; top: 50%; left: 50%; border: 0;
  width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.78vh;
  transform: translate(-50%, -50%) scale(1.15); /* başlık/logo şeridini kenarlardan taşırır */
}
#bgShade { z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.45)); }

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border-radius: 18px;
}
button {
  font: inherit; color: var(--text); cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 14px;
}
button:hover { background: rgba(255,255,255,.16); }
button.primary { background: var(--accent); color: #1d1d1d; border-color: transparent; font-weight: 600; }
button.primary:hover { filter: brightness(1.08); }
button.link { background: none; border: none; color: var(--muted); padding: 4px 0; text-decoration: underline; }
input {
  font: inherit; color: var(--text); width: 100%;
  background: rgba(0,0,0,.3); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; outline: none;
}
input:focus { border-color: var(--accent); }
h1 { margin: 0 0 4px; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 600; letter-spacing: .3px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.err { color: #ff8a80; min-height: 1em; margin: 0; }
.pill { background: rgba(255,255,255,.15); border-radius: 99px; padding: 1px 8px; font-size: 12px; }
.row { display: flex; gap: 8px; }

.center { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; }
.card { padding: 26px; width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.card.wide { width: min(640px, 100%); max-height: 90vh; overflow: auto; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* Oda */
#room { height: 100%; display: flex; flex-direction: column; padding: 14px; gap: 14px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.brand { font-weight: 700; }
.topActions { display: flex; gap: 8px; }
.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 280px 1fr 320px; gap: 14px; }
.panel { padding: 16px; display: flex; flex-direction: column; min-height: 0; }

#people { list-style: none; padding: 0; margin: 0; flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
#people li { display: flex; gap: 10px; align-items: flex-start; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 700; color: #1d1d1d; position: relative;
}
.avatar::after {
  content: ""; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px;
  border-radius: 50%; border: 2px solid #222; background: var(--dot);
}
.pname { font-weight: 600; font-size: 14px; }
.pstat { font-size: 12px; color: var(--muted); }
.ptask { font-size: 12px; color: var(--text); opacity: .85; margin-top: 2px; word-break: break-word; }
.me { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.pttBtn { padding: 12px; font-weight: 700; font-size: 15px; user-select: none; -webkit-user-select: none; touch-action: none; }
.pttBtn.live { background: #e63946; border-color: #e63946; animation: pttPulse 1s infinite; }
.pttBtn.busy, .pttBtn:disabled { opacity: .55; cursor: not-allowed; }
@keyframes pttPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(230,57,70,.6); } 50% { box-shadow: 0 0 0 8px rgba(230,57,70,0); } }
.pttRow { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pttRow label { flex-direction: row; align-items: center; gap: 4px; }
.pttRow input[type=range] { width: 80px; padding: 0; accent-color: var(--accent); }
#people li.speaking .avatar { box-shadow: 0 0 0 3px #2ecc71, 0 0 12px #2ecc71; }
#people li.speaking .pname::after { content: ' 🎙️'; }
.pttBanner {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 40;
  background: rgba(46, 204, 113, .92); color: #0b2b17; font-weight: 700; padding: 8px 18px; border-radius: 99px;
}
/* Sigara odası */
.smokeBtn { background: rgba(244,162,97,.25); border-color: rgba(244,162,97,.5); font-weight: 600; }
#smoke { height: 100%; display: flex; flex-direction: column; padding: 14px; gap: 14px; }
.smokeTop { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; flex-wrap: wrap; gap: 8px; }
.smokeTop .topActions { align-items: center; flex-wrap: wrap; }
.smMic { font-weight: 700; background: rgba(46,204,113,.3); border-color: rgba(46,204,113,.6); }
.smMic.off { background: rgba(230,57,70,.35); border-color: rgba(230,57,70,.7); }
.smVolL { flex-direction: row; align-items: center; gap: 4px; }
.smVolL input, .smCtl input[type=range] { padding: 0; accent-color: var(--accent); }
.smVolL input { width: 90px; }
.smokeGrid { flex: 1; min-height: 0; display: grid; grid-template-columns: 240px 1fr 320px; gap: 14px; }
.smMembers { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; overflow: auto; }
.smMembers li { display: flex; align-items: center; gap: 10px; }
.smMembers .pname { flex: 1; }
.smMembers li.speaking .avatar { box-shadow: 0 0 0 3px #2ecc71, 0 0 14px #2ecc71; }
.smStage { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; }
.smVideoWrap { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; }
.smVideoWrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.smUnblock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
.smCtl { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.smCtl #smSeek { flex: 1; }
.smCtl label { flex-direction: row; align-items: center; gap: 4px; }
.smCtl label input { width: 80px; }
.smVideoInfo { margin-top: 4px; }
.smEmpty { text-align: center; padding: 30px 0 10px; color: var(--muted); }
.smPickBtn { align-self: center; padding: 12px 22px; font-size: 15px; }
.smPicker { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; }
.smMessages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; margin-bottom: 10px; }
@media (max-width: 980px) {
  #smoke { height: auto; min-height: 100%; }
  .smokeGrid { grid-template-columns: 1fr; }
  .smStage { order: -1; }
  .smokeGrid .chat { height: 380px; }
}

/* Ekran paylaşımı */
.shBtn { font-weight: 700; background: rgba(66,133,244,.3); border-color: rgba(66,133,244,.6); }
.shBtn.live { background: #e63946; border-color: #e63946; animation: pttPulse 1.4s infinite; }
.shBtn:disabled { opacity: .5; cursor: not-allowed; }
.shBox { display: flex; flex-direction: column; gap: 8px; }
.shHead { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; }
.shHead span:last-child { display: flex; gap: 6px; }
.shWrap { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; }
.shWrap video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.shStatus { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: var(--muted); text-align: center; pointer-events: none; }
.shStatus:empty { display: none; }
.shPlayBtn { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); }
/* Biri ekran paylaşırken ortak video küçük kalsın */
body.sharing .smVideoWrap { max-height: 200px; }

/* Müzik */
.card.music { width: min(980px, 100%); max-height: 88vh; }
.musicHead { display: flex; justify-content: space-between; align-items: center; }
.musicHead h2 { margin: 0; }
.musicCols { display: grid; grid-template-columns: 220px 1fr; gap: 14px; min-height: 0; flex: 1; overflow: hidden; }
.mLists, .mMain { overflow-y: auto; max-height: 60vh; }
.mListsHead, .mSecHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.mSecHead span { display: flex; gap: 4px; align-items: center; }
.small.primary, button.small { padding: 5px 10px; font-size: 12px; }
#mPls { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
#mPls li { padding: 8px 10px; border-radius: 8px; cursor: pointer; background: rgba(255,255,255,.04); display: flex; justify-content: space-between; }
#mPls li.on { background: rgba(255,0,51,.35); }
#mPls li span { color: var(--muted); font-size: 12px; }
#mResultsWrap { margin-bottom: 16px; }
.mTabs { display: flex; gap: 6px; margin-bottom: 12px; position: sticky; top: 0; z-index: 2; background: rgba(20,22,30,.95); padding: 2px 0 6px; }
.mTab { flex: 1; padding: 10px; font-weight: 600; font-size: 14px; display: flex; justify-content: center; align-items: center; gap: 6px; min-width: 0; }
.mTab.on { background: #ff0033; border-color: #ff0033; color: #fff; }
.mTab .pill:empty { display: none; }
.mTab.bump { animation: mBump .5s; }
@keyframes mBump { 30% { transform: scale(1.06); box-shadow: 0 0 0 3px rgba(255,0,51,.5); } }
.mTargetHint { margin: 0 0 8px; color: var(--muted); }
.mTargetHint b { color: var(--text); }
.addBtn { padding: 5px 10px; font-size: 12px; font-weight: 600; background: rgba(255,0,51,.8); border-color: transparent; color: #fff; white-space: nowrap; }
.addBtn.done { background: rgba(46,204,113,.25); color: #8ef0b5; cursor: default; }
.tracks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.tracks li { display: flex; align-items: center; gap: 10px; padding: 5px; border-radius: 8px; background: rgba(255,255,255,.04); }
.tracks li.playing { background: rgba(255,0,51,.25); }
.tracks img { width: 64px; height: 36px; object-fit: cover; border-radius: 5px; flex: none; }
.tracks .tt { flex: 1; min-width: 0; }
.tracks .tt div:first-child { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tracks .tt div:last-child { font-size: 11px; color: var(--muted); }
.tracks select { font: inherit; font-size: 12px; background: rgba(0,0,0,.4); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 4px; }
.mPlayer { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 35; display: flex; gap: 12px; align-items: center; padding: 8px 12px; width: min(720px, calc(100% - 28px)); }
.mPlayer img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; }
.mpInfo { flex: 1; min-width: 0; }
.mpTitle { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mpSeek { padding: 0; height: 4px; accent-color: #ff0033; margin-top: 4px; }
.mpBtns { display: flex; gap: 4px; align-items: center; }
.mpBtns button { padding: 6px 9px; }
.mpBtns button.on { background: rgba(255,0,51,.45); }
#mpVol { width: 70px; padding: 0; accent-color: #ff0033; }
/* YouTube oynatıcısı görünmez: sadece ses */
#mHost { position: fixed; left: -10000px; top: 0; width: 320px; height: 180px; overflow: hidden; pointer-events: none; opacity: 0; }
body.zenOn.zenIdle .mPlayer { opacity: 0; transition: opacity .6s; }
body.zenOn .mPlayer { transition: opacity .6s; }
@media (max-width: 760px) { .musicCols { grid-template-columns: 1fr; } .mPlayer { flex-wrap: wrap; } #mpVol { display: none; } }
.seg { display: flex; gap: 4px; }
.seg button { flex: 1; padding: 7px 4px; font-size: 12px; }
.seg button.on { background: rgba(255,255,255,.28); border-color: rgba(255,255,255,.4); }

.timerWrap { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.timerCard { padding: 26px; text-align: center; }
.phase { text-transform: uppercase; letter-spacing: 3px; font-size: 13px; font-weight: 700; color: var(--focus); }
.phase.break { color: var(--break); }
.clock { font-size: clamp(64px, 11vw, 120px); font-weight: 200; font-variant-numeric: tabular-nums; line-height: 1.1; }
.timerBtns { display: flex; justify-content: center; gap: 8px; margin: 14px 0 6px; }
.timerBtns .primary { min-width: 110px; }
.cfg { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 10px 0; }
.cfg label { flex-direction: row; align-items: center; }
.cfg input { width: 70px; }

.todoCard { padding: 16px; flex: 1; min-height: 0; overflow: auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tab.active { background: rgba(255,255,255,.25); }
#todos, .otherTodos { list-style: none; padding: 0; margin: 12px 0 6px; display: flex; flex-direction: column; gap: 6px; }
#todos li, .otherTodos li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.05); }
#todos li .t, .otherTodos li .t { flex: 1; word-break: break-word; }
li.done .t { text-decoration: line-through; opacity: .5; }
.icon { padding: 3px 8px; font-size: 13px; background: none; border-color: transparent; opacity: .7; }
.icon:hover { opacity: 1; }
.chk { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--muted); flex: none; cursor: pointer; display: grid; place-items: center; font-size: 12px; }
li.done .chk { background: var(--break); border-color: var(--break); }
.ownerH { font-size: 13px; font-weight: 600; margin-top: 12px; }

.chat #messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; margin-bottom: 10px; }
.msg { font-size: 14px; line-height: 1.4; word-break: break-word; }
.msg .who { font-weight: 600; margin-right: 6px; }
.msg .when { font-size: 11px; color: var(--muted); margin-left: 4px; }
.msg.sys { color: var(--muted); font-size: 12px; font-style: italic; text-align: center; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 16px; z-index: 10; }
.card.gallery { width: min(900px, 100%); }
.bgCats { display: flex; flex-wrap: wrap; gap: 6px; }
.bgCats button { padding: 6px 12px; font-size: 13px; border-radius: 99px; }
.bgCats button.on { background: var(--accent); color: #1d1d1d; border-color: transparent; font-weight: 600; }
.bgGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; max-height: 55vh; overflow-y: auto; padding: 2px; }
.bgGrid button { padding: 0; aspect-ratio: 16/9; border-width: 3px; overflow: hidden; position: relative; background: #000; }
.bgGrid button img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.bgGrid button:hover img { transform: scale(1.06); }
.bgGrid button.on { border-color: var(--accent); }
.bgGrid .zoom {
  position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; background: rgba(0,0,0,.6); font-size: 15px; opacity: 0; transition: .2s;
}
.bgGrid button:hover .zoom, .bgGrid button.on .zoom { opacity: 1; }
.modalFoot { justify-content: space-between; flex-wrap: wrap; }
.bgTabs { display: flex; gap: 8px; }
.bgTab { flex: 1; padding: 10px; font-weight: 600; }
.bgTab.on { background: rgba(255,255,255,.25); border-color: rgba(255,255,255,.4); }
.bgTab.yt.on { background: #ff0033; border-color: #ff0033; color: #fff; }
.ytPanel { display: flex; flex-direction: column; gap: 10px; max-height: 64vh; overflow-y: auto; padding-right: 4px; }
.ytSearch { display: flex; gap: 8px; align-items: center; position: sticky; top: 0; z-index: 2; background: rgba(20,22,30,.95); padding: 4px 0; }
.ytLogo { color: #ff0033; font-weight: 800; white-space: nowrap; }
.ytSearch .primary { background: #ff0033; color: #fff; }
.ytSuggest { display: flex; flex-wrap: wrap; gap: 6px; }
.ytSuggest button { padding: 4px 10px; font-size: 12px; border-radius: 99px; }
.ytPlayerBox { background: rgba(0,0,0,.35); border-radius: 12px; overflow: hidden; }
.ytPlayerWrap { position: relative; aspect-ratio: 16/9; background: #000; }
.ytPlayerWrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ytPlayerInfo { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; }
.ytPTitle { font-weight: 600; font-size: 14px; }
.ytResults { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.ytCard { padding: 6px; text-align: left; display: flex; flex-direction: column; gap: 5px; background: rgba(255,255,255,.04); }
.ytThumb { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #000; }
.ytThumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ytThumb span { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.8); font-size: 11px; padding: 1px 5px; border-radius: 4px; }
.ytT { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ytRecent { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ytRecent:empty { display: none; }
.ytRecent > div { width: 100%; }
.ytRecent button { display: flex; align-items: center; gap: 8px; padding: 4px 28px 4px 4px; max-width: 260px; position: relative; text-align: left; font-size: 12px; }
.ytRecent img { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; flex: none; }
.ytRecent span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ytRecent i { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-style: normal; opacity: .5; }
.ytRecent i:hover { opacity: 1; }
body.zenOn #bgVideo { z-index: 1; }

/* Tam ekran fotoğraf modu: arayüz gizlenir, sadece fotoğraf kalır */
body.zenOn #bgShade { display: none !important; }
/* Tam ekranda yalnızca sabitlenen (📌) paneller görünür, yerleri normal düzendeki gibi kalır */
body.zenOn #room { position: fixed; inset: 0; z-index: 31; pointer-events: none; }
body.zenOn #room .topbar, body.zenOn [data-pin]:not(.pinned) { visibility: hidden; }
body.zenOn [data-pin].pinned { pointer-events: auto; }
body.zenOn.zenIdle, body.zenOn.zenIdle #zen { cursor: none; }
body.zenOn.zenIdle [data-pin].pinned { cursor: auto; }
#zen { pointer-events: none; }
#zen .zenBar, #zen .zenCredit { pointer-events: auto; }
[data-pin] { position: relative; }
.pinBtn {
  position: absolute; top: 8px; right: 8px; z-index: 3; padding: 2px 7px; font-size: 12px;
  border-radius: 7px; opacity: .45; background: rgba(0,0,0,.25);
}
.pinBtn:hover { opacity: 1; }
.pinBtn.on { opacity: .9; background: var(--accent); color: #1d1d1d; border-color: transparent; }
.ytVol { width: 90px; padding: 0; accent-color: #ff0033; align-self: center; }
.zenBar .ytVol { width: 110px; }
.zenPtt { user-select: none; -webkit-user-select: none; touch-action: none; }
.zenPtt.live { background: #e63946; border-color: #e63946; animation: pttPulse 1s infinite; }
.zenPtt:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 980px) {
  body.zenOn [data-pin]:not(.pinned), body.zenOn #room .topbar { display: none; }
  body.zenOn #room { overflow: auto; padding-top: 80px; }
}
body.zenOn #bg { background-size: cover; }
#zen { position: fixed; inset: 0; z-index: 30; cursor: default; }
#zen.idle { cursor: none; }
#zen.idle .zenBar, #zen.idle .zenCredit { opacity: 0; }
.zenBar {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; align-items: center; transition: opacity .6s;
  background: rgba(0,0,0,.45); backdrop-filter: blur(5px); padding: 8px; border-radius: 14px;
}
.zenBar button { font-size: 18px; min-width: 42px; }
.zenClock { font-variant-numeric: tabular-nums; font-size: 20px; padding: 0 12px; min-width: 110px; text-align: center; }
.zenCredit {
  position: absolute; left: 16px; bottom: 14px; font-size: 12px; color: rgba(255,255,255,.8);
  background: rgba(0,0,0,.45); padding: 6px 10px; border-radius: 8px; transition: opacity .6s; max-width: 80vw;
}
.zenCredit a { color: inherit; }
.amb { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.amb button { width: 140px; text-align: left; }
.amb button.on { background: rgba(255,255,255,.28); }
.amb input[type=range] { flex: 1; padding: 0; accent-color: var(--accent); }
#lofiBox iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; margin-top: 10px; }
.check { flex-direction: row; align-items: center; gap: 8px; }
.check input { width: auto; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: rgba(20,20,20,.9); padding: 12px 20px; border-radius: 12px; opacity: 0;
  transition: .3s; pointer-events: none; z-index: 20; border: 1px solid var(--border);
}
#toast.show { opacity: 1; transform: translateX(-50%); }

/* Mobil alt menü (masaüstünde gizli) */
.mNav, .mPtt { display: none; }

/* Mobil */
@media (max-width: 980px) {
  body { overflow: auto; }
  #room { height: auto; min-height: 100%; }
  .layout { grid-template-columns: 1fr; }
  .timerWrap { order: -1; }
  .chat { height: 420px; }
  #people { max-height: 260px; }
  .bgGrid { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================================
   Telefon düzeni (≤760px): alt menüyle tek panel, büyük dokunma alanları
   ===================================================================== */
@media (max-width: 760px) {
  html, body { height: 100%; }
  body { overflow: hidden; font-size: 15px; -webkit-text-size-adjust: 100%; }
  input, button, select { font-size: 16px; } /* iOS'ta odaklanınca yakınlaştırmayı engeller */
  button { min-height: 40px; }

  /* Üst bar: sıkışık, yatay kaydırılabilir */
  #room, #smoke {
    position: fixed; inset: 0; height: auto; min-height: 0;
    padding: calc(8px + env(safe-area-inset-top)) 8px calc(66px + env(safe-area-inset-bottom)) 8px; gap: 8px;
  }
  .topbar, .smokeTop { padding: 6px 8px; border-radius: 14px; flex-wrap: nowrap; gap: 6px; }
  .topbar .brand { display: none; }
  .topActions { gap: 6px; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap !important; width: 100%; justify-content: flex-start; }
  .topActions::-webkit-scrollbar { display: none; }
  .topActions > * { flex: none; }
  .topActions button { padding: 6px 10px; }
  .ytVol { width: 70px; }

  /* Tek panel: alt menüde seçilen görünür */
  .layout { display: block; flex: 1; min-height: 0; position: relative; }
  .layout > aside, .timerWrap > div { display: none; }
  .timerWrap { display: contents; }
  body[data-mtab="people"] #peoplePanel,
  body[data-mtab="chat"] .layout > .chat,
  body[data-mtab="timer"] .timerCard,
  body[data-mtab="todos"] .todoCard { display: flex; flex-direction: column; position: absolute; inset: 0; overflow-y: auto; }
  body[data-mtab="timer"] .timerCard { justify-content: center; }
  .panel, .todoCard, .timerCard { padding: 14px; border-radius: 16px; }
  .chat { height: auto; }
  #people { max-height: none; }
  .pinBtn { display: none; }

  /* Sayaç */
  .clock { font-size: 22vw; }
  .timerBtns { flex-wrap: wrap; }
  .timerBtns .primary { min-width: 0; flex: 1 1 100%; padding: 14px; font-size: 18px; }
  .timerBtns button:not(.primary) { flex: 1; }
  .cfg { flex-wrap: wrap; }

  /* Görevler ve sohbet */
  #todos li, .otherTodos li { padding: 10px; }
  .chk { width: 22px; height: 22px; }
  .chat #messages, .smMessages { margin-bottom: 8px; }
  .msg { font-size: 15px; }

  /* Alt menü */
  .mNav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(16,18,26,.92); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
    border-top: 1px solid var(--border);
  }
  .mNav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative;
    background: none; border: none; font-size: 20px; padding: 4px 0; color: var(--muted);
  }
  .mNav button span { font-size: 11px; }
  .mNav button.on { color: var(--accent); }
  .mNav i { position: absolute; top: 2px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; }

  /* Yüzen bas konuş (sayaç ve kişiler sekmesinde) */
  .mPtt {
    display: grid; place-items: center; position: fixed; right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 26;
    width: 62px; height: 62px; border-radius: 50%; font-size: 26px;
    background: var(--accent); color: #1d1d1d; border: none; box-shadow: 0 6px 20px rgba(0,0,0,.45);
    user-select: none; -webkit-user-select: none; touch-action: none; -webkit-touch-callout: none;
  }
  .mPtt.live { background: #e63946; color: #fff; animation: pttPulse 1s infinite; }
  .mPtt:disabled { opacity: .5; }
  body[data-mtab="chat"] .mPtt, body[data-mtab="todos"] .mPtt, body.zenOn .mPtt, #room[hidden] ~ .mPtt { display: none; }
  #room[hidden] .mNav { display: none; }
  .pttBanner { top: calc(60px + env(safe-area-inset-top)); font-size: 13px; }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom)); max-width: 90vw; text-align: center; }

  /* Modallar tam ekran sayfa gibi */
  .modal { padding: 0; place-items: stretch; }
  .modal > .card, .card.wide, .card.gallery, .card.music {
    width: 100%; max-height: none; height: 100%; border-radius: 0; padding: calc(14px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }
  .bgTabs { flex-direction: column; }
  .bgGrid { grid-template-columns: repeat(2, 1fr); max-height: none; }
  .bgGrid .zoom { opacity: 1; }
  .ytPanel { max-height: none; }
  .ytSearch .ytLogo { display: none; }
  .ytResults { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ytT { font-size: 12px; }
  .modalFoot { flex-direction: column-reverse; }
  .modalFoot button { width: 100%; }
  .amb button { width: 130px; }

  /* Müzik */
  .musicCols { display: flex; flex-direction: column; overflow: visible; }
  .mLists, .mMain { max-height: none; overflow: visible; }
  .mListsHead { margin-bottom: 4px; }
  #mPls { flex-direction: row; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  #mPls li { flex: none; gap: 6px; }
  .tracks li { padding: 6px; }
  .tracks img { width: 54px; height: 30px; }
  .tracks .icon[data-a="up"] { display: none; }
  .mTab { font-size: 13px; padding: 8px 4px; }
  .mPlayer {
    bottom: calc(70px + env(safe-area-inset-bottom)); width: calc(100% - 16px); padding: 6px 8px; gap: 8px; flex-wrap: nowrap;
  }
  .mPlayer img { width: 40px; height: 40px; }
  .mpBtns button { padding: 4px 6px; min-height: 34px; }
  #mpShuffle, #mpRepeat, #mpVol { display: none; }
  body:has(#mPlayer:not([hidden])) .mPtt { bottom: calc(140px + env(safe-area-inset-bottom)); }

  /* Tam ekran modu */
  .zenBar { top: calc(10px + env(safe-area-inset-top)); max-width: calc(100% - 16px); gap: 4px; padding: 6px; flex-wrap: wrap; justify-content: center; }
  .zenBar button { min-width: 38px; font-size: 16px; }
  .zenClock { font-size: 17px; min-width: 80px; padding: 0 6px; }
  .zenBar .ytVol { width: 80px; }
  .zenCredit { display: none; }
  body.zenOn #room { padding-top: 120px; position: fixed; }
  body.zenOn .mNav { display: none; }
  body.zenOn [data-pin].pinned { position: static !important; display: flex !important; max-height: 50vh; margin-bottom: 8px; }

  /* Sigara odası */
  .smokeTop .brand { font-size: 14px; white-space: nowrap; }
  .smokeTop { flex-direction: column; align-items: stretch; }
  .smVolL input { width: 70px; }
  #smLeave { order: -1; }
  .smokeGrid { display: block; flex: 1; min-height: 0; position: relative; }
  .smokeGrid > * { display: none !important; }
  body[data-smtab="stage"] [data-sm="stage"],
  body[data-smtab="chat"] [data-sm="chat"],
  body[data-smtab="people"] [data-sm="people"] { display: flex !important; flex-direction: column; position: absolute; inset: 0; overflow-y: auto; height: auto; }
  .smStage { padding: 10px; }
  .smCtl { flex-wrap: wrap; }
  .smCtl #smSeek { flex: 1 1 100%; order: -1; }
  .smCtl label input { width: 70px; }
  body.sharing .smVideoWrap { max-height: none; }
  #smoke[hidden] + * .mNav, #smoke[hidden] #smNav { display: none; }
}
@media (max-width: 760px) {
  /* Üst bar düğmeleri taşmasın: alt satıra sarsın, hepsi görünsün */
  .topActions { flex-wrap: wrap !important; overflow: visible; justify-content: center; }
  .topActions button { padding: 6px 9px; min-height: 36px; }
  .smokeTop .topActions > * { flex: 1 1 auto; }
  .smokeTop .smVolL { justify-content: center; }
  /* Kişiler sekmesinde panelin kendi "Bas konuş" düğmesi var */
  body[data-mtab="people"] .mPtt { display: none; }
}
/* Telsiz uyarısı sigara odasında gösterilmez (orada telsiz duyulmuyor) */
#room[hidden] ~ .pttBanner { display: none; }
@media (max-width: 760px) {
  /* Telsiz uyarısını üst bardan alıp alt menünün üstüne al */
  .pttBanner { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
}
.shVolL { flex-direction: row; align-items: center; gap: 4px; }
.shVolL button { padding: 4px 8px; }
.shVolL input { width: 90px; padding: 0; accent-color: var(--accent); }
.shRetry { position: absolute; left: 50%; top: calc(50% + 34px); transform: translateX(-50%); }

/* Sigara odası tam ekran modu */
[data-sm] { position: relative; }
.smStage { padding-top: 38px; }
body.smZen .smokeTop, body.smZen #bgShade { display: none !important; }
body.smZen .smokeGrid > [data-sm]:not(.pinned) { visibility: hidden; }
body.smZen #smoke { padding-top: 64px; }
body.smZenIdle, body.smZenIdle #smoke { cursor: none; }
body.smZenIdle [data-sm].pinned { cursor: auto; }
.smZenBar {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 40;
  display: flex; gap: 8px; align-items: center; transition: opacity .6s;
  background: rgba(0,0,0,.5); backdrop-filter: blur(5px); padding: 6px 8px; border-radius: 14px;
}
.smZenBar button { font-size: 18px; min-width: 42px; }
.smZenBar button.off { background: rgba(230,57,70,.45); }
.smZenInfo { padding: 0 8px; font-weight: 600; white-space: nowrap; }
body.smZenIdle .smZenBar { opacity: 0; }
body.smZenIdle .smZenBar:hover { opacity: 1; }
@media (max-width: 760px) {
  body.smZen .smokeGrid > [data-sm] { visibility: visible; }
  body.smZen #smoke { padding-top: calc(60px + env(safe-area-inset-top)); }
  .smStage { padding-top: 10px; }
}


/* =====================================================================
   2026 yenileme: arka plan ön planda, yüzen kompakt paneller,
   sakin cam yüzeyler, Geist yazı tipi, hap biçimli kontroller
   ===================================================================== */
:root {
  --glass: rgba(16, 17, 22, 0.46);
  --glass-strong: rgba(16, 17, 22, 0.72);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f2ee;
  --muted: rgba(244, 242, 238, 0.58);
  --accent: #f2a65a;
  --accent-ink: #1b1309;
  --r-lg: 22px; --r-md: 14px; --r-sm: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 20px 50px -20px rgba(0,0,0,.55);
  --ease: cubic-bezier(.2,.7,.2,1);
}
body { font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
#bgShade { background: radial-gradient(120% 80% at 50% 40%, rgba(0,0,0,.05), rgba(0,0,0,.45)), linear-gradient(180deg, rgba(0,0,0,.25), transparent 30%, rgba(0,0,0,.35)); }

.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow: var(--shadow);
}
h2 { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); text-transform: none; }

button {
  border-radius: 999px; border: 1px solid var(--border); background: rgba(255,255,255,.06);
  padding: 8px 14px; font-weight: 500;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease), opacity .2s;
}
button:hover { background: rgba(255,255,255,.12); border-color: var(--border-strong); }
button:active { transform: scale(.97); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
button.primary:hover { background: #f7b672; }
input { border-radius: var(--r-md); background: rgba(255,255,255,.05); border: 1px solid var(--border); padding: 10px 14px; }
input:focus { border-color: rgba(242,166,90,.6); background: rgba(255,255,255,.08); }
input[type=range] { accent-color: var(--accent); }
.pill { background: rgba(255,255,255,.1); font-weight: 600; font-family: "Geist Mono", ui-monospace, monospace; }

/* Giriş ekranı */
#login .card { padding: 32px; gap: 16px; background: var(--glass-strong); }
#login h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
#login .primary { padding: 12px; font-size: 15px; }

/* Sayaç: kart yok, doğrudan fotoğrafın üstünde */
.clock {
  font-family: "Geist", sans-serif; font-weight: 200; letter-spacing: -0.05em;
  font-size: clamp(88px, 11vw, 168px); line-height: 1; font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 40px rgba(0,0,0,.35);
}
.phase { font-family: "Geist Mono", monospace; font-size: 12px; letter-spacing: .28em; font-weight: 500; }
#round { font-size: 13px; }
.timerBtns { gap: 10px; margin: 18px 0 6px; }
.timerBtns .primary { min-width: 132px; padding: 11px 22px; font-size: 15px; }
.timerBtns button:not(.primary) { width: 42px; height: 42px; padding: 0; display: inline-grid; place-items: center; }
#resetBtn { width: auto !important; padding: 0 16px !important; }

/* Kişiler */
.avatar { width: 34px; height: 34px; font-size: 14px; }
.avatar::after { border-color: rgba(16,17,22,.9); }
.pname { font-weight: 600; }
.seg { background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: none; background: transparent; border-radius: 999px; padding: 6px 4px; }
.seg button.on { background: rgba(255,255,255,.16); }
.pttBtn { border-radius: var(--r-md); padding: 12px; }

/* Görevler */
.tabs { background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 999px; padding: 3px; display: inline-flex; gap: 2px; }
.tabs .tab { border: none; background: transparent; padding: 6px 14px; font-size: 13px; }
.tabs .tab.active { background: rgba(255,255,255,.16); }
#todos li, .otherTodos li { background: transparent; border-radius: var(--r-sm); padding: 8px 6px; }
#todos li:hover { background: rgba(255,255,255,.05); }
.chk { border-radius: 50%; border-width: 1.5px; }

/* Sohbet: mesajlar baloncuk değil, sakin satırlar */
.msg { font-size: 14px; line-height: 1.45; }
.msg .when { font-family: "Geist Mono", monospace; font-size: 10.5px; opacity: .7; }
.msg.sys { font-style: normal; font-size: 11.5px; opacity: .8; }
#chatForm, #smChatForm { background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 999px; padding: 4px; gap: 4px; }
#chatForm input, #smChatForm input { background: transparent; border: none; padding: 8px 12px; }
#chatForm button, #smChatForm button { width: 38px; height: 38px; padding: 0; flex: none; }

/* Modallar */
.modal { background: rgba(6,7,10,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal .card { background: var(--glass-strong); }
.bgCats button, .ytSuggest button { font-size: 12.5px; }
.bgGrid button { border-radius: var(--r-md); border-width: 2px; border-color: transparent; }
.bgGrid button.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,166,90,.25); }

#toast { border-radius: 999px; background: var(--glass-strong); backdrop-filter: blur(10px); font-size: 14px; }
.pinBtn { border-radius: 999px; opacity: .0; transition: opacity .2s; }
[data-pin]:hover .pinBtn, [data-sm]:hover .pinBtn, .pinBtn.on { opacity: .75; }

/* ---------- Masaüstü yerleşimi: yüzen paneller, fotoğrafa nefes alanı ---------- */
@media (min-width: 761px) {
  #room, #smoke { padding: 18px 20px 20px; gap: 16px; }
  .topbar, .smokeTop { background: transparent; border: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0 4px; }
  .brand { font-weight: 600; letter-spacing: -0.02em; font-size: 15px; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
  .topActions {
    background: var(--glass); border: 1px solid var(--border); border-radius: 999px; padding: 5px;
    backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%); box-shadow: var(--shadow); gap: 4px;
  }
  .topActions button { border: none; background: transparent; padding: 8px 12px; min-height: 36px; }
  .topActions button:hover { background: rgba(255,255,255,.1); }
  .topActions .smokeBtn { background: rgba(242,166,90,.18); color: #ffd5ab; }
  .topActions button.primary { background: var(--accent); color: var(--accent-ink); }

  .layout { grid-template-columns: 290px 1fr 340px; gap: 20px; align-items: start; }
  #peoplePanel { align-self: start; max-height: 100%; overflow: auto; padding: 18px; }
  #people { flex: none; }
  .layout > .chat { align-self: end; height: min(600px, 100%); padding: 18px; }

  .timerWrap { justify-content: center; align-items: center; height: 100%; gap: 22px; }
  .timerCard { background: transparent; border: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 8px; width: 100%; }
  .todoCard { width: min(560px, 100%); flex: 0 1 auto; max-height: 42vh; padding: 16px 18px; }
  .timerCard .pinBtn { top: 0; right: 0; }

  .smokeGrid { gap: 20px; }
  .smokeGrid > [data-sm="people"] { align-self: start; }
  .smStage { background: var(--glass); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (min-width: 761px) {
  /* Sayaç fotoğrafın üstünde okunaklı kalsın: yumuşak koyu hale + gölgeli yazı */
  .timerCard { position: relative; isolation: isolate; }
  .timerCard::before {
    content: ""; position: absolute; inset: -40px -10%; z-index: -1; pointer-events: none;
    background: radial-gradient(closest-side, rgba(0,0,0,.42), rgba(0,0,0,0));
  }
  .phase, #round, #timerBy { text-shadow: 0 1px 8px rgba(0,0,0,.7); }
  #round { color: rgba(244,242,238,.85); }
  .phase { color: #ff9a76; }
  .phase.break { color: #6fe0cf; }
  .timerBtns button:not(.primary) {
    background: rgba(16,17,22,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-color: var(--border-strong);
  }
}
@media (min-width: 761px) {
  /* Sayaç arkasına hafif buzlu cam */
  .timerCard {
    width: auto; min-width: min(560px, 100%); padding: 30px 56px 24px;
    background: rgba(16,17,22,.22); border: 1px solid var(--border); border-radius: 28px;
    backdrop-filter: blur(8px) saturate(140%); -webkit-backdrop-filter: blur(8px) saturate(140%);
    box-shadow: 0 20px 50px -24px rgba(0,0,0,.5);
  }
  .timerCard::before { display: none; }
  .timerCard .pinBtn { top: 10px; right: 10px; }
}

/* Kişi listesi: 1px taşma yüzünden gereksiz kaydırma çubuğu çıkmasın */
#people, .smMembers { overflow: visible; padding: 2px; margin: -2px; }
@media (min-width: 761px) { #peoplePanel { overflow-y: auto; } }
/* Kaydırma çubukları ince ve sade (Windows'taki ok düğmeli çubuk yerine) */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }

/* Son kişi ile alttaki ayırıcı çizgi arasında boşluk */
#people { margin-bottom: 14px; }
.smMembers { margin-bottom: 14px; }
.me { margin-top: 4px; }

/* Bas konuş altındaki ses sürgüsü sağa yaslı */
.pttRow { justify-content: flex-end; }
/* Ses sürgüsü ortada */
.pttRow { justify-content: center; }


/* =====================================================================
   Apple tarzı katman (macOS/visionOS koyu malzeme, SF Pro, mavi vurgu)
   ===================================================================== */
:root {
  --accent: #0a84ff;            /* Apple koyu mod mavisi */
  --accent-hover: #409cff;
  --accent-ink: #ffffff;
  --text: #f5f5f7;
  --muted: rgba(235,235,245,.6);  /* secondaryLabel */
  --tertiary: rgba(235,235,245,.3);
  --fill: rgba(120,120,128,.24);  /* systemFill */
  --fill-2: rgba(120,120,128,.16);
  --separator: rgba(84,84,88,.6);
  --glass: rgba(30,30,32,.55);    /* koyu malzeme */
  --glass-strong: rgba(28,28,30,.82);
  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.14);
  --focus: #ff9f0a; --break: #30d158; --away: #8e8e93;
  --red: #ff453a;
  --r-lg: 20px; --r-md: 12px; --r-sm: 8px;
  --shadow: 0 0 0 .5px rgba(255,255,255,.06) inset, 0 12px 40px -12px rgba(0,0,0,.6);
}
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, "Helvetica Neue", sans-serif;
  font-size: 15px; letter-spacing: -0.01em; color: var(--text);
}
h1, .brand, .clock, .smokeTop .brand {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}

/* Simgeler */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
button > span { white-space: nowrap; }

/* Yüzeyler */
.glass { background: var(--glass); border: .5px solid var(--border-strong); box-shadow: var(--shadow); }
.modal .card, #login .card { background: var(--glass-strong); }
h2 { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: -0.005em; }

/* Düğmeler */
button {
  border: none; background: var(--fill); color: var(--text); border-radius: 999px;
  padding: 7px 14px; font-size: 14px; font-weight: 500; min-height: 32px;
}
button:hover { background: rgba(120,120,128,.34); border: none; }
button:active { transform: scale(.96); background: rgba(120,120,128,.44); }
button.primary { background: var(--accent); color: #fff; }
button.primary:hover { background: var(--accent-hover); }
button:disabled { opacity: .4; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(10,132,255,.6); outline-offset: 1px; }
button.icon, .icon { background: transparent; padding: 6px; min-height: 0; color: var(--muted); }
button.icon:hover { background: var(--fill-2); color: var(--text); }
button.link { background: none; color: var(--accent); text-decoration: none; }

/* Girdi ve sürgüler */
input { background: var(--fill-2); border: none; border-radius: 10px; padding: 9px 12px; font-size: 15px; }
input:focus { background: var(--fill); border: none; box-shadow: 0 0 0 3px rgba(10,132,255,.45); }
input::placeholder { color: var(--tertiary); }
input[type=range] {
  -webkit-appearance: none; appearance: none; background: transparent; padding: 0; height: 22px; box-shadow: none !important;
}
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: rgba(255,255,255,.22); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 99px; background: rgba(255,255,255,.22); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 99px; background: #fff; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; margin-top: -6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* Segmentli kontroller (Odakta/Molada/Uzakta, galeri ve müzik sekmeleri) */
.seg, .bgTabs, .mTabs {
  display: flex; background: rgba(118,118,128,.24); border: none; border-radius: 10px; padding: 2px; gap: 0;
}
.seg button, .bgTab, .mTab {
  flex: 1; background: transparent; border-radius: 8px; padding: 6px 8px; min-height: 30px; font-size: 13px; font-weight: 500; color: var(--text);
}
.seg button.on, .bgTab.on, .bgTab.yt.on, .mTab.on {
  background: rgba(99,99,102,.9); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.mTabs { position: sticky; top: 0; z-index: 2; margin-bottom: 12px; }
.mTab .pill { background: rgba(255,255,255,.14); }

/* Hap biçimli filtreler */
.bgCats button, .ytSuggest button { background: var(--fill-2); font-size: 13px; padding: 5px 12px; min-height: 28px; }
.bgCats button.on { background: #f5f5f7; color: #1d1d1f; }

/* Üst menü: kompakt simge düğmeleri */
@media (min-width: 761px) {
  .topActions { background: var(--glass); border: .5px solid var(--border-strong); padding: 4px; gap: 2px; box-shadow: var(--shadow); }
  .topActions button { background: transparent; width: 36px; height: 36px; padding: 0; color: var(--text); }
  .topActions button:hover { background: var(--fill); }
  .topActions button > span { display: none; }
  .topActions .smokeBtn, .topActions #smMic, .topActions #shBtn, .topActions #smZenBtn, .topActions #smLeave {
    width: auto; padding: 0 14px; background: var(--fill-2);
  }
  .topActions .smokeBtn > span, .topActions #smMic > span, .topActions #shBtn > span, .topActions #smZenBtn > span, .topActions #smLeave > span { display: inline; }
  .topActions .smokeBtn { background: rgba(255,159,10,.2); color: #ffd60a; }
  .topActions #smLeave { background: var(--accent); color: #fff; }
  .brand { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
}

/* Sayaç */
.clock { font-weight: 200; letter-spacing: -0.04em; }
.phase { font-family: inherit; font-size: 13px; letter-spacing: .02em; text-transform: none; font-weight: 600; color: var(--focus) !important; }
.phase.break { color: var(--break) !important; }
.timerBtns .primary { border-radius: 999px; padding: 10px 26px; font-size: 16px; font-weight: 600; min-width: 128px; }
.timerBtns button:not(.primary) { width: 40px; height: 40px; padding: 0; background: var(--fill); }
#resetBtn { width: auto !important; padding: 0 16px !important; }

/* Kişiler */
.avatar { width: 32px; height: 32px; font-size: 13px; font-weight: 600; }
.avatar::after { width: 10px; height: 10px; border: 2px solid #1c1c1e; }
.pname { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.pstat, .ptask { font-size: 12px; }
.inSmoke .ic { width: 14px; height: 14px; color: #ffd60a; }
.pttBtn { border-radius: 12px; padding: 11px; font-weight: 600; background: var(--fill); }
.pttBtn .ic { width: 18px; height: 18px; }
.pttBtn.live { background: var(--red); color: #fff; }
.pttRow .ic { width: 16px; height: 16px; color: var(--muted); }
.pttRow label { gap: 6px; }

/* Sohbet: iMessage tarzı giriş alanı */
#chatForm, #smChatForm { background: var(--fill-2); border: .5px solid var(--border); border-radius: 20px; padding: 3px 3px 3px 4px; }
#chatForm button, #smChatForm button { width: 30px; height: 30px; min-height: 30px; border-radius: 50%; }
#chatForm .ic, #smChatForm .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.msg .who { font-weight: 600; }
.msg.sys { color: var(--tertiary); }

/* Kartlar, listeler */
.tracks li, #mPls li { border-radius: 10px; background: transparent; }
.tracks li:hover, #mPls li:hover { background: var(--fill-2); }
.tracks li.playing, #mPls li.on { background: rgba(10,132,255,.22); }
.addBtn { background: var(--accent); color: #fff; padding: 5px 12px; min-height: 28px; font-size: 12.5px; }
.addBtn.done { background: rgba(48,209,88,.18); color: #30d158; }
.addBtn .ic { width: 14px; height: 14px; stroke-width: 2.2; }
.ytCard { background: transparent; border-radius: 12px; padding: 4px; }
.ytCard:hover { background: var(--fill-2); }
.ytThumb { border-radius: 10px; }
.bgGrid button { border-radius: 12px; }
.bgGrid button.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,132,255,.35); }
.bgGrid .zoom { background: rgba(0,0,0,.55); border-radius: 50%; }
.bgGrid .zoom .ic { width: 14px; height: 14px; }
.ytRecent i .ic { width: 12px; height: 12px; }
.amb button { justify-content: flex-start; }
.amb button.on { background: rgba(10,132,255,.3); }

/* Pin düğmesi */
.pinBtn { width: 28px; height: 28px; min-height: 0; padding: 0; background: var(--fill-2); color: var(--muted); }
.pinBtn .ic { width: 14px; height: 14px; }
.pinBtn.on { background: var(--accent); color: #fff; opacity: 1; }

/* Mini çalar ve kontroller */
.mPlayer { border-radius: 18px; }
.mpBtns button { width: 34px; height: 34px; padding: 0; background: transparent; }
.mpBtns button:hover { background: var(--fill); }
.mpBtns #mpPlay { background: #f5f5f7; color: #1d1d1f; width: 38px; height: 38px; }
.mpBtns button.on { color: var(--accent); background: transparent; }
#mpSeek, .smCtl #smSeek { height: 14px; }
.smCtl button, .shHead button, .shVolL button { width: 34px; height: 34px; padding: 0; }
.smEmptyIc .ic { width: 44px; height: 44px; margin: 0 auto; stroke-width: 1.4; color: var(--tertiary); }

/* Tam ekran çubukları */
.zenBar, .smZenBar { background: rgba(28,28,30,.7); border: .5px solid var(--border-strong); border-radius: 999px; padding: 4px; gap: 2px; }
.zenBar button, .smZenBar button { width: 36px; height: 36px; min-width: 0; padding: 0; background: transparent; }
.zenBar button:hover, .smZenBar button:hover { background: var(--fill); }
.zenClock { font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 500; color: var(--muted); }
.zenPtt.live, .mPtt.live { background: var(--red) !important; color: #fff; }

/* Mikrofon / paylaş durumları */
.smMic { background: rgba(48,209,88,.2) !important; color: #30d158; }
.smMic.off { background: rgba(255,69,58,.2) !important; color: #ff453a; }
.shBtn.live { background: var(--red) !important; color: #fff; }
.smMicIcon .ic { width: 15px; height: 15px; color: var(--muted); }

/* Toast ve telsiz uyarısı: Dynamic Island hissi */
#toast { background: rgba(28,28,30,.92); border: .5px solid var(--border-strong); border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 500; }
.pttBanner { background: rgba(28,28,30,.92); color: #fff; border: .5px solid var(--border-strong); display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.pttBanner .ic { color: #30d158; width: 16px; height: 16px; }

/* Mobil alt menü: iOS sekme çubuğu */
@media (max-width: 760px) {
  .mNav { background: rgba(22,22,24,.85); border-top: .5px solid var(--separator); }
  .mNav button { background: none; min-height: 0; flex-direction: column; gap: 3px; color: #8e8e93; }
  .mNav button .ic { width: 24px; height: 24px; stroke-width: 1.7; }
  .mNav button span { font-size: 10px; font-weight: 500; }
  .mNav button.on { color: var(--accent); }
  .mPtt { background: var(--accent); color: #fff; }
  .mPtt .ic { width: 26px; height: 26px; }
  .topActions button { width: 38px; height: 38px; padding: 0; }
  .topActions button > span { display: none; }
  .topActions .smokeBtn, .smokeTop .topActions button { width: auto; padding: 0 12px; }
  .topActions .smokeBtn > span, .smokeTop .topActions button > span { display: inline; }
}

@media (prefers-reduced-motion: reduce) { button:active { transform: none; } }

@media (max-width: 760px) {
  /* Üst menü tek satır: simgeler biraz küçük, sığmazsa yatay kaydırılır */
  .topActions { flex-wrap: nowrap !important; overflow-x: auto; justify-content: space-between; gap: 4px; }
  .topActions button { width: 36px; height: 36px; min-height: 36px; }
  .topActions .smokeBtn { padding: 0 10px; }
  .smokeTop .topActions { flex-wrap: wrap !important; justify-content: center; }
}

/* ===== Oda seçici ve sesli oda ===== */
.roomSeg { display: inline-flex; background: rgba(118,118,128,.24); border-radius: 999px; padding: 2px; gap: 0; }
.topActions .roomSeg button { width: auto !important; padding: 0 12px !important; height: 32px; min-height: 32px; border-radius: 999px; background: transparent !important; color: var(--text); }
.topActions .roomSeg button > span { display: inline !important; }
.topActions .roomSeg button.on { background: rgba(99,99,102,.95) !important; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.topActions .roomSeg .smokeBtn { color: #ffd60a !important; }
.roomSeg b { font-weight: 500; color: var(--muted); }
body[data-room="silent"] .voiceOnly { display: none !important; }
body[data-room="voice"] .silentOnly { display: none !important; }
#vMessages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; margin-bottom: 10px; }
.vCtl { display: flex; flex-direction: column; gap: 8px; }
.vMic { border-radius: 12px; padding: 11px; font-weight: 600; background: rgba(48,209,88,.2); color: #30d158; }
.vMic.off { background: rgba(255,69,58,.2); color: #ff453a; }
.vVolL { flex-direction: row; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.vVolL input { width: 120px; }
.zenPtt.off, .mPtt.off { background: rgba(255,69,58,.35) !important; color: #fff; }
#people li.speaking .avatar { box-shadow: 0 0 0 3px #30d158, 0 0 12px rgba(48,209,88,.7); }
#people li.vMuted .pname::after { content: ""; }
.inVoice .ic { width: 14px; height: 14px; color: #30d158; }
@media (max-width: 760px) {
  .topActions .roomSeg button { padding: 0 9px !important; font-size: 12.5px; }
  .topActions .roomSeg button .ic { display: none; }
  body[data-mtab="chat"] .mPtt { display: none; }
}

/* ===== Araştırmaya dayalı düzenlemeler ===== */
/* Hedef: başlamayı kolaylaştırır (Focusmate/Study Together'daki temel mekanik) */
.goal { display: block; width: min(420px, 100%); margin: 14px auto 0; text-align: center; background: rgba(0,0,0,.25); border-radius: 999px; padding: 10px 16px; font-size: 14px; }
.goal:focus { text-align: left; }
/* Pasif varlık sinyali: kimse fark edilmeden "yalnız değilim" hissi */
.presence { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: rgba(235,235,245,.75); text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.presence:empty { display: none; }
.presence .dots { display: inline-flex; }
.presence .dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(28,28,30,.9); margin-left: -5px; }
.presence .dots i:first-child { margin-left: 0; }
/* Hazır süreler */
.cfg { flex-direction: column; align-items: center; gap: 10px; }
.cfg > label, .cfg > #cfgSave { display: inline-flex; }
.presets { display: inline-flex; background: rgba(118,118,128,.24); border-radius: 10px; padding: 2px; }
.presets button { background: transparent; border-radius: 8px; min-height: 30px; padding: 4px 12px; font-size: 13px; }
.presets button.on { background: rgba(99,99,102,.95); }
/* Odak bloğu: sohbet görünür ama sakin */
.focusHint { display: none; margin: -4px 0 8px; font-size: 12px; color: var(--muted); }
body.inFocus .layout > .chat .focusHint { display: block; }
body.inFocus .layout > .chat #messages, body.inFocus .layout > .chat #vMessages { opacity: .55; transition: opacity .4s; }
body.inFocus .layout > .chat:hover #messages, body.inFocus .layout > .chat:focus-within #messages,
body.inFocus .layout > .chat:hover #vMessages, body.inFocus .layout > .chat:focus-within #vMessages { opacity: 1; }
body.inFocus #mChatBadge { display: none; }
@media (max-width: 760px) { .goal { width: 100%; } }
/* Oda seçici: 3 uzun etiket sığsın */
.topActions .roomSeg .smokeBtn { color: #ffd60a !important; }
@media (max-width: 760px) { .topActions .roomSeg button { font-size: 12px; padding: 0 8px !important; } }
/* Eski bas-konuş kalıntısı: konuşan kişinin adının yanındaki emoji */
#people li.speaking .pname::after { content: none !important; }
@media (max-width: 760px) {
  /* Oda seçici kendi satırında, tam genişlik; diğer düğmeler üstte */
  .topActions { flex-wrap: wrap !important; overflow: visible; justify-content: center; row-gap: 6px; }
  .topActions .roomSeg { order: 2; width: 100%; display: flex; }
  .topActions .roomSeg button { flex: 1; justify-content: center; }
}

/* ===== Oda renkleri ve üst bar düzeni ===== */
:root { --room-rgb: 255,149,0; }                       /* Çalışma odası: turuncu */
body[data-room="voice"] { --room-rgb: 10,132,255; }     /* Grup çalışma: mavi */
#smoke { --room-rgb: 48,209,88; }                       /* Mola odası: yeşil */
.topbar.glass, .smokeTop.glass {
  background: rgba(var(--room-rgb), .55) !important;   /* saydamlık eski cam ile aynı (.55) */
  border: .5px solid rgba(255,255,255,.14) !important;
  backdrop-filter: blur(12px) saturate(150%) !important; -webkit-backdrop-filter: blur(12px) saturate(150%) !important;
  box-shadow: var(--shadow) !important; border-radius: 999px !important;
  transition: background-color .45s ease;
}
.topbar { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 6px 8px !important; }
.tbLeft { display: flex; gap: 2px; justify-self: start; }
.topbar .topActions { justify-self: end; background: transparent !important; border: none !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; padding: 0 !important; }
.tbLeft button { background: transparent; width: 36px; height: 36px; padding: 0; color: #fff; }
.tbLeft button:hover, .topbar .topActions > button:hover { background: rgba(255,255,255,.18); }
.topbar .topActions > button { color: #fff; }
.roomTitle {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  font-size: 22px !important; font-weight: 700 !important; letter-spacing: -0.03em; color: #fff;
  text-shadow: 0 1px 10px rgba(0,0,0,.35); white-space: nowrap; justify-self: center; text-align: center;
}
.topbar .roomSeg { background: rgba(0,0,0,.22); }
.topActions .roomSeg button.on { background: rgba(255,255,255,.28) !important; }
.topActions .roomSeg .smokeBtn { color: #fff !important; }
/* Mola odası barı: başlık ortada */
.smokeTop { display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 8px !important; }
.smokeTop .roomTitle { grid-column: 2; }
.smokeTop .topActions { grid-column: 3; justify-self: end; background: transparent !important; border: none !important; box-shadow: none !important; backdrop-filter: none !important; }
.smokeTop .topActions button { color: #fff; }
.smokeTop .topActions #smLeave { background: rgba(0,0,0,.25) !important; }
@media (max-width: 760px) {
  .topbar, .smokeTop { grid-template-columns: auto 1fr auto; border-radius: 18px !important; row-gap: 6px; }
  .topbar .roomTitle { display: block !important; font-size: 17px !important; }
  .topbar .topActions { grid-column: 1 / -1; justify-self: stretch; }
  .smokeTop { grid-template-columns: 1fr; }
  .smokeTop .roomTitle, .smokeTop .topActions { grid-column: 1; justify-self: center; }
}

/* Üst bar ince ayar */
.topActions .roomSeg .smokeBtn, .topActions .roomSeg button { font-weight: 500 !important; }
.tbRight { display: flex; align-items: center; gap: 2px; }
.tbRight button { background: transparent; width: 36px; height: 36px; padding: 0; color: #fff; }
.tbRight button:hover { background: rgba(255,255,255,.18); }
.topbar .topActions { display: flex; align-items: center; gap: 8px; }
.smokeTop { grid-template-columns: 1fr auto 1fr; }
.smokeTop .smLeft { grid-column: 1; display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.smokeTop .roomTitle { grid-column: 2; }
.smokeTop .topActions { grid-column: 3; display: flex; gap: 6px; flex-wrap: nowrap !important; }
.smokeTop button { background: rgba(0,0,0,.2) !important; color: #fff !important; height: 34px; min-height: 34px; }
.smokeTop .smMic.off { background: rgba(255,69,58,.55) !important; }
.smokeTop .shBtn.live { background: #ff453a !important; }
.smokeTop .smVolL { color: #fff; display: flex; align-items: center; gap: 6px; }
.smokeTop .smVolL input { width: 90px; }
@media (max-width: 1150px) and (min-width: 761px) {
  .smokeTop .smLeft button > span, .smokeTop .topActions #smZenBtn > span { display: none; }
  .smokeTop .smLeft button, .smokeTop #smZenBtn { width: 36px; padding: 0 !important; }
}
@media (max-width: 760px) {
  .topbar { grid-template-columns: auto 1fr auto; grid-template-areas: "title title title" "left . right" "seg seg seg"; row-gap: 4px; }
  .topbar .roomTitle { grid-area: title; }
  .topbar .tbLeft { grid-area: left; }
  .topbar .topActions { display: contents; }
  .topbar .tbRight { grid-area: right; justify-self: end; }
  .topbar .roomSeg { grid-area: seg; width: 100%; display: flex; order: 0; }
  .topbar .roomSeg button { flex: 1; justify-content: center; }
  .topbar { padding-top: 8px !important; }
  .smokeTop { grid-template-columns: 1fr; row-gap: 6px; }
  .smokeTop .roomTitle { grid-column: 1; grid-row: 1; }
  .smokeTop .smLeft { grid-column: 1; grid-row: 2; justify-self: center; flex-wrap: wrap; justify-content: center; }
  .smokeTop .topActions { grid-column: 1; grid-row: 3; justify-self: center; }
}
/* Mola barı sol grup: metinli düğmeler genişliğini kendisi alsın */
.smokeTop .smLeft button { width: auto !important; padding: 0 12px !important; gap: 6px; white-space: nowrap; }
.smokeTop .smLeft button > span { display: inline !important; }
@media (max-width: 1150px) and (min-width: 761px) {
  .smokeTop .smLeft button > span { display: none !important; }
  .smokeTop .smLeft button { width: 36px !important; padding: 0 !important; }
}
/* Oda barı renk dolgusu yarıya indi (.55 → .28) */
.topbar.glass, .smokeTop.glass { background: rgba(var(--room-rgb), .28) !important; }
/* Oda barı renk dolgusu tekrar yarıya indi (.28 → .14) */
.topbar.glass, .smokeTop.glass { background: rgba(var(--room-rgb), .14) !important; }

/* Oda başlığı: zarif serif (Instrument Serif), Türkçe karakter destekli */
.roomTitle {
  font-family: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif !important;
  font-weight: 400 !important; font-size: 30px !important; letter-spacing: 0.005em !important; line-height: 1;
  font-feature-settings: "liga" 1, "kern" 1;
}
body.titleFraunces .roomTitle { font-family: "Fraunces", Georgia, serif !important; font-weight: 500 !important; font-size: 25px !important; letter-spacing: -0.01em !important; font-variation-settings: "opsz" 72; }
@media (max-width: 760px) { .roomTitle { font-size: 24px !important; } body.titleFraunces .roomTitle { font-size: 20px !important; } }

/* Oda başlığı: Apple'ın SF Pro Display'i (Apple cihazlarında sistem yazı tipi), diğerlerinde en yakın sistem karşılığı */
.roomTitle, body.titleFraunces .roomTitle {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, "Helvetica Neue", sans-serif !important;
  font-weight: 600 !important; font-size: 24px !important; letter-spacing: -0.022em !important;
  font-variation-settings: normal; font-feature-settings: normal;
}
@media (max-width: 760px) { .roomTitle, body.titleFraunces .roomTitle { font-size: 19px !important; } }
