/* Nature — 自然风格 + 大地色系 + 有机形状 + 森林氛围 */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&family=Merriweather:wght@300;400;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

:root {
  --nat-bg: #f5f1e8;
  --nat-paper: #fefcf8;
  --nat-cream: #faf8f3;
  --nat-forest: #3d5a40;
  --nat-forest-light: #5a7d5c;
  --nat-leaf: #6b8e6b;
  --nat-moss: #8fbc8f;
  --nat-earth: #8b7355;
  --nat-wood: #a0826d;
  --nat-sun: #e6b89c;
  --nat-sky: #b8d4e3;
  --nat-ink: #3a3a3a;
  --nat-muted: #6b6b6b;
  --nat-max: 1200px;
  --nat-gutter: clamp(1.5rem, 5vw, 3rem);
  --nat-font: "Nunito", "Noto Sans SC", sans-serif;
  --nat-serif: "Merriweather", "Noto Sans SC", serif;
  --nat-radius: 24px;
  --nat-radius-sm: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  color: var(--nat-ink);
  font-size: 16px;
  line-height: 1.8;
  font-family: var(--nat-font);
  background: var(--nat-bg);
  background-image: 
    radial-gradient(ellipse at 10% 20%, rgba(139, 188, 143, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(230, 184, 156, 0.15) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%239C92AC' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--nat-forest);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

a:hover {
  color: var(--nat-forest-light);
}

a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--nat-leaf);
  transition: width 0.3s ease;
  border-radius: 2px;
}

a:hover::after {
  width: 100%;
}

ol, ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

img {
  border: 0;
  max-width: 100%;
  height: auto;
  border-radius: var(--nat-radius);
  box-shadow: 0 8px 30px rgba(61, 90, 64, 0.15);
  transition: all 0.4s ease;
}

img:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(61, 90, 64, 0.2);
}

p, dl, dd, dt, h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
}

.clear {
  clear: both;
}

/* ========== 有机形状装饰 ========== */
.leaf-decoration {
  position: relative;
}

.leaf-decoration::before {
  content: "🌿";
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.6;
}

/* ========== 外壳布局 ========== */
#divAll {
  width: 100%;
  max-width: var(--nat-max);
  margin: 0 auto;
  padding: var(--nat-gutter);
}

#divPage {
  width: 100%;
}

#divMiddle {
  width: 100%;
}

/* ========== 顶部区域 ========== */
#divTop {
  text-align: center;
  padding: 4rem 2rem 3rem;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--nat-paper) 0%, var(--nat-cream) 100%);
  border-radius: var(--nat-radius);
  box-shadow: 0 10px 40px rgba(61, 90, 64, 0.1);
  position: relative;
  overflow: hidden;
}

/* 叶子装饰 */
#divTop::before {
  content: "🌱";
  position: absolute;
  top: 20px;
  left: 30px;
  font-size: 2rem;
  animation: sway 3s ease-in-out infinite;
}

#divTop::after {
  content: "🍃";
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 1.8rem;
  animation: sway 3s ease-in-out infinite 0.5s;
}

@keyframes sway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* 底部藤蔓 */
#divTop .vine-decoration {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%233d5a40' fill-opacity='0.1' d='M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,138.7C672,128,768,160,864,181.3C960,203,1056,213,1152,197.3C1248,181,1344,139,1392,117.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
}

#BlogTitle {
  font-family: var(--nat-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--nat-forest);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

#BlogTitle a {
  color: var(--nat-forest);
}

#BlogTitle a:hover {
  color: var(--nat-forest-light);
}

#BlogSubTitle {
  font-size: 1rem;
  color: var(--nat-muted);
  font-weight: 400;
  font-style: italic;
}

/* ========== 导航栏 ========== */
#divNavBar {
  margin-bottom: 3rem;
  padding: 1.25rem;
  background: var(--nat-paper);
  border-radius: 50px;
  box-shadow: 0 6px 25px rgba(61, 90, 64, 0.1);
}

#divNavBar h3 {
  display: none;
}

#divNavBar ul {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

#divNavBar a {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--nat-forest);
  background: transparent;
  border-radius: 50px;
  transition: all 0.3s ease;
}

#divNavBar a:hover,
#divNavBar a.on {
  background: var(--nat-moss);
  color: white;
  box-shadow: 0 4px 15px rgba(139, 188, 143, 0.4);
}

#divNavBar a:hover::after,
#divNavBar a.on::after {
  display: none;
}

/* ========== 主内容区 ========== */
#divMain {
  float: left;
  width: 65%;
  padding-right: 3rem;
}

