/* Satranç — oyun alanı stilleri (design system üstüne) */

.oyun-kolon {
  width: min(520px, 100vw);
  margin: 0 auto;
  padding: 0 var(--s3) var(--s8);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  position: relative;
  z-index: 1;
}

.oyuncu-serit {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s2) var(--s4);
  border-radius: var(--r-orta);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--cizgi-soluk);
  min-height: 50px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.oyuncu-serit.sirada {
  border-color: var(--altin-soft);
  box-shadow: 0 0 0 1px var(--altin-soft), 0 0 18px rgba(217, 176, 76, 0.15);
}
.oyuncu-serit .oyuncu-ad { font-weight: 800; font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oyuncu-serit .renk-ibaresi { font-size: 11px; color: var(--soluk); letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
.oyuncu-serit .dusunuyor {
  font-size: 12px; color: var(--altin-1);
  animation: nefes 1.2s ease-in-out infinite;
}

/* ---------- tahta ---------- */
.tahta-kap {
  padding: 10px;
  border-radius: var(--r-buyuk);
  background: linear-gradient(165deg, #1b2946, #101a2e);
  border: 1px solid var(--cizgi);
  box-shadow: var(--golge-panel), 0 0 40px rgba(217, 176, 76, 0.06);
}

#tahta {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-kucuk);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.kare {
  position: absolute;
  width: 12.5%;
  height: 12.5%;
}
.kare.acik-kare { background: #dfe4ee; }
.kare.koyu-kare { background: #4a5b85; }

/* Koordinat etiketleri */
.kare .koord {
  position: absolute;
  font-size: clamp(7px, 1.8vw, 10px);
  font-weight: 700;
  opacity: 0.55;
  pointer-events: none;
}
.kare.acik-kare .koord { color: #4a5b85; }
.kare.koyu-kare .koord { color: #dfe4ee; }
.kare .koord.dosya { right: 3px; bottom: 2px; }
.kare .koord.sira { left: 3px; top: 2px; }

.kare.son-hamle::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(232, 193, 90, 0.34);
}
.kare.secili::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(90, 162, 232, 0.35);
  box-shadow: inset 0 0 0 2px rgba(90, 162, 232, 0.8);
}
.kare.sah-tehdit {
  animation: sahYanip 0.9s ease-in-out infinite;
}
@keyframes sahYanip {
  0%, 100% { box-shadow: inset 0 0 0 3px rgba(229, 88, 106, 0.9), inset 0 0 22px rgba(229, 88, 106, 0.55); }
  50% { box-shadow: inset 0 0 0 3px rgba(229, 88, 106, 0.4), inset 0 0 10px rgba(229, 88, 106, 0.25); }
}

/* Legal hamle noktaları */
.kare.hedef::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 26%; height: 26%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(20, 28, 46, 0.45);
  box-shadow: 0 0 0 2px rgba(232, 193, 90, 0.5);
  z-index: 3;
}
.kare.hedef.alis::before {
  width: 88%; height: 88%;
  background: transparent;
  border: 3px solid rgba(229, 88, 106, 0.75);
  box-shadow: none;
}

.tas {
  position: absolute;
  width: 12.5%;
  height: 12.5%;
  z-index: 2;
  pointer-events: none;
  transition: transform 0.18s cubic-bezier(0.3, 0.8, 0.4, 1);
  will-change: transform;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}
.tas img { width: 100%; height: 100%; display: block; }
.tas.aliniyor {
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-origin: center;
  opacity: 0;
  z-index: 1;
}

/* ---------- hamle geçmişi ---------- */
#hamle-gecmisi {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 96px;
  overflow-y: auto;
  font-size: 13px;
}
#hamle-gecmisi .h-no { color: var(--cok-soluk); font-weight: 700; }
#hamle-gecmisi .h-san {
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--cizgi-soluk);
}
#hamle-gecmisi .h-san.son {
  border-color: var(--altin-soft);
  color: var(--altin-1);
}

.durum-panel { padding: var(--s3) var(--s4); }

/* ---------- terfi modalı ---------- */
.terfi-secim { display: flex; gap: var(--s3); justify-content: center; }
.terfi-secim button {
  width: 64px; height: 64px;
  border-radius: var(--r-orta);
  border: 1px solid var(--cizgi);
  background: #182642;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
/* hover'da transform yasak (site kuralı) */
.terfi-secim button:hover { border-color: var(--altin-2); box-shadow: 0 0 0 3px var(--altin-soft); }
.terfi-secim img { width: 100%; height: 100%; }
