/* 基础排版与布局 */

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

/* === 水墨宣纸背景纹理 === */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(180, 160, 130, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 60%, rgba(160, 140, 110, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 80%, rgba(170, 150, 120, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, var(--rice-paper) 0%, var(--rice-paper-dark) 100%);
  pointer-events: none;
}

/* === 主容器 === */
#app {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* === 排版 === */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.4;
  font-weight: var(--fw-bold);
}

p {
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

/* === 通用按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--ink-dark);
  color: var(--rice-paper);
  box-shadow: var(--shadow-ink);
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:active {
  background: var(--rice-paper-dark);
}

/* === 水墨扩散效果 === */
.ink-spread {
  position: relative;
}

.ink-spread::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at center, rgba(26, 26, 26, 0.08) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.ink-spread:active::after {
  opacity: 1;
  transform: scale(1.5);
}

/* === 通用分隔线 === */
.divider {
  width: 60px;
  height: 1px;
  background: var(--ink-lighter);
  margin: var(--space-lg) auto;
}

.divider-dotted {
  width: 100%;
  height: 0;
  border-top: 2px dashed var(--ink-lighter);
  margin: var(--space-lg) 0;
}

/* === 工具类 === */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }

/* === 偏好减少动画 === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
