/**
 * Premium SEO Template - Main Theme CSS
 * 现代化的主题样式，包含导航、布局、卡片等核心组件
 */

/* ========== 颜色变量 ========== */
:root {
  /* 超大菜单变量 */
  --mega-menu-bg: #fff;
  --mega-menu-title-color: #1a1a2e;
  --mega-menu-link-color: #666;
  --mega-menu-link-hover: #e94560;
  --mega-menu-border: #ddd;
  
  /* 原有变量 */
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --accent-color: #0f3460;
  --highlight-color: #e94560;
  --text-dark: #333;
  --text-light: #666;
  --text-muted: #999;
  --border-color: #ddd;
  --bg-light: #f5f5f5;
  --bg-white: #fff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

/* ========== 全局样式 ========== */
body {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

/* ========== 头部导航栏 ========== */
.site-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 8px 0;
  font-size: 12px;
  text-align: center;
  color: #fff;
}

/* 主导航栏 */
.main-navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 0;
}

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

/* Logo/品牌 */
.navbar-brand {
  flex-shrink: 0;
  margin-right: 30px;
}

.brand-logo {
  display: inline-block;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.brand-logo:hover {
  color: var(--highlight-color);
  text-decoration: none;
}

.brand-text {
  background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 导航菜单 */
.navbar-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav-item {
  position: relative;
  margin: 0 5px;
}

.nav-link {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 14px;
  padding: 20px 15px;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--highlight-color);
  background-color: rgba(233, 69, 96, 0.1);
}

.nav-link i {
  margin-right: 6px;
  font-size: 16px;
}

.icon-chevron-down {
  font-size: 12px;
  margin-left: 4px;
}

/* 下拉菜单 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: var(--shadow-lg);
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  z-index: 1001;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  margin: 0;
  padding: 0;
}

.dropdown-item a {
  display: block;
  color: var(--text-dark);
  padding: 12px 20px;
  text-decoration: none;
  transition: var(--transition);
}

.dropdown-item a:hover {
  color: var(--highlight-color);
  background-color: var(--bg-light);
  padding-left: 25px;
}

/* 搜索栏 */
.navbar-search {
  flex-shrink: 0;
  margin-left: 20px;
}

.search-form {
  display: flex;
  align-items: center;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0 10px;
  transition: var(--transition);
}

.search-input-wrapper:focus-within {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--highlight-color);
}

.search-input {
  background: transparent;
  border: none;
  color: #fff;
  padding: 8px 10px;
  width: 180px;
  font-size: 14px;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 16px;
  transition: var(--transition);
}

.search-button:hover {
  color: var(--highlight-color);
}

/* 导航切换按钮 (移动端) */
.navbar-toggle {
  display: none;
  flex-direction: column;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger {
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 4px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* ========== 面包屑导航 ========== */
.breadcrumb-wrapper {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
}

.breadcrumb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.breadcrumb {
  margin: 0;
  padding: 0;
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.breadcrumb-item a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb-item a:hover {
  color: var(--highlight-color);
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--text-muted);
}

.breadcrumb-item:not(:last-child)::after {
  content: ">";
  margin: 0 8px;
  color: var(--text-muted);
}

/* ========== 页面主容器 ========== */
.page-main {
  flex: 1;
  min-height: calc(100vh - 200px);
}

.index-content,
.list-content,
.detail-content,
.play-content {
  background: var(--bg-white);
  padding: 30px 0;
}

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

.video-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  list-style: none;
}

.video-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--highlight-color);
}

.video-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 视频封面 */
.video-cover {
  position: relative;
  width: 100%;
  padding-bottom: 150%;
  background: var(--bg-light);
  overflow: hidden;
}

.cover-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.video-item:hover .cover-image {
  transform: scale(1.05);
}

.cover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.video-item:hover .cover-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.play-icon {
  width: 50px;
  height: 50px;
  background: var(--highlight-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition);
}

.video-item:hover .play-icon {
  opacity: 1;
  transform: scale(1);
}

/* 视频徽章 */
.video-badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
}

.badge-hits {
  background: rgba(233, 69, 96, 0.8);
}

