/* SpankBang风格样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-orange: #6366f1;
  --primary-red: #8b5cf6;
  --accent-orange: #7c3aed;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-gray: #f1f5f9;
  --text-dark: #1e293b;
  --text-gray: #64748b;
  --text-light: #94a3b8;
  --border-light: #e2e8f0;
  --border-gray: #cbd5e1;
  --hover-orange: #4f46e5;
  --shadow-light: rgba(0,0,0,0.05);
  --shadow-medium: rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-white);
  color: var(--text-dark);
  line-height: 1.6;
  margin: 0;
  padding-top: 70px;
}

/* 头部导航 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo a {
  color: var(--primary-orange);
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: -1px;
}

.header-center {
  flex: 1;
  max-width: 500px;
  margin: 0 40px;
}

.search-form {
  display: flex;
  border: 2px solid var(--primary-orange);
  border-radius: 25px;
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.search-input {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--text-dark);
  font-size: 16px;
  outline: none;
}

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

.search-btn {
  padding: 12px 20px;
  border: none;
  background: var(--primary-orange);
  color: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.3s;
}

.search-btn:hover {
  background: var(--hover-orange);
}

.header-nav {
  display: flex;
  gap: 25px;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-orange);
  background: var(--bg-light);
}

/* 主内容区 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.stats-info {
  margin: 20px 0;
  color: var(--text-gray);
  font-size: 14px;
}

/* 视频网格 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.video-card {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow-medium);
  border-color: var(--primary-orange);
}

.video-thumb {
  display: block;
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.video-category {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary-orange);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.video-info {
  padding: 16px;
}

.video-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.video-title a {
  color: var(--text-dark);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s;
}

.video-title a:hover {
  color: var(--primary-orange);
}

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

.page-numbers {
  padding: 10px 16px;
  color: var(--text-dark);
  text-decoration: none;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  transition: all 0.3s;
  font-weight: 500;
  background: var(--bg-white);
}

/* 移动端分页字体调整 */
@media (max-width: 768px) {
  .page-numbers {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .next.page-numbers {
    padding: 6px 10px;
    font-size: 12px;
  }
}

.page-numbers:hover {
  background: var(--primary-orange);
  color: white;
  border-color: var(--primary-orange);
}

.page-numbers.current {
  background: var(--primary-orange);
  color: white;
  border-color: var(--primary-orange);
}

.next.page-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-orange);
  color: white;
  border-color: var(--primary-orange);
}

.next.page-numbers:hover {
  background: var(--hover-orange);
}

/* 页脚 */
.site-footer {
  background: var(--bg-gray);
  border-top: 1px solid var(--border-light);
  margin-top: 60px;
  padding: 40px 0;
}

.site-info {
  text-align: center;
  color: var(--text-gray);
  font-size: 14px;
}

.site-info p {
  margin: 8px 0;
}

/* 搜索模态框 */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  color: white;
  cursor: pointer;
}

/* 分类页面样式 */
.category-header {
  margin: 20px 0 30px 0;
  border-bottom: 3px solid var(--primary-orange);
  padding-bottom: 15px;
}

.category-title {
  font-size: 24px;
  color: var(--text-dark);
  margin: 0 0 8px 0;
  font-weight: bold;
}

.category-stats {
  color: var(--text-gray);
  font-size: 16px;
  font-weight: 500;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.no-results h2 {
  color: var(--text-dark);
  font-size: 24px;
  margin-bottom: 10px;
}

.no-results p {
  color: var(--text-gray);
  font-size: 16px;
}

.no-results a {
  color: var(--primary-orange);
  text-decoration: none;
  font-weight: 500;
}

.no-results a:hover {
  text-decoration: underline;
}

/* 视频详情页面样式 */
.video-player-container {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px var(--shadow-light);
}

.video-player {
  width: 100%;
  height: auto;
  background: #000;
}

.video-title-main {
  font-size: 20px;
  color: var(--text-dark);
  margin: 20px 0 15px 0;
  font-weight: bold;
  line-height: 1.3;
}

.source-tabs {
  display: flex;
  flex-wrap: wrap;
  margin: 15px 0;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
}

.source-tab {
  padding: 8px 16px;
  margin-right: 8px;
  margin-bottom: 5px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-dark);
  transition: all 0.3s;
  font-weight: 500;
}

.source-tab.active,
.source-tab:hover {
  background: var(--primary-orange);
  color: white;
  border-color: var(--primary-orange);
}

.source-info {
  margin: 15px 0;
  padding: 15px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-gray);
  font-size: 14px;
}

.related-videos {
  margin-top: 40px;
}

.related-videos h2 {
  color: var(--text-dark);
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--primary-orange);
}

/* 视频播放器响应式 */
@media (max-width: 768px) {
  .video-title-main {
    font-size: 20px;
    margin: 15px 0 10px 0;
  }

  .source-tab {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* 分类列表页面样式 */
.all-categories-page {
  max-width: 900px;
  margin: 40px auto;
  background: var(--bg-white);
  border-radius: 12px;
  padding: 32px 18px 40px 18px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 16px var(--shadow-light);
}

.all-categories-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 30px;
  text-align: center;
  color: var(--text-dark);
  border-bottom: 3px solid var(--primary-orange);
  padding-bottom: 15px;
}

.all-categories-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.all-category-item {
  display: block;
  padding: 15px 20px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.3s;
  text-align: center;
  font-weight: 500;
}

.all-category-item:hover {
  background: var(--primary-orange);
  border-color: var(--primary-orange);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-medium);
}

