/* ===========================================
   Enhancements
   主题增强样式
   包括文章页面、首页、顶部栏和底部的美化
   =========================================== */

/* ===========================================
   Global Variables
   全局变量
   =========================================== */
:root {
  --primary-color: #4a6cf7;
  --secondary-color: #36cbcb;
  --accent-color: #6c757d;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --background-color: #fff;
  --card-background: #fff;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

/* 暗黑模式变量 */
body.dark-mode {
  --primary-color: #90caf9;
  --secondary-color: #64b5f6;
  --accent-color: #b0b0b0;
  --text-primary: #e9ecef;
  --text-secondary: #c0c0c0;
  --text-muted: #909090;
  --background-color: #1a1a2e;
  --card-background: #16213e;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.3);
}

/* ===========================================
   Global Animations
   全局动画效果
   =========================================== */

/* 淡入滑动动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    
  }
  to {
    opacity: 1;
    
  }
}

/* 淡入滑动动画（从左） */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    
  }
  to {
    opacity: 1;
    
  }
}

/* 淡入滑动动画（从右） */
@keyframes fadeInRight {
  from {
    opacity: 0;
    
  }
  to {
    opacity: 1;
    
  }
}



/* 渐变动画 */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ===========================================
   Header Enhancement
   顶部栏美�?   =========================================== */

/* 顶部栏渐变背�?*/
.header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
  position: relative;
  z-index: 1000;
  transition: var(--transition);
}

/* 黑夜模式顶部栏渐变背�?*/
body.dark-mode .header {
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.95), rgba(20, 20, 40, 0.95));
}

/* 头部滚动效果 */
.header.scrolled {
  box-shadow: 0 2px 10px var(--shadow-color);
  backdrop-filter: blur(10px);
}

/* 导航项动画效�?*/
.nav-item {
  position: relative;
  transition: var(--transition);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-item:hover::after {
  width: 100%;
}

/* ===========================================
   Hero Carousel
   轮播图样�?   =========================================== */

/* 轮播图容�?*/
.hero-carousel {
  margin-bottom: 4rem;
  overflow: hidden;
}

/* 轮播�?*/
.swiper {
  position: relative;
  width: 100%;
  height: 500px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* 轮播图项 */
.swiper-slide {
  position: relative;
  width: 100%;
  height: 100%;
}

/* 轮播图图�?*/
.carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.carousel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.swiper-slide:hover .carousel-image img {
}

/* 轮播图遮�?*/
.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
  z-index: 2;
}

/* 轮播图内�?*/
.carousel-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 3rem;
  z-index: 3;
  color: white;
}

/* 轮播图标�?*/
.carousel-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  animation: fadeInUp 0.6s ease;
}

.carousel-title-link {
  color: white;
  text-decoration: none;
  transition: var(--transition);
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
}

.carousel-title-link:hover {
  color: var(--primary-color);
  text-shadow: 0 2px 8px rgba(74, 108, 247, 0.5);
}

/* 轮播图描�?*/
.carousel-desc {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 0.6s ease 0.2s both;
}

/* 轮播图按�?*/
.carousel-btn-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.carousel-bottom-btn-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.carousel-btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(74, 108, 247, 0.4);
  animation: fadeInUp 0.6s ease 0.4s both;
}

.carousel-btn:hover {
  
  box-shadow: 0 6px 16px rgba(74, 108, 247, 0.6);
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* Swiper控制按钮样式 */
.swiper-button-prev,
.swiper-button-next {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  color: var(--primary-color);
  transition: var(--transition);
  margin-top: 0 !important;
  
  border: 2px solid var(--primary-color);
  z-index: 10;
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 8px 20px rgba(74, 108, 247, 0.6);
  
  border-color: var(--primary-color);
}

/* Swiper控制按钮图标 */
.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 24px !important;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 调整控制按钮位置 */
.swiper-button-prev {
  left: 30px !important;
}

.swiper-button-next {
  right: 30px !important;
}

/* Swiper指示器样�?*/
.swiper-pagination {
  bottom: 20px !important;
}

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transition: var(--transition);
}

.swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.8);
}

