:root {
  --zemin: #eef2f7;
  --kart: #ffffff;
  --yazi: #0f172a;
  --soluk: #64748b;
  --cizgi: #d7dee8;
  --ana: #1d4ed8;
  --ana-koyu: #1e40af;
  --tehlike: #dc2626;
  --basari: #15803d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --zemin: #0b1220; --kart: #131c2e; --yazi: #e5ecf6; --soluk: #8b9ab2; --cizgi: #24324a;
    --ana: #3b82f6; --ana-koyu: #2563eb;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--zemin); color: var(--yazi);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
button, input, select { font: inherit; color: inherit; }

/* ---------- Giriş ---------- */
.giris { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.kart { width: 100%; max-width: 380px; background: var(--kart); border: 1px solid var(--cizgi); border-radius: 16px; padding: 24px; box-shadow: 0 8px 30px rgba(15, 23, 42, .08); }
.logo { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 700; margin-bottom: 20px; }
form { display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 600; font-size: 13px; margin-top: 8px; }
label small { font-weight: 400; color: var(--soluk); }
input { padding: 11px 12px; border: 1px solid var(--cizgi); border-radius: 10px; background: transparent; outline: none; }
input:focus { border-color: var(--ana); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ana) 25%, transparent); }
#hedefId { font-size: 22px; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
#baglanDugme { margin-top: 16px; padding: 12px; border: 0; border-radius: 10px; background: var(--ana); color: #fff; font-weight: 700; cursor: pointer; }
#baglanDugme:hover { background: var(--ana-koyu); }
#baglanDugme:disabled { opacity: .6; cursor: wait; }
.durum { min-height: 1.4em; margin: 14px 0 0; color: var(--soluk); }
.durum.hata { color: var(--tehlike); }
.sonlar h2 { font-size: 13px; color: var(--soluk); margin: 18px 0 6px; font-weight: 600; }
.sonlar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sonlar button { border: 1px solid var(--cizgi); background: transparent; border-radius: 999px; padding: 4px 12px; cursor: pointer; font-variant-numeric: tabular-nums; }
.alt { margin-top: 16px; color: var(--soluk); font-size: 12px; }

