/* Anahtar Meet — tema */
:root {
  --bg: #0b1220;
  --bg-2: #111a2e;
  --surface: #18223a;
  --surface-2: #1f2b48;
  --border: #2a3656;
  --text: #e6ecf7;
  --text-dim: #94a3c4;
  --primary: #4f7cff;
  --primary-hover: #6a91ff;
  --danger: #ef4444;
  --ok: #22c55e;
  --warn: #f59e0b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ============ FİLİGRAN ARKA PLAN (toplantı odası hariç) ============ */
.page-landing::before,
.page-dashboard::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('/static/arkaPlan.png') center center / cover no-repeat;
  opacity: 0.015;
  pointer-events: none;
  z-index: 0;
}

/* ============ LANDING ============ */
.page-landing {
  min-height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 600px at 50% -10%, #1a2750 0%, transparent 60%),
    var(--bg);
  padding: 24px;
}

.landing-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 28px 24px;
  box-shadow: var(--shadow);
}

.brand { text-align: center; margin-bottom: 28px; }
.brand-logo {
  width: auto;
  height: 100px;
  max-width: 90%;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 12px 20px;
  margin-bottom: 18px;
}
.brand-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.brand-sub {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 14px;
}

.form { display: flex; flex-direction: column; gap: 16px; }
/* hidden HTML attribute display: flex'i geçersiz kılmıyor — manuel ekle */
.form[hidden], .field[hidden] { display: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; color: var(--text-dim); padding-left: 2px; }
.field input {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus {
  border-color: var(--primary);
  background: #15203a;
}

.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.btn {
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.05s, background 0.15s, opacity 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--primary); }

.error {
  color: var(--danger);
  font-size: 14px;
  margin: 4px 0 0;
  text-align: center;
}

.landing-foot {
  margin-top: 24px;
  text-align: center;
  color: var(--text-dim);
}

/* ============ DASHBOARD ============ */
.page-dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 600px at 50% -10%, #1a2750 0%, transparent 60%),
    var(--bg);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 22px;
  background: rgba(24, 34, 58, 0.6);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 16px;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px 4px 4px;
}
.user-chip-text { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip-name { font-size: 13px; font-weight: 600; }
.user-chip-role { font-size: 11px; color: var(--text-dim); }

.user-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: white;
}

.dashboard-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 0;
}

/* Dashboard büyük logo — top bar ile kart arasında ortalanır */
.dashboard-logo {
  width: auto;
  max-width: 90%;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(79, 124, 255, 0.15));
  margin-bottom: 20px;
}
.dashboard-logo[hidden] { display: none; }

/* Şeffaf hero card */
.hero-card.transparent {
  background: rgba(24, 34, 58, 0.4);
  backdrop-filter: blur(12px);
  border-color: rgba(42, 54, 86, 0.5);
}

.hero-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
}
.hero-header {
  text-align: center;
  margin-bottom: 24px;
}
.hero-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 12px;
}
.hero-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.hero-sub {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
  max-width: 360px;
  margin: 0 auto;
}

.btn-lg {
  padding: 16px 18px;
  font-size: 17px;
}

.dashboard-foot {
  margin-top: 8px;
}

/* Yönetim butonu daha belirgin */
.admin-btn {
  background: rgba(79, 124, 255, 0.12);
  border: 1px solid rgba(79, 124, 255, 0.4);
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-btn:hover {
  background: rgba(79, 124, 255, 0.22);
  border-color: var(--primary);
  color: var(--primary-hover);
}

/* Hero card geniş varyant */
.hero-card.wide { max-width: 560px; }
.hero-header.compact { margin-bottom: 18px; }
.hero-header.compact .hero-logo { width: 56px; height: 56px; margin-bottom: 8px; }
.hero-header.compact .hero-title { font-size: 22px; }

/* "ya da" bölücü çizgi */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 18px;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}

/* Kompakt katıl formu */
.join-inline { gap: 8px; }
.join-inline .field span { font-size: 13px; }

