/* ─── izliyo.com.tr — style.css v8 ─────────────────── */

:root {
  --bg-void:    #080a0d;
  --bg-surface: #0d1117;
  --bg-panel:   #111620;
  --bg-card:    #141921;
  --bg-hover:   #1a2030;
  --bg-input:   #0d1117;

  --border-dim: rgba(255,255,255,0.06);
  --border-mid: rgba(255,255,255,0.12);
  --border-hot: rgba(255,255,255,0.22);

  --accent:     #e8323c;
  --blue:       #2a6aff;
  --blue-dim:   rgba(42,106,255,0.15);
  --blue-glow:  rgba(42,106,255,0.4);
  --green:      #1adb7a;
  --green-dim:  rgba(26,219,122,0.12);
  --amber:      #f5a623;

  --text-primary:   #f0f2f5;
  --text-secondary: #8a95a3;
  --text-muted:     #4a5568;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;

  --topbar-h: 52px;
  --panel-w:  310px;
  --gap:      3px;

  /* Okunabilir font ailesi */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body:    'Inter', 'Space Grotesk', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Mono', monospace;

  --transition: 160ms cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg-void); color: var(--text-primary);
  font-family: var(--font-body); -webkit-font-smoothing: antialiased; font-size: 14px; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }

::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }

/* ─── App shell ──────────────────────────────────────── */
#app { display: flex; flex-direction: column; height: 100vh; }

/* ─── Top bar ────────────────────────────────────────── */
#topbar {
  display: flex; align-items: center;
  height: var(--topbar-h); padding: 0 16px; gap: 8px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-dim);
  flex-shrink: 0; position: relative; z-index: 10;
}
#topbar::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--blue) 30%, var(--accent) 50%, var(--blue) 70%, transparent 100%);
  opacity: .4;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-mark {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 2px; width: 20px; height: 20px;
}
.logo-mark span { display: block; border-radius: 2px; background: var(--blue); }
.logo-mark span:first-child { background: var(--accent); }
.logo-mark span:nth-child(3){ background: var(--accent); opacity: .6; }
.logo-text {
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  letter-spacing: .5px; color: var(--text-primary);
}
.logo-text em { font-style: normal; color: var(--blue); font-weight: 500; font-size: 14px; }

/* Topbar title */
.topbar-center {
  display: flex; flex-direction: row; align-items: center; gap: 12px; flex-shrink: 0;
}
.topbar-title {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 2px; color: var(--text-muted); white-space: nowrap;
}
.topbar-spacer { flex: 1; }

/* Saat — title'ın altında */
.live-indicator {
  display: flex; align-items: center; gap: 7px;
  flex-shrink: 0;
}
#liveClock {
  font-family: var(--font-mono) !important;
  font-size: 15px !important;
  color: var(--green);
  letter-spacing: 0.5px;
  line-height: 1;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: pulse-green 2s infinite; flex-shrink: 0;
}
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(26,219,122,.6); }
  50%      { box-shadow: 0 0 0 4px rgba(26,219,122,0); }
}

/* Arama */
.search-wrap { position: relative; display: flex; align-items: center; }
.search-icon-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-surface); border: 1px solid var(--border-dim); border-radius: var(--radius-md);
  color: var(--text-secondary); transition: all var(--transition); flex-shrink: 0;
}
.search-icon-btn:hover { background: var(--bg-hover); border-color: var(--border-mid); color: var(--text-primary); }
.search-input-hidden {
  width: 0; opacity: 0; padding: 0; border: none; background: none; outline: none;
  color: var(--text-primary); font-size: 13px; pointer-events: none;
  transition: width .25s ease, opacity .25s ease, padding .25s ease;
}
.search-wrap.search-open .search-icon-btn { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }
.search-wrap.search-open .search-input-hidden {
  width: 180px; opacity: 1; padding: 0 10px;
  background: var(--bg-input); border: 1px solid var(--blue);
  border-radius: 0 var(--radius-md) var(--radius-md) 0; border-left: none;
  pointer-events: auto; height: 34px;
}

