/* ── Harita üzeri savaş badge'leri ── */
.war-badge {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 18;
  /* Transition: zoom < threshold → görünür, zoom ≥ threshold → gizli (JS ile) */
  transition: opacity .25s ease, transform .2s ease;
}

.war-badge-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(8, 6, 22, 0.92);
  color: #e8eaf8; /* haritanın üzerinde yüzer, moddan bağımsız her zaman koyu */
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 6px 10px 6px 8px;
  border: 1px solid rgba(240, 74, 74, 0.55);
  box-shadow:
    0 0 0 1px rgba(240,74,74,.18),
    0 4px 18px rgba(0,0,0,.65),
    0 0 20px rgba(240,74,74,.22);
  white-space: nowrap;
  transition: box-shadow .2s ease, border-color .2s ease;
  min-width: 110px;
}

.war-badge-inner:hover {
  border-color: rgba(240,74,74,.85);
  box-shadow:
    0 0 0 1px rgba(240,74,74,.35),
    0 6px 24px rgba(0,0,0,.75),
    0 0 30px rgba(240,74,74,.40);
}

.war-badge-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #f04a4a;
}

.war-badge-sword {
  animation: badge-sword-pulse 1.5s ease-in-out infinite;
  font-size: .75rem;
}

@keyframes badge-sword-pulse {
  0%, 100% { opacity: 1; transform: scale(1) rotate(-5deg); }
  50%       { opacity: .7; transform: scale(1.15) rotate(5deg); }
}

.war-badge-title {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
}

.war-badge-title .wbt-sep {
  color: #f04a4a;
  padding: 0 3px;
  font-size: .65rem;
}

.war-badge-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: .58rem;
  color: rgba(255,255,255,.55);
}

.war-badge-bar-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,.10);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 1px;
}

.war-badge-bar-a {
  height: 100%;
  border-radius: 2px 0 0 2px;
  transition: width .6s ease;
  display: inline-block;
  float: left;
}
.war-badge-bar-b {
  height: 100%;
  border-radius: 0 2px 2px 0;
  display: inline-block;
  float: left;
  opacity: .75;
}

/* Blinking live dot */
.war-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f04a4a;
  flex-shrink: 0;
  animation: war-live-blink 1s ease-in-out infinite;
}

@keyframes war-live-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .25; }
}

/* ── Savaş detay popup ── */
#war-popup {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.65);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: war-popup-fade .2s ease;
}

@keyframes war-popup-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#war-popup-inner {
  background: rgba(10, 10, 24, .97);
  color: #e8eaf8; /* moddan bağımsız her zaman koyu, sabit savaş teması */
  border: 1px solid rgba(240,74,74,.35);
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
  width: min(480px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  box-shadow:
    0 0 0 1px rgba(240,74,74,.12),
    0 28px 60px rgba(0,0,0,.75),
    0 0 40px rgba(240,74,74,.14);
  position: relative;
  animation: war-popup-slide .25s cubic-bezier(.34,1.4,.64,1);
}

@keyframes war-popup-slide {
  from { transform: translateY(12px) scale(.97); opacity: 0; }
  to   { transform: translateY(0) scale(1);      opacity: 1; }
}

#war-popup-inner::-webkit-scrollbar { width: 3px; }
#war-popup-inner::-webkit-scrollbar-thumb { background: rgba(240,74,74,.3); border-radius: 2px; }