/* Slug üretici satır */
.row-with-btn {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.row-with-btn input { flex: 1 1 auto; }
.row-with-btn .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Toplantı seçenekleri fieldset */
.opts {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px 14px;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.opts legend {
  font-size: 12px;
  color: var(--text-dim);
  padding: 0 6px;
}
.opt-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
}
.opt-row input { margin-top: 3px; accent-color: var(--primary); }
.opt-row strong { display: block; font-size: 14px; }
.opt-row small { display: block; color: var(--text-dim); font-size: 12px; margin-top: 2px; }

/* Ana ekran grid */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.home-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.05s;
}
.home-btn:hover { border-color: var(--primary); background: #15203a; }
.home-btn:active { transform: translateY(1px); }
.home-btn-icon {
  font-size: 28px;
  flex: 0 0 auto;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(79,124,255,0.12);
  border-radius: 12px;
}
.play-icon::after {
  content: '';
  display: block;
  width: 0; height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent white;
}
.home-btn-text { display: flex; flex-direction: column; }
.home-btn-text strong { font-size: 14px; color: var(--text); }
.home-btn-text small { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* View header */
.view-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.view-header h2 { margin: 0; font-size: 18px; }
.back-btn {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.back-btn:hover { border-color: var(--primary); color: var(--text); }

/* Zamanlama satırı */
.schedule-row {
  display: flex; gap: 12px;
}
.schedule-row .field { flex: 1; }
.schedule-row input { color-scheme: dark; }

/* Toplantılarım listesi */
.meetings-list {
  display: flex; flex-direction: column; gap: 8px;
}
.meeting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  transition: border-color 0.15s;
}
.meeting-row:hover { border-color: var(--surface-2); }
.meeting-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.meeting-info strong { font-size: 14px; color: var(--text); }
.meeting-info small { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.meeting-actions { display: flex; gap: 6px; flex: 0 0 auto; }

@media (max-width: 500px) {
  .home-grid { grid-template-columns: 1fr; }
  .meeting-row { flex-direction: column; align-items: stretch; }
  .meeting-actions { justify-content: flex-end; }
}

/* Paylaş linki */
.share-link {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.share-link input {
  flex: 1 1 auto;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.share-info {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

/* Misafir bekleme ekranı */
.waiting, .denied {
  text-align: center;
  padding: 30px 8px 8px;
}
.waiting h2, .denied h2 {
  font-size: 18px;
  margin: 16px 0 8px;
}
/* Animasyonlu üç nokta */
.dot-anim::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}
@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.big-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  display: grid;
  place-items: center;
  font-size: 28px;
  margin: 0 auto 12px;
}

/* Oda üst bar — paylaş + lobi butonları */
.bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.bar-btn:hover { border-color: var(--primary); }
.lobby-icon { font-size: 16px; }
.lobby-badge {
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}
.lobby-badge.zero {
  background: var(--surface);
  color: var(--text-dim);
}
.bar-btn.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* Lobi listesi */
.lobby-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  max-height: 50vh;
  overflow-y: auto;
}
.lobby-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
.lobby-info { display: flex; flex-direction: column; }
.lobby-info strong { font-size: 14px; }
.lobby-info small { font-size: 11px; }
.lobby-actions { display: flex; gap: 6px; }

/* ============ Eski user-info (artık kullanılmıyor ama kalsın) ============ */
.user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 18px;
  font-size: 14px;
}
.user-info-actions { display: flex; align-items: center; gap: 10px; }
.link {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
}
.link:hover { color: var(--primary-hover); }
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}

.role-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  border: 1px solid var(--border);
}
.role-admin { color: #fbbf24; border-color: #92580d; background: #2a1d05; }
.role-user  { color: #94a3c4; border-color: var(--border); background: var(--bg-2); }

.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
}
.btn-danger:hover { background: #dc2626; }

/* ============ ADMIN ============ */
.page-admin {
  min-height: 100vh;
  background: var(--bg);
}
.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.admin-bar-left { display: flex; align-items: center; gap: 12px; }
.admin-bar-right { display: flex; align-items: center; gap: 14px; }

.admin-main {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  gap: 20px;
}
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px;
}
.admin-card h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
}

