/* 博客美化样式 - 现代化设计 */

/* 全局样式和CSS变量 */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #f093fb;
  --success-color: #43e97b;
  --warning-color: #f5576c;
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --bg-primary: #ffffff;
  --bg-secondary: #f7fafc;
  --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-gradient);
  margin: 0;
  padding: 0;
  font-size: 16px;
  scroll-behavior: smooth;
}

/* 头部样式 - 玻璃拟态效果 */
#header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 30px 0;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="20" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
  opacity: 0.3;
  z-index: 0;
}

#header > * {
  position: relative;
  z-index: 1;
}

/* 导航栏样式 - 现代化设计 */
#navList {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

#navList li {
  margin: 0;
}

#navList a {
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 25px;
  transition: var(--transition);
  display: block;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

#navList a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

#navList a:hover::before {
  left: 100%;
}

#navList a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 博客标题样式 - 现代化设计 */
#blogTitle {
  text-align: center;
  margin: 30px 0;
  position: relative;
}

#blogTitle h1 {
  font-size: 3.5rem;
  margin: 0;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
  font-weight: 700;
  background: linear-gradient(45deg, #ffffff, #e0e0e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

#blogTitle h2 {
  font-size: 1.3rem;
  font-weight: 300;
  margin: 15px 0 0;
  opacity: 0.9;
  letter-spacing: 1px;
}

@keyframes titleGlow {
  0% { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5)); }
  100% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)); }
}

/* 主体内容样式 */
#main {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

#mainContent {
  flex: 1;
  min-width: 300px;
}

#leftmenu {
  width: 300px;
  flex-shrink: 0;
}

/* 博客文章卡片样式 - 新拟态设计 */
.post {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.post:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: rgba(102, 126, 234, 0.3);
}

.post::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--success-color));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.post:hover::before {
  transform: scaleX(1);
}

.post::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, #667eea, #764ba2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post:hover::before {
  opacity: 1;
}

.post:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.postTitle2 {
  font-size: 1.5rem;
  margin: 0 0 15px;
  color: #333;
  transition: color 0.3s ease;
}

.postTitle2:hover {
  color: #667eea;
}

.postbody {
  margin-bottom: 15px;
  line-height: 1.7;
}

.postfoot {
  font-size: 0.9rem;
  color: #666;
  border-top: 1px solid #eee;
  padding-top: 15px;
  margin-top: 15px;
}

/* 侧边栏样式 - 玻璃拟态 */
#leftmenu {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

#leftmenu h3 {
  color: #667eea;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

#leftmenu ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

#leftmenu li {
  margin-bottom: 8px;
}

#leftmenu a {
  color: #555;
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  padding: 5px 0;
}

#leftmenu a:hover {
  color: #667eea;
  padding-left: 5px;
}

/* 日历样式 */
#blog-calendar {
  margin: 20px 0;
}

.Cal {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.CalTitle {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.CalDayHeader {
  background: #f5f5f5;
  padding: 5px;
  text-align: center;
}

.CalTodayDay {
  background: #667eea;
  color: white;
  font-weight: bold;
  border-radius: 50%;
}

.CalWeekendDay {
  color: #999;
}

/* 搜索框样式 - 现代化设计 */
.input_my_zzk {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 25px;
  margin-bottom: 12px;
  transition: var(--transition);
  font-size: 1rem;
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}

.input_my_zzk:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

.btn_my_zzk {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  width: 100%;
}

.btn_my_zzk:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* 页脚样式 */
#footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 30px 0;
  margin-top: 50px;
}

#footer a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.3s ease;
}

#footer a:hover {
  color: white;
}

/* 响应式设计 - 增强版 */
@media (max-width: 768px) {
  #main {
    flex-direction: column;
    padding: 0 15px;
    gap: 20px;
  }
  
  #leftmenu {
    width: 100%;
    padding: 20px;
  }
  
  #blogTitle h1 {
    font-size: 2.5rem;
  }
  
  #navList {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  #navList a {
    width: 100%;
    text-align: center;
  }
  
  .post {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .postTitle2 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  #blogTitle h1 {
    font-size: 2rem;
  }
  
  #header {
    padding: 20px 0;
  }
  
  .post {
    padding: 15px;
  }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

/* 表格样式现代化 */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-weight: 600;
}

tr:hover {
  background: #f7fafc;
  transition: background 0.3s ease;
}

/* 动画效果 - 增强版 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 1; transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.post {
  animation: fadeIn 0.6s ease-out;
}

#leftmenu {
  animation: slideInRight 0.8s ease-out;
}

/* 代码块样式现代化 */
.cnblogs-markdown code, .cnblogs-code {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  padding: 2px 6px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  color: #2d3748;
}

.cnblogs-markdown pre, .cnblogs-pre {
  background: linear-gradient(135deg, #1a202c, #2d3748);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.cnblogs-markdown pre::before, .cnblogs-pre::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  width: 12px;
  height: 12px;
  background: #ff5f57;
  border-radius: 50%;
  box-shadow: 20px 0 #ffbd2e, 40px 0 #28ca42;
}

.cnblogs-markdown pre code, .cnblogs-pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.95em;
  line-height: 1.6;
}

/* 标签样式 */
.tag-count {
  background: #f0f0f0;
  color: #666;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.8rem;
  margin-left: 5px;
}

/* 置顶文章标记 */
.pinned-post-mark {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 8px;
}

/* 阅读全文按钮 - 现代化设计 */
.c_b_p_desc_readmore {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 0.95rem;
  margin-top: 15px;
  transition: var(--transition);
  font-weight: 500;
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.c_b_p_desc_readmore::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.c_b_p_desc_readmore:hover::before {
  left: 100%;
}

.c_b_p_desc_readmore:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: white;
}

/* 现代化标签样式 */
.catListTag ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}

.catListTag li {
  margin: 0 !important;
}

.catListTag a {
  display: inline-block;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
  border: 1px solid rgba(102, 126, 234, 0.1);
  box-shadow: var(--shadow-sm);
}

.catListTag a:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

/* 统计数据样式 */
.post-view-count, .post-comment-count, .post-digg-count {
  margin-left: 10px;
  padding: 2px 8px;
  background: #f0f0f0;
  border-radius: 10px;
  font-size: 0.8rem;
}

/* 公告样式 */
.notice {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  margin-bottom: 15px;
}

/* 个人信息样式 */
#profile_block {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

#profile_block a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

#profile_block a:hover {
  text-decoration: underline;
}

/* 侧边栏区块样式 */
.sidebar-block {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.catListTitle {
  color: #667eea;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

/* 最新评论样式 */
.recent_comment_title {
  margin-bottom: 5px;
}

.recent_comment_title a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.recent_comment_title a:hover {
  text-decoration: underline;
}

.recent_comment_body {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 5px;
  padding-left: 10px;
  border-left: 2px solid #eee;
}

.recent_comment_author {
  color: #999;
  font-size: 0.8rem;
  font-style: italic;
  margin-bottom: 15px;
}
