/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 全局变量 - Dailymotion深色主题 */
:root {
  --primary-color: #FF6900;
  --primary-hover: #FF8533;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --bg-main: #0a0a0a;
  --card-background: #1a1a1a;
  --header-background: #000000;
  --header-foreground: #ffffff;
  --footer-background: #000000;
  --footer-foreground: #888888;
  --border-light: #333333;
  --accent-color: #FF6900;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.65;
  font-weight: 400;
}

.container {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

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

a:hover {
  color: var(--primary-hover);
}

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

/* 视频播放器适配样式 */
.player-wrapper {
  width: 100%;
  margin: 0 auto 15px auto;
  display: block;
}

.player-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 比例 */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(255, 105, 0, 0.2);
  background-color: #000;
}

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

/* 增强播放控制体验 */
.video-js .vjs-control-bar {
  background-color: rgba(0, 0, 0, 0.9);
  border-radius: 0 0 8px 8px;
}

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

.video-js .vjs-slider-bar {
  background-color: rgba(255, 255, 255, 0.3);
}

.video-js .vjs-load-progress div {
  background-color: rgba(255, 255, 255, 0.15);
}

/* 触碰设备的特殊增强 */
@media (hover: none) and (pointer: coarse) {
  .video-js .vjs-big-play-button {
    font-size: 3em;
    border-radius: 50%;
    width: 2em;
    height: 2em;
    line-height: 2em;
    border: none;
    background-color: rgba(255, 105, 0, 0.9);
  }
}

/* 竖屏视频特殊样式 */
.portrait-mode .player-container {
  padding-bottom: 177.78%; /* 9:16比例，适合竖屏视频 */
  background-color: #000;
  border: 1px solid #2d3748;
  box-shadow: 0 4px 20px rgba(44, 123, 229, 0.2);
}

.portrait-mode .player-wrapper {
  width: 65%; /* PC端调整为更合适的宽度 */
  margin: 0 auto;
  max-width: 500px; /* 限制最大宽度 */
}

/* 增强竖屏视频控制体验 */
.portrait-mode .video-js .vjs-big-play-button {
  transform: scale(1.2);
}

.portrait-mode .video-js .vjs-control-bar {
  height: 4em !important;
  padding: 0 8px;
}

.portrait-mode .video-js .vjs-button > .vjs-icon-placeholder:before {
  font-size: 2em;
  line-height: 2;
}

.portrait-mode .video-js .vjs-big-play-button {
  top: 45%; /* 中心稍上位置 */
}

/* 竖屏视频进度条增强 */
.portrait-mode .video-js .vjs-progress-control {
  min-width: 6em;
}

.portrait-mode .video-js .vjs-progress-holder {
  height: 0.5em;
}

.portrait-mode .video-js .vjs-progress-control:hover .vjs-progress-holder {
  font-size: 2em;
}

/* 响应式调整 */
@media (max-width: 1200px) {
  .portrait-mode .player-wrapper {
    width: 70%;
  }
}

@media (max-width: 992px) {
  .portrait-mode .player-wrapper {
    width: 75%;
  }
}

@media (max-width: 768px) {
  .portrait-mode .player-wrapper {
    width: 80%;
  }
  .portrait-mode .video-js .vjs-control-bar {
    height: 5em !important; /* 更大的控制条更易于触摸操作 */
  }
}

@media (max-width: 576px) {
  .portrait-mode .player-wrapper {
    width: 85%;
  }
}

@media (max-width: 480px) {
  .portrait-mode .player-wrapper {
    width: 98%;
    max-width: none; /* 移动端取消最大宽度限制 */
  }
  .portrait-mode .video-js .vjs-control-bar {
    height: 5.5em !important;
  }
}

/* 头部导航 */
.site-header {
  background-color: var(--header-background);
  box-shadow: 0 2px 8px rgba(26, 32, 44, 0.1);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.section-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
}

.logo-brand {
  font-size: 26px;
  font-weight: 800;
  margin-right: 25px;
  letter-spacing: -0.02em;
}

.logo-brand a {
  color: var(--header-foreground);
}

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

/* PC端独立分类导航 */
.nav-desktop {
  background-color: #1a1a1a;
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
  display: block;
}

.nav-list-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: flex-start;
  align-items: center;
}

.nav-list-horizontal li {
  margin: 0;
}

.nav-list-horizontal a {
  display: inline-block;
  padding: 6px 14px;
  background-color: #2a2a2a;
  color: var(--text-primary);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
}

.nav-list-horizontal a:hover {
  background-color: var(--primary-color);
  color: white;
}

.nav-list-horizontal a.all-categories {
  background-color: var(--primary-color);
  color: white;
}

.nav-list-horizontal a.all-categories:hover {
  background-color: var(--primary-hover);
}

.nav-category {
  display: none; /* PC端隐藏，移动端显示 */
}

.nav-category ul {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  max-height: 80px; /* 限制为最多两行 */
  overflow: hidden;
  justify-content: center;
}

.nav-category li {
  margin: 6px 10px 6px 0;
}

.nav-category a {
  color: var(--header-foreground);
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.nav-category a.all-categories {
  background-color: var(--accent-color);
  color: white;
  font-weight: 500;
}

.nav-category a:hover {
  background-color: rgba(56, 178, 172, 0.2);
  color: var(--accent-color);
  transform: translateY(-1px);
}

.btn-search {
  background-color: var(--primary-color);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 4px;
  white-space: nowrap;
  transition: all 0.2s ease;
  font-weight: 500;
}

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

/* 汉堡菜单 */
.btn-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.btn-mobile-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--header-foreground);
  border-radius: 3px;
  transition: all 0.3s ease;
}

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

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

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