.field select {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  outline: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.card-header h2 { margin: 0; font-size: 20px; }
.small { font-size: 12px; }
.center { text-align: center; }
.pad { padding: 30px 12px; }

.btn-icon {
  font-size: 18px;
  font-weight: 600;
  margin-right: 4px;
  display: inline-block;
  line-height: 1;
}

/* Kullanıcı listesi */
.user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
}
.user-row:hover { border-color: var(--surface-2); background: #15203a; }

.user-avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: white;
  letter-spacing: 0.5px;
}
.user-info-cell { flex: 1 1 auto; min-width: 0; }
.user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.user-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-dim);
}
.user-username { color: var(--text-dim); }
.dot { opacity: 0.5; }
.user-actions { flex: 0 0 auto; }

.btn-icon-only {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-icon-only:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
}

/* Modal */
.modal-card {
  max-width: 480px;
  width: calc(100% - 32px);
  text-align: left;
  padding: 24px 26px 22px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-header h3 { margin: 0; font-size: 18px; }
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}
.modal-close:hover { color: var(--text); background: var(--bg-2); }

.password-row {
  display: flex;
  gap: 8px;
}
.password-row input { flex: 1 1 auto; }

/* Rol seçici */
.role-picker {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.role-picker legend {
  font-size: 13px;
  color: var(--text-dim);
  padding: 0 0 6px;
}
.role-option {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.role-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(79, 124, 255, 0.1);
}
.role-option input { margin: 0; accent-color: var(--primary); }
.role-option strong { display: block; font-size: 14px; }
.role-option small { display: block; color: var(--text-dim); font-size: 12px; margin-top: 2px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

@media (max-width: 720px) {
  .user-info { flex-direction: column; align-items: stretch; }
  .user-info-actions { justify-content: space-between; }
  .admin-main { padding: 0 10px; }
  .admin-card { padding: 16px; }

  .top-bar { padding: 12px 14px; }
  .top-bar-right { gap: 8px; }
  .user-chip { padding: 3px 10px 3px 3px; }
  .user-chip-name { font-size: 12px; }
  .user-chip-role { display: none; }

  .dashboard-main { padding: 24px 14px; }
  .hero-card { padding: 28px 22px 22px; border-radius: 16px; }
  .hero-title { font-size: 22px; }
  .hero-sub { font-size: 13px; }
}

/* ============ LOADING ============ */
.loading-screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg);
}
.loading-screen[hidden] { display: none; }

/* ============ PRE-JOIN ============ */
.prejoin {
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center;
  background: radial-gradient(800px 400px at 50% 30%, #1a2750 0%, transparent 60%), var(--bg);
  padding: 24px;
}
.prejoin[hidden] { display: none; }

.pj-card {
  display: flex; gap: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 720px; width: 100%;
}
.pj-left {
  flex: 0 0 300px; display: flex; flex-direction: column; gap: 12px;
}
.pj-right {
  flex: 1; display: flex; flex-direction: column; gap: 16px; justify-content: center;
}

.pj-video-wrap {
  position: relative; width: 300px; height: 225px;
  border-radius: 14px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--border);
}
.pj-video-wrap video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scaleX(-1); /* ayna efekti */
}
.pj-placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #1d2a4d, #2a3a66);
  font-size: 64px; font-weight: 700; color: var(--text);
}
.pj-cam-off {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.7); color: var(--text-dim);
  padding: 4px 14px; border-radius: 8px; font-size: 12px;
}

.pj-controls {
  display: flex; gap: 8px; justify-content: center;
}
.pj-ctrl {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 16px; font-size: 14px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pj-ctrl:hover { border-color: var(--primary); }
.pj-ctrl.off {
  background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4);
  color: #ffb4b4;
}

.pj-logo { width: 48px; height: 48px; border-radius: 12px; }

