/* ========================================
   青春的故事 - 基础样式
   ======================================== */

/* 引入字体 */
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=ZCOOL+XiaoWei&family=Indie+Flower&display=swap');

/* CSS 变量 - 色彩方案 */
:root {
  /* 主色调 - 纸张色系 */
  --paper-cream: #f5f0e1;
  --paper-aged: #e8dcc4;
  --paper-sepia: #d4c4a8;
  --paper-white: #faf8f3;
  
  /* 墨水色系 */
  --ink-brown: #5c4033;
  --ink-black: #2c2416;
  --ink-blue: #4a5568;
  --ink-faded: #8b7355;
  
  /* 点缀色 */
  --accent-rose: #c9a9a6;
  --accent-sage: #9caf88;
  --accent-gold: #b8860b;
  --accent-lavender: #b8a9c9;
  
  /* 阴影 */
  --shadow-warm: rgba(92, 64, 51, 0.15);
  --shadow-deep: rgba(92, 64, 51, 0.25);
  
  /* 字体 */
  --font-title: 'ZCOOL XiaoWei', 'STFangsong', '仿宋', serif;
  --font-body: 'Ma Shan Zheng', 'STKaiti', '楷体', cursive;
  --font-deco: 'Indie Flower', cursive;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink-brown);
  background-color: var(--paper-cream);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 纸张纹理背景 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
}

/* 链接 */
a {
  color: var(--ink-brown);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-gold);
}

/* 标题 */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: normal;
  letter-spacing: 0.1em;
}

h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* 段落 */
p {
  margin-bottom: 1rem;
  text-align: justify;
}

/* 选中文本 */
::selection {
  background: var(--accent-rose);
  color: var(--paper-white);
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--paper-aged);
}

::-webkit-scrollbar-thumb {
  background: var(--ink-faded);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-brown);
}

/* 工具类 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

/* 响应式 */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .container {
    padding: 0 1rem;
  }
}