/* ============================================================
 * 首屏關鍵樣式 (Critical CSS) 
 * 負責：確保應用程式在 JS 載入 CSS 之前，不會發生畫面閃爍 (FOUC)
 * ============================================================ */

/* 防止 body 因 Vite CSS 延遲載入造成 layout shift (CLS) */
body {
  margin: 0;
  padding: 0;
  background-color: #000;
  height: 100vh;
  overflow: hidden;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* 防止以下 position:fixed 元素在 Vite CSS 載入前處於正常文件流而產生 CLS */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
}

#live2dContainer {
  position: fixed;
  left: 20px;
  top: 10vh;
}

.chat-input-container {
  position: fixed;
  right: 30px;
  bottom: 30px;
}

.group-drag-handle {
  position: absolute;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
