/*
Theme Name: 7Nav - 导航主题
Theme URI: https://touduyu.com
Author: Your Name
Author URI: https://touduyu.com
Description: 一个现代化的WordPress导航主题，参考偷渡鱼网站设计。支持自动获取网站favicon图标。
Version: 1.0.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: 7nav
Tags: navigation, directory, modern, responsive, favicon
*/

/* ========================================
   面包屑导航样式 - 全局统一样式
   ======================================== */

/* 面包屑导航 - 统一样式 */
.breadcrumb {
  padding: 20px 30px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  border-radius: 12px 12px 0 0;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  border-bottom: none;
}

body.dark-mode .breadcrumb {
  background: rgba(26, 29, 41, 0.5);
}

/* 面包屑模块特定样式 */
.breadcrumb-module {
  position: relative;
  z-index: 10;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.breadcrumb a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.breadcrumb .breadcrumb-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb .breadcrumb-home svg {
  flex-shrink: 0;
}

.breadcrumb .separator {
  margin: 0 8px;
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumb .current,
.breadcrumb .breadcrumb-current {
  color: var(--text-color);
  font-weight: 600;
}

.breadcrumb-module .breadcrumb-link {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.breadcrumb-module .breadcrumb-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.breadcrumb-module .breadcrumb-current {
  color: var(--text-color);
  font-weight: 600;
}

/* 移动端面包屑样式 */
@media (max-width: 768px) {
  .breadcrumb {
    padding: 16px;
    font-size: 13px;
  }
}

/* ========================================
   CSS 变量和基础样式
   ======================================== */

:root {
  /* 颜色系统 */
  --primary-color: #5e72e4;
  --secondary-color: #f5365c;
  --success-color: #2dce89;
  --info-color: #11cdef;
  --warning-color: #fb6340;
  --danger-color: #f5365c;
  --text-color: #333;
  --text-muted: #666;
  --border-color: #e9ecef;
  --bg-light: #f8f9fa;
  --white: #fff;
  
  /* 统一圆角 */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 50%;
  
  /* 统一阴影 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.12);
  
  /* 统一间距 */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* 过渡动画 */
  --transition: all 0.3s ease;
  
  /* 兼容旧版本 */
  --shadow: var(--shadow-md);
  --shadow-hover: var(--shadow-lg);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color);
  background: #f5f5f5;
  transition: var(--transition);
}

body.dark-mode {
  --text-color: #e9ecef;
  --text-muted: #adb5bd;
  --border-color: #3a3f51;
  --bg-light: #1a1d29;
  --white: #252a3a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.4);
  --shadow: var(--shadow-md);
  background: #1a1d29;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   首页核心样式
   ======================================== */

/* 热门导航区域 */
.hot-nav-section {
  background: transparent;
  padding: 20px 0;
}

.hot-nav-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 30px;
}

body.dark-mode .hot-nav-card {
  background: rgba(26, 29, 41, 0.5);
}

.hot-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.hot-nav-wrapper {
  position: relative;
  display: block;
}

.hot-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: rgba(248, 249, 250, 0.3);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
  border: 2px solid transparent;
  backdrop-filter: blur(10px);
}

body.dark-mode .hot-nav-item {
  background: rgba(37, 42, 58, 0.3);
}

.hot-nav-item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hot-nav-direct {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 114, 228, 0.1);
  border-radius: 6px;
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  opacity: 0;
  transform: scale(0.8);
  z-index: 10;
}

.hot-nav-wrapper:hover .hot-nav-direct {
  opacity: 1;
  transform: scale(1);
}

.hot-nav-direct:hover {
  background: white;
  color: var(--primary-color);
  transform: scale(1.1);
}

.hot-nav-direct svg {
  width: 14px;
  height: 14px;
}

.hot-nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.hot-nav-icon-emoji {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  display: inline-block;
  width: 24px;
  height: 24px;
  text-align: center;
}

.hot-nav-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 搜索区域 */
.search-section {
  background: transparent;
  padding: 40px 0 20px 0;
  text-align: center;
  position: relative;
  z-index: 10;
}

.search-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 50px 30px;
  position: relative;
}

body.dark-mode .search-card {
  background: rgba(26, 29, 41, 0.5);
}

.search-title {
  font-size: 32px;
  margin-bottom: 30px;
  color: var(--text-color);
}

/* 导航区域 - 滑动布局 */
.nav-section {
  background: transparent;
  padding: 15px 0;
}

.nav-card {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: visible;
}

body.dark-mode .nav-card {
  background: rgba(26, 29, 41, 0.5);
}

.nav-wrapper {
  display: flex;
  align-items: flex-start;
}