/* ---------- Uzak ekran ---------- */
.ekran-alani { position: fixed; inset: 0; background: #000; overflow: hidden; touch-action: none; }
.sahne { position: absolute; inset: 0; transform-origin: 0 0; }
#video { width: 100%; height: 100%; object-fit: contain; display: block; cursor: default; user-select: none; -webkit-user-select: none; }
.ekran-alani.kontrolsuz #video { cursor: not-allowed; }

.arac {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; align-items: center; padding: 6px 8px;
  background: rgba(15, 23, 42, .82); color: #fff; border-radius: 12px;
  backdrop-filter: blur(6px); box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  transition: opacity .25s, transform .25s; z-index: 5; max-width: calc(100% - 16px); flex-wrap: wrap; justify-content: center;
}
.arac.gizli { opacity: 0; transform: translate(-50%, -70%); pointer-events: none; }
.arac button, .arac select { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); color: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; min-height: 32px; }
.arac select option { color: #000; }
.arac button:hover { background: rgba(255, 255, 255, .2); }
.arac .tehlike { background: var(--tehlike); border-color: var(--tehlike); }
.istatistik { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; padding: 0 4px; white-space: nowrap; }
.menu-sar { position: relative; }
.menu { position: absolute; top: calc(100% + 6px); right: 0; background: rgba(15, 23, 42, .95); border-radius: 10px; padding: 6px; display: grid; gap: 4px; min-width: 190px; }
.menu[hidden] { display: none; }
.menu button { text-align: left; }
.dokunmatik { display: none; }
@media (pointer: coarse) { .dokunmatik { display: inline-block; } }

.gizli-girdi { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; }
.bilgi-katman { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(15, 23, 42, .88); color: #fff; padding: 10px 16px; border-radius: 10px; max-width: calc(100% - 32px); text-align: center; }

/* ---------- paneller ---------- */
.panel {
  position: absolute; top: 56px; right: 8px; width: min(340px, calc(100% - 16px)); max-height: calc(100% - 72px);
  overflow: auto; background: rgba(15, 23, 42, .95); color: #fff; border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 8px; z-index: 6; box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
}
.panel[hidden] { display: none; }
.panel.genis { width: min(520px, calc(100% - 16px)); }
.panel label { font-size: 12px; opacity: .8; margin: 4px 0 0; font-weight: 600; }
.panel textarea { width: 100%; resize: vertical; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 8px; padding: 8px; color: #fff; font: 13px/1.4 Consolas, monospace; }
.panel button { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.panel button:hover { background: rgba(255, 255, 255, .2); }
.panel-ust { display: flex; justify-content: space-between; align-items: center; }
.panel-ust button { padding: 2px 8px; }
.panel-not { font-size: 12px; opacity: .65; margin: 0; }
.dosya-yol { display: flex; gap: 6px; align-items: center; }
#dosyaYol { font: 12px Consolas, monospace; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; flex: 1; }
.dosya-liste { list-style: none; margin: 0; padding: 0; overflow: auto; max-height: 45vh; min-height: 120px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; }
.dosya-liste li { display: flex; gap: 8px; padding: 7px 10px; cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 13px; }
.dosya-liste li:hover { background: rgba(255, 255, 255, .1); }
.dosya-liste li .ad { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dosya-liste li .boy { opacity: .6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dosya-liste li.bilgi { cursor: default; opacity: .7; }
.aktarimlar { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12.5px; }
.aktarimlar li { display: grid; gap: 3px; }
.aktarimlar progress { width: 100%; height: 6px; }
.aktarimlar .hata { color: #fca5a5; }
.aktarimlar .tamam { color: #86efac; }
.birak-katman { position: absolute; inset: 12px; border: 3px dashed #93c5fd; border-radius: 16px; background: rgba(29, 78, 216, .35); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; z-index: 7; pointer-events: none; }
.birak-katman[hidden] { display: none; }

/* ---------- sohbet, menü, adres defteri ---------- */
.rozet { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.rozet[hidden] { display: none; }
.menu-baslik { font-size: 11px; opacity: .6; padding: 6px 4px 0; text-transform: uppercase; letter-spacing: .05em; }
.menu button.secili::before { content: '✓ '; }
.sohbet-liste { list-style: none; margin: 0; padding: 4px; display: flex; flex-direction: column; gap: 6px; min-height: 160px; max-height: 50vh; overflow: auto; }
.sohbet-liste:empty::before { content: 'Uzak bilgisayardaki kişiye buradan yazabilirsin.'; opacity: .6; font-size: 13px; }
.sohbet-liste li { max-width: 85%; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .12); white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.sohbet-liste li.ben { align-self: flex-end; background: #1d4ed8; }
.sohbet-liste li small { display: block; font-size: 11px; opacity: .7; }
.sohbet-form { display: flex; gap: 6px; }
.sohbet-form input { flex: 1; min-width: 0; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #fff; border-radius: 8px; padding: 8px; }
.kayit-isareti { color: #f87171; font-weight: 700; }
.sonlar li { display: flex; align-items: center; gap: 4px; }
.sonlar .kisi { display: inline-flex; align-items: center; gap: 6px; }
.sonlar .nokta { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex: none; }
.sonlar .nokta.acik { background: #16a34a; }
.sonlar .kisi small { color: var(--soluk); font-variant-numeric: tabular-nums; }
.sonlar .ufak { border: 0; padding: 2px 6px; color: var(--soluk); background: transparent; cursor: pointer; border-radius: 6px; }
.sonlar .ufak:hover { background: var(--cizgi); }
.sonlar ul { flex-direction: column; flex-wrap: nowrap; }
