body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: url('../images/bgMainMenu.png') no-repeat center center fixed;
  background-size: cover;
}

/* ==== Anti-scroll hanya halaman game ==== */
html.no-scroll, body.no-scroll { overflow: hidden; }
html, body { height: 100%; }

.logo-inside {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 60px;
  background: url('../images/logo.png') no-repeat center;
  background-size: 300px 62px;
  border-radius: 15px;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* Footer */
.footer {
  width: 90%;
  max-width: 900px;
  display: flex;
  justify-content: space-between;
  margin: 20px auto;
  z-index: 2;
}

.footer button {
  background: #fdfde9;
  border: none;
  padding: 10px 20px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 10px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  cursor: pointer;
}

.footer button:hover {
  background: #ececcf;
}

#logWord {
  min-width:200px; 
  min-height:60px; 
  border:2px solid #333; 
  border-radius:8px;
  font-size:2rem; 
  text-align:center; 
  background:#fff;
  padding-top: -10px;
}

/* ==== Layout 1 layar: game + navigation ==== */
:root { --nav-h: 80px; }              /* tinggi bar navigasi */

.game-layout {
  min-height: 100svh;                 /* ukuran layar real, anti address bar */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;                   /* jangan biarkan anak bikin scroll */
}

/* Area game ambil sisa tinggi, center, tanpa scroll */
.game-page {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Kotak game 16:9, fit-contain terhadap ruang sisa di atas navigation */
#game-root {
  position: relative;
  aspect-ratio: 16 / 9;
  /* gunakan MIN dari batas lebar & tinggi tersisa supaya tidak muncul scroll */
  width: min(100vw, (100svh - var(--nav-h)) * 16/9);
  height: min(calc(100svh - var(--nav-h)), 100vw * 9/16);
  max-width: 100vw;
  max-height: calc(100svh - var(--nav-h));
  overflow: hidden;                   /* pastikan tidak bikin scroll internal */
}

/* Iframe isi penuh parent */
#unityFrame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

/* Loading kecil (opsional) */
#unity-loading {
  position: absolute;
  left: 0; right: 0; top: 8px;
  text-align: center;
  font: 500 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: #e6edf3;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  pointer-events: none;
}