/* 全局基础 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 50% 20%, #0a1630 0%, #030614 70%, #01030a 100%);
  color: #f5f7ff;
}

/* 星空、银河、佛光三层背景 */
.stars,
.galaxy,
.buddha-light {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.stars {
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.5px 1.5px at 70% 60%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.8px 1.8px at 40% 80%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.2px 1.2px at 85% 20%, rgba(255,255,255,0.6), transparent),
    radial-gradient(2px 2px at 30% 50%, rgba(255,210,120,0.9), transparent),
    radial-gradient(1.8px 1.8px at 60% 30%, rgba(255,200,110,0.8), transparent);
  animation: twinkle 12s ease-in-out infinite alternate;
  opacity: 0.9;
}

@keyframes twinkle {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.04); }
}

.galaxy {
  background:
    radial-gradient(ellipse at 50% 60%, rgba(255,220,120,0.45), transparent 65%),
    radial-gradient(ellipse at 50% 60%, rgba(120,160,255,0.25), transparent 75%);
  mix-blend-mode: screen;
}

.buddha-light {
  background:
    radial-gradient(circle at center, rgba(255,230,150,0.35), transparent 70%),
    radial-gradient(circle at 50% 80%, rgba(255,200,120,0.25), transparent 80%);
  mix-blend-mode: screen;
  animation: pulse 7s ease-in-out infinite alternate;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* 首页主视觉 */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.title {
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  color: #f7fbff;
  text-shadow: 0 0 18px rgba(255,220,120,0.45);
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2.4rem;
  color: #ffe9c7;
  text-shadow: 0 0 12px rgba(255,200,120,0.35);
}

/* 通用容器（章节页、入口页） */
.container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

/* 宇宙方程展示 */
.equation {
  font-size: 1.6rem;
  margin: 2rem 0;
  color: #ffe9c7;
  text-shadow: 0 0 12px rgba(255,200,120,0.35);
}

/* 小节标题 */
.section-title {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #ffe9c7;
  text-shadow: 0 0 10px rgba(255,200,120,0.3);
}

/* 按钮组 */
.buttons {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,220,120,0.7);
  color: #fff7e6;
  background: rgba(10,20,40,0.6);
  backdrop-filter: blur(8px);
  text-decoration: none;
  font-size: 0.98rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

.btn:hover {
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(255,220,120,0.8);
  transform: translateY(-1px);
  background: rgba(20,40,80,0.9);
}

/* 章节列表（宇宙总方程目录等） */
.chapters {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.chapter {
  padding: 1rem 1.4rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,220,120,0.4);
  backdrop-filter: blur(6px);
  color: #fff7e6;
  text-decoration: none;
  transition: all 0.25s ease;
  text-align: left;
}

.chapter:hover {
  background: rgba(255,255,255,0.12);
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(255,220,120,0.8);
  transform: translateY(-2px);
}

/* 页脚 */
.footer {
  position: fixed;
  bottom: 1.2rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.6;
  z-index: 1;
  color: #ffe9c7;
}

/* 通用正文排版（以后章节页可用） */
.main-text {
  text-align: left;
  line-height: 1.8;
  font-size: 1rem;
  max-width: 720px;
  margin: 2rem auto 0;
  color: #f5f7ff;
}

.main-text p + p {
  margin-top: 0.8rem;
}