.pj-field {
  display: flex; flex-direction: column; gap: 6px;
}
.pj-field[hidden] { display: none; }
.pj-field label {
  font-size: 13px; color: var(--text-dim); padding-left: 2px;
}
.pj-field input {
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: 15px; outline: none;
}
.pj-field input:focus { border-color: var(--primary); }

.pj-bg-options {
  display: flex; gap: 5px; flex-wrap: wrap;
}
.pj-bg {
  padding: 7px 10px; border-radius: 8px;
  background: var(--bg-2); color: var(--text-dim);
  border: 1px solid var(--border); font-size: 12px;
  cursor: pointer; transition: all 0.15s;
}
.pj-bg:hover { border-color: var(--primary); color: var(--text); }
.pj-bg.active {
  background: rgba(79,124,255,0.15); border-color: var(--primary);
  color: var(--primary);
}

.pj-join-btn { margin-top: 8px; }

/* Profil fotosu */
.profile-photo-section {
  display: flex; align-items: center; gap: 16px; margin-bottom: 8px;
}
.profile-photo-preview {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--border);
  display: grid; place-items: center;
  font-size: 28px; font-weight: 700; color: var(--text-dim);
  overflow: hidden; flex: 0 0 auto;
}
.profile-photo-preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.profile-photo-actions {
  display: flex; flex-direction: column; gap: 6px;
}


@media (max-width: 640px) {
  .pj-card { flex-direction: column; padding: 20px; gap: 20px; }
  .pj-left { flex: none; align-items: center; }
  .pj-video-wrap { width: 100%; max-width: 300px; height: 200px; }
}

/* ============ ROOM ============ */
.page-room {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  position: fixed;
  inset: 0;
  touch-action: none;
}