.swiper-pagination-bullet-active {
  background: white;
  width: 30px;
  border-radius: 6px;
}

/* 暗黑模式下的Swiper样式 */
body.dark-mode .swiper-button-prev,
body.dark-mode .swiper-button-next {
  background: rgba(40, 40, 60, 0.9);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .swiper-button-prev:hover,
body.dark-mode .swiper-button-next:hover {
  background: var(--primary-color);
  color: #121212;
}

body.dark-mode .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.3);
}

body.dark-mode .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.5);
}

body.dark-mode .swiper-pagination-bullet-active {
  background: var(--primary-color);
}

/* ===========================================
   Posts Section
   文章列表部分
   =========================================== */

/* 文章列表容器 */
.posts-section {
  margin-bottom: 4rem;
}

/* 区块头部 */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* 文章网格 */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

/* 文章卡片 */
.post-card {
  background: var(--card-background);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.6s ease;
}

.post-card:hover {
  
  box-shadow: 0 12px 30px rgba(74, 108, 247, 0.15);
  border-color: rgba(74, 108, 247, 0.2);
}

/* 文章卡片封面 */
.post-card-cover {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  border-radius: 16px;
}

.post-card-cover a {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
}

.post-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.post-card:hover .post-cover {
}

/* 文章卡片内容 */
.post-card-content {
  padding: 1.5rem;
}

/* 文章元数�?*/
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.post-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-tag {
  padding: 0.2rem 0.8rem;
  background: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
  border-radius: 12px;
  font-size: 0.8rem;
  text-decoration: none;
  transition: var(--transition);
}

.category-tag:hover {
  background: var(--primary-color);
  color: white;
  
}

/* 文章卡片标题 */
.post-card-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.post-card-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
  display: block;
}

.post-card-title a:hover {
  color: var(--primary-color);
  
}

/* 文章卡片摘要 */
.post-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 阅读更多按钮 */
.read-more-btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  color: black;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  transition: var(--transition);
  font-size: 0.9rem;
}

.read-more-btn:hover {
  
  box-shadow: 0 4px 12px rgba(74, 108, 247, 0.4);
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* ===========================================
   Pagination
   分页导航
   =========================================== */

/* 分页部分 */
.pagination-section {
  margin-top: 4rem;
  text-align: center;
}

/* 分页容器 */
.pagination-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* 分页链接 */
.pagination-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--card-background);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px var(--shadow-color);
}

.pagination-link:hover {
  background: linear-gradient(220.55deg, #D7003A 0%, #19087E 100%);
  color: white;
  
  box-shadow: 0 4px 12px rgba(215, 0, 58, 0.4);
  border-color: #D7003A;
}

/* ===========================================
   Settings Panel
   设置面板
   =========================================== */

/* 设置按钮 */
.settings-button {
  position: fixed;
  right: 10px;
  bottom: 30px;
  
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(220.55deg, #D7003A 0%, #19087E 100%);
  color: white;
  border: 2px solid #D7003A;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(215, 0, 58, 0.3);
  transition: var(--transition);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  pointer-events: auto;
  animation: pulse 2s ease-in-out infinite;
  max-width: 64px;
  box-sizing: border-box;
}

/* 响应式设�?- 调整设置按钮位置，避免与宠物云重�?*/
@media (max-width: 768px) {
  .settings-button {
    right: 10px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    font-size: 24px;
    max-width: 56px;
  }
  
  /* 调整宠物云位�?*/
  .cloud-pet-container {
    bottom: 100px !important;
    right: 10px !important;
  }
}

.settings-button:hover {
  background: linear-gradient(220.55deg, #D7003A 0%, #19087E 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(215, 0, 58, 0.5);
}

/* 脉冲动画 */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.3);
  }
  50% {
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.5);
  }
}

