/* ============================================
   cafe-theme.css — 深夜咖啡厅视觉主题 v2（朱砂红）
   深棕黑 #222222 + 朱砂红 #b8453a
   简洁卡片 · 台灯光晕 · 线性蒸汽 · 雨滴
   ============================================ */

/* ===== 0. CSS 变量覆盖 ===== */
:root {
  --ink-deep: #222222 !important;
  --ink-mid: #222222 !important;
  --ink-surface: #222222 !important;
  --ink-card: #222222 !important;
  --ink-border: rgba(184, 69, 58, 0.15) !important;
  --gold: #b8453a !important;
  --gold-dim: #b8453a !important;
  --gold-pale: #d4a09a !important;
  --text: #e8d5c4 !important;
  --text-dim: #b8a590 !important;
  --text-muted: #6a5d4e !important;
  --accent-warm: #b8453a !important;
}

/* ===== 1. 全局底色 ===== */
body {
  background: #222222 !important;
  color: #e8d5c4 !important;
}

body::before {
  opacity: 0.024 !important;
}

/* ===== 2. 台灯光晕 ===== */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  max-width: 800px;
  height: 100vh;
  background: radial-gradient(ellipse at 50% 0%,
    rgba(184, 69, 58, 0.05) 0%,
    rgba(184, 69, 58, 0.02) 35%,
    rgba(0, 0, 0, 0) 75%
  );
  pointer-events: none;
  z-index: 0;
  animation: lamp-breathe 8s ease-in-out infinite;
}

@keyframes lamp-breathe {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1.0; }
}

/* ===== 4. 线性蒸汽动画（已移除） ===== */
.steam-container {
  position: fixed;
  bottom: 120px;
  right: 80px;
  pointer-events: none;
  z-index: 1;
}

.steam-wisp {
  position: absolute;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle,
    rgba(255,255,255,0.08) 0%,
    rgba(255,255,255,0.02) 50%,
    rgba(255,255,255,0) 100%
  );
  border-radius: 50%;
  filter: blur(5px);
  animation: steam-linear 5s linear infinite;
}

.steam-wisp:nth-child(1) {
  animation-delay: 0s;
  left: 0;
}

.steam-wisp:nth-child(2) {
  animation-delay: 1.6s;
  left: 10px;
  width: 9px;
  height: 9px;
}

.steam-wisp:nth-child(3) {
  animation-delay: 3.2s;
  left: -5px;
  width: 11px;
  height: 11px;
}

@keyframes steam-linear {
  0%   { transform: translateY(0) translateX(0) scale(0.7); opacity: 0; }
  10%  { opacity: 0.20; }
  50%  { transform: translateY(-40px) translateX(6px) scale(1.6); opacity: 0.10; }
  80%  { transform: translateY(-65px) translateX(-3px) scale(2.4); opacity: 0.03; }
  100% { transform: translateY(-90px) translateX(2px) scale(3.0); opacity: 0; }
}