.badge-date {
  background: rgba(0, 0, 0, 0.7);
}

/* 视频信息 */
.video-info {
  flex: 1;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.video-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 10px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.meta-category a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

.meta-category a:hover {
  color: var(--highlight-color);
}

.video-description {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== 分区标题 ========== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--highlight-color);
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
  position: relative;
  padding-left: 15px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--highlight-color);
  border-radius: 2px;
}

.section-more {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.section-more:hover {
  color: var(--highlight-color);
}

/* ========== 详情页 ========== */
.detail-info-section {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
  margin-bottom: 40px;
  padding: 30px;
  background: var(--bg-light);
  border-radius: 8px;
}

.detail-poster {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.poster-image {
  width: 100%;
  height: auto;
  display: block;
}

.poster-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.detail-poster:hover .poster-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.play-button {
  width: 60px;
  height: 60px;
  background: var(--highlight-color);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 24px;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition);
}

.detail-poster:hover .play-button {
  opacity: 1;
  transform: scale(1);
}

.play-button span {
  font-size: 12px;
  margin-top: 4px;
}

/* 详情元信息 */
.detail-meta {
  flex: 1;
}

.detail-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.detail-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.info-item {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.info-label {
  font-weight: 600;
  color: var(--text-dark);
  min-width: 80px;
}

.info-value {
  color: var(--text-light);
  flex: 1;
}

.info-value a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

.info-value a:hover {
  color: var(--highlight-color);
  text-decoration: underline;
}

/* 详情描述 */
.detail-description {
  margin-top: 20px;
}

.desc-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.desc-text {
  color: var(--text-light);
  line-height: 1.8;
  text-align: justify;
}

/* ========== 播放列表 ========== */
.play-section {
  margin-bottom: 40px;
  padding: 30px;
  background: var(--bg-light);
  border-radius: 8px;
}

.play-header {
  margin-bottom: 20px;
}

.play-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

.source-tabs {
  display: flex;
  list-style: none;
  margin: 0 0 20px 0;
  padding: 0;
  border-bottom: 2px solid var(--border-color);
  flex-wrap: wrap;
  gap: 10px;
}

.source-tab button {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  margin-bottom: -2px;
}

.source-tab.active button {
  color: var(--highlight-color);
  border-bottom-color: var(--highlight-color);
}

.source-tab button:hover {
  color: var(--accent-color);
}

.source-panels {
  display: flex;
  flex-direction: column;
}

.source-panel {
  display: none;
}

.source-panel.active {
  display: block;
}

.episode-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.episode-item {
  margin: 0;
}

.episode-link {
  display: block;
  padding: 10px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.episode-link:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

.episode-link.active {
  background: var(--highlight-color);
  color: #fff;
  border-color: var(--highlight-color);
}

/* ========== 页脚 ========== */
.site-footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: #fff;
  padding: 40px 0 20px;
  margin-top: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-column {
  flex: 1;
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--highlight-color);
}

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

.footer-list li {
  margin-bottom: 8px;
}

.footer-list a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  font-size: 13px;
}

.footer-list a:hover {
  color: var(--highlight-color);
  text-decoration: underline;
}

.footer-info {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.site-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.site-url {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.site-description {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-copyright p {
  margin: 5px 0;
}

/* ========== 返回顶部按钮 ========== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--highlight-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  z-index: 999;
}

.back-to-top:hover {
  background: #d63447;
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(233, 69, 96, 0.3);
}

.back-to-top:active {
  transform: translateY(-1px);
}

/* ========== 分页 ========== */
.pagination-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 30px 0;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 8px;
}

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

.pagination-list {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 5px;
}

.pagination-item {
  margin: 0;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
  cursor: pointer;
}

.pagination-link:hover:not([aria-disabled="true"]) {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

.pagination-item.active .pagination-link {
  background: var(--highlight-color);
  color: #fff;
  border-color: var(--highlight-color);
}

.pagination-item.disabled .pagination-link {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.pagination-jump {
  text-align: center;
}

.jump-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.jump-input {
  width: 60px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 13px;
}

.jump-button {
  padding: 6px 15px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.jump-button:hover {
  background: var(--highlight-color);
}