/* Topbar butonları */
.tb-btn {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  background: var(--bg-surface); border: 1px solid var(--border-dim); border-radius: var(--radius-md);
  color: var(--text-secondary); font-family: var(--font-display);
  font-size: 11px; font-weight: 600; letter-spacing: .8px; white-space: nowrap;
  transition: all var(--transition);
}
.tb-btn:hover { background: var(--bg-hover); border-color: var(--border-mid); color: var(--text-primary); }
.tb-btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.tb-btn-primary:hover { background: #1a5aee; border-color: #1a5aee; color: #fff; }

/* ─── Main ───────────────────────────────────────────── */
#main { display: flex; flex: 1; overflow: hidden; }
#gridArea { flex: 1; overflow: auto; padding: var(--gap); background: var(--bg-void); }
#gridContainer { display: grid; gap: var(--gap); height: 100%; min-height: 100%; }

/* ─── Cell ───────────────────────────────────────────── */
.cell {
  position: relative; background: var(--bg-card);
  border: 1px solid var(--border-dim); border-radius: var(--radius-sm);
  overflow: hidden; transition: border-color var(--transition), box-shadow var(--transition);
}
.cell:hover { border-color: var(--border-hot); z-index: 2; }
.cell.main-cell { border-color: rgba(42,106,255,.5); box-shadow: 0 0 20px rgba(42,106,255,.1); }
.cell iframe { display: block; width: 100%; height: 100%; border: none; background: #000; }

.cell-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 45%);
  pointer-events: none; opacity: 0; transition: opacity var(--transition);
}
.cell:hover .cell-overlay { opacity: 1; }

.cell-name {
  position: absolute; bottom: 8px; left: 42px; right: 36px;
  font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .5px;
  color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--transition), transform var(--transition); pointer-events: none;
}
.cell:hover .cell-name, .cell.main-cell .cell-name { opacity: 1; transform: translateY(0); }

.live-badge {
  position: absolute; top: 7px; right: 7px; pointer-events: none;
  background: var(--accent); color: #fff;
  font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: 1px;
  padding: 2px 6px; border-radius: 2px;
}
.slot-num {
  position: absolute; top: 7px; left: 8px; pointer-events: none;
  font-family: var(--font-mono); font-size: 9px; color: var(--text-muted);
  opacity: 0; transition: opacity var(--transition);
}
.cell:hover .slot-num { opacity: 1; }

.cell-edit {
  position: absolute; bottom: 7px; right: 7px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-sm);
  color: #fff; font-size: 13px;
  opacity: 0; transform: scale(.85);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}
.cell-edit svg { width: 12px; height: 12px; pointer-events: none; }
.cell:hover .cell-edit { opacity: 1; transform: scale(1); }
.cell-edit:hover { background: var(--blue); border-color: var(--blue); }

.cell-mute-btn {
  position: absolute; bottom: 7px; left: 7px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-sm);
  color: #fff; opacity: 0; transform: scale(.85);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 5;
}
.cell:hover .cell-mute-btn { opacity: 1; transform: scale(1); }
.cell-mute-btn:hover { background: var(--blue); border-color: var(--blue); }
.cell-mute-btn .icon-muted, .cell-mute-btn .icon-unmuted { display:flex; align-items:center; justify-content:center; }
.cell-mute-btn.muted   .icon-unmuted { display: none; }
.cell-mute-btn.muted   .icon-muted   { display: flex; }
.cell-mute-btn:not(.muted) .icon-muted   { display: none; }
.cell-mute-btn:not(.muted) .icon-unmuted { display: flex; }
.cell-mute-btn:not(.muted) { opacity:1; background:var(--green); border-color:var(--green); color:#000; }
.cell-mute-btn svg { pointer-events: none; }

.placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 8px; cursor: pointer; transition: background var(--transition);
}
.placeholder:hover { background: var(--bg-hover); }
.placeholder-icon {
  width: 32px; height: 32px; border: 1.5px dashed var(--border-mid);
  border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 18px; line-height: 1;
}
.placeholder:hover .placeholder-icon { border-color: var(--blue); color: var(--blue); }
.placeholder-name { font-family: var(--font-display); font-size: 12px; font-weight: 600; color: var(--text-muted); text-align: center; padding: 0 8px; }
.placeholder-hint { font-size: 10px; color: var(--text-muted); opacity: .6; }
.cell.dimmed { opacity: .2; pointer-events: none; }

