/* ====== 主题：东方夜间仪式感 ====== */
/* 使用方式：<link rel="stylesheet" href="../theme/theme.css"> */
/* 工具页面可覆盖 --theme-* 变量来定制 */

:root {
  /* 色彩 —— 琥珀旧铜方向 */
  --gold: #c89b3c;
  --gold-hover: #d8aa4a;
  --gold-glow: rgba(255, 220, 120, 0.08);
  --gold-border: rgba(200, 155, 60, 0.2);
  --gold-border-hover: rgba(200, 155, 60, 0.35);

  /* 背景层 */
  --bg-deep: #140a02;
  --bg-mid: #1f1106;
  --bg-warm: #2a1810;
  --bg-surface: rgba(255, 255, 255, 0.04);

  /* 文字层级 */
  --text-body: rgba(255, 255, 255, 0.78);
  --text-secondary: rgba(255, 255, 255, 0.42);
  --text-faint: rgba(255, 255, 255, 0.15);
  --text-gold: #c89b3c;

  /* 边框（极低透明度——边界融化在黑暗里） */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(220, 180, 60, 0.08);

  /* 阴影 */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 8px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(200, 155, 60, 0.06);
  --shadow-btn-sink: 0 1px 4px rgba(0, 0, 0, 0.3);

  /* 时间节奏 */
  --t-hover: 0.4s;
  --t-breathe: 3.5s;
  --t-ritual: 1s;

  /* 间距 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

html, body {
  min-height: 100vh;
  background: linear-gradient(180deg,
    #100701 0%,        /* 顶部最暗 */
    #1a0d04 20%,       /* 缓慢过渡 */
    #24140c 45%,       /* 中央偏暖——视线聚焦 */
    #1f1108 65%,       /* 逐渐变暗 */
    #100701 100%       /* 底部最暗 */
  );
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

/* Vignette —— 极柔、边界消失 */
body::after {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 50% 42%, transparent 55%, rgba(8, 3, 0, 0.45) 100%);
}

/* 中央琥珀呼吸光晕 —— 像远处香火把空气微微照暖 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%, rgba(210, 145, 50, 0.025) 0%, rgba(180, 120, 40, 0.008) 40%, transparent 70%);
  pointer-events: none; z-index: 0;
  animation: theme-breathe var(--t-breathe) ease-in-out infinite;
}

@keyframes theme-breathe {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* 容器 */
.theme-container {
  max-width: 420px;
  margin: 0 auto;
  padding: 50px 20px 40px;
  position: relative;
  z-index: 1;
}

/* ====== 按钮 ====== */
.theme-btn {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid var(--gold-border);
  background: linear-gradient(180deg, rgba(200,155,60,.12) 0%, rgba(200,155,60,.04) 100%);
  box-shadow: inset 0 1px 0 rgba(255,220,150,.04), 0 2px 8px rgba(0,0,0,.3);
  color: var(--gold);
  transition: background var(--t-hover), border-color var(--t-hover), box-shadow var(--t-hover), transform 0.15s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.theme-btn:hover {
  background: linear-gradient(180deg, rgba(210,160,65,.18) 0%, rgba(200,155,60,.08) 50%, rgba(180,135,50,.04) 100%);
  border-color: var(--gold-border-hover);
  box-shadow: inset 0 1px 0 rgba(255,220,150,.08), 0 0 24px rgba(200,155,60,.12), 0 4px 12px rgba(0,0,0,.4);
}

.theme-btn:active {
  transform: scale(0.98);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.4);
}

/* 呼吸态 —— 潜意识感知"元素有生命" */
.theme-breathing {
  animation: theme-btn-breathe 3.2s ease-in-out infinite;
}
@keyframes theme-btn-breathe {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,220,150,.04), 0 0 8px rgba(200,155,60,.04); }
  50% { box-shadow: inset 0 1px 0 rgba(255,220,150,.08), 0 0 16px rgba(200,155,60,.1); }
}

/* 次要/回退按钮 */
.theme-btn-ghost {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.02) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
  color: var(--text-secondary);
  transition: background var(--t-hover), border-color var(--t-hover), box-shadow var(--t-hover), transform 0.15s;
}

.theme-btn-ghost:hover {
  background: linear-gradient(180deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,.03) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 2px 12px rgba(0,0,0,.3);
}

.theme-btn-ghost:active {
  transform: scale(0.98);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.3);
}

/* ====== 卡片 ====== */
.theme-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: transform var(--t-hover), box-shadow var(--t-hover), border-color var(--t-hover);
}

.theme-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(200, 155, 60, 0.15);
}

/* 无边框面板 —— 纯阴影区分层级 */
.theme-panel {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

/* ====== 排版 ====== */
.theme-title {
  font-size: 22px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 8px;
  font-family: serif;
  text-align: center;
}

.theme-subtitle {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 4px;
  text-align: center;
}

.theme-text-gold {
  color: var(--text-gold);
}