.wp-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.45);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: color .15s;
  padding: 2px;
}
.wp-close:hover { color: #fff; }

.wp-header {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
  padding-right: 1.5rem;
}

.wp-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.wp-header-text { flex: 1; }

.wp-war-name {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.wp-war-meta {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: .62rem;
  color: rgba(255,255,255,.4);
  margin-top: 3px;
}

.wp-war-meta span {
  color: #f04a4a;
}

/* Bölge + cephe hattı bilgi kutusu (popup) */
.wp-zone-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(240,74,74,.06);
  border: 1px solid rgba(240,74,74,.22);
  border-radius: 10px;
  padding: .6rem .8rem;
  margin-bottom: 1rem;
  font-size: .72rem;
  color: rgba(255,255,255,.7);
  line-height: 1.5;
}

.wp-zone-goto {
  margin-left: 8px;
  padding: 2px 9px;
  border: 1px solid rgba(240,74,74,.45);
  border-radius: 6px;
  background: rgba(240,74,74,.12);
  color: #f04a4a;
  font-size: .66rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.wp-zone-goto:hover { background: rgba(240,74,74,.25); }

/* Harita üstü savaş bölgesi bilgi çipi (war_indicator.js) */
.wz-info-chip {
  position: absolute;
  display: none;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: pointer;
  z-index: 18;
  background: rgba(8, 6, 22, 0.92);
  color: #e8eaf8;
  border: 1px solid rgba(240, 74, 74, 0.55);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.55);
  transition: border-color .15s;
}
.wz-info-chip:hover { border-color: rgba(240,74,74,.9); }
.wz-info-chip .wzc-sep { color: #ffd24a; font-size: .62rem; }
.wz-info-chip .wzc-info { color: rgba(255,255,255,.45); font-size: .6rem; font-weight: 600; }

/* Bar karşılaştırma */
.wp-progress-section {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: .9rem 1rem;
  margin-bottom: 1rem;
}

.wp-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: .5rem;
}

.wp-faction-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wp-faction-label.right { align-items: flex-end; }

.wp-faction-color-name {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.wp-faction-pix {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: .62rem;
  color: rgba(255,255,255,.45);
}

.wp-vs-center {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: rgba(255,255,255,.3);
  text-align: center;
}

.wp-progress-bar-wrap {
  height: 8px;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.wp-bar-a {
  height: 100%;
  transition: width .7s ease;
  border-radius: 4px 0 0 4px;
}

.wp-bar-b {
  height: 100%;
  transition: width .7s ease;
  border-radius: 0 4px 4px 0;
  opacity: .8;
}

/* Oyuncu listeleri */
.wp-players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.wp-player-col-title {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: .45rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.wp-player-row {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .4rem;
  border-radius: 7px;
  transition: background .15s;
}

.wp-player-row:hover { background: rgba(255,255,255,.05); }

.wp-player-rank {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: .55rem;
  font-weight: 600;
  color: rgba(255,255,255,.25);
  min-width: 14px;
  text-align: center;
}

.wp-player-rank.gold   { color: #f5a623; }
.wp-player-rank.silver { color: #c0c0c0; }
.wp-player-rank.bronze { color: #cd7f32; }

.wp-player-name {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: .72rem;
  font-weight: 600;
  color: #e0e0e0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wp-player-name.is-me { color: var(--accent2); }

.wp-player-pix {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: .62rem;
  font-weight: 500;
  color: rgba(255,255,255,.4);
  flex-shrink: 0;
}

.wp-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(245,166,35,.15);
  border: 1px solid rgba(245,166,35,.35);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: .5rem;
  font-weight: 700;
  color: #f5a623;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.wp-empty-list {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: .72rem;
  color: rgba(255,255,255,.25);
  text-align: center;
  padding: .5rem 0;
}

/* ── Tutorial (ilk giriş rehberi) ── */
#tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5,6,14,.85);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: tut-fade .2s ease;
}
#tutorial-overlay.show { display: flex; }
#tutorial-overlay.tut-has-spotlight { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
@keyframes tut-fade { from{opacity:0} to{opacity:1} }

/* spotlight div — box-shadow creates the dim ring around the target */
#tut-spotlight {
  display: none;
  position: fixed;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(5,6,14,.87);
  outline: 2px solid rgba(var(--accent-rgb),.55);
  outline-offset: 1px;
  pointer-events: none;
  z-index: 9999;
  transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease;
}
#tutorial-overlay.tut-has-spotlight #tut-spotlight { display: block; }

.tut-card {
  position: relative;
  width: min(90vw, 360px);
  background: var(--surf, #14141f);
  border: 1px solid var(--bdr, #2a2a3a);
  border-radius: 16px;
  padding: 1.25rem 1.2rem 1.1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  animation: tut-pop .22s ease;
  z-index: 10000;
  pointer-events: all;
}
@keyframes tut-pop { from{transform:scale(.93);opacity:0} to{transform:scale(1);opacity:1} }

.tut-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: .4rem;
}
.tut-icon {
  font-size: 2rem;
  line-height: 1;
}
.tut-progress {
  font-size: .65rem;
  font-weight: 700;
  color: var(--muted, #9a9ab0);
  background: var(--surf2, #1a1a28);
  border-radius: 20px;
  padding: .18rem .5rem;
  letter-spacing: .04em;
  margin-top: .1rem;
}
.tut-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--txt, #fff);
  margin-bottom: .3rem;
}
.tut-desc {
  font-size: .78rem;
  color: var(--muted, #9a9ab0);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.tut-dots {
  display: flex;
  justify-content: center;
  gap: .3rem;
  margin-bottom: .9rem;
}
.tut-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--bdr, #2a2a3a);
  transition: background .2s, transform .2s;
}
.tut-dot.active { background: var(--accent, var(--accent)); transform: scale(1.35); }

.tut-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.tut-skip {
  background: none; border: none;
  color: var(--muted, #9a9ab0);
  font-size: .72rem; font-weight: 600;
  cursor: pointer; padding: .45rem .2rem;
  white-space: nowrap;
}
.tut-skip kbd {
  display: inline-block;
  background: var(--surf2, #1a1a28);
  border: 1px solid var(--bdr, #2a2a3a);
  border-radius: 4px;
  font-size: .6rem;
  padding: .05rem .3rem;
  font-family: inherit;
  margin-left: .2rem;
  color: var(--muted, #9a9ab0);
}
.tut-skip:hover, .tut-skip:hover kbd { color: var(--txt, #fff); }
.tut-next {
  flex: 1;
  background: var(--accent, var(--accent));
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: .6rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.tut-next:hover { opacity: .88; }

/* ── Lider Tablosu kartı (profil > seviye paneli) ── */
.lvl-leaderboard-card {
  margin-top: .9rem;
  background: var(--surf2, #1a1a28);
  border: 1px solid var(--bdr, #2a2a3a);
  border-radius: 14px;
  padding: .8rem .7rem;
}
.lvl-leaderboard-title {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted, #9a9ab0);
  margin-bottom: .4rem;
}

/* ── Savaş ilan banner ── */
#war-declaration-banner {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.78);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: war-decl-fade .3s ease;
}

@keyframes war-decl-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

#war-decl-inner {
  background: linear-gradient(145deg, #100616, #1a0a0a, #130d22);
  color: #e8eaf8; /* moddan bağımsız her zaman koyu, sabit savaş teması */
  border: 1px solid rgba(240,74,74,.45);
  border-radius: 22px;
  padding: 2rem 2rem 1.6rem;
  width: min(420px, 90vw);
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(240,74,74,.15),
    0 40px 80px rgba(0,0,0,.85),
    0 0 60px rgba(240,74,74,.25);
  animation: war-decl-slide .4s cubic-bezier(.34,1.4,.64,1);
}

@keyframes war-decl-slide {
  from { transform: scale(.85) translateY(20px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}

.war-decl-sword {
  font-size: 2.5rem;
  animation: war-decl-shake .6s ease-in-out;
  display: block;
  margin-bottom: .5rem;
}

@keyframes war-decl-shake {
  0%, 100% { transform: rotate(-15deg); }
  25%       { transform: rotate(15deg); }
  50%       { transform: rotate(-10deg); }
  75%       { transform: rotate(10deg); }
}

.war-decl-label {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #f04a4a;
  margin-bottom: .85rem;
}

.war-decl-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-bottom: .65rem;
}

.war-decl-side {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.war-decl-vstext {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: #f04a4a;
  flex-shrink: 0;
}

.war-decl-region {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: .68rem;
  color: rgba(255,255,255,.45);
  margin-bottom: .85rem;
}

.war-decl-note {
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  line-height: 1.6;
  margin-bottom: 1.1rem;
}

.war-decl-close {
  background: linear-gradient(135deg, #b91c1c, #f04a4a);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .6rem 1.4rem;
  cursor: pointer;
  transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s ease;
  box-shadow: 0 4px 16px rgba(240,74,74,.45);
}

.war-decl-close:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(240,74,74,.60);
}
.war-decl-close:active {
  transform: scale(.96);
  transition-duration: .08s;
}

/* Kapanma yolunun ikinci ipucu — telefonda oyuncular önce ekrana
   basıyor, düğmeyi aramıyor. */
.war-decl-tap {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: .58rem;
  color: rgba(255,255,255,.32);
  margin-top: .7rem;
  letter-spacing: .04em;
}

/* ── Profil/Ayarlar'a "Savaş Overlay" toggle'ı ──
   Bu stil mevcut pca-row sistemiyle uyumlu, ek CSS gerekmez.
   Toggle zaten var (pca-toggle class). */

/* ── Mobil responsive ── */
@media (max-width: 768px) {
  .wp-players-grid { grid-template-columns: 1fr; gap: .5rem; }
  #war-popup-inner { padding: 1.1rem 1rem; border-radius: 20px 20px 0 0; }
  #war-popup { align-items: flex-end; }
  .war-decl-side { font-size: .92rem; }
  #war-decl-inner { padding: 1.6rem 1.3rem 1.3rem; }
  /* Parmakla vurulabilir hedef: 32px'lik düğme telefonda ıskalanıyordu */
  .war-decl-close { padding: .85rem 1.6rem; font-size: .88rem; min-height: 46px; width: 100%; }
}

@media (max-width: 375px) {
  .war-badge-inner { min-width: 90px; padding: 5px 8px; }
  .war-badge-title { font-size: .62rem; }
}


/* ══════════════ EKRAN DÜZENİ DÜZENLEYİCİ (layout.js) ══════════════ */
/* Oyuncunun düzenleyiciden gizlediği HUD öğesi. Inline display yazmak
   yerine sınıf kullanılır — giriş akışında inline display:flex ile
   açılan butonlar (örn. #chat-btn) ezilmesin. */
.hud-hidden { display: none !important; }

/* ══════════════ GİRİŞ SONRASI GÖRÜNEN HUD BUTONLARI ══════════════
   Bu butonların CSS varsayılanı display:none. Eskiden giriş akışı inline
   style.display='flex' yazıyordu; inline stili silen/ezen HERHANGİ bir kod
   butonu kalıcı olarak öldürüyordu — "sohbet butonu bir süre sonra
   kayboluyor, geri gelmiyor" hatasının kaynağı buydu. Artık görünürlük tek
   bir gövde sınıfına bağlı: body.pf-authed. Inline stile bağımlılık YOK.
   :not(.hud-hidden) → oyuncu düzenleyiciden gizlediyse gizli kalır. */
body.pf-authed #chat-btn:not(.hud-hidden) { display: flex !important; }

body.hud-edit .hud-movable {
  outline: 2px dashed var(--accent) !important;
  outline-offset: 3px;
  cursor: move !important;
  /* Sayaç gibi pointer-events:none öğeler düzenlemede tutulabilsin */
  pointer-events: auto !important;
  touch-action: none !important;
  z-index: 950 !important;
}
body.hud-edit .hud-movable * { pointer-events: none !important; }
#hud-edit-toolbar {
  display: none;
  position: fixed;
  left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 990;
  background: rgba(10,11,24,.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: .6rem .9rem;
  flex-direction: column; align-items: center; gap: .5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  max-width: calc(100vw - 24px);
}
#hud-edit-toolbar.show { display: flex; }
#hud-edit-hint { font-size: .72rem; color: #e8eaf8; font-family: var(--font-mono); text-align: center; }
#hud-edit-btns { display: flex; gap: .45rem; }
.hud-tb-btn {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: #e8eaf8; border-radius: 9px;
  font-family: var(--font-display); font-weight: 700; font-size: .78rem;
  padding: .5rem 1rem; cursor: pointer; min-height: 40px;
  -webkit-tap-highlight-color: transparent;
}
.hud-tb-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Ayarlar satırındaki "Düzenle" rozeti */
.pca-row-go {
  font-size: .68rem; font-weight: 700; font-family: var(--font-display);
  color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .4);
  border-radius: 8px; padding: .3rem .7rem; flex-shrink: 0;
}


/* ══════════ TOPRAK SİSTEMİ — sağ tık faction bilgi kartı ══════════ */
#terr-pop {
  display: none;
  position: fixed;
  z-index: 500;
  width: 220px;
  background: var(--surf, #14152a);
  border: 1px solid var(--bdr2, #2a2b45);
  border-radius: 12px;
  padding: .6rem .7rem;
  box-shadow: 0 10px 32px rgba(0,0,0,.55);
  font-family: var(--font-ui, sans-serif);
  color: var(--txt, #e8eaf8);
}
#terr-pop.show { display: block; animation: terrPopIn .14s ease; }
@keyframes terrPopIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* Faction kontrolündeki il etiketi */
#label-overlay span[data-terr] { letter-spacing: .04em; }


/* ══════════ KOORDİNAT & REPORT SİSTEMİ (2026-07-10) ══════════ */
/* Zoom butonlarının altındaki koordinat kutusu — tıkla = link kopyala */
#coord-box {
  background: var(--surf, #14152a);
  border: 1px solid var(--bdr2, #2a2b45);
  border-radius: 8px;
  color: var(--muted, #8b8db8);
  font-family: var(--font-mono, monospace);
  font-size: .58rem;
  font-weight: 700;
  padding: .3rem .2rem;
  text-align: center;
  cursor: pointer;
  user-select: none;
  line-height: 1.15;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
#coord-box:hover {
  color: var(--txt, #e8eaf8);
  border-color: rgba(var(--accent-rgb, 68,114,184), .5);
}

/* Sohbetteki tıklanabilir koordinat linki */
.pf-coordlink {
  display: inline-block;
  color: var(--accent, #4472b8);
  font-weight: 700;
  cursor: pointer;
  border-bottom: 1px dotted currentColor;
  white-space: nowrap;
}
.pf-coordlink:hover { filter: brightness(1.25); }

/* Report modalı form elemanları */
.rp-label {
  font-size: .62rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.rp-input {
  background: var(--bg); border: 1px solid var(--bdr2); border-radius: 10px;
  padding: .6rem .8rem; color: var(--txt); font-size: .8rem;
  font-family: inherit; outline: none; width: 100%;
}
.rp-input:focus { border-color: var(--accent); }

/* Admin rapor listesi */
.rp-item {
  background: var(--surf2); border: 1px solid var(--bdr); border-radius: 10px;
  padding: .6rem .7rem; display: flex; flex-direction: column; gap: .35rem;
}
.rp-chip {
  font-size: .56rem; font-weight: 800; font-family: var(--font-mono);
  border-radius: 5px; padding: .12rem .38rem; letter-spacing: .05em;
}
.rp-btn {
  background: var(--surf); border: 1px solid var(--bdr2); border-radius: 8px;
  color: var(--txt); font-size: .66rem; font-weight: 700;
  font-family: var(--font-display); cursor: pointer; padding: .3rem .6rem;
}
.rp-btn:hover { border-color: var(--accent); }
.rp-empty {
  font-size: .74rem; color: var(--muted); text-align: center; padding: 1.4rem 0;
}


/* ══════════ ADMIN PANELİ + MODERASYON (2026-07-10) ══════════ */
/* Bölge inceleme seçim overlay'i (rollback canvas'ının kardeşi) */
#admin-region-canvas{ position:absolute; inset:0; pointer-events:none; z-index:17; display:none; }
#admin-region-canvas.active{ display:block; }

/* Yenilenen admin paneli — düz buton yığını yerine kart görünümü */
#paint-toolbar{
  top:12px; right:12px; left:auto; bottom:auto;
  width:236px; max-height:calc(100vh - 24px); overflow-y:auto;
  padding:10px; gap:5px;
  background:linear-gradient(170deg, rgba(22,23,42,.97) 0%, rgba(14,15,28,.98) 100%);
  border:1px solid rgba(var(--shine-rgb),.10);
  border-radius:16px;
  box-shadow:0 18px 48px rgba(0,0,0,.55), inset 0 1px 0 rgba(var(--shine-rgb),.06);
  animation:apnlIn .18s cubic-bezier(.2,.8,.2,1);
}
@keyframes apnlIn{ from{opacity:0; transform:translateY(-8px) scale(.98);} to{opacity:1; transform:none;} }

.apnl-head{
  display:flex; align-items:center; gap:.5rem;
  padding:.2rem .15rem .5rem; margin-bottom:.1rem;
  border-bottom:1px solid rgba(var(--shine-rgb),.08);
}
.apnl-head-badge{
  width:26px; height:26px; border-radius:8px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; color:#fff;
  background:linear-gradient(135deg, var(--accent), var(--accent2));
  font-size:.85rem;
}
.apnl-head-txt{ font-family:var(--font-display); font-weight:800; font-size:.86rem; letter-spacing:.01em; }
.apnl-close{
  margin-left:auto; background:none; border:none; color:var(--muted);
  cursor:pointer; width:24px; height:24px; border-radius:6px; font-size:.8rem;
  display:flex; align-items:center; justify-content:center;
}
.apnl-close:hover{ background:var(--surf2); color:var(--txt); }

.apnl-sec-label{
  font-size:.56rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase;
  color:var(--muted); padding:.5rem .2rem .2rem; opacity:.75;
}
.apnl-btn{
  display:flex; align-items:center; gap:.5rem; width:100%;
  text-align:left; font-size:.74rem !important; padding:.5rem .6rem !important;
  border-radius:10px !important;
}
.apnl-btn .apnl-ic{
  width:18px; text-align:center; flex-shrink:0; opacity:.85; font-size:.82rem;
  display:inline-flex; align-items:center; justify-content:center;
}
.apnl-btn.danger{ color:#ff8f8f; }
.apnl-btn.danger:hover{ background:rgba(220,38,38,.14) !important; border-color:rgba(220,38,38,.4) !important; }

/* Admin liste satırları (bölge sonucu, ban listesi, profil kutusu) */
.adm-row{
  background:var(--surf2); border:1px solid var(--bdr); border-radius:12px;
  padding:.6rem .7rem; display:flex; flex-direction:column; gap:.4rem;
}
.adm-row-top{ display:flex; align-items:center; gap:.5rem; }
.adm-name{ font-weight:800; font-size:.82rem; }
.adm-count{ margin-left:auto; font-family:var(--font-mono); font-size:.66rem; color:var(--accent); font-weight:700; }
.adm-tag{ font-size:.54rem; font-weight:800; letter-spacing:.05em; border-radius:5px; padding:.12rem .4rem; }
.adm-tag.banned{ background:rgba(220,38,38,.18); color:#ff7373; }
.adm-meta{
  display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .7rem;
  font-size:.66rem; color:var(--muted); font-family:var(--font-mono);
}
.adm-meta .adm-ip b{ color:var(--txt); }
.adm-isp{ color:var(--accent2, #9b7fff); }
.adm-uid{ font-size:.6rem; color:var(--muted); font-family:var(--font-mono); word-break:break-all; opacity:.85; }
.adm-actions{ display:flex; flex-wrap:wrap; gap:.4rem; }
.rp-btn.danger{ color:#ff7373; border-color:rgba(220,38,38,.4); }
.rp-btn.danger:hover{ background:rgba(220,38,38,.14); }

/* Profil kartındaki ID/UID kutusu */
.pp-idbox{
  background:var(--surf2); border:1px solid var(--bdr); border-radius:12px;
  padding:.55rem .7rem; display:flex; flex-direction:column; gap:.4rem; margin-top:.2rem;
}

/* ════════════════════════════════════════════════════════════════
   GİRİŞ EKRANI KİMLİĞİ — marka kilidi + canlı piksel tarlası
   Tema-bağımsız (yeni sınıflar, hiçbir tema bunları ezmez). İmza:
   Pixelify Sans wordmark (yüklü ama kullanılmayan gerçek piksel
   fontu) + arkada faction renklerinde yanıp sönen "canlı tuval".
   Kart (.lbox) önde ve okunur kalır; tarla kartın arkasında sönük.
════════════════════════════════════════════════════════════════ */

/* Canlı piksel tarlası — #login içinde, kartın arkasında */
#login-pixelfield{
  position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none;
}
.lpf-cell{
  position:absolute; width:22px; height:22px; border-radius:3px;
  background:currentColor; opacity:0;
  box-shadow:0 0 12px 1px currentColor;
  transition:opacity .85s ease;
  will-change:opacity;
}
/* Kart tarlanın önünde kalsın */
#login .lbox{ position:relative; z-index:1; }

/* Marka kilidi: bayrak + wordmark + dil */
.lbox-brand{
  display:flex; align-items:center; gap:.55rem;
  margin-bottom:.9rem;
}
.lbox-logo{ display:inline-flex; font-size:1.55rem; line-height:1; flex-shrink:0; }
.lbox-logo svg{ filter:drop-shadow(0 2px 5px rgba(0,0,0,.45)); }
.lbox-wordmark{
  font-family:'Pixelify Sans', var(--font-display), sans-serif;
  font-weight:600; font-size:1.5rem; line-height:1;
  letter-spacing:.01em; color:var(--txt);
  -webkit-font-smoothing:auto; /* piksel font net kalsın */
}
.lbox-wordmark b{ font-weight:600; color:var(--accent-text, var(--accent)); }

/* Aksiyon başlığı marka kilidinin altında; hiyerarşi net */
#login .lbox h1{ margin-top:.1rem; }

@media (max-width:520px){
  .lbox-wordmark{ font-size:1.3rem; }
  .lbox-logo{ font-size:1.3rem; }
}

/* ════════════════════════════════════════════════════════════════
   PİKSEL BİLGİSİ KUTUSU — orta tuşla "bunu kim bastı?"
   İmleç yanında beliren küçük kart: koordinat (mono) + parti rengi/adı
   + basan oyuncu. pixel-info.js tarafından doldurulur.
════════════════════════════════════════════════════════════════ */
#pixinfo-pop{
  position:fixed; z-index:950; pointer-events:none;
  min-width:148px; max-width:250px;
  background:linear-gradient(160deg, rgba(var(--surf2-rgb),.98), rgba(var(--surf-rgb),.99));
  border:1px solid var(--bdr2);
  border-radius:10px; padding:.5rem .6rem;
  box-shadow:0 10px 30px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.4),
             inset 0 1px 0 rgba(var(--shine-rgb),.07);
  opacity:0; transform:translateY(4px) scale(.97); transform-origin:top left;
  transition:opacity .12s ease, transform .14s var(--ease-spring, ease);
}
#pixinfo-pop.show{ opacity:1; transform:none; }
.pxi-coord{
  font-family:var(--font-mono, monospace); font-size:.6rem; font-weight:700;
  color:var(--muted); letter-spacing:.05em; margin-bottom:.4rem;
  padding-bottom:.36rem; border-bottom:1px solid var(--bdr);
}
.pxi-party{ display:flex; align-items:center; gap:.42rem; font-size:.76rem; font-weight:800; color:var(--txt); margin-bottom:.34rem; }
.pxi-sw{ width:14px; height:14px; border-radius:3px; border:1px solid rgba(0,0,0,.45); box-shadow:inset 0 1px 0 rgba(255,255,255,.25); flex-shrink:0; }
.pxi-byrow{ display:flex; align-items:baseline; gap:.4rem; font-size:.68rem; }
.pxi-by{ color:var(--muted); flex-shrink:0; }
.pxi-who{ display:inline-flex; align-items:center; gap:.26rem; font-weight:800; color:var(--accent-text, var(--accent)); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pxi-who svg{ width:.9em; height:.9em; opacity:.85; flex-shrink:0; }
.pxi-who.me{ color:#00d4a0; }
.pxi-who.unknown{ color:var(--muted); font-weight:600; font-style:italic; }
/* v75: isim ve fraksiyon etiketi tıklanabilir — profil/fraksiyon açar */
.pxi-who[data-pp]{ cursor:pointer; }
.pxi-who[data-pp]:hover{ text-decoration:underline; }
.pxi-fac{ font-weight:800; cursor:pointer; flex-shrink:0; }
.pxi-fac:hover{ text-decoration:underline; }
/* Kutu YALNIZ açıkken tıklanabilir. Eskiden koşulsuz pointer-events:auto
   vardı; kapatıldığında element DOM'da opacity:0 ile duruyor ve durduğu
   yerdeki tıklamaları yutuyordu — o noktaya piksel basılamıyordu. */
#pixinfo-pop{ pointer-events:none; }
#pixinfo-pop.show{ pointer-events:auto; }
.pxi-empty{ font-size:.7rem; color:var(--muted); }

/* ════════════════════════════════════════════════════════════════
   PROFİL — komutan dosyası istatistik kartları
   Düz merkezli sayılar yerine sola hizalı "dosya" kartları: üstte ikon,
   büyük değer, küçük etiket. Sıra (#) kartları rütbe olduğu için altın
   vurgu alır. 5→4 sütun boşluğu düzeltildi. Varsayılan 'front' teması
   .pc-stat'a dokunmuyor; bu kurallar güvenle uygulanır.
════════════════════════════════════════════════════════════════ */
.pc-stats{ grid-template-columns:repeat(4,1fr) !important; }
.pc-stat{
  position:relative; overflow:hidden;
  align-items:flex-start !important; gap:.2rem !important;
  padding:.7rem .7rem .62rem !important;
  background:linear-gradient(158deg, rgba(var(--surf3-rgb),.75) 0%, rgba(var(--surf2-rgb),.92) 100%) !important;
  border:1px solid var(--bdr) !important; border-radius:12px !important;
  box-shadow:inset 0 1px 0 rgba(var(--shine-rgb),.05) !important;
  transition:transform .18s var(--ease-spring, ease), border-color .2s, box-shadow .2s !important;
}
.pc-stat-ic{
  display:flex; color:var(--accent-text, var(--accent));
  font-size:.95rem; opacity:.92; margin-bottom:.05rem;
}
.pc-stat-ic svg{ width:1em; height:1em; }
.pc-stat-val{ font-size:1.35rem !important; font-weight:800 !important; letter-spacing:-.01em; line-height:1.05 !important; }
.pc-stat-lbl{ font-size:.54rem !important; line-height:1.25 !important; text-align:left !important; }
.pc-stat:hover{
  transform:translateY(-2px);
  border-color:rgba(var(--accent-rgb),.42) !important;
  box-shadow:0 6px 18px rgba(0,0,0,.32), inset 0 1px 0 rgba(var(--shine-rgb),.07) !important;
}
/* Sıra (#) kartları = rütbe → altın vurgu + üst şerit */
.pc-stat.rank::before{
  content:''; position:absolute; left:0; top:0; right:0; height:2px;
  background:linear-gradient(90deg, var(--gold), transparent 85%);
}
.pc-stat.rank .pc-stat-ic{ color:var(--gold); }
.pc-stat.rank .pc-stat-val{ color:var(--gold); }
.pc-stat.rank:hover{ border-color:rgba(245,166,35,.45) !important; box-shadow:0 6px 18px rgba(245,166,35,.14), inset 0 1px 0 rgba(var(--shine-rgb),.07) !important; }

@media (max-width:560px){
  .pc-stats{ grid-template-columns:repeat(2,1fr) !important; }
}

/* Profil kimliği: isim biraz daha baskın (hiyerarşi) */
#pc-username-display{ font-size:1.28rem !important; letter-spacing:-.02em !important; }

/* ════════════════════════════════════════════════════════════════
   CHAT + PROFİL FACTION ROZETİ — [TAG] + bayrak
   Gönderenin faction tag'i ve bayrağı (fcLogo) sohbette adın yanında,
   profilde başlık çipinde gösterilir. Renk faction rengidir (inline).
════════════════════════════════════════════════════════════════ */
.cm-meta{ display:flex; align-items:center; gap:.34rem; flex-wrap:wrap; margin-bottom:1px; }
.cm.user .cm-meta{ justify-content:flex-end; }
.cm-fac{
  display:inline-flex; align-items:center; gap:.2rem;
  font-family:var(--font-mono, monospace); font-size:.55rem; font-weight:800; line-height:1;
  padding:.1rem .34rem; border-radius:5px; border:1px solid currentColor;
  flex-shrink:0;
}
.cm-fac svg{ width:.85em; height:.85em; }

/* Profil başlığı faction çipi — bayrak + [TAG] */
.pp-chip.pp-chip-fac{ border:1px solid currentColor; }
.pp-chip.pp-chip-fac svg{ width:.9em; height:.9em; vertical-align:-.12em; }

/* Kullanıcı kartı faction satırındaki bayrak ikonu */
.pp-fchip svg{ width:.9em; height:.9em; vertical-align:-.12em; }
