:root {
  --bg: #0d0d0d;
  --bg-soft: #141414;
  --text: #f5f5f5;
  --muted: #a0a0a0;
  --accent: #dd6030;
  --maxw: 760px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: "LXGW WenKai Screen", "Lora", "Songti SC", "STSong", serif;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

main {
  display: block;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  background-color: #1a1510;
  background-image: url("meditation-taoist.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero__veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.75) 65%, rgba(0, 0, 0, 0.92) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.hero__title {
  font-family: "LXGW WenKai Screen", "STKaiti", "KaiTi", serif;
  font-size: clamp(5rem, 15vw, 12rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  color: #fff8e8;
  text-shadow: 
    0 0 30px rgba(255, 220, 150, 0.6),
    0 0 60px rgba(255, 200, 100, 0.4),
    0 0 120px rgba(255, 180, 80, 0.2),
    0 4px 8px rgba(0, 0, 0, 0.5);
  animation: daoBreath 5s ease-in-out infinite;
}

@keyframes daoBreath {
  0%, 100% { 
    text-shadow: 
      0 0 30px rgba(255, 220, 150, 0.4),
      0 0 60px rgba(255, 200, 100, 0.2),
      0 4px 8px rgba(0, 0, 0, 0.5);
  }
  50% { 
    text-shadow: 
      0 0 50px rgba(255, 220, 150, 0.7),
      0 0 100px rgba(255, 200, 100, 0.4),
      0 0 150px rgba(255, 180, 80, 0.2),
      0 4px 8px rgba(0, 0, 0, 0.5);
  }
}

.hero__subtitle {
  font-size: clamp(1rem, 3.2vw, 1.5rem);
  color: rgba(200, 195, 180, 0.85);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  font-weight: 300;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* 每日一句 */
.daily-quote {
  margin-top: 48px;
  padding: 20px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.4s ease;
  max-width: 520px;
}

.daily-quote:hover {
  background: rgba(0, 0, 0, 0.4);
}

.daily-quote__text {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #f8f4e8;
  line-height: 1.8;
  letter-spacing: 0.08em;
}

.daily-quote__source {
  margin-top: 12px;
  font-size: 0.9rem;
  color: rgba(200, 195, 180, 0.7);
  text-align: right;
}

.daily-quote__full {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
  color: rgba(248, 244, 232, 0.85);
  line-height: 2;
  letter-spacing: 0.05em;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.4s ease;
}

.daily-quote__hint {
  margin-top: 12px;
  font-size: 0.75rem;
  color: rgba(200, 195, 180, 0.5);
  text-align: center;
  transition: opacity 0.3s ease;
}

.daily-quote__link {
  margin-top: 14px;
  display: inline-block;
  color: rgba(245, 245, 245, 0.92);
  text-decoration: none;
  border-bottom: 1px solid rgba(221, 96, 48, 0.65);
  padding-bottom: 2px;
  letter-spacing: 0.06em;
}

.daily-quote__link:hover {
  color: #fff;
  border-bottom-color: var(--accent);
}

.daily-quote.expanded .daily-quote__full {
  max-height: 400px;
  opacity: 1;
}

.daily-quote.expanded .daily-quote__hint {
  opacity: 0;
}

.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 1.2rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  animation: breathe 2.8s ease-in-out infinite;
  z-index: 1;
}

.section {
  background: var(--bg);
  padding: 96px 24px;
}

.section:nth-of-type(2n) {
  background: var(--bg-soft);
}

.section__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

h2 {
  margin: 0 0 24px 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.prose p {
  margin: 0 0 12px 0;
  color: var(--text);
}

.prose p:last-child {
  margin-bottom: 0;
}

.footer {
  padding: 40px 24px 64px;
  display: grid;
  gap: 12px;
  place-items: center;
  text-align: center;
  color: var(--muted);
  background: #0a0a0a;
}

.footer__link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  transition: border-color 0.2s ease;
}

.footer__link:hover {
  border-color: var(--accent);
}

.footer__copy {
  font-size: 0.9rem;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.4;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 0.9;
    transform: translateX(-50%) translateY(6px);
  }
}

@media (max-width: 600px) {
  .section {
    padding: 72px 20px;
  }

  .hero__title {
    letter-spacing: 0.12em;
  }
}

/* ===== 全文阅读页 ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 13, 13, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.topbar__title {
  font-size: 0.95rem;
  color: rgba(245, 245, 245, 0.9);
  letter-spacing: 0.12em;
}

.topbar__back,
.topbar__home {
  color: rgba(245, 245, 245, 0.86);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  width: fit-content;
}

.topbar__back:hover,
.topbar__home:hover {
  border-color: var(--accent);
}

.topbar__home {
  justify-self: end;
  color: rgba(160, 160, 160, 0.9);
}

.reader {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 80px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
}

.reader__side {
  position: sticky;
  top: 72px;
  align-self: start;
}

.toc {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
}

.toc__summary {
  cursor: pointer;
  color: rgba(245, 245, 245, 0.9);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.toc__list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding-right: 6px;
}

.toc__item {
  color: rgba(245, 245, 245, 0.82);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.toc__item:hover {
  border-color: rgba(221, 96, 48, 0.55);
  background: rgba(221, 96, 48, 0.08);
}

.reader__content {
  min-width: 0;
}

.chapter {
  padding: 18px 0 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  scroll-margin-top: 92px;
}

.chapter__title {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.08em;
  font-size: 1.4rem;
}

.chapter__quote {
  margin: 0 0 12px;
  color: rgba(245, 245, 245, 0.92);
  letter-spacing: 0.06em;
}

.chapter__full {
  color: rgba(245, 245, 245, 0.86);
  line-height: 2.05;
}

.chapter__full p {
  margin: 0;
}

.footer--reader {
  background: #0a0a0a;
}

/* 全文页：移动端优化 */
@media (max-width: 900px) {
  .reader {
    grid-template-columns: 1fr;
  }

  .reader__side {
    position: static;
  }

  .toc__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .topbar__inner {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .topbar__home {
    justify-self: start;
  }

  .toc__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