/* 搜索模态框 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

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

.search-form {
  width: 100%;
  max-width: 650px;
  padding: 25px;
}

.search-form input {
  width: 100%;
  padding: 18px;
  font-size: 18px;
  background-color: #1a1a1a;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  color: #fff;
}

.search-form input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.3);
}

.close-btn {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: var(--primary-color);
}

/* 主内容区 */
.main-content {
  padding: 35px 0;
}

/* 视频卡片样式 - Dailymotion风格 */
.media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin: 30px 0;
}

/* 相关视频专用：PC端每行4个 */
.content-related .media-list {
  grid-template-columns: repeat(4, 1fr);
}

.media-card {
  background-color: transparent;
  border-radius: 0;
  overflow: visible;
  transition: transform 0.2s ease;
  border: none;
}

.media-card:hover {
  transform: scale(1.02);
}

.thumb-wrapper {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 比例 */
  background-color: #1a1a1a;
  overflow: hidden;
  border-radius: 4px;
}

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

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

.card-title {
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  min-height: 48px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  letter-spacing: 0;
}

.card-title a {
  color: var(--text-primary);
  line-height: 1.4;
}

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

/* 视频播放器 */
.player-section {
  margin: 30px 0 40px;
  background-color: var(--card-background);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.08);
  border: 1px solid var(--border-light);
}

.media-player {
  width: 100%;
  aspect-ratio: 16/9;
}

.player-info {
  padding: 25px;
}

.player-title {
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.player-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  color: #718096;
  font-size: 14px;
  margin-bottom: 12px;
}

.player-meta .category-tag {
  margin-right: 18px;
  background-color: var(--accent-color);
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
}

.player-meta a {
  color: var(--primary-color);
}

.player-notes {
  padding: 12px;
  background-color: rgba(56, 178, 172, 0.1);
  border-radius: 6px;
  margin-top: 12px;
  font-size: 14px;
  border-left: 4px solid var(--accent-color);
}

/* 相关视频 */
.content-related {
  margin: 35px 0;
}

.title-content {
  font-size: 24px;
  margin-bottom: 28px;
  font-weight: 600;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
  color: var(--text-primary);
  position: relative;
  letter-spacing: 0;
}

.title-content::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background-color: var(--primary-color);
}

/* 分页导航 */
.page-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 35px 0;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  margin: 0 4px 12px;
  padding: 0 12px;
  background-color: #1a1a1a;
  color: var(--text-primary);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
}

.nav-link.current {
  background-color: var(--primary-color);
  color: #fff;
}

.nav-link:hover:not(.current) {
  background-color: #2a2a2a;
  color: white;
}

.nav-link.dots {
  background: none;
  box-shadow: none;
  border: none;
}

/* 页脚 */
.site-footer {
  background-color: var(--footer-background);
  padding: 35px 0;
  margin-top: 60px;
  color: var(--footer-foreground);
  text-align: center;
}

.site-footer .container {
  max-width: 800px;
}

.footer-text {
  font-size: 14px;
  line-height: 1.8;
}

.footer-text p {
  margin-bottom: 8px;
}

/* 无结果 */
.no-results {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

/* 响应式调整 */
@media (max-width: 992px) {
  .media-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
  }

  .content-related .media-list {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .player-title {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  /* 移动端隐藏PC分类导航 */
  .nav-desktop {
    display: none;
  }
  
  .site-header .container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  
  .section-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
  }
  
  .logo-brand {
    margin-right: 0;
    order: 1;
  }
  
  .nav-category {
    display: block;
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--header-background);
    transition: left 0.3s ease;
    z-index: 999;
    padding: 80px 20px 20px;
    overflow-y: auto;
    order: 1;
    margin: 0;
  }
  
  .nav-category.active {
    left: 0;
  }
  
  .nav-category ul {
    flex-direction: column;
    max-height: none;
    justify-content: flex-start;
  }
  
  .nav-category li {
    margin: 8px 0;
    width: 100%;
  }
  
  .nav-category a {
    display: block;
    padding: 12px 16px;
    width: 100%;
  }
  
  .nav-category a.all-categories {
    background-color: var(--primary-color);
  }
  
  .btn-mobile-toggle {
    display: flex;
    order: 2;
  }
  
  .section-search {
    order: 3;
    margin-left: auto;
  }
  
  .btn-search {
    padding: 8px 14px;
    font-size: 14px;
  }
  
  .media-list {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
  }
  
  .content-related .media-list {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .card-title {
    font-size: 14px;
    height: 60px;
  }
  
  .player-title {
    font-size: 20px;
  }
  
  .btn-refresh {
    padding: 8px 12px;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .media-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .page-nav .mobile-hidden {
    display: none;
  }
}

.tag-label {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: var(--primary-color);
  color: white;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
  text-transform: uppercase;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 998;
  display: none;
}

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

.list-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.cat-item {
  display: inline-block;
  padding: 12px 18px;
  background-color: #1a1a1a;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s ease;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border-light);
}

.cat-item:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.cat-count {
  margin-left: 8px;
  font-size: 0.95em;
  color: #888;
  opacity: 0.8;
}

@media (max-width: 576px) {
  .list-categories {
    gap: 10px;
  }
  
  .cat-item {
    padding: 10px 15px;
    font-size: 14px;
    width: calc(50% - 5px);
    text-align: center;
  }
}

.btn-refresh {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-refresh:hover {
  background-color: var(--primary-hover);
}

.btn-refresh svg {
  width: 16px;
  height: 16px;
} 
