/* ===== Dil (TR/EN) ===== */
html[lang="en"] .lbl-tr { display: none !important; }
html[lang="tr"] .lbl-en { display: none !important; }

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-dark:    #0f1112;
  --bg-panel:   #0a0c0e;
  --bg-card:    #080a0c;
  --bg-hover:   rgba(212,185,106,0.06);
  --border:     rgba(212,185,106,0.15);
  --text:       #e8e0d0;
  --text-muted: rgba(232,224,208,0.45);
  --accent:     #d4b96a;
  --accent-dim: rgba(212,185,106,0.5);
  --sidebar-w:  280px;
  --topbar-h:   0px;
  --mapbar-h:   0px;

  /* Harita görseli filtresi — kolayca ayarlanabilir */
  --map-filter: saturate(0.8) brightness(0.75) contrast(1.1);
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  overflow: hidden;
}

/* ===== Layout ===== */
#sidebar {
  position: fixed;
  top: var(--mapbar-h); left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--mapbar-h));
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: transform .25s ease;
}

#sidebar.collapsed {
  transform: translateX(-100%);
}

/* Mobil: sidebar (filtreler) içinde her zaman erişilebilir kapat butonu.
   ≤480px'te sidebar tüm ekranı kapladığı için backdrop/☰ ulaşılamıyordu. */
#sidebar-mobile-header { display: none; }
#sidebar-close {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(212,185,106,0.3);
  color: #e8e0d0; font-size: 18px; line-height: 1; cursor: pointer;
}
@media (max-width: 768px) {
  #sidebar-mobile-header {
    display: flex; justify-content: flex-end; align-items: center;
    position: sticky; top: 0; z-index: 6;
    background: var(--bg-panel);
    padding: 8px; border-bottom: 1px solid var(--border);
  }
}

#main {
  position: fixed;
  top: var(--mapbar-h);
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  transition: left .25s ease;
}

#main.expanded {
  left: 0;
}

/* ===== Map Button Base ===== */
.map-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s;
  letter-spacing: .02em;
  white-space: nowrap;
  padding: 4px 10px;
  height: 28px;
}

.map-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border);
}

.map-btn.active {
  background: var(--bg-card);
  color: var(--accent);
  border-color: var(--accent-dim);
  font-weight: 600;
}

/* ===== Filters — tarkov.dev stili ===== */
#filter-global-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 6px 12px;
}

#filter-global-toggle + .filter-section-label {
  border-top: none;
  margin-top: 0;
}
.filter-global-btns {
  display: flex;
  gap: 6px;
}
.filter-global-btns button {
  flex: 1;
  padding: 5px 0;
  font-size: 11px;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.filter-global-btns button:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--accent-dim);
}

#filters {
  padding: 0 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 2 sütunlu grid — her bölümün öğeleri */
#extracts-filters,
#hazard-filters,
#spawn-filters,
#keys-filters,
#container-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

/* 2 sütun içindeki item'larda yer kazanmak için badge ve check gizle */
#extracts-filters .fi-badge, #extracts-filters .fi-check,
#hazard-filters .fi-badge,   #hazard-filters .fi-check,
#spawn-filters .fi-badge,    #spawn-filters .fi-check,
#keys-filters .fi-badge,     #keys-filters .fi-check,
#container-filters .fi-badge, #container-filters .fi-check,
#container-filters .fi-count {
  display: none;
}

/* Bölüm başlığı (Çıkış, Spawn, Loot…) */
.filter-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(212,185,106,0.5);
  padding: 6px 2px 5px;
  border-top: 1px solid var(--border);
  margin-top: 14px;
  cursor: pointer;
  user-select: none;
  transition: color .15s;
}
.filter-section-label:first-child { border-top: none; margin-top: 0; }
.filter-section-label:hover { color: var(--text); }

.filter-section-arrow {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.4;
  transition: opacity .15s;
  padding: 6px 10px;
  margin-right: -4px;
}
.filter-section-label:hover .filter-section-arrow { opacity: 0.85; }

/* Her filtre satırı */
.filter-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s;
  position: relative;
  min-width: 0;
}

/* checkbox gizle — tüm kontrol CSS :has() ile */
.filter-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}

/* Hover */
.filter-item:hover {
  background: var(--bg-hover);
}


/* İkon */
.fi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  flex-shrink: 0;
  opacity: 0.92;
  transition: opacity .15s;
}
.fi-icon svg { width: 100%; height: 100%; }

