/* Sayı Birleştir - sadece bu oyuna ait görünüş.
   Kutucuk renkleri oyunun içerik renkleri; üstlerindeki yazı iki temada da okunur. */

.zorluklar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}
.zorluk {
  padding: 8px 16px;
  border: 1px solid var(--cizgi);
  border-radius: 999px;
  background: var(--yuzey);
  color: var(--yazi);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.zorluk.aktif { background: var(--ana); border-color: var(--ana); color: var(--ana-uzeri); }
.bilgi-satiri { justify-content: center; }

.tahta-sarici {
  position: relative;
  width: min(100%, 440px);
  margin: 0 auto;
}
.tahta {
  --n: 4;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  grid-template-rows: repeat(var(--n), minmax(0, 1fr));
  gap: 10px;
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 16px;
  background: #4a3f6b;
  touch-action: none;
  user-select: none;
  direction: ltr;
}
.kutucuk {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  font-size: clamp(1rem, calc(34vw / var(--n)), 2.4rem);
  line-height: 1;
  min-height: 0;
}
.kutucuk.kucuk-yazi { font-size: clamp(0.8rem, calc(26vw / var(--n)), 1.8rem); }
.kutucuk.yeni { animation: belir 0.18s ease-out; }
.kutucuk.birlesti { animation: patla 0.2s ease-out; }
@keyframes belir { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes patla { 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .kutucuk.yeni, .kutucuk.birlesti { animation: none; } }

/* Mordan sarıya giden renkler */
.d2 { background: #efe9ff; color: #2d2450; }
.d4 { background: #ddd1ff; color: #2d2450; }
.d8 { background: #b49cff; color: #1d1640; }
.d16 { background: #8f72f5; color: #ffffff; }
.d32 { background: #7553e6; color: #ffffff; }
.d64 { background: #5b37cf; color: #ffffff; }
.d128 { background: #f2c94c; color: #3a2b00; }
.d256 { background: #f0b429; color: #3a2b00; }
.d512 { background: #ec9a1f; color: #2e1a00; }
.d1024 { background: #e8771d; color: #ffffff; }
.d2048 { background: #e2492f; color: #ffffff; box-shadow: 0 0 18px rgba(226, 73, 47, 0.6); }
.d4096 { background: #1d1b2e; color: #ffd84d; }

.perde {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  border-radius: 16px;
  background: rgba(19, 18, 28, 0.72);
  color: #ffffff;
  font-weight: 700;
}
.perde[hidden], .perde [hidden] { display: none; }
.perde p { margin: 0 0 6px; font-size: 1.15rem; }

.ipucu {
  text-align: center;
  color: var(--soluk);
  font-size: 0.9rem;
  max-width: 440px;
  margin: 14px auto 0;
}

/* Sayfa zemini desenli: yazı iki temada da okunsun diye kutu içinde */
.ipucu {
  width: fit-content;
  max-width: min(100%, 520px);
  margin-left: auto;
  margin-right: auto;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--yuzey);
  border: 1px solid var(--cizgi);
}

/* ---------- Görünüm: satranç tarzı (Batu'nun isteği, 2026-11-30) ----------
   Satranç tahtasıyla aynı dil: gradyanlı, kenarı parlayan çerçeve (dış gölge yok), içte hafif gölge,
   karelerde/parçalarda hafif parlaklık ve kabartma. Çok gerçekçi de çok düz de değil.
   Sadece bu blok eklendi; geri almak için bloğu silmek yeterli. */
/* Çerçeve ve oyuk hücreler; sayı karoları hafif parlak ve kabartmalı */
.tahta { background: linear-gradient(145deg, #6a5a9a, #3a3058 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -2px 0 rgba(0, 0, 0, 0.25); }
.kutucuk { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25); }
.tahta .kutucuk[class*=" d"] {
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.08));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18), 0 2px 3px rgba(0, 0, 0, 0.3);
}
.tahta .kutucuk.d2048 { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18), 0 0 18px rgba(226, 73, 47, 0.6); }
/* ---------- /satranç tarzı ---------- */