/* ===== 5. 简洁卡片（无木纹） ===== */
.container,
.form-section,
.report-section,
.report-container,
article,
section,
.card,
.info-box,
.hl-box,
.toc,
[class*="card"],
[class*="box"],
[class*="panel"] {
  background: #222222 !important;
  border-color: rgba(184, 69, 58, 0.15) !important;
  box-shadow: 0 2px 24px rgba(12, 8, 6, 0.50) !important;
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

[class*="card"]:hover,
[class*="box"]:hover,
[class*="panel"]:hover,
.form-section:hover,
.report-section:hover {
  box-shadow: 0 4px 32px rgba(12, 8, 6, 0.60), 0 0 20px rgba(184, 69, 58, 0.06) !important;
  transform: translateY(-2px);
}

/* 表格 */
table {
  border-color: rgba(184, 69, 58, 0.12) !important;
}

th {
  background: #222222 !important;
  color: #b8453a !important;
  border-color: rgba(184, 69, 58, 0.12) !important;
}

td {
  background: #222222 !important;
  border-color: rgba(184, 69, 58, 0.08) !important;
  color: #d0c5b5 !important;
}

tr:nth-child(even) td {
  background: #222222 !important;
}

/* ===== 6. 按钮 ===== */
.btn,
button,
[class*="btn"],
a[class*="btn"],
.cta a {
  background: #993333 !important;
  color: #e8d5c4 !important;
  border: 1px solid rgba(184, 69, 58, 0.25) !important;
  transition: all 0.35s ease !important;
}

.btn:hover,
button:hover,
[class*="btn"]:hover,
a[class*="btn"]:hover,
.cta a:hover {
  background: #7a2828 !important;
  color: #fff5e8 !important;
  box-shadow: 0 0 20px rgba(184, 69, 58, 0.14) !important;
  transform: translateY(-1px);
}

.btn:active,
button:active,
[class*="btn"]:active,
a[class*="btn"]:active,
.cta a:active {
  transform: scale(0.97) translateY(0) !important;
  box-shadow: 0 0 8px rgba(184, 69, 58, 0.10) !important;
  transition: transform 0.08s ease, box-shadow 0.08s ease !important;
}

.btn:focus-visible,
button:focus-visible,
[class*="btn"]:focus-visible,
a[class*="btn"]:focus-visible {
  outline: 2px solid rgba(184, 69, 58, 0.50) !important;
  outline-offset: 2px;
}

.btn-primary {
  background: #993333 !important;
  color: #e8d5c4 !important;
}

.btn-primary:hover {
  background: #7a2828 !important;
}

/* ===== 7. 链接 & 标题 ===== */
a {
  color: #b8453a !important;
  transition: color 0.3s !important;
}

a:hover {
  color: #d4a09a !important;
}

h1, h2, h3, h4, h5, h6,
.section-title,
[class*="title"] {
  color: #b8453a !important;
  text-wrap: balance;
}

h1 {
  text-shadow: 0 0 30px rgba(184, 69, 58, 0.14) !important;
  letter-spacing: 2px !important;
}

.subtitle,
.hero .subtitle {
  color: #b8a590 !important;
}

.breadcrumb,
.breadcrumb a {
  color: #8a7a65 !important;
}

.hero-badge {
  color: #b8453a !important;
  border-color: rgba(184, 69, 58, 0.35) !important;
  border-radius: 2px !important;
  letter-spacing: 4px !important;
}

hr,
[class*="divider"],
.border-bottom,
.section-title {
  border-color: rgba(184, 69, 58, 0.12) !important;
}

/* ===== 8. 输入框 ===== */
input, select, textarea,
.form-group input,
.form-group select {
  background: #222222 !important;
  border-color: rgba(184, 69, 58, 0.18) !important;
  color: #e8d5c4 !important;
}

input:focus, select:focus, textarea:focus,
.form-group input:focus,
.form-group select:focus {
  border-color: rgba(184, 69, 58, 0.45) !important;
  box-shadow: 0 0 12px rgba(184, 69, 58, 0.06) !important;
}

/* ===== 9. 免责声明 ===== */
.disclaimer {
  color: #6a5d4e !important;
  border-color: rgba(184, 69, 58, 0.08) !important;
}

/* ===== 10. BGM 按钮 ===== */
.bgm-btn {
  background: rgba(0, 0, 0, 0.88) !important;
  border-color: rgba(184, 69, 58, 0.18) !important;
  color: #b89a70 !important;
}

.bgm-btn:hover {
  background: rgba(0, 0, 0, 0.94) !important;
  border-color: rgba(184, 69, 58, 0.35) !important;
  color: #b8453a !important;
  box-shadow: 0 4px 20px rgba(12,8,6,0.55), 0 0 20px rgba(201,168,124,0.08) !important;
}

.bgm-btn.playing {
  color: #b8453a !important;
  border-color: rgba(184, 69, 58, 0.35) !important;
  box-shadow: 0 2px 12px rgba(12,8,6,0.40), 0 0 24px rgba(201,168,124,0.14) !important;
}

@keyframes bgm-breathe-cafe {
  0%, 100% { box-shadow: 0 2px 12px rgba(12,8,6,0.40); }
  50% { box-shadow: 0 2px 20px rgba(160,130,90,0.22), 0 0 24px rgba(160,130,90,0.06); }
}

.bgm-btn.idle-hint {
  animation: bgm-breathe-cafe 2.5s ease-in-out infinite !important;
}

.bgm-tooltip {
  background: rgba(0, 0, 0, 0.94) !important;
  border-color: rgba(184, 69, 58, 0.12) !important;
  color: #b89a70 !important;
}

/* ===== 11. z-index 层级保护 ===== */
.container,
header,
main,
article,
nav,
footer,
form,
.bgm-btn,
.bgm-tooltip {
  position: relative;
  z-index: 2;
}