/* ========== 侧边栏 ========== */
#divSidebar {
  float: right;
  width: 35%;
}

/* ========== 文章卡片 ========== */
div.post {
  margin-bottom: 3rem;
  padding: 2.5rem;
  background: var(--nat-paper);
  border-radius: var(--nat-radius);
  box-shadow: 0 8px 35px rgba(61, 90, 64, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

div.post::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--nat-forest), var(--nat-moss), var(--nat-sun));
}

div.post:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 45px rgba(61, 90, 64, 0.15);
}

div.post:last-of-type {
  margin-bottom: 0;
}

/* 文章日期 */
div.post .post-date {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--nat-earth);
  margin-bottom: 1.25rem;
  padding: 0.5rem 1rem;
  background: var(--nat-cream);
  border-radius: 20px;
}

div.post .post-date::before {
  content: "🌸";
  font-size: 0.875rem;
}

/* 文章标题 */
div.post .post-title {
  font-family: var(--nat-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--nat-forest);
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

div.post .post-title a {
  color: var(--nat-forest);
}

div.post .post-title a:hover {
  color: var(--nat-forest-light);
}

/* 文章内容 */
div.post div.post-body {
  color: var(--nat-muted);
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

/* 文章底部 */
div.post .post-footer {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--nat-earth);
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  background: var(--nat-cream);
  border-radius: 20px;
}

div.post .post-footer::before {
  content: "🌿";
}

/* ========== 单篇文章详情 ========== */
div.post.single {
  padding: 3rem;
}

div.post.single .post-date {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

div.post.single .post-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 1.5rem;
}

div.post.single .post-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--nat-forest), var(--nat-moss));
  border-radius: 2px;
}

/* ========== 侧边栏模块 ========== */
.function {
  margin-bottom: 2.5rem;
  padding: 1.75rem;
  background: var(--nat-paper);
  border-radius: var(--nat-radius);
  box-shadow: 0 8px 30px rgba(61, 90, 64, 0.08);
  position: relative;
}

.function::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--nat-moss);
  border-radius: var(--nat-radius) var(--nat-radius) 0 0;
}

.function .function_t {
  font-family: var(--nat-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--nat-forest);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--nat-cream);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.function .function_t::before {
  content: "🌿";
  font-size: 1.25rem;
}

.function li {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--nat-cream);
  font-size: 0.9375rem;
  transition: all 0.3s ease;
}

.function li:last-child {
  border-bottom: none;
}

.function li:hover {
  padding-left: 0.75rem;
  color: var(--nat-forest);
}

.function a {
  color: var(--nat-muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.function li:hover a {
  color: var(--nat-forest);
}

.function a::after {
  display: none;
}

/* ========== 文章内容样式 ========== */
div.post-body {
  color: var(--nat-ink);
  font-size: 1.0625rem;
  line-height: 1.9;
}

div.post-body p {
  margin-bottom: 1.5em;
}

div.post-body a {
  color: var(--nat-forest);
  font-weight: 600;
  border-bottom: 2px solid var(--nat-moss);
}

div.post-body a:hover {
  background: var(--nat-moss);
  color: white;
  padding: 0 0.3rem;
  border-radius: 4px;
}

div.post-body a::after {
  display: none;
}

div.post-body h1,
div.post-body h2,
div.post-body h3,
div.post-body h4,
div.post-body h5,
div.post-body h6 {
  font-family: var(--nat-serif);
  font-weight: 700;
  color: var(--nat-forest);
  margin: 2em 0 0.75em;
}

div.post-body h1 {
  font-size: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--nat-moss);
}

div.post-body h2 {
  font-size: 1.5rem;
  color: var(--nat-forest-light);
}

div.post-body h3 {
  font-size: 1.25rem;
  font-style: italic;
}

div.post-body blockquote {
  margin: 2rem 0;
  padding: 1.75rem 2rem;
  background: var(--nat-cream);
  border-left: 5px solid var(--nat-moss);
  border-radius: 0 var(--nat-radius-sm) var(--nat-radius-sm) 0;
  color: var(--nat-muted);
  font-style: italic;
  position: relative;
}

div.post-body blockquote::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 3rem;
  color: var(--nat-moss);
  opacity: 0.3;
}

div.post-body code {
  font-family: "Fira Code", monospace;
  font-size: 0.875em;
  color: var(--nat-forest);
  background: var(--nat-cream);
  padding: 0.2em 0.5em;
  border-radius: 6px;
}

