/* ========== Modern Dark Theme Template ========== */

/* 全局重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 现代暗色主题变量 */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --dark-bg: #0f0f23;
  --darker-bg: #1a1a3a;
  --card-bg: rgba(26, 26, 58, 0.6);
  --text-primary: #e0e6ed;
  --text-secondary: #8892b0;
  --text-accent: #64ffda;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(102, 126, 234, 0.3);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 10px 25px rgba(102, 126, 234, 0.3);
  --backdrop-blur: blur(20px);
  --sidebar-width: 280px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 50%, var(--dark-bg) 100%);
  min-height: 100vh;
  font-size: 14px;
  background-attachment: fixed;
}

/* 容器和布局 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

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

a:hover {
  color: var(--text-accent);
}

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

/* 通用图片显示修复 */
.entry-thumb img,
.related-videos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--darker-bg);
}

/* 确保图片容器有高度 */
.entry-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--darker-bg);
  min-height: 150px;
}


/* ========== 头部导航 ========== */
.site-header {
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
  height: 70px;
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-container {
  font-size: 28px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.logo-container a {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 搜索和导航 */
.header-search {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-btn {
  background: var(--primary-gradient);
  border: none;
  padding: 8px 24px;
  border-radius: 25px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  gap: 3px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  transition: 0.3s;
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ========== 主导航 ========== */
.main-navigation {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 25px;
  border: 1px solid var(--border-color);
  width: var(--sidebar-width);
  flex-shrink: 0;
  height: fit-content;
  position: sticky;
  top: 90px;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-navigation a {
  display: block;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
}

.main-navigation a:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.more-categories {
  background: var(--primary-gradient) !important;
  color: white !important;
  font-weight: 700 !important;
  text-align: center;
}

/* ========== 内容区域 ========== */
.site-main {
  padding: 30px 0;
}

.site-main .container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.content-area {
  flex: 1;
}

.content-area h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 30px;
  text-align: center;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== 视频卡片网格 ========== */
.entry-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.entry-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
  border: 1px solid var(--border-color);
  position: relative;
}

.entry-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
  border-color: var(--border-accent);
}

.entry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.entry-card:hover::before {
  opacity: 0.1;
}

.entry-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--darker-bg);
}

.entry-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.4s ease;
}

.entry-card:hover .entry-thumb img {
  transform: scale(1.05);
}

.card-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--primary-gradient);
  color: white;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  z-index: 2;
}

.entry-title {
  padding: 20px;
}

.entry-title a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.entry-title a:hover {
  color: var(--text-accent);
}

/* ========== 视频播放器 ========== */
.video-wrapper {
  width: 100%;
  margin: 0 auto 20px auto;
  display: block;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 15px;
  background: var(--darker-bg);
  border: 1px solid var(--border-color);
}

.video-js {
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 15px;
}

.video-js .vjs-control-bar {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 0 0 15px 15px;
}

.video-js .vjs-play-progress {
  background: var(--primary-gradient);
}

/* 竖屏视频特殊样式 */
.portrait-mode .video-wrapper {
  width: 60%;
  margin: 0 auto;
  max-width: 500px;
}

.video-wrapper.portrait-video .video-js {
  position: relative !important;
  height: auto !important;
  min-height: 450px !important;
  max-height: 80vh !important;
}

/* ========== 分页导航 ========== */
.ct-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 50px 0;
  flex-wrap: wrap;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 50px;
  padding: 0 18px;
  background: var(--card-bg);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.page-numbers:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.page-numbers.current {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-hover);
}

.page-numbers.dots {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: default;
}

.next {
  gap: 8px;
  font-weight: 700;
}

/* ========== 搜索模态框 ========== */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: var(--backdrop-blur);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.search-modal.active {
  display: flex;
}

.search-close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: var(--text-primary);
  font-size: 40px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.search-close:hover {
  color: var(--text-accent);
}

.search-form {
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
}

