/* Genel Ayarlar */
body {
  margin: 0;
  overflow: hidden;
  background-color: #1a1a1a;
  font-family: "Segoe UI", sans-serif;
}

/* =====================================================================
   HUD ÇUBUĞU - Tek satır, üstte ortalı
   ===================================================================== */
#ui-layer {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: none; /* gameStart eventi ile görünür olur */
  pointer-events: none; /* Tıklamaların 3D sahneye geçmesi için */
}

/* Yatay HUD çubuğu: Sol | Orta | Sağ */
#hud-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px; /* Elemanlar arası boşluk */
  background: rgba(0, 0, 0, 0.55); /* Yarı saydam arka plan */
  backdrop-filter: blur(6px); /* Cam efekti */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 20px;
  white-space: nowrap; /* Satır kırılmasını önle */
  transition: background 0.3s ease, border-color 0.3s ease; /* Renk geçişi için */
}

/* SIRA SİZE GELDİĞİNDE: Kırmızı arka plan */
#hud-bar.hud-my-turn {
    background: rgba(139, 0, 0, 0.7);   /* Koyu kırmızı, yarı saydam */
    border-color: rgba(255, 0, 0, 0.3); /* Hafif kırmızı kenarlık */
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2); /* Hafif parlama */
}

/* Sol: Durum mesajı */
#status {
  color: #e0e0e0;
  font-size: 14px;
  font-weight: 500;
  text-shadow: 1px 1px 3px black;
  min-width: 180px; /* Metin değişince çubuk genişliği oynamasın */
  text-align: center;
}

/* Orta: Zar sonuç kutucukları */
#dice-val {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 80px; /* Boşken de yer tutsun, kayma olmasın */
  justify-content: center;
}

/* Sağ: Roll Dice butonu */
#dice-controls {
  pointer-events: auto; /* Buton tıklanabilir olsun */
}

/* =====================================================================
   ZAR SONUÇ KUTUCUKları
   ===================================================================== */
.dice-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: gold;
  color: black;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* =====================================================================
   BUTON TASARIMLARI
   ===================================================================== */
button {
  background: #8b4513;
  color: white;
  border: none;
  padding: 9px 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  transition: background 0.15s;
  white-space: nowrap;
}
button:hover {
  background: #a05217;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =====================================================================
   GİRİŞ MENÜSÜ
   ===================================================================== */
#menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  color: white;
  text-align: center;
}
.menu-box {
  background: #2a2a2a;
  padding: 40px;
  border-radius: 10px;
  border: 1px solid #444;
  width: 320px;
}

/* Menü içindeki butonlar tam genişlik olsun */
.menu-box button {
  width: 100%;
  margin-top: 10px;
}

input {
  width: 90%;
  padding: 8px;
  margin-bottom: 10px;
  text-align: center;
  background: #333;
  color: white;
  border: 1px solid #555;
  border-radius: 4px;
}