/* ─── Settings panel ─────────────────────────────────── */
#settingsPanel {
  width: var(--panel-w); background: var(--bg-panel);
  border-left: 1px solid var(--border-dim);
  display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0;
  transition: width var(--transition), opacity var(--transition);
}
#settingsPanel.hidden { width: 0; opacity: 0; pointer-events: none; overflow: hidden; }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; height: 48px; border-bottom: 1px solid var(--border-dim); flex-shrink: 0;
}
.panel-header-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; color: var(--text-secondary);
}
.panel-close {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border-dim); border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 16px; line-height: 1;
  transition: all var(--transition);
}
.panel-close:hover { background: var(--bg-hover); border-color: var(--border-hot); color: var(--text-primary); }
.panel-body { overflow-y: auto; padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 20px; }
.panel-section {}
.section-label {
  font-family: var(--font-display); font-size: 10px; font-weight: 700;
  letter-spacing: 2px; color: var(--text-muted); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border-dim); }

.layout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; } /* 7 buton: son satır tek */
.layout-btn {
  background: var(--bg-surface); border: 1px solid var(--border-dim); border-radius: var(--radius-md);
  padding: 8px 6px; color: var(--text-secondary);
  font-family: var(--font-display); font-size: 11px; font-weight: 600; text-align: center;
  transition: all var(--transition);
}
.layout-btn:hover { background: var(--bg-hover); border-color: var(--border-mid); color: var(--text-primary); }
.layout-btn.active { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }

.pos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.pos-btn {
  display: flex; align-items: center; gap: 7px; padding: 8px 10px;
  background: var(--bg-surface); border: 1px solid var(--border-dim); border-radius: var(--radius-md);
  color: var(--text-secondary); font-family: var(--font-display); font-size: 11px; font-weight: 600;
  transition: all var(--transition);
}
.pos-btn:hover { background: var(--bg-hover); border-color: var(--border-mid); color: var(--text-primary); }
.pos-btn.active { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }

.slot-list { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.slot-item { background: var(--bg-surface); border: 1px solid var(--border-dim); border-radius: var(--radius-md); padding: 10px; transition: border-color var(--transition); }
.slot-item:hover { border-color: var(--border-mid); }
.slot-item.is-main { border-color: rgba(42,106,255,.3); }
.slot-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; gap: 4px; }
.slot-num-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
.slot-name-label { font-family: var(--font-display); font-size: 12px; font-weight: 600; color: var(--text-primary); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-main-tag { font-family: var(--font-mono); font-size: 9px; padding: 2px 5px; background: var(--blue-dim); border: 1px solid var(--blue); border-radius: 2px; color: var(--blue); letter-spacing: .5px; flex-shrink: 0; }
.slot-input-row { display: flex; gap: 5px; align-items: center; }
.slot-url-input {
  flex: 1; height: 28px; background: var(--bg-input); border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm); padding: 0 7px; color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 10px; outline: none; min-width: 0;
  transition: border-color var(--transition), color var(--transition);
}
.slot-url-input::placeholder { color: var(--text-muted); }
.slot-url-input:focus { border-color: var(--blue); color: var(--text-primary); }
.slot-has-url { border-color: rgba(26,219,122,.3); }
.slot-edit-btn {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-input); border: 1px solid var(--border-dim); border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 12px; flex-shrink: 0; transition: all var(--transition);
}
.slot-edit-btn:hover { background: var(--blue-dim); border-color: var(--blue); color: var(--blue); }