.all-category-count {
  color: var(--text-light);
  font-size: 12px;
  margin-left: 8px;
}

.all-category-item:hover .all-category-count {
  color: rgba(255, 255, 255, 0.8);
}

/* 搜索页面样式 */
.search-results-header {
  margin: 20px 0 30px 0;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--primary-orange);
}

.search-results-title {
  font-size: 20px;
  color: var(--text-dark);
  margin: 0 0 8px 0;
}

.search-results-info {
  color: var(--text-gray);
  font-size: 14px;
}

/* 汉堡菜单样式 */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: 1px;
}

.menu-toggle.active span:first-child {
  transform: rotate(45deg);
}

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

.menu-toggle.active span:third-child {
  transform: rotate(-45deg);
}

/* 移动端菜单样式 */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-navigation {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--bg-white);
  border-left: 1px solid var(--border-light);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -4px 0 16px var(--shadow-medium);
}

.mobile-navigation.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  background: var(--primary-orange);
}

.mobile-menu-header h3 {
  color: white;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-list li {
  border-bottom: 1px solid var(--border-light);
}

.mobile-menu-link {
  display: block;
  padding: 15px 20px;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 15px;
  font-weight: 500;
}

.mobile-menu-link:hover {
  background: var(--primary-orange);
  color: white;
}

/* 相关视频卡片样式 */
.entry-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.entry-card {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.entry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow-medium);
  border-color: var(--primary-orange);
}

.entry-thumb {
  display: block;
  position: relative;
  width: 100%;
  padding-bottom: 70%;
  overflow: hidden;
}

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

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

.card-category {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary-orange);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.entry-title {
  margin: 0;
  padding: 15px;
}

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

.entry-title a:hover {
  color: var(--primary-orange);
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }

  .header-container {
    height: 60px;
    padding: 0 15px;
  }

  .header-center {
    margin: 0 15px;
  }

  .header-nav {
    display: none;
  }

  .menu-toggle {
    display: flex !important;
  }

  /* 移动端标题字体调整 */
  .category-title {
    font-size: 20px;
  }

  .search-results-title {
    font-size: 18px;
  }

  .related-videos h2 {
    font-size: 18px;
  }

  .no-results h2 {
    font-size: 18px;
  }

  /* 移动端搜索框优化 */
  .header-center {
    margin: 0 8px !important;
    max-width: 200px !important;
  }

  .search-form {
    border-radius: 20px !important;
    border-width: 1px !important;
  }

  .search-input {
    padding: 8px 12px !important;
    font-size: 14px !important;
  }

  .search-btn {
    padding: 8px 12px !important;
    font-size: 14px !important;
  }

  /* 移动端logo优化 */
  .logo a {
    font-size: 16px !important;
  }

  /* 移动端视频网格 - 一排2个，16:9比例 */
  .video-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  /* 移动端相关视频也一排2个 */
  .entry-cards {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  .video-thumb {
    height: auto;
    padding-bottom: 56.25%; /* 16:9 比例 */
    position: relative;
  }

  .video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .video-info {
    padding: 8px;
  }

  .video-title {
    font-size: 12px;
    line-height: 1.3;
  }

  /* 移动端相关视频布局 */
  .entry-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .entry-thumb {
    padding-bottom: 56.25%; /* 16:9 比例 */
  }

  .entry-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .main-navigation {
    display: none;
  }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
  .container {
    padding: 0 6px;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 10px 0;
  }

  .video-thumb {
    height: auto;
    padding-bottom: 56.25%; /* 16:9 比例 */
    position: relative;
  }

  .video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .video-info {
    padding: 6px;
  }

  .video-title {
    font-size: 12px;
  }

  .header-container {
    padding: 0 8px;
  }

  .header-center {
    margin: 0 8px;
  }

  /* 小屏幕搜索框进一步优化 */
  .header-center {
    max-width: 150px !important;
    margin: 0 5px !important;
  }

  .search-input {
    padding: 6px 8px !important;
    font-size: 12px !important;
  }

  .search-btn {
    padding: 6px 8px !important;
    font-size: 12px !important;
  }

  /* 小屏幕logo进一步优化 */
  .logo a {
    font-size: 14px !important;
  }
}

/* 移动端隐藏左侧导航 */
@media (max-width: 992px) {
  .main-navigation {
    display: none;
  }
}

@media (max-width: 1024px) {
  .header-nav {
    gap: 8px;
  }

  .nav-link {
    font-size: 13px;
    padding: 6px 10px;
    white-space: nowrap;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* PC端左侧导航样式 */
.main-navigation {
  width: 200px;
  flex-shrink: 0;
  background: var(--bg-white);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.main-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-navigation li {
  margin-bottom: 8px;
}

.main-navigation a {
  color: var(--text-dark);
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  border-radius: 8px;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: 500;
}

.main-navigation a:hover {
  background: var(--primary-orange);
  color: white;
}

.main-navigation .more-categories {
  color: var(--primary-orange);
  font-weight: 600;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 15px;
  padding-bottom: 15px;
}

.content-area {
  flex: 1;
  min-width: 0;
}

/* PC端布局 */
@media (min-width: 993px) {
  .site-main .container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-direction: row-reverse; /* 反转布局，导航在右边 */
  }
  
  .main-navigation {
    display: block !important;
  }
}