/* 没用的网站 — 样式。原则：静态、克制、不伤眼 */
:root {
  --bg: #f7f6f2;
  --ink: #2b2a27;
  --muted: #8a877f;
  --accent: #e8613c;       /* 暖橘红，与米色背景区分但不刺眼 */
  --accent-hover: #cf4f2d;
  --footer-bg: #262521;
  --footer-ink: #b8b5ad;
  --panel-bg: #fffdf9;
  --border: #e6e3da;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* —— 主区域 —— */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
}

.site-title {
  margin: 0;
  font-size: clamp(34px, 7vw, 56px);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.subtitle {
  margin: 14px 0 48px;
  color: var(--muted);
  font-size: clamp(15px, 2.5vw, 18px);
  letter-spacing: 0.12em;
}

/* 主按钮：静态展示，只有 hover 变色与按下微缩 */
.go-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-indent: 0.2em; /* 平衡字距 */
  color: #fff;
  background: var(--accent);
  padding: 18px 52px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(232, 97, 60, 0.28);
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.go-btn:hover { background: var(--accent-hover); }
.go-btn:active { transform: scale(0.97); box-shadow: 0 3px 10px rgba(232, 97, 60, 0.22); }
.go-btn:focus-visible { outline: 3px solid rgba(232, 97, 60, 0.4); outline-offset: 3px; }

.hint {
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
}

/* —— 历史入口按钮 —— */
.icon-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel-bg);
  color: var(--muted);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--muted); }

#history-btn {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 30;
}

/* —— 历史侧边栏 —— */
.history-panel {
  position: fixed;
  z-index: 50;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  /* 桌面：左侧滑出 */
  top: 0; left: 0; bottom: 0;
  width: min(340px, 88vw);
  border-radius: 0 14px 14px 0;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.08);
  animation: slide-in-left 0.22s ease;
}
@keyframes slide-in-left { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }

.icon-btn[hidden] { display: none !important; }
.history-panel[hidden] { display: none; }
.mask[hidden] { display: none; }

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px 20px;
  border-bottom: 1px solid var(--border);
}
.history-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.history-actions { display: flex; gap: 8px; align-items: center; }

.text-btn {
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  padding: 6px;
}
.text-btn:hover { color: var(--accent); }

.history-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  flex: 1;
}
.history-list li a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.history-list li a:hover { background: rgba(232, 97, 60, 0.06); }
.history-list .h-name { font-size: 14px; font-weight: 500; }
.history-list .h-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.history-list .empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 32px 0;
}

.mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.25);
  border: none;
}

/* 移动端：历史面板改为底部弹出 */
@media (max-width: 640px) {
  .history-panel {
    top: auto;
    left: 0; right: 0; bottom: 0;
    width: auto;
    max-height: 62vh;
    border-radius: 14px 14px 0 0;
    animation: slide-in-bottom 0.22s ease;
  }
  @keyframes slide-in-bottom { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* —— Footer —— */
.footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  text-align: center;
  padding: 20px 16px;
  font-size: 13px;
}
.footer a { color: var(--footer-ink); text-decoration: none; border-bottom: 1px dotted var(--footer-ink); }
.footer a:hover { color: #fff; border-bottom-color: #fff; }
.footer .sep { margin: 0 8px; opacity: 0.5; }
.footer p { margin: 0; line-height: 1.8; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