.btn-apply {
  width: 100%; height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--blue); border: none; border-radius: var(--radius-md); color: #fff;
  font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 1px;
  transition: background var(--transition), box-shadow var(--transition); margin-top: 10px;
}
.btn-apply:hover { background: #1a5aee; box-shadow: 0 4px 16px var(--blue-glow); }

.hint-box {
  background: var(--bg-input); border: 1px solid var(--border-dim); border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 8px;
}
.hint-box-title { font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--blue); margin-bottom: 5px; }
.hint-box p { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); line-height: 1.8; }

/* ─── Modal ──────────────────────────────────────────── */
#modalOverlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 500;
  transition: opacity var(--transition);
}
#modalOverlay.hidden { opacity: 0; pointer-events: none; }
.modal {
  background: var(--bg-panel); border: 1px solid var(--border-mid); border-radius: var(--radius-lg);
  padding: 22px; width: 360px; box-shadow: 0 24px 64px rgba(0,0,0,.6);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-primary); }
.modal-slot-tag {
  font-family: var(--font-mono); font-size: 10px; padding: 3px 8px;
  background: var(--bg-surface); border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm); color: var(--text-muted);
}
.field-group { margin-bottom: 14px; }
.field-label { display: block; font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: 1.2px; color: var(--text-muted); margin-bottom: 5px; }
.field-input {
  width: 100%; height: 38px; background: var(--bg-input); border: 1px solid var(--border-dim);
  border-radius: var(--radius-md); padding: 0 12px; color: var(--text-primary);
  font-size: 13px; outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.field-input::placeholder { color: var(--text-muted); }
.field-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.field-textarea { height: auto; min-height: 90px; resize: vertical; padding: 10px 12px; line-height: 1.6; font-size: 12px; font-family: var(--font-mono); }
.url-preview { min-height: 18px; margin-top: 5px; font-family: var(--font-mono); font-size: 11px; padding: 5px 8px; border-radius: var(--radius-sm); transition: all var(--transition); }
.preview-ok  { background: var(--green-dim); border: 1px solid rgba(26,219,122,.3); color: var(--green); }
.preview-err { background: rgba(245,166,35,.08); border: 1px solid rgba(245,166,35,.3); color: var(--amber); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.btn-cancel {
  height: 36px; padding: 0 16px; background: var(--bg-surface); border: 1px solid var(--border-dim);
  border-radius: var(--radius-md); color: var(--text-secondary);
  font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: .8px;
  transition: all var(--transition);
}
.btn-cancel:hover { background: var(--bg-hover); border-color: var(--border-hot); color: var(--text-primary); }
.btn-save {
  height: 36px; padding: 0 20px; background: var(--blue); border: none; border-radius: var(--radius-md);
  color: #fff; font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 1px;
  transition: all var(--transition);
}
.btn-save:hover { background: #1a5aee; box-shadow: 0 4px 14px var(--blue-glow); }

/* ─── Profil overlay ─────────────────────────────────── */
#profileOverlay {
  position: fixed; inset: 0; background: rgba(8,10,13,.95);
  backdrop-filter: blur(14px); display: flex; align-items: center; justify-content: center;
  z-index: 900;
}
#profileOverlay.hidden { display: none; }

.profile-card {
  width: 480px; max-width: calc(100vw - 32px);
  background: var(--bg-panel); border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: 0 32px 80px rgba(0,0,0,.7);
  animation: dropIn .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes dropIn { from { opacity:0; transform:translateY(-16px) scale(.97); } to { opacity:1; transform:none; } }

.profile-header { text-align: center; margin-bottom: 28px; }
.profile-header .logo { justify-content: center; margin-bottom: 8px; }
.profile-subtitle {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: 2px; color: var(--text-muted); margin-top: 10px;
}

.profile-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 20px; }

.profile-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; background: var(--bg-surface); border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg); color: var(--text-secondary);
  transition: all var(--transition);
}
.profile-btn:hover {
  background: var(--bg-hover); border-color: var(--pc, var(--blue));
  color: var(--text-primary); transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}
