/* PF 스타더스트 — 한국어 UI (파일: public/fonts/) */
@font-face {
  font-family: 'PFStarDust';
  src: url('/fonts/PFStarDust.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PFStarDust';
  src: url('/fonts/PFStarDust_Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PFStarDust';
  src: url('/fonts/PFStarDust_ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Terrarum Sans Bitmap — en / zh-CN / ja (SIL OFL 1.1, see font LICENSE) */
@font-face {
  font-family: 'TerrarumSansBitmap';
  src: url('/fonts/TerrarumSansBitmap.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.87);
  background-color: #0f172a;
  touch-action: none;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
}

#app {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #0f172a;
}

#game-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #0f172a;
}

#game-container canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

/* Fullscreen 정렬 보정 */
#app:fullscreen,
#game-container:fullscreen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #0f172a;
}

#app:fullscreen #game-container,
#game-container:fullscreen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

#app:fullscreen canvas,
#game-container:fullscreen canvas {
  display: block;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
}

/* 일부 WebKit 계열 브라우저 대응 */
#app:-webkit-full-screen,
#game-container:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #0f172a;
}

#app:-webkit-full-screen #game-container,
#game-container:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

#app:-webkit-full-screen canvas,
#game-container:-webkit-full-screen canvas {
  display: block;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
}