/* Daoist Sutra Reading Pages - Shared Styles */
:root {
  --bg-primary: #faf6f0;
  --bg-card: #ffffff;
  --bg-header: linear-gradient(135deg, #8b1a1a 0%, #a52a2a 50%, #8b1a1a 100%);
  --text-primary: #2c1810;
  --text-secondary: #5a4a3a;
  --text-annotation: #6b5b4b;
  --accent-gold: #c9a84c;
  --accent-red: #a52a2a;
  --border-light: #e8ddd0;
  --border-gold: #d4b86a;
  --shadow-soft: 0 2px 12px rgba(44,24,16,0.08);
  --shadow-card: 0 4px 20px rgba(44,24,16,0.12);
  --font-cn: 'Noto Serif SC', 'Source Han Serif CN', 'SimSun', serif;
  --font-en: 'Georgia', 'Times New Roman', serif;
  --font-ui: 'Noto Sans SC', -apple-system, 'Segoe UI', sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-cn);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
}

/* Header */
.sutra-header {
  background: var(--bg-header);
  color: #f5e6d0;
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  position: relative;
  overflow: hidden;
}

.sutra-header::before {
  content: '☯';
  position: absolute;
  font-size: 12rem;
  opacity: 0.06;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.sutra-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 0.3rem;
  position: relative;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.sutra-header .subtitle-en {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 0.95rem;
  opacity: 0.85;
  position: relative;
}

.sutra-header .source-tag {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.25rem 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  position: relative;
}

/* Main content */
.sutra-body {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.2rem 4rem;
}

/* Section */
.section {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-bottom: 1.8rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.section-title {
  background: linear-gradient(90deg, #f8f0e4, #faf6f0);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-red);
  letter-spacing: 0.1em;
}

.section-title .en {
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  display: block;
  margin-top: 0.2rem;
  font-style: italic;
}

/* Verse blocks */
.verse-block {
  padding: 1.5rem;
  border-bottom: 1px dashed var(--border-light);
}

.verse-block:last-child {
  border-bottom: none;
}

.verse-cn {
  font-size: 1.15rem;
  line-height: 2;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
  text-align: justify;
}

.verse-en {
  font-family: var(--font-en);
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
  padding-left: 1rem;
  border-left: 3px solid var(--border-gold);
  margin-bottom: 0.8rem;
}

.annotation {
  background: #fdf8ee;
  border: 1px solid #ede4d4;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: var(--text-annotation);
  line-height: 1.7;
}

.annotation::before {
  content: '📌 注释 Notes: ';
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.8rem;
}

/* Navigation */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-light);
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-bar a {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-size: 0.72rem;
  color: var(--accent-red);
  text-decoration: none;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  transition: all 0.2s;
  font-family: var(--font-ui);
  white-space: nowrap;
}

.nav-bar a:hover,
.nav-bar a.active {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

/* Responsive */
@media (max-width: 640px) {
  .sutra-header h1 { font-size: 1.4rem; }
  .sutra-header { padding: 2rem 1rem 1.5rem; }
  .sutra-body { padding: 1rem 0.8rem 5rem; }
  .verse-cn { font-size: 1.05rem; }
  .nav-bar a { font-size: 0.65rem; padding: 0.25rem 0.5rem; }
  .section-title { font-size: 1rem; }
}

@media (min-width: 641px) {
  body { padding-bottom: 3rem; }
}

/* Print styles */
@media print {
  .nav-bar { display: none; }
  .section { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  body { background: #fff; }
}

/* Decorative elements */
.divider {
  text-align: center;
  color: var(--accent-gold);
  font-size: 1.5rem;
  margin: 1.5rem 0;
  opacity: 0.6;
  letter-spacing: 0.5em;
}

/* Back to top */
.back-top {
  position: fixed;
  bottom: 4rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--accent-red);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99;
  transition: opacity 0.3s;
}

.back-top.show { display: flex; }
