/* 宠信 Ch&Xi —— 主题变量与 MC 风格基础组件 */

@font-face {
  font-family: 'PixelZh';
  src: url('../assets/fonts/fusion-pixel-12px-zh-subset.e1a0fa9e.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'PixelLatin';
  src: url('../assets/fonts/fusion-pixel-12px-latin-subset.d1ff1b00.woff2') format('woff2');
  font-display: swap;
}

:root {
  /* 石质面板配色（MC 界面质感） */
  --mc-ink: #2b2620;
  --mc-panel: #b8b0a3;
  --mc-light: #e8e2d6;
  --mc-dark: #565046;
  --mc-btn: #a49b8c;
  --mc-slot: #4b453d;

  /* 主色 */
  --accent: #ff8a4c;
  --accent-dark: #c85f28;
  --accent-light: #ffb98a;

  --bg: #1b1712;
  --bg-2: #2a231b;
  --text: #332c24;
  --text-light: #efe8dc;
  --muted: #7d7367;
  --danger: #c2452d;
  --ok: #5c9a4a;

  --radius: 0;
  --gap: 24px;

  --font-pixel: 'PixelZh', 'PixelLatin', 'Microsoft YaHei', monospace;
  --font-body: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* hidden 属性优先于任何 display 规则 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }

/* ── 面板：斜面石块 ── */
.mc-panel {
  background: var(--mc-panel);
  border: 2px solid var(--mc-ink);
  border-radius: var(--radius);
  box-shadow:
    inset 3px 3px 0 var(--mc-light),
    inset -3px -3px 0 var(--mc-dark),
    0 6px 0 rgba(0, 0, 0, .25);
}

/* ── 按钮：按下会陷下去 ── */
.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: var(--font-pixel);
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--text-light);
  background: var(--mc-btn);
  border: 2px solid var(--mc-ink);
  border-radius: var(--radius);
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, .42),
    inset -3px -3px 0 rgba(0, 0, 0, .3),
    0 4px 0 rgba(0, 0, 0, .28);
  cursor: pointer;
  transition: transform .06s steps(2, end), box-shadow .06s steps(2, end), filter .12s;
  user-select: none;
}
.mc-btn:hover { filter: brightness(1.08); }
.mc-btn:active {
  transform: translate(3px, 3px);
  box-shadow:
    inset -3px -3px 0 rgba(255, 255, 255, .3),
    inset 3px 3px 0 rgba(0, 0, 0, .35);
}
.mc-btn:disabled { filter: grayscale(.6) brightness(.8); cursor: not-allowed; }

.mc-btn-primary {
  background: var(--accent);
  color: #3a1e0c;
  box-shadow:
    inset 3px 3px 0 var(--accent-light),
    inset -3px -3px 0 var(--accent-dark),
    0 4px 0 rgba(0, 0, 0, .3);
}
.mc-btn-ghost {
  padding: 8px 16px;
  font-size: 13px;
  background: transparent;
  color: var(--text-light);
  border-color: rgba(239, 232, 220, .5);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .18), inset -2px -2px 0 rgba(0, 0, 0, .3);
}

/* ── 输入框：内凹凹槽 ── */
.mc-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-light);
  background: var(--mc-slot);
  border: 2px solid var(--mc-ink);
  border-radius: var(--radius);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .45);
  outline: none;
}
.mc-input::placeholder { color: #8d8477; }
.mc-input:focus {
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .45), 0 0 0 2px var(--accent);
}

/* ── 复选框 ── */
.mc-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-light); cursor: pointer; }
.mc-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ── 页脚 ── */
.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  padding: 16px 16px 24px;
  font-size: 12px;
  color: rgba(239, 232, 220, .6);
}
.site-foot a { color: rgba(239, 232, 220, .75); text-decoration: none; }
.site-foot a:hover { color: var(--accent-light); text-decoration: underline; }

/* ── 提示条 ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 90;
  max-width: min(90vw, 420px);
  padding: 16px;
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--text-light);
  background: rgba(43, 38, 32, .96);
  border: 2px solid var(--mc-ink);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .3);
  animation: toast-in .18s steps(3, end);
}
.toast.is-error { border-color: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