div.post-body pre {
  background: var(--nat-cream);
  border-radius: var(--nat-radius-sm);
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

div.post-body pre code {
  background: none;
  padding: 0;
}

div.post-body ul,
div.post-body ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

div.post-body li {
  margin: 0.75rem 0;
  position: relative;
  padding-left: 1.5rem;
}

div.post-body ul li::before {
  content: "🌱";
  position: absolute;
  left: 0;
  font-size: 0.875rem;
}

div.post-body ol {
  counter-reset: item;
}

div.post-body ol li {
  counter-increment: item;
}

div.post-body ol li::before {
  content: counter(item) ".";
  position: absolute;
  left: 0;
  color: var(--nat-forest);
  font-weight: 700;
}

div.post-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2rem 0;
  font-size: 0.9375rem;
  background: var(--nat-paper);
  border-radius: var(--nat-radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(61, 90, 64, 0.1);
}

div.post-body th,
div.post-body td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--nat-cream);
}

div.post-body th {
  font-weight: 700;
  background: var(--nat-forest);
  color: white;
  text-align: left;
}

div.post-body tr:last-child td {
  border-bottom: none;
}

div.post-body tr:nth-child(even) {
  background: var(--nat-cream);
}

/* ========== 分页 ========== */
div.pagebar {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--nat-cream);
  text-align: center;
}

span.page,
span.now-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  margin: 0 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--nat-forest);
  background: var(--nat-paper);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(61, 90, 64, 0.1);
  transition: all 0.3s ease;
}

span.page:hover {
  background: var(--nat-moss);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(139, 188, 143, 0.4);
}

span.now-page {
  background: var(--nat-forest);
  color: white;
}

/* ========== 评论 ========== */
ul.msg {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--nat-paper);
  border-radius: var(--nat-radius-sm);
  box-shadow: 0 4px 20px rgba(61, 90, 64, 0.08);
}

li.msgname {
  font-weight: 700;
  color: var(--nat-forest);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

li.msgname::before {
  content: "🌿";
}

li.msgarticle {
  color: var(--nat-muted);
  line-height: 1.8;
  padding-left: 1.5rem;
  border-left: 3px solid var(--nat-moss);
}

li.msgtime {
  font-size: 0.75rem;
  color: var(--nat-earth);
  margin-top: 1rem;
  font-style: italic;
}

/* 评论表单 */
#divCommentPost {
  margin-top: 2.5rem;
  padding: 2rem;
  background: var(--nat-paper);
  border-radius: var(--nat-radius);
  box-shadow: 0 8px 30px rgba(61, 90, 64, 0.1);
}

#divCommentPost a[name="comment"] {
  font-family: var(--nat-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--nat-forest);
  margin-bottom: 1.5rem;
  display: inline-block;
}

input.text,
#txaArticle {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  color: var(--nat-ink);
  background: var(--nat-cream);
  border: 2px solid transparent;
  border-radius: var(--nat-radius-sm);
  font-family: var(--nat-font);
  transition: all 0.3s ease;
}

input.text:focus,
#txaArticle:focus {
  outline: none;
  border-color: var(--nat-moss);
  background: var(--nat-paper);
  box-shadow: 0 0 0 4px rgba(139, 188, 143, 0.2);
}

#txaArticle {
  min-height: 120px;
  resize: vertical;
}

input.button {
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: var(--nat-forest);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--nat-font);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(61, 90, 64, 0.3);
}

input.button:hover {
  background: var(--nat-forest-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(61, 90, 64, 0.4);
}

/* ========== 页脚 ========== */
#divBottom {
  clear: both;
  margin-top: 3rem;
  padding: 2.5rem;
  text-align: center;
  background: var(--nat-forest);
  border-radius: var(--nat-radius);
  position: relative;
  overflow: hidden;
}

#divBottom::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
}

#BlogCopyRight {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.8;
  position: relative;
}

#BlogCopyRight a {
  color: var(--nat-moss);
  font-weight: 600;
}

#BlogCopyRight a:hover {
  color: white;
}

#BlogCopyRight a::after {
  background: white;
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  #divNavBar a {
    padding: 0.6rem 1.25rem;
  }
  
  #divMain {
    float: none;
    width: 100%;
    padding-right: 0;
    margin-bottom: 2.5rem;
  }
  
  #divSidebar {
    float: none;
    width: 100%;
  }
  
  div.post.single {
    padding: 2rem;
  }
  
  #BlogTitle {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  #divTop {
    padding: 3rem 1.5rem 2.5rem;
  }
  
  #divTop::before,
  #divTop::after {
    display: none;
  }
  
  div.post {
    padding: 1.75rem;
  }
  
  .function {
    padding: 1.5rem;
  }
  
  #divCommentPost {
    padding: 1.5rem;
  }
}
