/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 22px;
  user-select: none;
  -webkit-user-select: none;
}

/* ===== CSS Variables ===== */
:root {
  /* 角色好感色 */
  --color-shuyin: #FF9EAA;
  --color-qinghan: #9EC5FF;
  --color-wanning: #FFD59E;

  /* UI 颜色 */
  --color-bg-dark: rgba(10, 10, 20, 0.85);
  --color-bg-medium: rgba(20, 20, 40, 0.75);
  --color-text: #E8E8EC;
  --color-text-dim: #8888AA;
  --color-accent: #7B68EE;
  --color-accent-glow: rgba(123, 104, 238, 0.4);
  --color-danger: #FF6B6B;

  /* 对话框 */
  --dialogue-box-height: 32vh;
  --dialogue-padding: 26px;
  --dialogue-font-size: 25px;
  --dialogue-line-height: 1.6;
  --name-plate-font-size: 22px;

  /* 过渡 */
  --transition-fast: 200ms;
  --transition-normal: 300ms;
  --transition-slow: 500ms;
  --transition-scene: 800ms;
}

/* ===== 字体预加载 ===== */
@font-face {
  font-family: "GameFont";
  src: local("Noto Sans SC"), local("Microsoft YaHei"), local("PingFang SC");
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

/* ===== 按钮通用样式 ===== */
button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  outline: none;
}

button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== 工具类 ===== */
.hidden { display: none !important; }
.no-pointer { pointer-events: none; }
.fade-in { animation: fadeIn var(--transition-normal) ease-out forwards; }
.fade-out { animation: fadeOut var(--transition-normal) ease-in forwards; }