.profile-btn.active {
  background: color-mix(in srgb, var(--pc, var(--blue)) 15%, transparent);
  border-color: var(--pc, var(--blue)); color: var(--text-primary);
}
.profile-icon { width: 32px; height: 32px; display:flex; align-items:center; justify-content:center; color: var(--pc, var(--blue)); }
.profile-icon svg { width: 28px; height: 28px; }
.profile-name { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.profile-count { font-family: var(--font-mono); font-size: 9px; color: var(--text-muted); }
.profile-note { text-align: center; font-size: 11px; color: var(--text-muted); line-height: 1.6; border-top: 1px solid var(--border-dim); padding-top: 16px; }

/* Profil badge (topbar) */
.profile-badge {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 6px 0 8px;
  background: var(--bg-surface); border: 1px solid var(--pc, var(--border-dim));
  border-radius: var(--radius-md); transition: all var(--transition);
  cursor: pointer; user-select: none;
}
.profile-badge:hover {
  background: var(--bg-hover); border-color: var(--pc, var(--border-hot));
}
.profile-badge-icon { width: 18px; height: 18px; display:flex; align-items:center; justify-content:center; color: var(--pc, var(--blue)); }
.profile-badge-icon svg { width: 16px; height: 16px; }
.profile-badge-name { font-family: var(--font-display); font-size: 12px; font-weight: 600; color: var(--text-primary); }
.profile-badge-change {
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 13px;
}

/* ─── Toast ──────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-panel); border: 1px solid var(--border-mid); border-radius: var(--radius-md);
  padding: 10px 18px; font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--text-primary); box-shadow: 0 8px 32px rgba(0,0,0,.5); z-index: 600;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1); white-space: nowrap;
}
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.toast-success { border-color: var(--green); color: var(--green); }
#toast.toast-info    { border-color: var(--blue);  color: var(--blue); }

/* ─── Arama alanı ────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Boş slot (Kanal Ekle) ──────────────────────────── */
.placeholder-empty { opacity: .45; }
.placeholder-empty:hover { opacity: 1; }
.placeholder-add-icon {
  border-style: dashed;
  font-size: 20px; font-weight: 300; color: var(--text-muted);
}
.placeholder-empty:hover .placeholder-add-icon { border-color: var(--blue); color: var(--blue); }

/* ─── Pos section aktif/pasif ────────────────────────── */
#posSection { transition: opacity 0.2s, pointer-events 0s; }

/* ════════════════════════════════════════════════════════
   MOBİL RESPONSIVE — izliyo.com.tr
   Breakpoints:
     ≤768px  → Telefon
     769–1024px → Tablet
   ════════════════════════════════════════════════════════ */

/* ─── Tablet (769–1024px) ─────────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  :root { --topbar-h: 50px; --panel-w: 280px; }
  .topbar-title { display: none; }
  .topbar-center { gap: 0; }
  #liveClock { font-size: 12px !important; }
  #btnRefreshText, #btnSettingsText { display: none; }
  .tb-btn { padding: 0 9px; font-size: 10px; gap: 5px; }
  .profile-badge-name { max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ─── Telefon (≤768px) ────────────────────────────────── */
@media (max-width: 768px) {
  :root { --topbar-h: 48px; --gap: 2px; }

  /* Topbar */
  #topbar {
    padding: 0 8px;
    gap: 4px;
    overflow: visible;
    flex-wrap: nowrap;
  }
  .logo-text { font-size: 13px; }
  .logo-text em { font-size: 11px; }
  .logo-mark { width: 15px; height: 15px; }
  .topbar-center { display: none; }
  .profile-badge-name { display: none; }
  #langLabel { display: none; }
  /* Güncelle butonu mobilde gizle — ayarlardan manuel yenilenebilir */
  .btn-refresh-mobile-hide { display: none; }
  .topbar-spacer { flex: 1; min-width: 4px; }

  /* Tüm topbar butonları küçük ve eşit */
  .tb-btn {
    height: 34px;
    padding: 0 7px;
    min-width: 34px;
    justify-content: center;
    flex-shrink: 0;
  }
  #btnRefreshText, #btnSettingsText { display: none; }

  /* Güncelle butonunu mobilde gizle — siteyi taşıtıyor */
  #btnRefreshText { display: none; }

  /* Paylaş butonundaki yazıyı gizle */
  .share-btn-text { display: none; }

  /* Main: dikey akış */
  #main { flex-direction: column; overflow-y: auto; overflow-x: hidden; }

  /* Grid: kaydırılabilir dikey liste */
  #gridArea {
    flex: none;
    overflow: visible;
    padding: var(--gap);
  }
  #gridContainer {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: auto !important;
    gap: var(--gap);
  }

  /* Hücre: 16:9 oran */
  .cell {
    width: 100%;
    height: auto !important;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
  }

  /* Mobilde her zaman görünür kontroller */
  .cell-overlay { opacity: 1 !important; }
  .cell-name { opacity: 1 !important; transform: none !important; font-size: 11px; }
  .cell-mute-btn { opacity: 1 !important; transform: scale(1) !important; width: 34px; height: 34px; }
  .cell-edit { opacity: 1 !important; transform: scale(1) !important; width: 34px; height: 34px; }
  .slot-num { opacity: 1 !important; }
  .live-badge { font-size: 8px; padding: 2px 5px; }

  /* Ayarlar: alttan bottom sheet */
  #settingsPanel {
    position: fixed !important;
    bottom: 0; left: 0; right: 0; top: auto !important;
    width: 100% !important;
    height: 82vh;
    max-height: 82vh;
    border-left: none !important;
    border-top: 1px solid var(--border-mid);
    border-radius: 12px 12px 0 0;
    z-index: 200;
    opacity: 1 !important;
    transform: translateY(0);
    transition: transform 0.3s ease !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  #settingsPanel.hidden {
    transform: translateY(100%) !important;
    pointer-events: none !important;
    width: 100% !important;
    opacity: 1 !important;
  }
  #settingsPanel::before {
    content: '';
    display: block;
    width: 40px; height: 4px;
    background: var(--border-mid);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }
  /* Panel header sabit, body scroll edilebilir */
  #settingsPanel .panel-header {
    flex-shrink: 0;
    height: 44px;
    padding: 0 16px;
  }
  #settingsPanel .panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 16px 24px;
    -webkit-overflow-scrolling: touch;
  }
  /* Layout butonları 2 sütun, küçük padding */
  .layout-grid { grid-template-columns: 1fr 1fr; gap: 5px; }
  .layout-btn { font-size: 10px; padding: 8px 4px; }
  .pos-btn { font-size: 10px; padding: 8px 8px; }
  /* Slot listesi yeterli yükseklik */
  .slot-list { max-height: 200px; overflow-y: auto; }
  /* Slot item kompakt */
  .slot-item { padding: 8px; }
  .slot-name-label { font-size: 11px; }
  .slot-url-input { height: 26px; font-size: 10px; }
  /* Hint box gizle — mobilde yer kaplar */
  .hint-box { display: none; }

  /* Profil: alttan açılır */
  #profileOverlay { align-items: flex-end; }
  .profile-card {
    width: 100%;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    padding: 24px 20px;
    max-height: 85vh;
    overflow-y: auto;
  }
  .profile-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

  /* Modal */
  .modal { width: calc(100vw - 24px); padding: 18px; }
  .field-textarea { min-height: 70px; }

  /* Toast */
  #toast { bottom: 16px; font-size: 12px; padding: 8px 14px; }

  /* Layout/pos butonları */
  .layout-btn { font-size: 10px; padding: 7px 4px; }
  .pos-btn { font-size: 10px; padding: 7px 6px; }
  .search-wrap.search-open .search-input-hidden { width: 120px; }
}