.room-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.room-bar-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.room-bar-center {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; min-width: 0; flex: 0 0 auto;
}
.bar-logo {
  width: auto; height: 36px;
  object-fit: contain;
  border-radius: 0;
}
.bar-logo-big {
  width: auto;
  height: 38px;
  border-radius: 0;
  object-fit: contain;
}
.room-bar-right { flex: 1; display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.room-meta { display: flex; flex-direction: column; min-width: 0; }
.room-meta strong {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
}
.muted { color: var(--text-dim); font-size: 12px; }

.status {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.status-connecting { color: var(--warn); }
.status-ok { color: var(--ok); }
.status-err { color: var(--danger); }

/* Room body: video + sağ panel yan yana */
.room-body {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* Speaker view */
.video-area {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  min-width: 0;
  background: var(--bg);
}

/* ===== PANEL OK BUTONU ===== */
.panel-arrow {
  position: absolute;
  right: 300px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  width: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 2px;
  gap: 4px;
  transition: right 0.25s ease, color 0.15s, background 0.15s;
}
.panel-arrow:hover { color: var(--text); background: var(--surface-2); }
.panel-arrow.collapsed { right: 0; }
.panel-arrow:not(.collapsed) { right: 300px; }
.arrow-icon { font-size: 18px; line-height: 1; }
.panel-arrow.has-notification::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 10px;
  height: 10px;
  background: var(--danger);
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.arrow-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ===== SAĞ PANEL ===== */
.right-panel {
  flex: 0 0 300px;
  width: 300px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow: hidden;
  transition: flex-basis 0.25s ease, width 0.25s ease, max-width 0.25s ease, opacity 0.2s;
}
.right-panel.hidden {
  flex-basis: 0;
  width: 0;
  max-width: 0;
  opacity: 0;
  border-left: none;
  overflow: hidden;
  pointer-events: none;
}

.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.panel-tab {
  flex: 1; padding: 12px 6px;
  background: none; border: none;
  color: var(--text-dim); font-size: 13px; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.panel-tab:hover { color: var(--text); }
.panel-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.chat-badge {
  background: var(--danger); color: white;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px;
  margin-left: 4px;
}

.panel-content {
  flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden;
}
.panel-content[hidden] { display: none; }

.panel-search {
  padding: 10px 10px 6px; flex: 0 0 auto;
}
.panel-search input {
  width: 100%; padding: 8px 10px;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; outline: none;
}
.panel-search input:focus { border-color: var(--primary); }

.sp-bulk {
  display: flex; gap: 6px; padding: 4px 10px 6px; flex-wrap: wrap; flex: 0 0 auto;
}
.sp-bulk[hidden] { display: none; }

.sp-list {
  flex: 1 1 auto; overflow-y: auto; padding: 2px 6px 6px;
  scrollbar-width: thin;
}
.sp-list::-webkit-scrollbar { width: 5px; }
.sp-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.p-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; transition: background 0.15s;
}
.p-row:hover { background: var(--bg-2); }

.p-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #1d2a4d, #2a3a66);
  color: var(--text); display: grid; place-items: center;
  font-weight: 700; font-size: 12px; flex: 0 0 auto;
}

.p-info { flex: 1 1 auto; min-width: 0; }
.p-name {
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.you-badge {
  display: inline-block; font-size: 9px; padding: 1px 5px;
  border-radius: 999px; background: rgba(79,124,255,0.2);
  color: var(--primary); margin-left: 3px; font-weight: 600;
}

.p-status, .p-controls { display: flex; gap: 4px; flex: 0 0 auto; align-items: center; }
.p-status span { font-size: 13px; opacity: 0.6; }
.p-status span.off { opacity: 0.25; }

.p-ctrl-btn {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg-2);
  color: var(--text); font-size: 12px; cursor: pointer;
  display: grid; place-items: center; transition: background 0.15s;
}
.p-ctrl-btn:hover { border-color: var(--primary); background: rgba(79,124,255,0.15); }
.p-ctrl-btn.off { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); }
.p-ctrl-btn.disabled { opacity: 0.3; cursor: not-allowed; }

/* Kapalı mic/kamera — kırmızı çapraz çizgi */
.icon-muted {
  position: relative;
  display: inline-block;
}
.red-slash {
  position: absolute;
  top: -2px; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.red-slash::after {
  content: '';
  position: absolute;
  top: 50%; left: -2px;
  width: calc(100% + 4px);
  height: 2px;
  background: #ef4444;
  transform: rotate(-45deg);
  transform-origin: center;
  border-radius: 1px;
}

.p-empty { padding: 20px 10px; text-align: center; color: var(--text-dim); font-size: 13px; }

/* ===== SOHBET ===== */
.chat-messages {
  flex: 1 1 auto; overflow-y: auto; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 6px;
  scrollbar-width: thin;
}
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.chat-msg {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px 10px; max-width: 92%;
}
.chat-msg-me { align-self: flex-end; background: rgba(79,124,255,0.15); border-color: rgba(79,124,255,0.3); }
.chat-msg-head { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 2px; }
.chat-msg-name { font-size: 11px; font-weight: 600; color: var(--primary); }
.chat-msg-me .chat-msg-name { color: var(--primary-hover); }
.chat-msg-time { font-size: 10px; color: var(--text-dim); }
.chat-msg-text { font-size: 13px; color: var(--text); word-break: break-word; line-height: 1.4; }

.chat-input-row {
  display: flex; gap: 6px; padding: 8px 10px;
  border-top: 1px solid var(--border); flex: 0 0 auto;
}
.chat-input-row input {
  flex: 1; padding: 8px 10px; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; font-size: 13px; outline: none;
}
.chat-input-row input:focus { border-color: var(--primary); }
.chat-input-row .btn { padding: 8px 12px; }

.main-stage {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  min-width: 0;
}
.main-stage .tile {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
}

.thumbnail-strip {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 12px 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.thumbnail-strip::-webkit-scrollbar { width: 6px; }
.thumbnail-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== GRID MODE ===== */
.video-area.grid-mode {
  flex-direction: column;
}
.video-area.grid-mode .main-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 4px;
  padding: 4px;
  overflow: hidden;
}
.video-area.grid-mode .main-stage .tile {
  flex: 0 0 auto;
}
.video-area.grid-mode .main-stage .tile {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
}
/* Kişi sayısına göre boyut — JS ile --grid-size set edilir */
.video-area.grid-mode .main-stage .tile {
  width: var(--grid-size, 180px);
  height: var(--grid-size, 180px);
  max-width: var(--grid-size, 180px);
  max-height: var(--grid-size, 180px);
}
.video-area.grid-mode .main-stage .tile video {
  object-fit: cover;
}
.video-area.grid-mode .main-stage .tile-placeholder {
  font-size: 36px;
}

/* Grid navigasyon */
.grid-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex: 0 0 auto;
}
.grid-nav-btn {
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 14px; font-size: 14px; cursor: pointer;
  transition: background 0.15s;
}
.grid-nav-btn:hover:not(:disabled) { border-color: var(--primary); }
.grid-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.grid-nav-info { font-size: 12px; color: var(--text-dim); text-align: center; }
.grid-search {
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 5px 10px; font-size: 12px; outline: none; width: 130px;
}
.grid-search:focus { border-color: var(--primary); }
.video-area.grid-mode .main-stage .tile-name {
  font-size: 11px;
  padding: 3px 8px;
}

/* Tile - hem main hem thumbnail için */
.tile {
  position: relative;
  background: var(--bg-2);
  border: 2px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  width: 100%;
  flex: 0 0 auto;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}
.tile:hover { border-color: var(--surface-2); }
.tile.main { cursor: zoom-out; }
.tile.speaking { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.video-area.grid-mode .tile.speaking {
  transform: scale(1.06);
  z-index: 2;
  box-shadow: 0 0 0 2px var(--primary), 0 4px 16px rgba(79, 124, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tile.pinned { border-color: #fbbf24; }
.tile.pinned .tile-pin { display: block; }

.tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: black;
}
/* Kendi kameramız ayna görüntüsü olsun */
.tile.local-tile video {
  transform: scaleX(-1);
}
/* Ekran paylaşımı — mirror YOK + object-fit contain (tam sığsın) */
.tile.screen-share-tile video {
  transform: none !important;
  object-fit: contain !important;
  background: #000;
}
.tile.screen-share-tile {
  background: #000;
}

.tile-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: url('/static/cam-off.png') center center / cover no-repeat;
  color: transparent;
  font-size: 0;
}
.main-stage .tile-placeholder { }

.tile-name {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  max-width: calc(100% - 16px);
  line-height: 1.3;
  pointer-events: none;
}
.main-stage .tile-name { font-size: 14px; padding: 6px 12px; }

/* Body'deki audio element'leri gizle ama aktif tut */
body > audio {
  position: absolute;
  width: 0; height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Mikrofon durumu */
.tile-mic {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 14px;
  background: rgba(0,0,0,0.5);
  border-radius: 6px;
  padding: 2px 5px;
  pointer-events: none;
  line-height: 1;
}
.tile-mic.mic-off {
  background: rgba(239,68,68,0.6);
}

/* Sinyal kalitesi göstergesi */
.tile-signal {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  pointer-events: none;
}
.tile-signal span {
  display: block;
  width: 4px;
  border-radius: 1px;
  background: rgba(255,255,255,0.2);
  transition: background 0.3s;
}
.tile-signal span:nth-child(1) { height: 5px; }
.tile-signal span:nth-child(2) { height: 8px; }
.tile-signal span:nth-child(3) { height: 11px; }
.tile-signal span:nth-child(4) { height: 14px; }

.tile-pin {
  position: absolute;
  right: 28px;
  top: 8px;
  background: rgba(251, 191, 36, 0.9);
  color: #1a1100;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  display: none;
  pointer-events: none;
}

/* Controls */
.controls {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.ctrl {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 16px;
  min-width: 72px;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.ctrl:hover { border-color: var(--primary); }
.ctrl:active { transform: translateY(1px); }
.ctrl-icon { font-size: 22px; line-height: 1; }
.ctrl-label { font-size: 11px; color: var(--text-dim); }
.ctrl-off { background: #3a1f24; border-color: #6b2730; }
.ctrl-off .ctrl-label { color: #ffb4b4; }
.ctrl-on { background: #1f3a2a; border-color: #276b46; }
.ctrl-danger { background: var(--danger); border-color: var(--danger); }
.ctrl-danger .ctrl-label { color: #ffe2e2; }
.ctrl-danger:hover { background: #dc2626; }

.controls-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: rgba(148, 163, 196, 0.45);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.3px;
  pointer-events: none;
  white-space: nowrap;
}
.controls-label-left { left: 14px; text-align: left; }
.controls-label-right { right: 14px; text-align: right; }
.controls { position: relative; }
.ctrl-end {
  background: #4a0e0e;
  border-color: #7a1d1d;
  color: #ffb4b4;
}
.ctrl-end:hover { background: #7a1d1d; border-color: var(--danger); color: white; }
.ctrl-end .ctrl-label { color: #ffb4b4; }

/* Overlay */
.overlay {
  position: fixed; inset: 0;
  background: rgba(5, 10, 25, 0.75);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 50;
}
/* hidden HTML attribute'u display: grid'i geçersiz kılmıyor — manuel ekle */
.overlay[hidden] { display: none; }
.overlay-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 32px;
  border-radius: 16px;
  text-align: center;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ============ MOBILE ============ */
@media (max-width: 720px) {
  .room-bar { padding: 10px 12px; }
  .bar-logo { width: 30px; height: 30px; }
  .room-meta strong { font-size: 14px; max-width: 40vw; }
  .room-bar-right { gap: 4px; }
  .bar-btn { padding: 6px 8px; font-size: 12px; }

  .room-body { position: relative; }

  .video-area { flex-direction: column; }
  .main-stage { padding: 4px; }
  .thumbnail-strip {
    flex: 0 0 80px;
    flex-direction: row;
    padding: 4px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .thumbnail-strip .tile {
    width: 110px;
    flex: 0 0 110px;
  }

  /* Mobilde ok butonu */
  .panel-arrow { right: 0; }
  .panel-arrow:not(.collapsed) { right: 280px; }

  /* ===== MOBİL TOPLANTI RESPONSIVE ===== */

  /* Video alanı tam ekran */
  .room-body { position: relative; flex: 1; }
  .video-area { flex: 1; }
  .main-stage { padding: 2px; }

  /* Grid tile'ları mobilde cover */
  .tile video { object-fit: cover; }

  /* Thumbnail strip — yatay, altta */
  .thumbnail-strip {
    flex: 0 0 80px;
    flex-direction: row;
    padding: 4px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .thumbnail-strip .tile { width: 100px; flex: 0 0 100px; }

  /* Top bar kompakt */
  .room-bar { padding: 6px 10px; }
  .room-bar-left { gap: 6px; }
  .bar-logo { height: 28px; }
  .room-bar-center strong { font-size: 12px; }
  .room-bar-center .muted { font-size: 10px; }
  .room-bar-right { gap: 3px; }
  .bar-btn { padding: 4px 6px; font-size: 11px; }

  /* Kontrol butonları — kompakt */
  .controls {
    gap: 3px;
    padding: 4px;
    padding-bottom: calc(4px + env(safe-area-inset-bottom));
  }
  .ctrl { min-width: 36px; padding: 6px 4px; }
  .ctrl-icon { font-size: 18px; }
  .ctrl-label { display: none; }
  .controls-label { display: none; }

  /* Mobilde gereksiz butonları gizle */
  #btn-draw, #btn-bg, #btn-screen { display: none !important; }

  /* Sağ panel — alttan sheet */
  .right-panel {
    position: absolute;
    left: 0; right: 0; bottom: 0; top: auto;
    height: 40%; max-height: 45%;
    width: 100%; max-width: 100%;
    flex: none;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
    z-index: 40;
    transition: transform 0.25s ease;
  }
  .right-panel.hidden {
    transform: translateY(100%);
    opacity: 1;
    pointer-events: none;
  }

  /* Ok butonu — sağ altta sabit */
  .panel-arrow {
    position: fixed;
    left: auto; top: auto;
    bottom: 56px; right: 6px;
    transform: none;
    width: auto; height: 28px;
    border-radius: 14px;
    padding: 3px 10px;
    flex-direction: row; gap: 4px;
    border: 1px solid var(--border);
    z-index: 45;
  }
  .panel-arrow.collapsed { right: 6px; }
  .panel-arrow:not(.collapsed) { right: 6px; bottom: calc(40% + 56px); }
  .arrow-icon { font-size: 12px; }
  .arrow-label { writing-mode: horizontal-tb; font-size: 9px; }

  /* Grid nav mobilde */
  .grid-nav { padding: 4px 8px; gap: 6px; }
  .grid-nav-btn { padding: 4px 10px; font-size: 12px; }
  .grid-nav-info { font-size: 10px; }
  .grid-search { width: 100px; font-size: 16px; padding: 4px 8px; }

  /* Tüm input'lar 16px — mobilde zoom engelleme */
  input, textarea, select { font-size: 16px !important; }

  /* Tile detayları mobilde küçük */
  .tile-name { font-size: 9px; padding: 2px 5px; }
  .main-stage .tile-name { font-size: 10px; }
  .tile-signal span { width: 3px; }
  .tile-signal span:nth-child(1) { height: 4px; }
  .tile-signal span:nth-child(2) { height: 6px; }
  .tile-signal span:nth-child(3) { height: 8px; }
  .tile-signal span:nth-child(4) { height: 10px; }
  .tile-mic { font-size: 11px; padding: 1px 3px; }

  /* Pre-join mobil */
  .prejoin { padding: 12px; }
  .pj-card { flex-direction: column; padding: 14px; gap: 14px; max-width: 100%; }
  .pj-left { flex: none; align-items: center; }
  .pj-video-wrap { width: 100%; max-width: 260px; height: 170px; }
  .pj-right { gap: 10px; }
  .pj-right h2 { font-size: 15px; }
  .pj-bg-options { gap: 3px; }
  .pj-bg { padding: 5px 7px; font-size: 10px; }
  .pj-ctrl { padding: 6px 12px; font-size: 13px; }

  /* Bg panel mobilde */
  .bg-panel { bottom: 56px; width: calc(100% - 12px); left: 6px; transform: none; }

  /* Audio banner mobilde */
  #audio-banner { font-size: 12px; padding: 8px 16px; top: 50px; }

  /* Login/Landing mobilde */
  .landing-card { padding: 20px 16px; border-radius: 12px; }
  .brand-logo { width: auto; height: 70px; }
  .brand-title { font-size: 20px; }
}

/* ============ ARKA PLAN PANELİ ============ */
.bg-panel {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  z-index: 55;
  box-shadow: var(--shadow);
  animation: panelUp 0.15s ease-out;
}
.bg-panel[hidden] { display: none; }
@keyframes panelUp { from { opacity:0; transform: translateX(-50%) translateY(10px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
.bg-panel-title { font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 10px; text-align: center; }
.bg-panel-options { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.bg-opt {
  padding: 8px 12px; border-radius: 8px;
  background: var(--bg-2); color: var(--text-dim);
  border: 1px solid var(--border); font-size: 12px;
  cursor: pointer; transition: all 0.15s;
}
.bg-opt:hover { border-color: var(--primary); color: var(--text); }
.bg-opt.active { background: rgba(79,124,255,0.15); border-color: var(--primary); color: var(--primary); }

/* ============ ÇİZİM ARACI ============ */
.draw-toolbar {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  z-index: 60;
  box-shadow: var(--shadow);
}
.draw-toolbar[hidden] { display: none; }
.draw-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.draw-btn:hover { transform: scale(1.15); }
.draw-btn.active { border-color: white; }
.draw-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
}
.draw-tool {
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 14px;
  display: grid;
  place-items: center;
}
.draw-tool:hover { border-color: var(--primary); }

.draw-canvas {
  position: fixed;
  z-index: 55;
  cursor: default;
  pointer-events: none;
}
.draw-canvas[hidden] { display: none; }
