/* ========================================================================
   DIYCSS - 自定义样式文件
   ======================================================================== */
/**
 * 说明：
 * 1. 如果要修改CSS，建议在这个文件修改覆盖即可，更新的时候注意备份此文件
 * 2. 本文件包含首页所有自定义样式，包括亮色/暗色模式适配
 * 3. 样式按照功能模块组织，便于维护和查找
 */


/* ========================================================================
   1. 全局样式 - 页面整体背景和基础设置
   ======================================================================== */

/* 页面整体背景色 - 亮色模式 */
.site-content,
body {
  background: #e8e8e8 !important;
  transition: background 0.3s ease;
}

/* 页面整体背景色 - 暗色模式 */
body.dark-theme,
body.night-theme,
body.dark-theme .site-content,
body.night-theme .site-content {
  background: #2a2a2a !important;
}


/* ========================================================================
   2. Header 头部导航
   ======================================================================== */

/* Header毛玻璃半透明效果 - 亮色模式 */
.site-header {
  background: rgba(255, 255, 255, 0.20) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

/* Header毛玻璃半透明效果 - 暗色模式 */
body.dark-theme .site-header,
body.night-theme .site-header {
  background: rgba(30, 30, 30, 0.20) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}


/* ========================================================================
   3. 首页搜索区域
   ======================================================================== */

/* 搜索区域高度设置 */
.home-filter--content {
  min-height: 410px !important;
  padding-top: 80px;
  padding-bottom: 80px;
}

/* 搜索输入框 - 亮色模式 */
.home-filter--content .home_search_input,
.home-filter--content input[type="text"] {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  transition: all 0.3s ease;
  color: #333;
}

/* 搜索输入框悬停/聚焦 - 亮色模式 */
.home-filter--content .home_search_input:hover,
.home-filter--content input[type="text"]:hover,
.home-filter--content .home_search_input:focus,
.home-filter--content input[type="text"]:focus {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-color: rgba(255, 255, 255, 0.6) !important;
}

/* 搜索按钮 - 亮色模式 */
.home-filter--content .btn,
.home-filter--content input[type="submit"] {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  transition: all 0.3s ease;
  color: #333 !important;
}

/* 搜索按钮悬停 - 亮色模式 */
.home-filter--content .btn:hover,
.home-filter--content input[type="submit"]:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-color: rgba(255, 255, 255, 0.6) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 搜索输入框 - 暗色模式 */
body.dark-theme .home-filter--content .home_search_input,
body.dark-theme .home-filter--content input[type="text"],
body.night-theme .home-filter--content .home_search_input,
body.night-theme .home-filter--content input[type="text"] {
  background: rgba(30, 30, 30, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff;
}

/* 搜索输入框悬停/聚焦 - 暗色模式 */
body.dark-theme .home-filter--content .home_search_input:hover,
body.dark-theme .home-filter--content input[type="text"]:hover,
body.dark-theme .home-filter--content .home_search_input:focus,
body.dark-theme .home-filter--content input[type="text"]:focus,
body.night-theme .home-filter--content .home_search_input:hover,
body.night-theme .home-filter--content input[type="text"]:hover,
body.night-theme .home-filter--content .home_search_input:focus,
body.night-theme .home-filter--content input[type="text"]:focus {
  background: rgba(30, 30, 30, 0.9) !important;
  border-color: rgba(67, 49, 49, 0.4) !important;
}

/* 搜索按钮 - 暗色模式 */
body.dark-theme .home-filter--content .btn,
body.dark-theme .home-filter--content input[type="submit"],
body.night-theme .home-filter--content .btn,
body.night-theme .home-filter--content input[type="submit"] {
  background: rgba(30, 30, 30, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

/* 搜索按钮悬停 - 暗色模式 */
body.dark-theme .home-filter--content .btn:hover,
body.dark-theme .home-filter--content input[type="submit"]:hover,
body.night-theme .home-filter--content .btn:hover,
body.night-theme .home-filter--content input[type="submit"]:hover {
  background: rgba(30, 30, 30, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}


/* ========================================================================
   4. 网站公告区域
   ======================================================================== */

/* 公告容器 - 亮色模式 */
.container[style*="padding: 7px"] {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 12px 15px !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* 公告容器 - 暗色模式 */
body.dark-theme .container[style*="padding: 7px"],
body.night-theme .container[style*="padding: 7px"] {
  background: rgba(40, 40, 40, 0.6);
  color: #e0e0e0;
}


/* ========================================================================
   5. 模块容器样式
   ======================================================================== */

/* 模块外层容器 - 透明背景 */
.module-container {
  background: transparent;
  border-radius: 0;
  padding: 30px 0;
  margin-bottom: 20px;
  transition: background 0.3s ease;
}

/* 模块内部容器 - 亮色模式：白色背景，居中有限宽 */
.module-container > .container {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

/* 分类卡片模块 - 亮色模式 */
.module-container.bgcolor-fff > .container {
  background: #ffffff;
}

/* 模块内部容器 - 暗色模式：浅黑色背景 */
body.dark-theme .module-container > .container,
body.night-theme .module-container > .container {
  background: #1a1a1a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* 分类卡片模块 - 暗色模式 */
body.dark-theme .module-container.bgcolor-fff > .container,
body.night-theme .module-container.bgcolor-fff > .container {
  background: #1a1a1a;
}


/* ========================================================================
   6. 模块标题样式
   ======================================================================== */

/* 模块标题 - 基础样式 */
.module-container .section-title {
  margin-bottom: 25px;
  padding: 0 15px;
}

.module-container .section-title span {
  font-size: 20px;
  font-weight: 600;
}

/* 模块标题 - 暗色模式 */
body.dark-theme .module-container .section-title,
body.night-theme .module-container .section-title {
  color: #e0e0e0;
}

body.dark-theme .module-container .section-title a,
body.night-theme .module-container .section-title a {
  color: #e0e0e0;
}


/* ========================================================================
   7. 分类导航按钮
   ======================================================================== */

/* 导航按钮 - 亮色模式 */
.module-container .cat-nav .btn {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  color: #666;
  border-radius: 20px;
  padding: 8px 20px;
  transition: all 0.3s ease;
}

/* 导航按钮悬停/激活 - 亮色模式 */
.module-container .cat-nav .btn:hover,
.module-container .cat-nav .btn.active {
  background: #1e73be;
  border-color: #1e73be;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 115, 190, 0.3);
}

/* 导航按钮 - 暗色模式 */
body.dark-theme .module-container .cat-nav .btn,
body.night-theme .module-container .cat-nav .btn {
  background: #0d0d0d;
  border-color: #333;
  color: #ccc;
}

/* 导航按钮悬停/激活 - 暗色模式 */
body.dark-theme .module-container .cat-nav .btn:hover,
body.dark-theme .module-container .cat-nav .btn.active,
body.night-theme .module-container .cat-nav .btn:hover,
body.night-theme .module-container .cat-nav .btn.active {
  background: #1e73be;
  border-color: #1e73be;
  color: #ffffff;
}


/* ========================================================================
   8. 卡片样式 - 通用卡片
   ======================================================================== */

/* 卡片基础样式 - 亮色模式 */
.module-container .post-grid,
.module-container .post-list,
.module-container .category-box {
  background: transparent;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

/* 卡片文字区域 - 亮色模式 */
.module-container .post-grid .entry-wrapper,
.module-container .post-list .entry-wrapper {
  background: #f8f8f8;
  transition: all 0.3s ease;
}

/* 卡片悬停效果 - 亮色模式 */
.module-container .post-grid:hover,
.module-container .post-list:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* 卡片基础样式 - 暗色模式 */
body.dark-theme .module-container .post-grid,
body.dark-theme .module-container .post-list,
body.dark-theme .module-container .category-box,
body.night-theme .module-container .post-grid,
body.night-theme .module-container .post-list,
body.night-theme .module-container .category-box {
  background: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* 卡片文字区域 - 暗色模式 */
body.dark-theme .module-container .post-grid .entry-wrapper,
body.dark-theme .module-container .post-list .entry-wrapper,
body.night-theme .module-container .post-grid .entry-wrapper,
body.night-theme .module-container .post-list .entry-wrapper {
  background: #0d0d0d;
}

/* 卡片悬停效果 - 暗色模式 */
body.dark-theme .module-container .post-grid:hover,
body.dark-theme .module-container .post-list:hover,
body.night-theme .module-container .post-grid:hover,
body.night-theme .module-container .post-list:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}


/* ========================================================================
   9. 分类卡片特殊样式
   ======================================================================== */

/* 分类卡片悬停效果 - 亮色模式 */
.module-container .category-box {
  transition: all 0.3s ease;
}

.module-container .category-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 分类卡片悬停效果 - 暗色模式 */
body.dark-theme .module-container .category-box:hover,
body.night-theme .module-container .category-box:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}


/* ========================================================================
   10. Product2 专属卡片样式
   ======================================================================== */

/* Product2卡片基础样式 */
.product2-card {
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Product2卡片悬停效果 */
.product2-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Product2图片容器 */
.product2-card .entry-media {
  position: relative;
  overflow: hidden;
}

.product2-card .entry-media .placeholder {
  position: relative;
  overflow: hidden;
}

/* Product2链接层 */
.product2-card .product2-link {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Product2图片缩放效果 */
.product2-card .entry-media img {
  transition: transform 0.5s ease;
}

.product2-card:hover .entry-media img {
  transform: scale(1.1);
}

/* Product2遮罩层 - 默认隐藏 */
.product2-card .product2-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
  padding: 20px 15px 15px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 2;
}

/* Product2遮罩层 - 悬停显示 */
.product2-card:hover .product2-overlay {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Product2遮罩层信息容器 */
.product2-card .product2-info {
  color: #fff;
}

.product2-card .product2-overlay .entry-meta {
  margin-bottom: 8px;
}

/* Product2类目标签 */
.product2-card .product2-overlay .meta-category {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product2-card .product2-overlay .meta-category .dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

/* Product2标题样式 */
.product2-card .product2-overlay .entry-title {
  font-size: 15px;
  line-height: 1.4;
  margin: 0;
  color: #fff !important;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Product2卡片 - 暗色模式适配 */
body.dark-theme .product2-card,
body.night-theme .product2-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-theme .product2-card:hover,
body.night-theme .product2-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
