/* ============================================
   糖心读书会与知识分享平台 — 新中式书房美学
   设计运动：新中式极简主义 × 文人书房
   核心色彩：墨绿+米色+琥珀
   ============================================ */

:root {
  --primary: #2E7D32;
  --primary-light: #4CAF50;
  --secondary: #A5D6A7;
  --bg: #FAFAF5;
  --card: #FFFFFF;
  --accent: #FF8F00;
  --text: #3E2723;
  --text-light: #5D4037;
  --text-muted: #8D6E63;
  --border: #E8E5DF;
  --border-light: #F0EDE8;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(46,125,50,0.08);
  --shadow-lg: 0 8px 32px rgba(46,125,50,0.12);
  --shadow-card: 0 4px 16px rgba(62,39,35,0.06);
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --font-kai: "KaiTi", "STKaiti", serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --transition: 0.2s var(--ease-out);
}

/* 基础重置 */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-light);
}

/* 排版系统 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text);
  line-height: 1.4;
  font-weight: 700;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.875rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

blockquote {
  font-family: var(--font-kai);
  font-style: italic;
  border-left: 3px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(165,214,167,0.1);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* 布局容器 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section-title h2 {
  color: var(--text);
}

.section-title p {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 1rem;
}

/* 顶部导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250,250,245,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary);
}

.site-logo svg {
  width: 32px;
  height: 32px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text-light);
  font-size: 0.9375rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu a:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* 首屏英雄区 */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(46,125,50,0.85) 0%,
    rgba(46,125,50,0.6) 40%,
    rgba(62,39,35,0.7) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 680px;
  padding: 2rem 0;
}

.hero-content h1 {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-content .subtitle {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 按钮系统 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-light);
  color: #fff;
  box-shadow: 0 4px 16px rgba(46,125,50,0.3);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: #F57C00;
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,143,0,0.3);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* 卡片系统 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-body {
  padding: 1.5rem;
}

.card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

/* 书单卡片 */
.book-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.book-card:hover {
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.book-cover {
  width: 90px;
  height: 130px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.book-info h4 {
  font-family: var(--font-serif);
  margin-bottom: 0.25rem;
}

.book-info .author {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.book-info .desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.book-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.875rem;
}

/* 读书达人卡片 */
.reader-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.reader-card:hover {
  box-shadow: var(--shadow);
}

.reader-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--secondary);
}

.reader-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.reader-card .stats {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* 读书会日程 */
.event-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--primary);
  transition: all var(--transition);
}

.event-card:hover {
  box-shadow: var(--shadow);
}

.event-date {
  text-align: center;
  min-width: 60px;
}

.event-date .day {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.event-date .month {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.event-info h4 {
  margin-bottom: 0.25rem;
}

.event-info .meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* 知识卡片 */
.knowledge-card {
  background: linear-gradient(135deg, var(--card) 0%, #F5F9F5 100%);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.knowledge-card::before {
  content: "\201C";
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 6rem;
  color: var(--secondary);
  opacity: 0.3;
  font-family: var(--font-serif);
  line-height: 1;
}

.knowledge-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.knowledge-card .content {
  font-family: var(--font-kai);
  font-size: 1.125rem;
  line-height: 2;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.knowledge-card .source {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* 便签纸风格笔记 */
.note-card {
  background: #FFF9C4;
  border-radius: 2px;
  padding: 1.5rem;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.1);
  transform: rotate(-1deg);
  transition: all var(--transition);
  position: relative;
}

.note-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
}

.note-card:nth-child(even) {
  transform: rotate(1deg);
}

.note-card:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 4px 6px 16px rgba(0,0,0,0.15);
}

.note-card .page-ref {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.note-card .note-text {
  font-family: var(--font-kai);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

/* 阅读进度条 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 1s var(--ease-in-out);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* 3D书架 */
.bookshelf {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  padding: 2rem 1.5rem 1rem;
  background: linear-gradient(180deg, #5D4037 0%, #4E342E 100%);
  border-radius: var(--radius);
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.bookshelf::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: linear-gradient(180deg, #6D4C41, #4E342E);
  box-shadow: 0 -2px 4px rgba(0,0,0,0.3);
}

.book-spine {
  width: 28px;
  min-height: 140px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.book-spine:hover {
  transform: translateY(-12px) rotateZ(-2deg);
  box-shadow: 3px 3px 8px rgba(0,0,0,0.4);
}

.book-spine:nth-child(1) { background: #1B5E20; height: 160px; }
.book-spine:nth-child(2) { background: #B71C1C; height: 145px; }
.book-spine:nth-child(3) { background: #1A237E; height: 155px; }
.book-spine:nth-child(4) { background: #E65100; height: 140px; }
.book-spine:nth-child(5) { background: #4A148C; height: 150px; }
.book-spine:nth-child(6) { background: #004D40; height: 148px; }
.book-spine:nth-child(7) { background: #BF360C; height: 158px; }
.book-spine:nth-child(8) { background: #263238; height: 142px; }

/* 网格布局 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .separator {
  color: var(--border);
}

/* 页脚 */
.site-footer {
  background: #2C2C2C;
  color: #BDBDBD;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  font-family: var(--font-serif);
  color: #fff;
  font-size: 1.375rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: #9E9E9E;
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
  font-family: var(--font-sans);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: #9E9E9E;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--secondary);
}

.footer-bottom {
  border-top: 1px solid #424242;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: #757575;
}

.footer-bottom a {
  color: #9E9E9E;
}

/* 页面头部横幅 */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1B5E20 100%);
  padding: 4rem 0;
  color: #fff;
  text-align: center;
}

.page-banner h1 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.page-banner p {
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin: 0 auto;
}

/* FAQ手风琴 */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  transition: background var(--transition);
}

.faq-question:hover {
  background: #F5F9F5;
}

.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--primary);
  transition: transform var(--transition);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
}

.faq-item.active .faq-answer {
  padding: 0 1.5rem 1.25rem;
  max-height: 500px;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(46,125,50,0.08);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
}

.tag-accent {
  background: rgba(255,143,0,0.1);
  color: var(--accent);
}

/* 评分星星 */
.stars {
  color: var(--accent);
  letter-spacing: 2px;
}

/* 搜索框 */
.search-box {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
}

.search-box input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
  background: var(--card);
}

.search-box input:focus {
  border-color: var(--primary);
}

.search-box button {
  padding: 0.875rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition);
}

.search-box button:hover {
  background: var(--primary-light);
}

/* 合作伙伴 */
.partner-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  opacity: 0.7;
}

.partner-logos img {
  height: 40px;
  filter: grayscale(100%);
  transition: all var(--transition);
}

.partner-logos img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* 挑战进度 */
.challenge-card {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.challenge-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-serif);
}

.challenge-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* 动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s var(--ease-out) forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* 响应式 */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  html { font-size: 15px; }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero {
    min-height: 70vh;
  }
  
  .hero-content h1 {
    font-size: 2.25rem;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .event-card {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .book-card {
    flex-direction: column;
  }
  
  .book-cover {
    width: 100%;
    height: 180px;
  }
  
  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-content h1 {
    font-size: 1.75rem;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

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

/* 打印样式 */
@media print {
  .site-header, .site-footer, .nav-toggle, .btn {
    display: none;
  }
  body {
    color: #000;
    background: #fff;
  }
}