/* ─── Küçük telefon (≤380px) ──────────────────────────── */
@media (max-width: 380px) {
  .logo-text em { display: none; }
  .profile-badge-name { display: none; }
}

/* ─── Pos section aktif/pasif ────────────────────────── */
#posSection { transition: opacity 0.2s, pointer-events 0s; }

/* ─── Paylaşım butonu + panel ────────────────────────── */
.share-wrap {
  position: relative;
  flex-shrink: 0;
}
.share-btn-text { /* mobilde gizlenecek */ }

.share-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg-panel);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  z-index: 300;
  animation: dropIn .2s ease;
}
.share-panel.hidden { display: none; }

.share-panel-title {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px;
}
.share-panel-desc {
  font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px;
}
.share-input-row {
  display: flex; gap: 6px; align-items: center;
}
.share-input-row input {
  flex: 1; height: 34px; background: var(--bg-input);
  border: 1px solid var(--border-mid); border-radius: var(--radius-md);
  padding: 0 10px; color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 11px; outline: none;
  min-width: 0;
}
.share-copy-btn {
  display: flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 12px;
  background: var(--blue); border: none; border-radius: var(--radius-md);
  color: #fff; font-family: var(--font-display); font-size: 11px;
  font-weight: 700; letter-spacing: .5px; white-space: nowrap;
  transition: background var(--transition);
  flex-shrink: 0;
}
.share-copy-btn:hover { background: #1a5aee; }

/* ─── Tam ekran (custom) ─────────────────────────────── */
.cell-expanded {
  border-radius: 0 !important;
  box-shadow: none !important;
}



/* ─── Mobilde paylaşım paneli tam genişlik ───────────── */
@media (max-width: 768px) {
  .share-panel { width: calc(100vw - 24px); right: -80px; }
  .share-btn-text { display: none; }
}

/* ─── Dil seçici ─────────────────────────────────────── */
.lang-wrap {
  position: relative;
  flex-shrink: 0;
}
.lang-btn {
  gap: 5px;
  min-width: 34px;
}
#langLabel {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  z-index: 300;
  min-width: 160px;
  animation: dropIn .2s ease;
}
.lang-menu.hidden { display: none; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  text-align: left;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}
.lang-option:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.lang-option.active {
  background: var(--blue-dim);
  color: var(--blue);
  font-weight: 600;
}

/* Arapça RTL desteği */
[dir="rtl"] #topbar { direction: rtl; }
[dir="rtl"] .panel-body { direction: rtl; }
[dir="rtl"] .modal { direction: rtl; }
[dir="rtl"] .profile-card { direction: rtl; }
[dir="rtl"] .share-panel { left: 0; right: auto; }
[dir="rtl"] .lang-menu { left: 0; right: auto; }
[dir="rtl"] .cell-name { left: 36px; right: 42px; }

/* Mobilde dil menüsü */
@media (max-width: 768px) {
  .lang-menu { right: -40px; }
  #langLabel { display: none; }
}

/* Bayrak */
.lang-flag {
  width: 20px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Kanal taşıma handle */
.cell-drag-handle {
  position: absolute;
  bottom: 7px;
  left: 7px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  border-radius: 5px;
  color: rgba(255,255,255,.7);
  opacity: 0;
  transition: opacity var(--transition);
  cursor: grab;
  z-index: 10;
  pointer-events: auto;
}
.cell:hover .cell-drag-handle { opacity: 1; }
.cell-drag-handle:active { cursor: grabbing; }
