/* ============================================================
   base.css — 全站设计变量（换肤只改这里）
   基调：中性深灰（Steam / Epic 那一路），平台自身不吃色彩，
        唯一冷蓝只用于链接与焦点，其余交给游戏封面。
   尺度：间距 4/8/12/16/24/32/48；字号 12/13/14/16/20/28/40
   ============================================================ */

:root {
  /* 背景三层：页面 / 卡片 / 悬起 */
  --bg:            #0f1113;
  --surface:       #16191c;
  --surface-2:     #1c2024;
  --surface-3:     #23282d;

  /* 文字 */
  --text:          #e6e8ea;
  --text-2:        #a0a6ad;
  --text-3:        #7b8288;

  /* 唯一强调色：只给链接、焦点、选中态 */
  --accent:        #5aa9e6;
  --accent-strong: #7cc0f0;
  --accent-soft:   rgba(90, 169, 230, 0.12);
  --accent-line:   rgba(90, 169, 230, 0.34);

  /* 语义色 */
  --ok:            #52b788;
  --warn:          #e0a458;
  --danger:        #e5484d;

  /* 描边：深色下靠白透明度分层，不用纯色线 */
  --line:          rgba(255, 255, 255, 0.07);
  --line-2:        rgba(255, 255, 255, 0.14);

  /* 圆角：平台感要小，别用 App 那种大圆角 */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 0.16s;
  --base: 0.22s;

  --font: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Courier New", monospace;

  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
:focus:not(:focus-visible) { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--fast) var(--ease),
              border-color var(--fast) var(--ease),
              color var(--fast) var(--ease);
}
.btn:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, 0.22); }
.btn:active { transform: translateY(0.5px); }

.btn--primary {
  background: #e6e8ea;
  border-color: #e6e8ea;
  color: #101214;
  font-weight: 500;
}
.btn--primary:hover { background: #fff; border-color: #fff; }

.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--surface-2); }

.btn--sm { padding: 5px 10px; font-size: 12px; }

/* ---------- 输入 ---------- */
.field {
  width: 100%;
  padding: 7px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease);
}
.field::placeholder { color: var(--text-3); }
.field:hover { border-color: rgba(255, 255, 255, 0.2); }
.field:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.7;
  white-space: nowrap;
}

.muted { color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