/* 暗黑模式设置按钮 */
body.dark-mode .settings-button {
  background: linear-gradient(220.55deg, #D7003A 0%, #19087E 100%);
  color: white;
  border-color: #D7003A;
  box-shadow: 0 4px 15px rgba(215, 0, 58, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

body.dark-mode .settings-button:hover {
  background: linear-gradient(220.55deg, #D7003A 0%, #19087E 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(215, 0, 58, 0.5);
}

/* 设置面板 */
.settings-panel {
  position: fixed;
  right: -400px;
  bottom: 100px;
  
  width: 320px;
  background: var(--card-background);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  transition: all 0.3s ease;
  overflow: hidden;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  pointer-events: none;
}

.settings-panel.show {
  right: 30px;
  pointer-events: auto;
}

.settings-panel.show:hover {
  box-shadow: 0 24px 70px rgba(74, 108, 247, 0.4);
}

/* 设置面板头部 */
.settings-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--background-color);
}

.settings-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.settings-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-close:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

/* 设置面板内容 */
.settings-content {
  padding: 20px;
}

/* 设置�?*/
.settings-section {
  margin-bottom: 24px;
}

.settings-section h4 {
  margin: 0 0 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-
  letter-spacing: 0.5px;
}

/* 主题选项 */
.theme-mode-options {
  display: flex;
  gap: 12px;
}

.theme-option {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--background-color);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.theme-option:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(74, 108, 247, 0.2);
}

.theme-option.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* 字体大小选项 */
.font-size-options {
  display: flex;
  gap: 12px;
}

.font-option {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--background-color);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.font-option:hover {
  border-color: var(--primary-color);
}

.font-option.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* 动画选项 */
.animation-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  transition: var(--transition);
  color: var(--text-primary);
}

.animation-option:hover {
  background: var(--border-color);
}