/* 左侧分类导航 */
.nav-sidebar {
  width: 160px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
  transition: var(--transition);
  position: sticky;
  top: 20px;
  align-self: flex-start;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body.dark-mode .nav-sidebar {
  background: rgba(37, 42, 58, 0.3);
  border-right-color: var(--border-color);
}

.nav-sidebar-inner {
  padding: 15px 0;
  display: flex;
  flex-direction: column;
}

.nav-sidebar::-webkit-scrollbar {
  width: 4px;
}

.nav-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.nav-sidebar::-webkit-scrollbar-thumb {
  background: rgba(94, 114, 228, 0.3);
  border-radius: 2px;
}

.nav-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(94, 114, 228, 0.5);
}

.nav-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.nav-sidebar-item:hover {
  background: rgba(94, 114, 228, 0.1);
  color: var(--primary-color);
}

.nav-sidebar-item.active {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
}

.nav-sidebar-item.active::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: white;
  border-radius: 3px 0 0 3px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

body.dark-mode .nav-sidebar-item:hover {
  background: rgba(94, 114, 228, 0.2);
}

body.dark-mode .nav-sidebar-item.active {
  background: rgba(94, 114, 228, 0.3);
}

.nav-sidebar-icon {
  font-size: 18px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(94, 114, 228, 0.1);
  flex-shrink: 0;
}

.nav-sidebar-item.active .nav-sidebar-icon {
  background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .nav-sidebar-icon {
  background: rgba(94, 114, 228, 0.2);
}

body.dark-mode .nav-sidebar-item.active .nav-sidebar-icon {
  background: rgba(255, 255, 255, 0.2);
}

.nav-sidebar-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 右侧内容区域 */
.nav-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  min-height: 400px;
}

body.dark-mode .nav-content {
  background: rgba(37, 42, 58, 0.2);
}

.nav-content-inner {
  padding: 20px;
}

.nav-category {
  margin-bottom: 30px;
}

.category-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-color);
}

.nav-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.nav-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.nav-link-wrapper {
  position: relative;
}

/* 推荐链接样式 - 红色标题 */
.nav-link-wrapper.link-recommended .link-title {
  color: #ff4757;
  font-weight: 600;
}

.nav-link-wrapper.link-recommended .nav-link:hover .link-title {
  color: #ff3838;
}

/* 暗色模式下的推荐样式 */
body.dark-mode .nav-link-wrapper.link-recommended .link-title {
  color: #ff6b7a;
}

body.dark-mode .nav-link-wrapper.link-recommended .nav-link:hover .link-title {
  color: #ff5566;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
  border: 2px solid transparent;
}

body.dark-mode .nav-link {
  background: rgba(37, 42, 58, 0.25);
}

.nav-link:hover {
  background: white;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.nav-link-direct {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(94, 114, 228, 0.1);
  border-radius: 6px;
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  opacity: 0;
  transform: scale(0.8);
  z-index: 10;
}

.nav-link-wrapper:hover .nav-link-direct {
  opacity: 1;
  transform: scale(1);
}

.nav-link-direct:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.nav-link-direct svg {
  width: 14px;
  height: 14px;
}

.nav-link img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.link-icon {
  font-size: 25px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-light);
}

.link-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.link-title-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.link-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-tags {
  display: flex;
  gap: 4px;
}

.link-tag {
  display: inline-flex;
  padding: 2px 6px;
  background: rgba(94, 114, 228, 0.1);
  color: var(--primary-color);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
}

body.dark-mode .link-tag {
  background: rgba(94, 114, 228, 0.2);
}

.link-desc {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .hot-nav-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  
  .hot-nav-item {
    padding: 8px 12px;
  }
  
  .nav-section {
    padding: 20px 0;
  }
  
  .nav-wrapper {
    flex-direction: column;
  }
  
  .nav-sidebar {
    width: 100%;
    max-height: none;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    overflow-y: visible;
  }
  
  .nav-sidebar-inner {
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
  }
  
  .nav-sidebar-item {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 20px;
  }
  
  .nav-sidebar-item.active {
    border-radius: 20px;
  }
  
  .nav-sidebar-icon {
    width: 20px;
    height: 20px;
    font-size: 16px;
  }
  
  .nav-sidebar-title {
    font-size: 13px;
  }
  
  .nav-content-inner {
    padding: 15px 12px;
  }
  
  .nav-links {
    grid-template-columns: 1fr;
  }
  
  .nav-link {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .hot-nav-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .hot-nav-item {
    padding: 6px 10px;
    gap: 8px;
  }
  
  .hot-nav-icon,
  .hot-nav-icon-emoji {
    width: 20px;
    height: 20px;
    font-size: 20px;
  }
  
  .hot-nav-title {
    font-size: 12px;
  }
  
  .hot-nav-direct {
    width: 24px;
    height: 24px;
  }
  
  .hot-nav-direct svg {
    width: 12px;
    height: 12px;
  }
  
  .nav-links {
  gap: 8px;
}
}

/* 辅助类 */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
