/* 首页：次级导航、推荐筛选、搜索区域、名言与导航间距等样式 */

/* 首页次级居中导航（仅首页生效） */
.home-subnav { background:#f5f5f5; padding:8px 0; position:relative; }
.home-subnav .subnav-container { position:relative; }
/* 左下角标题：与主导航"首页"文字左边缘对齐（使用与 .nav-link 相同的左内边距） */
.home-subnav .subnav-title {
  position:absolute; left:0; bottom:-112px; z-index:1;
  display:inline-block; pointer-events:none;
  padding:5px 8px; padding-left: var(--spacing-6);
  background:#ffffff; border-radius:8px;
  box-shadow:0 2px 6px rgba(0,0,0,.06);
  color:#333333; font-size:1.25rem; font-weight:700; line-height:1;
  text-indent: var(--title-text-offset, 1em);
}
/* 次级标题下的短划线装饰 */
.home-subnav .subnav-title::after {
  content: "";
  display: block;
  width: var(--underline-width, 32px);
  height: 2.5px;
  background: #ff7a45;
  border-radius: 2px;
  margin-top: 8px;
}
/* 标题淡入动画 */
@keyframes subnavTitleFade { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }
.home-subnav .subnav-title.fade-in { animation: subnavTitleFade .25s ease; }

.home-subnav .subnav-menu { list-style:none; margin:0; padding:3px 0; display:flex; justify-content:center; gap:16px; }
.home-subnav .subnav-link { display:inline-flex; align-items:center; justify-content:center; padding:8px 15px; border-radius:8px; color:#ff7a45; font-size:1rem; font-weight:400; transition:all .2s ease; }
.home-subnav .subnav-link:hover, .home-subnav .subnav-link:focus { background:#ffa07a; color:#ffffff; font-weight:700; outline:none; padding:5px 15px; }
.home-subnav .subnav-link.active,
.home-subnav .subnav-link[aria-current="page"] { background:#ff7a45; color:#ffffff; font-weight:700; }
.home-subnav .subnav-link.active:hover,
.home-subnav .subnav-link[aria-current="page"]:hover { background:#ff7a45; padding:5px 15px; }

@media (max-width:768px){
  .home-subnav .subnav-menu{ gap:12px; }
  .home-subnav .subnav-link{ padding:8px 14px; font-size:1.0625rem; }
}

/* 推荐筛选子导航（样式同次级导航，但左对齐不居中）且定位在"推荐"标题下划线的正下方 */
.home-subnav .recommend-subnav { position:absolute; left:0; bottom:-160px; z-index:0; margin-top:0; }
.home-subnav .recommend-subnav .reco-menu { list-style:none; margin:0; padding:3px 0; display:flex; justify-content:flex-start; gap:14px; padding-left: var(--spacing-6); margin-left: calc(var(--title-text-offset, 1em) * 2 - 15px); }
.home-subnav .recommend-subnav .reco-link { display:inline-flex; align-items:center; justify-content:center; padding:5px 12px; border-radius:8px; color:#ff7a45; font-size:0.9rem; font-weight:400; position:relative; z-index:0; transition: color .22s ease, font-weight .22s ease; }
.home-subnav .recommend-subnav .reco-link::before { content:""; position:absolute; inset:0; border-radius:8px; background:#ff7a45; opacity:0; transition: opacity .22s ease; z-index:-1; }
.home-subnav .recommend-subnav .reco-link:hover { color:#ffffff; font-weight:700; outline:none; }
.home-subnav .recommend-subnav .reco-link:hover::before { opacity:1; }
.home-subnav .recommend-subnav .reco-link.active { color:#ffffff; font-weight:700; }
.home-subnav .recommend-subnav .reco-link.active::before { opacity:1; }
@media (max-width:768px){
  /* 移动端：不显示“下划线的导航栏”（推荐筛选子导航）以及其展开按钮 */
  .home-subnav .recommend-subnav{ display:none !important; }
  .home-subnav .subnav-title .recommend-subnav{ display:none !important; }
  .home-subnav .reco-toggle, .home-subnav .subnav-title .reco-toggle{ display:none !important; }
}

/* 搜索区域样式 - 独立区域，在推荐子导航下方 */
.search-section { background:#ffffff; padding: 0 0 15px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.search-container {
  display:flex; align-items:center; justify-content:flex-start; /* left align to subnav */
  max-width: 900px; margin:0 auto;
  padding-left: calc(var(--spacing-6) + (var(--title-text-offset, 1em) * 2)); /* align with reco-menu left */
}
/* 左对齐到“全部”左边框（与 reco-menu 的左偏移一致），容器不再居中 */
.search-section .search-container{
  justify-content: center !important; margin: 0 auto !important; max-width: none !important; width: 100% !important;
  /* 与“全部”左边框对齐后再向左偏移 20px */
  padding: 0 !important;
}
.search-box { display:flex; align-items:center; background:#ffffff; border:2px solid #e0e0e0; border-radius:20px; padding:4px 16px; width:1435px; max-width:1435px; transition:all .3s ease; box-shadow:0 2px 8px rgba(0,0,0,.05); height:40px; gap:8px; }
.search-box:focus-within { border-color:#ff7a45; box-shadow:0 4px 16px rgba(255,122,69,.2); transform:translateY(-1px); }
.search-input { flex:1; border:none; outline:none; padding:8px 12px; font-size:15px; color:#333; background:transparent; height:32px; }
.search-input::placeholder { color:#999; font-size:14px; }
.search-btn { display:flex; align-items:center; gap:6px; background:transparent; color:#333; border:none; border-radius:16px; padding:8px 16px; cursor:pointer; font-size:13px; font-weight:600; transition: color .2s ease, transform .2s ease; white-space:nowrap; height:32px; }
.search-btn:hover { background:transparent; color:#ff7a45; transform:none; box-shadow:none; }
.search-btn:active { transform:none; opacity:.9; }
.search-icon { width:16px; height:16px; flex-shrink:0; color:#666; }
.search-text { font-size:13px; }
.baidu-link { color:#999; text-decoration:none; font-size:12px; padding:4px 8px; border-radius:12px; transition:all .3s ease; white-space:nowrap; border:1px solid #e0e0e0; height:24px; display:flex; align-items:center; background:#f8f9fa; flex-shrink:0; }
.baidu-link:hover { color:#ff7a45; border-color:#ff7a45; background:rgba(255,122,69,.1); }

/* 搜索框下方的两个圆角矩形方框 */
.search-boxes-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  max-width: 1435px;
  margin-left: auto;
  margin-right: auto;
}

.search-box-item {
  flex: 1;
  max-width: 693px;
  background: #ffffff;
  border: 2px solid #ffe8dd;
  border-radius: 16px;
  padding: 65px 30px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

/* 左边圆角矩形往左移17px */
.search-box-item:first-child {
  transform: translateX(-17px);
}

/* 右边圆角矩形往右移17px */
.search-box-item:last-child {
  transform: translateX(17px);
}

/* 第二行圆角矩形容器 */
.search-boxes-row-2 {
  margin-top: 45px; /* 与第一行的间距 */
}

/* 第二行的矩形也应用相同的水平移动效果 */
.search-boxes-row-2 .search-box-item:first-child {
  transform: translateX(-17px);
}

.search-boxes-row-2 .search-box-item:last-child {
  transform: translateX(17px);
}

/* 第三行圆角矩形容器 */
.search-boxes-row-3 {
  margin-top: 45px; /* 与第二行的间距 */
}

/* 第三行的矩形也应用相同的水平移动效果 */
.search-boxes-row-3 .search-box-item:first-child {
  transform: translateX(-17px);
}

.search-boxes-row-3 .search-box-item:last-child {
  transform: translateX(17px);
}

/* 第四行圆角矩形容器 */
.search-boxes-row-4 {
  margin-top: 45px; /* 与第三行的间距 */
}

/* 第四行的矩形也应用相同的水平移动效果 */
.search-boxes-row-4 .search-box-item:first-child {
  transform: translateX(-17px);
}

.search-boxes-row-4 .search-box-item:last-child {
  transform: translateX(17px);
}

.search-box-item:hover {
  border-color: #ff7a45;
  box-shadow: 0 4px 16px rgba(255, 122, 69, 0.2);
}

/* 保持左边矩形的水平位置不变 */
.search-box-item:first-child:hover,
.search-boxes-row-2 .search-box-item:first-child:hover,
.search-boxes-row-3 .search-box-item:first-child:hover,
.search-boxes-row-4 .search-box-item:first-child:hover {
  transform: translateX(-17px);
}

/* 保持右边矩形的水平位置不变 */
.search-box-item:last-child:hover,
.search-boxes-row-2 .search-box-item:last-child:hover,
.search-boxes-row-3 .search-box-item:last-child:hover,
.search-boxes-row-4 .search-box-item:last-child:hover {
  transform: translateX(17px);
}

.search-box-content h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.search-box-content p {
  margin: 0;
  font-size: 14px;
  color: #666;
}
/* 移动端适配 */
@media (max-width: 768px) {
  .search-section { padding:12px 0; }
  .search-container { padding:0 20px; }
  .search-box { width:100%; max-width:none; height:36px; gap:6px; }
  .search-input { font-size:16px; height:28px; }
  .search-btn { padding:6px 12px; height:28px; }
  .baidu-link { height:20px; padding:2px 6px; font-size:11px; }
}
/* 移动端适配 - 搜索框下方的方框 */
@media (max-width: 768px) {
  .search-boxes-container {
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    padding: 0 20px;
  }

  .search-box-item {
    max-width: none;
    padding: 50px 22px;
  }

  /* 移动端取消水平移动效果 */
  .search-box-item:first-child,
  .search-box-item:last-child,
  .search-boxes-row-2 .search-box-item:first-child,
  .search-boxes-row-2 .search-box-item:last-child,
  .search-boxes-row-3 .search-box-item:first-child,
  .search-boxes-row-3 .search-box-item:last-child,
  .search-boxes-row-4 .search-box-item:first-child,
  .search-boxes-row-4 .search-box-item:last-child {
    transform: none;
  }

  /* 移动端的间距调整 */
  .search-boxes-row-2 {
    margin-top: 30px; /* 第二行与第一行间距 */
  }

  .search-boxes-row-3,
  .search-boxes-row-4 {
    margin-top: 30px; /* 统一间距 */
  }

  /* 移动端取消水平移动效果 */
  .search-box-item:first-child,
  .search-box-item:last-child {
    transform: none;
  }

  .search-box-content h3 {
    font-size: 15px;
  }

  .search-box-content p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .search-box { padding:3px 10px; height:32px; gap:4px; }
  .search-input { padding:6px 8px; font-size:15px; height:26px; }
  .search-btn { padding:4px 10px; font-size:12px; height:24px; }
  .search-text { font-size:12px; }
  .search-icon { width:14px; height:14px; }
  .baidu-link { height:18px; padding:2px 4px; font-size:10px; }

  .search-boxes-container {
    gap: 12px;
    margin-top: 12px;
  }

  .search-box-item {
    padding: 53px 18px;
  }

  .search-box-content h3 {
    font-size: 14px;
  }

  .search-box-content p {
    font-size: 12px;
  }

  /* 手机端的间距调整 */
  .search-boxes-row-2 {
    margin-top: 20px; /* 第二行与第一行间距 */
  }

  .search-boxes-row-3,
  .search-boxes-row-4 {
    margin-top: 20px; /* 统一间距 */
  }
}

/* 首页导航栏菜单项之间的间距设为 30px（仅首页） */
.main-navigation .nav-menu { gap: 30px; }
.main-navigation .nav-menu .nav-link { padding-left: 4px; padding-right: 4px; }
@media (max-width: 768px){ .main-navigation .nav-menu .nav-link { padding-left: 8px; padding-right: 8px; } }

/* 首页导航栏整体往右移30px */
.main-navigation .nav-content {
  margin-left: 30px;
}
@media (max-width: 768px) {
  /* 移动端不应用右移，保持原有布局 */
  .main-navigation .nav-content {
    margin-left: 0;
  }
}

/* 通用页面内容样式 */
.page-content {
  background: #ffffff;
  padding: 40px 0;
  min-height: 60vh;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h2 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 10px;
}

.page-header p {
  font-size: 1.1rem;
  color: #666;
}

.content-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.content-category h3 {
  font-size: 1.5rem;
  color: #ff7a45;
  margin-bottom: 20px;
  border-bottom: 2px solid #ff7a45;
  padding-bottom: 10px;
}

.content-items {
  display: grid;
  gap: 20px;
}

.content-item {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.content-item:hover {
  background: #e9ecef;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-cover {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  margin-right: 15px;
  flex-shrink: 0;
}

/* 不同页面的封面颜色 */
.music-cover {
  background: linear-gradient(135deg, #ff7a45, #ff9a6b);
}

.video-cover {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

.comic-cover {
  background: linear-gradient(135deg, #fd79a8, #fdcb6e);
}

.jiedan-cover {
  background: linear-gradient(135deg, #00b894, #00cec9);
}

.dev-cover {
  background: linear-gradient(135deg, #0984e3, #74b9ff);
}

.novel-cover {
  background: linear-gradient(135deg, #e17055, #fab1a0);
}

.tools-cover {
  background: linear-gradient(135deg, #636e72, #b2bec3);
}

.study-cover {
  background: linear-gradient(135deg, #e84393, #fd79a8);
}

.item-info h4 {
  font-size: 1.1rem;
  color: #333;
  margin: 0 0 5px 0;
}

.item-info p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .content-categories {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 20px;
  }

  .page-header h2 {
    font-size: 2rem;
  }

  .content-item {
    padding: 15px;
  }

  .item-cover {
    width: 50px;
    height: 50px;
  }
}

/* 
 * ========================================
 * 首页网站标题和导航名言样式设置
 * ========================================
 */

/* 网站标题"艺博之网"下移30px，但不影响外部布局盒子 */
.site-title .site-name { 
  display: inline-block; 
  transform: translateY(30px); 
}
.site-title, .site-title-section { 
  padding-bottom: 0 !important; 
}

/* 
 * 首页专用导航栏中部名言样式设置
 * ========================================
 * 名言内容："宁缺毋滥定会得偿所愿，饥不择食必会悔不当初"
 * 
 * 适用页面：
 * - 首页 (index.html) 【专用】
 * 
 * 注意：注册页面现在有独立的CSS设置，位于 assets/css/register.css
 * 
 * HTML结构：
 * <div class="nav-quote">
 *   <a class="nav-quote-link" href="...">
 *     <span class="quote-line1">
 *       <span class="quote-pre">宁缺毋滥定会</span>
 *       <span class="quote-anchor">得偿所愿</span>
 *     </span>
 *     <span class="quote-line2">饥不择食必会悔不当初</span>
 *   </a>
 * </div>
 * 
 * 功能特性：
 * - 点击可跳转到百度百科查看名言解释
 * - 悬停时文字变为橙色
 * - 移动端自动隐藏
 * - 字体大小：14px（经过多次调整优化）
 */
/* 
 * 首页名言容器主要样式
 * ========================================
 */
.nav-quote { 
  color: #666;           /* 名言文字颜色：中等灰色，保持低调优雅 */
  font-size: 14px;       /* 名言字体大小：14像素（经历了14px→12px→10px→9px→14px的调整过程，最终恢复与首页一致） */
  margin: 0 12px;        /* 名言左右边距：12像素，与导航其他元素保持适当间距 */
  line-height: 1.2;      /* 名言行高：1.2倍，确保两行文字间距适中，不会过于紧密 */
}

/* 
 * 首页名言行布局设置
 * ========================================
 * 将名言分为两行显示：
 * 第一行："宁缺毋滥定会得偿所愿"
 * 第二行："饥不择食必会悔不当初"
 */
.nav-quote .quote-line1, 
.nav-quote .quote-line2 { 
  display: block;        /* 每行独占一行显示，形成上下布局 */
}

/* 
 * 首页名言第二行缩进设置
 * ========================================
 * 可通过CSS变量 --quote-indent 调整第二行的左缩进
 * 当前设置为0px，即不缩进，与第一行左对齐
 */
.nav-quote .quote-line2 { 
  margin-left: var(--quote-indent, 0px);  /* 第二行左缩进，默认0px */
}

/* 
 * 首页名言链接基础样式
 * ========================================
 * 整个名言区域是一个可点击的链接
 * 点击后跳转到百度百科查看名言解释
 */
.nav-quote a.nav-quote-link { 
  color: inherit;        /* 继承父元素颜色（#666灰色） */
  text-decoration: none; /* 去除链接默认的下划线 */
}

/* 
 * 首页名言链接悬停交互效果
 * ========================================
 * 鼠标悬停时改变颜色，提供视觉反馈
 * 橙色与网站主题色保持一致
 */
.nav-quote a.nav-quote-link:hover { 
  color: #ff7a45;        /* 悬停时变为橙色，与网站主色调一致 */
}

/* 
 * 首页移动端响应式设计
 * ========================================
 * 在小屏幕设备上隐藏名言，节省导航栏空间
 * 断点：768px（平板及以下设备）
 */
@media (max-width: 768px) { 
  .nav-quote { 
    display: none;       /* 在768px以下屏幕完全隐藏名言 */
  } 
}