.search-form input {
  width: 100%;
  padding: 25px 35px;
  font-size: 24px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 30px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.search-form input:focus {
  border-color: #667eea;
  box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

.search-form input::placeholder {
  color: var(--text-secondary);
}

/* ========== 页脚 ========== */
.site-footer {
  background: rgba(15, 15, 35, 0.9);
  backdrop-filter: var(--backdrop-blur);
  border-top: 1px solid var(--border-color);
  padding: 50px 0;
  margin-top: 80px;
}

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

.site-info p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 8px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
  .site-main .container {
    display: block;
  }
  
  .main-navigation {
    display: none !important;
  }
}
  
  .main-navigation ul {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .main-navigation a {
    padding: 18px 25px;
    font-size: 18px;
    text-align: center;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .entry-cards {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
  
  .portrait-mode .video-wrapper {
    width: 80%;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }
  
  .logo-container {
    font-size: 24px;
  }
  
  .entry-cards {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }
  
  .entry-thumb {
    aspect-ratio: 16/9;
  }
  
  .entry-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  .entry-title {
    padding: 15px;
  }
  
  .entry-title a {
    font-size: 15px;
  }
  
  .search-form input {
    font-size: 18px;
    padding: 20px 30px;
  }
  
  .page-numbers {
    min-width: 45px;
    height: 45px;
    font-size: 14px;
  }
  
  .content-area h1 {
    font-size: 24px;
  }
  
  .portrait-mode .video-wrapper {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .entry-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .entry-card .entry-thumb {
    aspect-ratio: 16/9;
  }
  
  .entry-card .entry-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  .related-videos {
    padding: 20px 15px;
    margin-left: 0;
    margin-right: 0;
    border-radius: 15px;
  }
  
  .related-videos .entry-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .related-videos .entry-card {
    margin-bottom: 0;
  }
  
  .related-videos .entry-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
  }
  
  .related-videos .entry-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  .related-videos .entry-title {
    padding: 8px 5px;
    font-size: 13px;
  }
  
  .related-videos .entry-title a {
    font-size: 13px;
    line-height: 1.3;
  }
  
  .ct-pagination {
    gap: 8px;
  }
  
  .page-numbers {
    min-width: 40px;
    height: 40px;
    font-size: 13px;
    padding: 0 12px;
  }
  
  .content-area h1 {
    font-size: 20px;
  }
  
  .portrait-mode .video-wrapper {
    width: 100%;
  }
}

/* ========== 特殊效果和动画 ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.entry-card {
  animation: fadeInUp 0.6s ease forwards;
}

.entry-card:nth-child(even) {
  animation-delay: 0.1s;
}

.entry-card:nth-child(3n) {
  animation-delay: 0.2s;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 15, 35, 0.5);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-gradient);
}

/* 分类列表样式 */
.categories-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border-radius: 15px;
  padding: 20px 25px;
  font-size: 16px;
  color: var(--text-primary);
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.category-item:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.category-count {
  color: var(--text-secondary);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
}

.category-item:hover .category-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* 视频信息区域 */
.video-info {
  padding: 25px 0;
}

.video-title {
  font-size: 24px;
  margin-bottom: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  gap: 15px;
}

.video-meta a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.video-meta a:hover {
  color: var(--text-accent);
}

/* 相关视频区域 */
.related-videos {
  width: 100%;
  background: var(--card-bg);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  margin-top: 30px;
  padding: 30px;
}

.section-title {
  font-size: 20px;
  margin-bottom: 25px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 无结果页面 */
.no-results {
  text-align: center;
  padding: 80px 30px;
  background: var(--card-bg);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  font-size: 18px;
  color: var(--text-secondary);
}

/* 移动端优化 */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 150;
}

.mobile-menu-overlay.active {
  display: block;
}

/* ========== 移动端导航 ========== */
.mobile-navigation {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(15, 15, 35, 0.98);
  backdrop-filter: var(--backdrop-blur);
  z-index: 200;
  padding: 100px 30px 30px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.mobile-navigation.active {
  display: block;
  transform: translateX(0);
}

.mobile-navigation ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mobile-navigation a {
  display: block;
  padding: 18px 25px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 16px;
  text-align: center;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
}

.mobile-navigation a:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* PC端隐藏汉堡菜单和移动端导航 */
@media (min-width: 993px) {
  .menu-toggle {
    display: none !important;
  }
  
  .mobile-navigation {
    display: none !important;
  }
}