.animation-toggle {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* 遮罩 */
.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.settings-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ===========================================
   Sidebar Announcement
   侧边栏公�?   =========================================== */

.widget-announcement {
  background: linear-gradient(220.55deg, #D7003A 0%, #19087E 100%);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 25px rgba(0, 201, 255, 0.3);
  color: white;
}

.announcement-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.announcement-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.announcement-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.announcement-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: white;
}

.announcement-content {
  font-size: 0.95rem;
  line-height: 1.6;
}

.announcement-content p {
  margin: 0;
  line-height: 1.4;
  margin-bottom: 0.3rem;
}

.announcement-content p:last-child {
  margin-bottom: 0;
}

/* ===========================================
   AI Summary Button
   AI总结按钮
   =========================================== */

.ai-summary-button {
  position: fixed;
  bottom: 30px;
  left: 10px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(102, 16, 242, 0.9);
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(102, 16, 242, 0.4);
  transition: var(--transition);
  z-index: 998;
  max-width: 50px;
  box-sizing: border-box;
}

.ai-summary-button:hover {
  background: rgba(102, 16, 242, 1);
  box-shadow: 0 6px 16px rgba(102, 16, 242, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .ai-summary-button {
    bottom: 20px;
    left: 10px;
    width: 45px;
    height: 45px;
    font-size: 18px;
    max-width: 45px;
  }
}

/* ===========================================
   Back to Top Button
   回到顶部按钮
   =========================================== */

.back-to-top {
  position: fixed;
  bottom: 80px;
  left: 10px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(220.55deg, #D7003A 0%, #19087E 100%);
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(215, 0, 58, 0.4);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 999;
  max-width: 50px;
  box-sizing: border-box;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: linear-gradient(220.55deg, #D7003A 0%, #19087E 100%);
  
  box-shadow: 0 6px 16px rgba(215, 0, 58, 0.6);
}

/* ===========================================
   Footer Blog Age
   页脚博客运行时间
   =========================================== */

.footer-blog-age {
  margin: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.blog-age-label {
  font-weight: 500;
}

.blog-age-number {
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0.2rem;
}

.blog-age-unit {
  margin-right: 0.5rem;
}

/* ===========================================
   Custom Footer
   自定义页脚内�?   =========================================== */

.footer-custom {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--card-background);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.footer-custom p {
  margin: 0 0 0.8rem 0;
  line-height: 1.6;
}

.footer-custom p:last-child {
  margin-bottom: 0;
}

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

.footer-custom a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ===========================================
   Gallery Group
   图库组样式
   =========================================== */

.gallery-group-main {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem 0;
}

.gallery-group-item {
  flex: 1 1 300px;
  max-width: 400px;
  background: var(--card-background);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.gallery-group-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-color);
}

.gallery-group-link {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
}

.gallery-group-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-group-content {
  padding: 1.5rem;
}

.gallery-group-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
}

.gallery-group-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* ===========================================
   Gallery
   图片画廊样式
   =========================================== */

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.gallery-image-wrapper {
  position: relative;
  padding-top: 100%; /* 1:1 比例 */
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: var(--card-background);
  border: 1px solid var(--border-color);
}

.gallery-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-image-wrapper:hover .gallery-image {
  transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.3rem;
  }
}

/* ===========================================
   Responsive Design
   响应式设�?   =========================================== */

/* 大屏�?*/
@media (max-width: 1200px) {
  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  
  .swiper {
    height: 450px;
  }
  
  .carousel-title {
    font-size: 2.2rem;
  }
}

/* 中等屏幕 */
@media (max-width: 768px) {
  .hero-carousel {
    margin-bottom: 3rem;
  }
  
  .swiper {
    height: 400px;
    border-radius: 12px;
  }
  
  .carousel-content {
    padding: 2rem;
  }
  
  .carousel-title {
    font-size: 2rem;
  }
  
  .carousel-desc {
    font-size: 1rem;
  }
  
  .carousel-btn {
    padding: 0.7rem 1.5rem;
  }
  
  .swiper-button-prev,
  .swiper-button-next {
    width: 50px;
    height: 50px;
  }
  
  .swiper-button-prev {
    left: 15px !important;
  }
  
  .swiper-button-next {
    right: 15px !important;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  .pagination-container {
    flex-direction: column;
    align-items: center;
  }
  
  .pagination-link {
    width: 200px;
    justify-content: center;
  }
  
  .settings-button {
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .settings-panel {
    width: calc(100% - 80px);
    right: -100%;
  }
  
  .settings-panel.show {
    right: 20px;
  }
  
  .back-to-top {
    bottom: 70px;
    left: 10px;
    width: 45px;
    height: 45px;
    font-size: 18px;
    max-width: 45px;
  }
}

/* 小屏�?*/
@media (max-width: 480px) {
  .swiper {
    height: 300px;
  }
  
  .carousel-content {
    padding: 1.5rem;
  }
  
  .carousel-title {
    font-size: 1.5rem;
  }
  
  .carousel-desc {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .carousel-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .posts-section {
    margin-bottom: 3rem;
  }
  
  .post-card {
    border-radius: 12px;
  }
  
  .post-card-cover {
    height: 180px;
  }
  
  .post-card-content {
    padding: 1.2rem;
  }
  
  .post-card-title {
    font-size: 1.2rem;
  }
  
  .post-card-excerpt {
    font-size: 0.9rem;
  }
  
  .read-more-btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .section-header {
    margin-bottom: 2rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
}

/* ===========================================
   Dark Mode Adjustments
   暗黑模式调整
   =========================================== */

body.dark-mode .pagination-link {
  background: var(--card-background);
  color: var(--text-primary);
  border-color: var(--border-color);
  box-shadow: 0 2px 8px var(--shadow-color);
}

body.dark-mode .pagination-link:hover {
  background: linear-gradient(220.55deg, #D7003A 0%, #19087E 100%);
  color: white;
  border-color: #D7003A;
}

body.dark-mode .back-to-top {
  background: linear-gradient(220.55deg, #D7003A 0%, #19087E 100%);
}

body.dark-mode .back-to-top:hover {
  background: linear-gradient(220.55deg, #D7003A 0%, #19087E 100%);
}

/* ===========================================
   Animation Classes
   动画�?   =========================================== */

.fade-in {
  animation: fadeInUp 0.6s ease;
}

.fade-in-delay-1 {
  animation: fadeInUp 0.6s ease 0.2s both;
}

.fade-in-delay-2 {
  animation: fadeInUp 0.6s ease 0.4s both;
}

.fade-in-delay-3 {
  animation: fadeInUp 0.6s ease 0.6s both;
}

/* ===========================================
   Utility Classes
   工具�?   =========================================== */

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

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

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

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

/* ===========================================
   Gallery Preview
   图库预览样式
   =========================================== */

/* 图库预览容器 */
.image-preview-container {
  display: none;
  margin-top: 2rem;
  padding: 2rem;
  background: var(--card-background);
  border-radius: 16px;
  box-shadow: 0 8px 30px var(--shadow-color);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

/* 预览头部 */
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.preview-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.close-preview-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-preview-btn:hover {
  background: rgba(74, 108, 247, 0.1);
  color: var(--primary-color);
}

/* 预览内容 */
.preview-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .preview-content {
    flex-direction: column;
    align-items: center;
  }
}

/* 预览图片 */
.preview-image {
  max-width: 500px;
  max-height: 400px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

@media (max-width: 768px) {
  .preview-image {
    max-width: 100%;
    max-height: 300px;
  }
}

/* 预览信息 */
.preview-info {
  flex: 1;
  min-width: 300px;
}

.preview-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.preview-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.preview-category, .preview-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 图库分页样式 */
.gallery-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--background-color);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
}

.pagination-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  
  box-shadow: 0 4px 12px rgba(74, 108, 247, 0.4);
}

.pagination-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(74, 108, 247, 0.4);
}

.pagination-btn.prev, .pagination-btn.next {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn.prev:hover, .pagination-btn.next:hover {
  background: var(--primary-color);
  color: white;
}

/* ===========================================
   Font Settings
   字体设置样式
   =========================================== */

/* 字体大小 */
.font-small {
  font-size: 0.9rem !important;
}

.font-medium {
  font-size: 1rem !important;
}

.font-large {
  font-size: 1.1rem !important;
}

.font-xlarge {
  font-size: 1.25rem !important;
}

/* 字体大小对标题的影响 */
.font-small h1 { font-size: 2rem !important; }
.font-small h2 { font-size: 1.8rem !important; }
.font-small h3 { font-size: 1.5rem !important; }

.font-medium h1 { font-size: 2.2rem !important; }
.font-medium h2 { font-size: 2rem !important; }
.font-medium h3 { font-size: 1.6rem !important; }

.font-large h1 { font-size: 2.4rem !important; }
.font-large h2 { font-size: 2.2rem !important; }
.font-large h3 { font-size: 1.8rem !important; }

.font-xlarge h1 { font-size: 2.6rem !important; }
.font-xlarge h2 { font-size: 2.4rem !important; }
.font-xlarge h3 { font-size: 2rem !important; }

/* ===========================================
   Background Settings
   背景设置样式
   =========================================== */

/* 默认背景 */
.bg-default {
  background-color: var(--background-color) !important;
  background-image: none !important;
}

/* 渐变背景 */
.bg-gradient {
  background: linear-gradient(135deg, var(--background-color), rgba(74, 108, 247, 0.05)) !important;
  background-image: linear-gradient(135deg, var(--background-color), rgba(74, 108, 247, 0.05)) !important;
}

/* 图案背景 */
.bg-pattern {
  background-color: var(--background-color) !important;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(74, 108, 247, 0.1) 1px, transparent 0) !important;
  background-size: 20px 20px !important;
  background-repeat: no-repeat !important;
}

/* 背景模糊效果 */
.bg-blur {
  backdrop-filter: blur(8px) !important;
}

/* API背景样式 */
body[data-api-background] {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

/* 暗黑模式下的背景设置 */
body.dark-mode.bg-gradient {
  background: linear-gradient(135deg, var(--background-color), rgba(139, 183, 247, 0.1)) !important;
  background-image: linear-gradient(135deg, var(--background-color), rgba(139, 183, 247, 0.1)) !important;
}

body.dark-mode.bg-pattern {
  background-color: var(--background-color) !important;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(139, 183, 247, 0.1) 1px, transparent 0) !important;
  background-size: 20px 20px !important;
  background-repeat: no-repeat !important;
}

/* API背景选项样式 */
.background-api-options {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.background-api-options h5 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-
  letter-spacing: 0.5px;
}

.background-api-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--background-color);
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.background-api-select:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(74, 108, 247, 0.2);
}

.refresh-api-bg-btn {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  background: var(--primary-color);
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.refresh-api-bg-btn:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  
  box-shadow: 0 4px 12px rgba(74, 108, 247, 0.4);
}

/* ===========================================
   图片灯箱样式
   =========================================== */

.image-preview-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.preview-header {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
}

.preview-title {
  color: white;
  font-size: 1.5rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.close-preview-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-preview-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.preview-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 95%;
  max-height: calc(100vh - 120px);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.preview-image {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  object-fit: contain;
}

.preview-info {
  margin-top: 20px;
  text-align: center;
  color: white;
  max-width: 100%;
}

.preview-desc {
  font-size: 1rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  word-wrap: break-word;
}

.preview-meta {
  font-size: 0.875rem;
  opacity: 0.8;
}

.preview-category,
.preview-date {
  margin: 0 10px;
}

/* 响应式设�?*/
@media (max-width: 768px) {
  .preview-content {
    max-width: fit-content;
    width: auto;
    max-height: calc(100vh - 100px);
    padding: 15px;
    min-width: 0;
  }
  
  .preview-image {
    max-height: calc(100vh - 140px);
    max-width: calc(100vw - 60px);
  }
  
  .preview-title {
    font-size: 1.25rem;
  }
  
  .close-preview-btn {
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
  }
  
  .preview-header {
    top: 10px;
    left: 10px;
    right: 10px;
  }
  
  .preview-info {
    max-width: calc(100vw - 60px);
  }
}

/* 小屏幕设�?*/
@media (max-width: 480px) {
  .preview-content {
    max-height: calc(100vh - 80px);
    padding: 10px;
  }
  
  .preview-image {
    max-height: calc(100vh - 120px);
    max-width: calc(100vw - 40px);
  }
  
  .preview-info {
    margin-top: 10px;
    max-width: calc(100vw - 40px);
  }
  
  .preview-desc {
    font-size: 0.9rem;
  }
}

/* ===========================================
   Code Block Enhancements
   代码块增强
   =========================================== */

/* 代码块容器 */
.post-content pre {
  position: relative;
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
}

/* 代码块工具栏 */
.code-toolbar {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom-left-radius: 8px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* 代码块悬停时显示工具栏 */
.post-content pre:hover .code-toolbar {
  opacity: 1;
}

/* 代码块按钮 */
.code-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 4px;
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.code-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* 代码块内容 */
.code-content {
  max-height: 500px;
  overflow-y: auto;
  transition: max-height 0.3s ease;
}

/* 代码块收起状态 */
.code-content.collapsed {
  max-height: 200px;
}

/* 深色模式下的代码块工具栏 */
body.dark-mode .code-toolbar {
  background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .code-btn {
  background: rgba(255, 255, 255, 0.15);
}

body.dark-mode .code-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ===========================================
   Custom Tags
   自定义标签样式
   =========================================== */

/* link标签样式 */
.custom-link {
  display: inline-block;
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  text-decoration: none;
  color: #333333;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-link-content {
  display: flex;
  align-items: center;
  min-height: 24px;
}

.custom-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-color);
  border-color: var(--primary-color);
}

.custom-link-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 8px;
  object-fit: cover;
}

.custom-link-title {
  font-weight: 500;
  display: inline-block;
  vertical-align: middle;
  color: #333333;
  font-size: 14px;
  margin-left: 8px;
  min-width: 50px;
}

/* psw标签样式 - 密码保护文本 */
.password-protected {
  position: relative;
  display: inline-block;
  background: #e0e0e0;
  color: #e0e0e0;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: help;
}

.password-protected:hover {
  background: #f0f0f0;
  color: var(--text-primary);
}

/* 深色模式下的样式 */
body.dark-mode .custom-link {
  background: var(--card-background);
  border-color: var(--border-color);
  color: var(--text-primary);
}

body.dark-mode .custom-link:hover {
  border-color: var(--primary-color);
}

body.dark-mode .password-protected {
  background: #333;
  color: #333;
}

body.dark-mode .password-protected:hover {
  background: #444;
  color: var(--text-primary);
}

/* ===========================================
   End of Enhancements
   增强样式结束
   =========================================== */