/* Arka plan fill'lerini şeffaf yap */
.fi-icon svg [fill="#091409"],
.fi-icon svg [fill="#001a1f"],
.fi-icon svg [fill="#001e22"],
.fi-icon svg [fill="#152815"],
.fi-icon svg [fill="#1a0e00"],
.fi-icon svg [fill="#1f1200"],
.fi-icon svg [fill="#1a1500"],
.fi-icon svg [fill="#021508"],
.fi-icon svg [fill="#041a04"],
.fi-icon svg [fill="#091500"],
.fi-icon svg [fill="#141000"],
.fi-icon svg [fill="#0e001a"],
.fi-icon svg [fill="#111"] { fill: transparent; }

.filter-item:not(:has(input:checked)) .fi-icon {
  opacity: 0.25;
}

/* Küçük ikon (konteyner alt öğeleri) */
.fi-icon--sm { width: 18px; height: 18px; }


/* Etiket */
.fi-label {
  flex: 1;
  font-size: 12.5px;
  color: var(--text-muted);
  opacity: 0.5;
  text-decoration: line-through;
  text-decoration-color: rgba(107, 114, 128, 0.4);
  transition: color .15s, opacity .15s, font-weight .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.filter-item:has(input:checked) .fi-label {
  color: #a8b6c6;
  opacity: 1;
  text-decoration: none;
  font-weight: 400;
}
.filter-item--sub .fi-label { font-size: 11.5px; }

/* Adet (×50 gibi) */
.fi-count {
  font-size: 10px;
  color: var(--text-muted);
  opacity: .6;
  flex-shrink: 0;
}

/* Sayı rozeti (391 gibi) */
.fi-badge {
  font-size: 9.5px;
  background: rgba(200,169,110,.15);
  color: var(--accent);
  border: 1px solid rgba(200,169,110,.25);
  border-radius: 8px;
  padding: 1px 5px;
  flex-shrink: 0;
}

/* Checkmark göstergesi */
.fi-check {
  font-size: 9px;
  color: var(--accent);
  opacity: 0;
  transition: opacity .15s;
  flex-shrink: 0;
  width: 12px;
  text-align: center;
}
.filter-item:has(input:checked) .fi-check { opacity: 1; }

/* Konteyner alt öğeleri */
.filter-item--sub { padding-left: 14px; }

.filter-group-items {
  overflow: visible;
}

/* Quest filtrelerinde tik işaretini gizle */
#quest-filters .fi-check { display: none; }

/* Quest trader wrap: label + arrow yan yana */
.quest-trader-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.quest-trader-wrap .filter-item {
  flex: 1;
  min-width: 0;
}

/* Quest trader expand arrow */
.quest-expand-arrow {
  font-size: 14px;
  color: var(--accent, #a8ff3e);
  cursor: pointer;
  padding: 0 12px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.7;
  font-weight: 700;
  transition: opacity .15s, background .15s;
  user-select: none;
}
.quest-expand-arrow:hover {
  opacity: 1;
  background: rgba(255,255,255,.05);
}

/* Quest name sub-list */
.quest-name-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
  width: 100%;
}
.quest-name-list.open { max-height: 400px; }
.quest-name-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 5px 32px;
  border-left: 2px solid rgba(255,255,255,.06);
  transition: background .15s, border-color .15s;
  flex-wrap: wrap;
}
.quest-name-item:hover {
  background: rgba(255,255,255,.05);
  border-left-color: var(--fc, #888);
}
.quest-name-item .qn-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: .7;
}
.quest-name-item .qn-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1;
}
.quest-name-item .qn-title {
  font-size: 11px;
  color: var(--fc, #ccc);
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quest-name-item .qn-desc {
  font-size: 10px;
  color: var(--text-muted);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .2s ease, opacity .15s ease, margin .15s ease;
  white-space: normal;
  line-height: 1.4;
}
.quest-name-item.open .qn-desc {
  max-height: 80px;
  opacity: 0.65;
  margin-top: 3px;
}
.qn-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.qn-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.12);
  cursor: pointer;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.4;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.qn-find {
  color: var(--fc, #aaa);
  border-color: rgba(255,255,255,.1);
}
.qn-find:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.25);
}
.qn-close {
  color: #777;
  border-color: rgba(255,255,255,.06);
}
.qn-close:hover {
  background: rgba(255,80,80,.15);
  border-color: rgba(255,80,80,.3);
  color: #f66;
}
.quest-name-item.done {
  opacity: 0.45;
}
.quest-name-item.done .qn-title {
  text-decoration: line-through;
  opacity: 0.5;
}
.quest-name-item.done .qn-desc {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}
.qn-reopen {
  display: none;
  color: #888;
  border-color: rgba(255,255,255,.06);
}
.qn-reopen:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
  color: #ccc;
}
.quest-name-item.done .qn-find,
.quest-name-item.done .qn-close {
  display: none;
}
.quest-name-item.done .qn-reopen {
  display: inline-block;
}


