/* Desa Sukabantu — Prototipe 3D: gaya antarmuka (ringan, tanpa aset luar) */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #0e1a33; color: #f7efdb;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#adegan, #adegan canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- Layar judul ---------- */
#judul {
  position: fixed; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(14,26,51,0.55) 0%, rgba(14,26,51,0.25) 45%, rgba(14,26,51,0.65) 100%);
  transition: opacity 0.45s ease;
  padding: 20px;
}
#judul.sembunyi { opacity: 0; pointer-events: none; }
.kartu-judul { text-align: center; max-width: 430px; }
.lencana {
  display: inline-block; font-size: 11px; letter-spacing: 2.5px; font-weight: 700;
  color: #ffd9a0; border: 1px solid rgba(255,217,160,0.55); border-radius: 999px;
  padding: 5px 12px; margin-bottom: 16px; background: rgba(20,32,58,0.55);
}
.kartu-judul h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 9vw, 56px); line-height: 1.05;
  color: #fdf6e0; text-shadow: 0 3px 18px rgba(0,0,0,0.55);
}
.slogan {
  margin: 14px auto 22px; font-size: clamp(15px, 4vw, 18px); font-style: italic;
  color: #ffe9b8; text-shadow: 0 2px 10px rgba(0,0,0,0.6); max-width: 340px;
}
#masuk {
  font: inherit; font-size: 18px; font-weight: 700; cursor: pointer;
  color: #3a2410; background: linear-gradient(180deg, #ffc46a, #f09a3e);
  border: none; border-radius: 999px; padding: 14px 42px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.45);
}
#masuk:disabled { filter: grayscale(0.5) brightness(0.8); cursor: wait; }
#masuk:active { transform: scale(0.97); }
.catatan { margin-top: 14px; font-size: 13px; color: rgba(247,239,219,0.85); }
.catatan.kecil { font-size: 12px; color: rgba(247,239,219,0.6); max-width: 330px; margin-left: auto; margin-right: auto; }

/* ---------- HUD ---------- */
#hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 10px; pointer-events: none;
}
.panel-hud {
  background: rgba(18,28,20,0.62); border: 1px solid rgba(255,233,184,0.25);
  border-radius: 12px; padding: 8px 12px; backdrop-filter: blur(3px);
}
#labelMode { font-size: 13.5px; font-weight: 700; color: #fdf6e0; }
#labelFase { font-size: 12px; color: #ffd9a0; margin-top: 2px; }
#tombolMode {
  pointer-events: auto; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  color: #fdf6e0; background: rgba(122,62,32,0.85); border: 1px solid rgba(255,217,160,0.5);
  border-radius: 999px; padding: 10px 16px; box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
#tombolMode:active { transform: scale(0.96); }

/* ---------- Bar fase ---------- */
#faseBar {
  position: fixed; right: 10px; bottom: 12px; z-index: 20;
  display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; max-width: 62vw;
}
#faseBar button {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  color: #e9dfc6; background: rgba(18,28,20,0.62); border: 1px solid rgba(255,233,184,0.28);
  border-radius: 999px; padding: 6px 11px;
}
#faseBar button.aktif { background: #f09a3e; color: #3a2410; border-color: #f09a3e; }

/* ---------- Joystick ---------- */
#joy {
  position: fixed; left: 18px; bottom: 20px; z-index: 20;
  width: 118px; height: 118px; border-radius: 50%;
  background: rgba(18,28,20,0.4); border: 1.5px solid rgba(255,233,184,0.4);
  touch-action: none;
}
#joyKnob {
  position: absolute; left: 50%; top: 50%; width: 50px; height: 50px;
  margin: -25px 0 0 -25px; border-radius: 50%;
  background: rgba(255,217,160,0.85); box-shadow: 0 3px 10px rgba(0,0,0,0.4);
  pointer-events: none;
}
