/* ==========================================================================
   layout.css
   header / loading画面 / トースト / バージョン表示
   ========================================================================== */

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
header h1 {
  font-size: 18px;
  color: var(--accent);
  font-family: var(--font-mono);
}
header .stats {
  display: flex;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 15px;
}
header .stats span { color: #3f524d; font-weight: 700; }
header .stats strong { color: #215e49; margin-left: 5px; font-weight: 800; }

/* 戦闘中はヘッダーを隠してキャンバスを最上部まで表示 */
#app.battle-mode header {
  display: none;
}

/* ロード画面 */
#loading {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-alt);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* トースト */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--accent);
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 13px;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  box-shadow: 0 2px 8px var(--panel-shadow);
  color: var(--text);
}
.toast.show { opacity: 1; }