/* ===== Topbar ===== */
#topbar {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 1000;
  padding: 0;
}

#sidebar-toggle,
#zoom-in-btn,
#zoom-out-btn,
#fullscreen-btn {
  background: rgba(10, 12, 14, 0.92);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px; height: 34px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

#sidebar-toggle { font-size: 16px; }
#zoom-in-btn, #zoom-out-btn { font-size: 18px; font-weight: 300; color: var(--text); }

#sidebar-toggle:hover,
#zoom-in-btn:hover,
#zoom-out-btn:hover,
#fullscreen-btn:hover { background: rgba(212,185,106,0.1); border-color: var(--accent); color: var(--text); }

#search-wrap {
  position: relative;
  width: 100%;
}

#search {
  width: 100%;
  padding: 4px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}

#search:focus { border-color: var(--accent-dim); }
#search::placeholder { color: var(--text-muted); }

#search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
}

#search-results.visible { display: block; }

.search-item {
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}

.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg-hover); }

.search-item-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

#coords-display {
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  display: flex;
  gap: 10px;
  background: rgba(10, 12, 14, 0.75);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 10px;
  z-index: 800;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

/* Harita atıf/kredi (kaynağa göre dinamik) — lisans gereği görünür kalmalı */
#map-credit {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(10, 12, 14, 0.75);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 10px;
  z-index: 800;
  backdrop-filter: blur(4px);
  max-width: 60vw;
  line-height: 1.3;
}
#map-credit a {
  color: var(--gold, #c8a96e);
  text-decoration: none;
}
#map-credit a:hover { text-decoration: underline; }
#map-credit.hidden { display: none; }

/* ===== Floor Controls ===== */
#floor-controls {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 1000;
}
.floor-btn {
  pointer-events: all;
  background: rgba(13, 17, 23, 0.92);
  color: #e0e0e0;
  border: 1px solid #3a4a60;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.floor-btn:hover {
  background: rgba(40, 55, 75, 0.98);
  color: #fff;
  border-color: #5a7a9a;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}
.floor-btn.active {
  background: rgba(41, 182, 246, 0.25);
  color: #29b6f6;
  border-color: #29b6f6;
  box-shadow: 0 0 10px rgba(41, 182, 246, 0.3);
}

/* ===== Map ===== */
#map {
  flex: 1;
  background: #0a0c0e;
  cursor: crosshair;
}

/* Harita görseli — dark tema filtresi */
.map-image-layer {
  filter: var(--map-filter);
}

/* ===== Leaflet overrides ===== */
.leaflet-container { background: #0a0c0e !important; }

.leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-hover) !important;
}

/* ===== Tarkov.dev PNG marker ikonları ===== */
.marker-icon-img {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s;
  cursor: pointer;
}
.marker-icon-img img {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.9));
  image-rendering: auto;
}
.marker-icon-img:hover { transform: scale(1.3); }

@keyframes marker-pulse {
  0%, 100% { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 7px rgba(255,255,255,.55)); }
  50%       { filter: drop-shadow(0 0 8px #fff) drop-shadow(0 0 18px rgba(255,255,255,.35)); }
}
.marker-selected {
  animation: marker-pulse 1.3s ease-in-out infinite;
}

/* ===== Extract: icon + isim etiketi ===== */
.marker-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.marker-label {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: rgba(10, 13, 16, 0.88);
  border: 1px solid rgba(255,255,255,0.12);
  color: #dde2ea;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  pointer-events: none;
  user-select: none;
  z-index: 9999;
}

/* ===== Detail Panel ===== */
#detail-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 260px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  z-index: 800;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  animation: slideUp .2s ease;
}

#detail-panel.hidden { display: none; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#detail-close {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 24px; height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}

#detail-close:hover { color: var(--text); }

/* Çıkış noktası oyun-içi görseli (panelin en üstü, kenara yaslı) */
#detail-image-wrap {
  position: relative;
  margin: -16px -16px 12px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background: var(--bg-card);
  line-height: 0;
  cursor: zoom-in;
}

#detail-image {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
  transition: filter .15s ease, transform .25s ease;
}

/* Görsel henüz yokken gösterilen "yakında" yer tutucu (çıkış noktaları) */
#detail-image-placeholder {
  margin: -16px -16px 12px;
  height: 110px;
  border-radius: 10px 10px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 10px, transparent 10px 20px),
    var(--bg-card);
  border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
  color: #8a9080;
}
#detail-image-placeholder svg { opacity: .55; }
#detail-image-placeholder-text {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

