/* 博客园自定义CSS - 浅绿色可爱清新主题 */

/* 基础变量定义 */
:root {
  --primary-color: #4CAF50;    /* 浅绿色主色调 */
  --secondary-color: #2E7D32;  /* 深绿色辅助色 */
  --accent-color: #FF9800;     /* 橙色强调色 */
  --text-color: #333333;       /* 主要文本颜色 */
  --light-text: #666666;       /* 次要文本颜色 */
  --bg-color: #FFFFFF;         /* 背景色 */
  --light-bg: #F1F8E9;         /* 浅色背景 */
  --border-color: #E8F5E9;     /* 边框颜色 */
  --code-bg: #E8F5E9;          /* 代码块背景 */
  --radius: 12px;              /* 圆角半径 */
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* 阴影效果 */
}

/*点击动画*/

/* 小碎花点击效果（修复版） */
.flower {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  z-index: 1000;
  transform-origin: center;
}

@keyframes explode {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 0.9;
  }
  70% {
    opacity: 0.8;
  }
  100% {
    transform: translate(var(--end-x), var(--end-y)) scale(0.5) rotate(var(--rotate));
    opacity: 0;
  }
}    




/* 重置和基础样式 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--light-bg);
  margin: 0;
  padding: 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--secondary-color);
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.7em;
}

p {
  margin-bottom: 1.2em;
}

code {
  background-color: var(--code-bg);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: Consolas, Monaco, "Andale Mono", monospace;
  font-size: 0.9em;
  color: #c7254e;
}

pre code {
  padding: 1em;
  display: block;
  line-height: 1.5;
  overflow-x: auto;
  border-radius: var(--radius);
}

blockquote {
  border-left: 4px solid var(--primary-color);
  background-color: var(--light-bg);
  padding: 0.5em 1em;
  margin: 1em 0;
  color: var(--light-text);
  border-radius: 0 var(--radius) var(--radius) 0;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

img:hover {
  transform: scale(1.02);
}

/* 页面布局 */
#home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

#header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2em;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0 0 var(--radius) var(--radius);
}

#blogTitle {
  padding: 2em 0;
  text-align: center;
}

#blogTitle h1 {
  font-size: 2.5em;
  margin: 0;
  color: var(--primary-color);
  font-weight: 700;
}

#blogTitle h2 {
  font-size: 1.1em;
  color: var(--light-text);
  font-weight: normal;
  margin-top: 0.5em;
}

#navigator {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1em 0;
}

#navList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

#navList li {
  margin: 0 1em;
}

#navList a {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5em 0;
  position: relative;
}

#navList a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

#navList a:hover::after {
  width: 100%;
}

#main {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

#mainContent {
  flex: 3;
  min-width: 300px;
  padding: 0 15px;
}

#sideBar {
  flex: 1;
  min-width: 280px;
  padding: 0 15px;
}

/* 博客文章样式 */
.postTitle {
  font-size: 1.8em;
  margin-bottom: 0.5em;
}

.postTitle a {
  color: var(--secondary-color);
  transition: color 0.2s ease;
}

.postTitle a:hover {
  color: var(--primary-color);
}

.postCon {
  padding: 1em 0;
}

.postDesc {
  color: var(--light-text);
  font-size: 0.9em;
  margin-top: 1em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.postDesc a {
  margin-right: 1em;
}

.postDesc span {
  margin-right: 1em;
  display: flex;
  align-items: center;
}

.postDesc span i {
  margin-right: 5px;
}

.day {
  background-color: var(--bg-color);
  padding: 2em;
  margin-bottom: 2em;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.day:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* 侧边栏样式 */
.sidebar-block {
  background-color: var(--bg-color);
  padding: 1.5em;
  margin-bottom: 2em;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.sidebar-block h3 {
  margin-top: 0;
  font-size: 1.2em;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5em;
}

.sidebar-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-block li {
  margin-bottom: 0.7em;
}

.sidebar-block a {
  display: block;
  transition: all 0.2s ease;
}

.sidebar-block a:hover {
  transform: translateX(5px);
}

/* 评论样式 */
#comment_form {
  background-color: var(--bg-color);
  padding: 2em;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2em;
  border: 1px solid var(--border-color);
}

#comment_form h3 {
  margin-top: 0;
}

.commentbox_title {
  margin-bottom: 1em;
}

.comment_textarea {
  width: 100%;
  padding: 1em;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  resize: vertical;
  min-height: 150px;
  margin-bottom: 1em;
  font-family: inherit;
  font-size: inherit;
  transition: border-color 0.2s ease;
}

.comment_textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.comment_btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8em 1.5em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.comment_btn:hover {
  background-color: var(--secondary-color);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

#comment_nav {
  margin-bottom: 1em;
}

.comment_item {
  background-color: var(--bg-color);
  padding: 1.5em;
  margin-bottom: 1.5em;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.comment_info {
  display: flex;
  align-items: center;
  margin-bottom: 1em;
}

.comment_avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 1em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.comment_author {
  font-weight: 600;
  margin-right: 1em;
}

.comment_time {
  color: var(--light-text);
  font-size: 0.9em;
}

/* 页脚样式 */
#footer {
  background-color: var(--secondary-color);
  color: white;
  text-align: center;
  padding: 2em 0;
  margin-top: 3em;
  border-radius: var(--radius) var(--radius) 0 0;
}

#footer a {
  color: white;
  text-decoration: underline;
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
  #mainContent, #sideBar {
    flex: 1 1 100%;
  }
  
  #navList {
    flex-direction: column;
    text-align: center;
  }
  
  #navList li {
    margin: 0.5em 0;
  }
  
  .day, .sidebar-block, #comment_form, .comment_item {
    padding: 1.2em;
  }
  
  #blogTitle h1 {
    font-size: 2em;
  }
  
  .postTitle {
    font-size: 1.5em;
  }
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* 可爱元素 */
.cute-icon {
  display: inline-block;
  margin: 0 3px;
}

/* 加载动画 */
.loader {
  border: 3px solid var(--border-color);
  border-radius: 50%;
  border-top: 3px solid var(--primary-color);
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 0.5em;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}    