/* Bang mau lay tu chinh tam nen menu (MenuBackdropBuilder): troi dem tim than,
   anh lo cua Cong Tro Tan hat ra mau ho phach. */
:root {
  --ash-void: #0b0912;
  --ash-night: #140e18;
  --ash-stone: #4b3a52;
  --ash-ember: #ff9a45;
  --ash-bone: #dcd2c4;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ash-void);
  color: var(--ash-bone);
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Canvas chiem tron khung nhin. Game ve o 1920x1080 va tu co gian theo ti le man
   hinh, nen khong khoa kich thuoc co dinh o day. */
#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ash-void);
  outline: none;   /* canvas co tabindex nen trinh duyet ve vien tieu diem quanh no */
}

#loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: radial-gradient(60% 55% at 50% 62%, #24141f 0%, var(--ash-night) 55%, var(--ash-void) 100%);
  transition: opacity 500ms ease;
}

#loading.done {
  opacity: 0;
  pointer-events: none;
}

#loading-title {
  font-size: clamp(1.1rem, 3.2vw, 2rem);
  letter-spacing: 0.42em;
  text-indent: 0.42em;      /* bu lai khoang cach chu bi thua ben phai */
  text-transform: uppercase;
  color: var(--ash-bone);
}

#loading-bar {
  width: min(22rem, 62vw);
  height: 3px;
  background: rgba(220, 210, 196, 0.16);
  overflow: hidden;
}

#loading-fill {
  width: 0;
  height: 100%;
  background: var(--ash-ember);
  box-shadow: 0 0 12px var(--ash-ember);
  transition: width 200ms ease-out;
}

#loading-note {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: rgba(220, 210, 196, 0.55);
  max-width: min(34rem, 84vw);
  text-align: center;
  line-height: 1.5;
}

/* Tai that bai: thanh tien trinh doi sang do va loi duoc doc thang ra, thay vi mot
   hop thoai alert() trang khong noi duoc gi. */
#loading.failed #loading-fill {
  width: 100%;
  background: #c2412a;
  box-shadow: none;
}

#loading.failed #loading-note {
  color: #e9a08c;
}

#fullscreen {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 0.25rem;
  background: rgba(11, 9, 18, 0.55);
  color: rgba(220, 210, 196, 0.65);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.25;
  transition: opacity 160ms ease;
}

#fullscreen:hover,
#fullscreen:focus-visible {
  opacity: 1;
  color: var(--ash-bone);
}