#detail-image-wrap:hover #detail-image {
  filter: brightness(0.62);
  transform: scale(1.04);
}

/* Hover ipucu: tıklayıp büyütülebileceğini gösterir */
#detail-image-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}
#detail-image-hint::before {
  content: '';
  width: 15px; height: 15px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E");
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.8));
}
#detail-image-wrap:hover #detail-image-hint { opacity: 1; }

/* Tam ekran büyütme (lightbox) — sidebar (z 1000) dahil her şeyin üstünde.
   Harita alanının (iframe) tamamını kaplar; görsel de alanı doldurur. */
#image-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(0,0,0,.9);
  cursor: zoom-out;
  animation: fadeIn .15s ease;
}
#image-zoom-overlay.hidden { display: none; }
#image-zoom-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: default;
}
#image-zoom-close {
  position: absolute;
  top: 16px; right: 18px;
  z-index: 2;
  width: 38px; height: 38px;
  border-radius: 8px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
#image-zoom-close:hover { background: rgba(0,0,0,.85); border-color: rgba(255,255,255,.5); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#detail-icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}

#detail-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

#detail-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}


#detail-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

#detail-title-row #detail-title {
  margin-bottom: 0;
}

#detail-coords {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  white-space: nowrap;
}

#detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}

/* ===== Dev Mode — sadece ?dev=1 URL parametresiyle görünür ===== */
.dev-only { display: none !important; }
body.dev-mode .dev-only { display: initial !important; }

/* ===== Pin Mode ===== */
#pin-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0 12px;
  height: 34px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
  white-space: nowrap;
}

#pin-btn:hover { background: var(--bg-hover); color: var(--text); }

#pin-btn.active {
  background: rgba(200,169,110,.15);
  border-color: var(--accent);
  color: var(--accent);
}

.pin-cursor { cursor: crosshair !important; }

.pin-dot {
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
}

.pin-dot--draft {
  width: 14px; height: 14px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(200,169,110,.9);
}

.pin-dot--saved {
  width: 20px; height: 20px;
  background: #e53935;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 6px rgba(229,57,53,.7);
}

/* Giriş popup'ı */
#pin-input-popup {
  position: absolute;
  top: calc(var(--topbar-h) + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  padding: 10px 14px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.6);
  animation: slideUp .15s ease;
}

#pin-input-popup.hidden { display: none; }

.pin-draft-coords {
  font-family: monospace;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.pin-label {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  padding: 5px 9px;
  width: 210px;
  outline: none;
}

.pin-label:focus { border-color: var(--accent-dim); }
.pin-label::placeholder { color: var(--text-muted); }

#pin-save {
  background: rgba(200,169,110,.18);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

#pin-save:hover { background: rgba(200,169,110,.28); }

#pin-cancel {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
}

#pin-cancel:hover { color: var(--text); }

/* Liste paneli */
#pin-list-panel {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 340px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 800;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  overflow: hidden;
  animation: slideUp .2s ease;
}

#pin-list-panel.hidden { display: none; }

.pin-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
}

.pin-list-header button {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}

.pin-list-header button:hover { color: var(--text); }

#pin-copy-all:hover { color: var(--accent) !important; border-color: var(--accent-dim) !important; }

#pin-list {
  max-height: 260px;
  overflow-y: auto;
}

.pin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.pin-row:last-child { border-bottom: none; }

.pin-num {
  width: 18px; height: 18px;
  background: #e53935;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.pin-row-label {
  flex: 1;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-row-coords {
  font-family: monospace;
  font-size: 11px;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.pin-del {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}

.pin-del:hover { color: #ef5350; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }


/* ===== Sidebar Backdrop (mobile) ===== */
#sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 999;
  backdrop-filter: blur(1px);
}
#sidebar-backdrop.visible { display: block; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root { --sidebar-w: 270px; }

  #sidebar { transform: translateX(-100%); z-index: 1001; }
  #sidebar.open { transform: translateX(0); }

  #main { left: 0 !important; }

  #detail-panel {
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    width: auto !important;
  }

  #coords-display { display: none; }

  .filter-section-label { min-height: 44px; padding: 10px 14px; }
  .quest-expand-arrow { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 480px) {
  :root { --sidebar-w: 100vw; }
  #sidebar { box-shadow: 4px 0 20px rgba(0,0,0,.8); }
  #topbar { gap: 4px; }
  #topbar button { width: 36px; height: 36px; font-size: 14px; }
  #lang-toggle { padding: 0 8px; font-size: 10px; }
}
