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

:root {
  --spacing-unit: 8px;
  --primary-color: #FF6700;
  --secondary-color: #FF8533;
  --text-primary: #333;
  --text-secondary: #666;
  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

body.ui-style-3 {
  --primary-color: #e74c3c;
  --secondary-color: #c0392b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 2);
}

.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--spacing-unit) * 2) 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: calc(var(--spacing-unit) * 2);
  padding-right: calc(var(--spacing-unit) * 2);
}

.site-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 2);
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  color: var(--text-primary);
  text-decoration: none;
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-size: 15px;
}

.main-nav a:hover {
  color: var(--primary-color);
  background: var(--bg-secondary);
}

.main-nav a.active {
  color: var(--primary-color);
  font-weight: 600;
}

.site-main {
  min-height: calc(100vh - 200px);
  padding: calc(var(--spacing-unit) * 4) 0;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--text-primary);
  line-height: 1.2;
}

.page-intro {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: calc(var(--spacing-unit) * 4);
  padding: calc(var(--spacing-unit) * 3);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--text-primary);
  padding-left: calc(var(--spacing-unit));
  border-left: 4px solid var(--primary-color);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: calc(var(--spacing-unit) * 3);
  margin-bottom: calc(var(--spacing-unit) * 5);
}

.video-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

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

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--bg-secondary);
  overflow: hidden;
}

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

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

.video-info {
  padding: calc(var(--spacing-unit) * 2);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit));
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: calc(var(--spacing-unit));
}

.video-one-line {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing-unit));
  margin-top: calc(var(--spacing-unit));
}

.video-tag {
  font-size: 12px;
  padding: calc(var(--spacing-unit) / 2) calc(var(--spacing-unit));
  background: var(--bg-secondary);
  border-radius: calc(var(--radius-sm) / 2);
  color: var(--text-secondary);
}

.video-player-section {
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.video-player {
  width: 100%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.player-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: #fff;
}

.player-play-icon {
  font-size: 32px;
  color: var(--primary-color);
  margin-left: 4px;
}

.detail-section {
  margin-bottom: calc(var(--spacing-unit) * 5);
}

.detail-section h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--text-primary);
}

.detail-content {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.detail-content p {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.info-table tr {
  border-bottom: 1px solid var(--border-color);
}

.info-table th {
  text-align: left;
  padding: calc(var(--spacing-unit) * 2);
  font-weight: 600;
  color: var(--text-primary);
  width: 120px;
  background: var(--bg-secondary);
}

.info-table td {
  padding: calc(var(--spacing-unit) * 2);
  color: var(--text-secondary);
}

.layout__side--filters {
  background: var(--bg-secondary);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: var(--radius-md);
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.page--with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: calc(var(--spacing-unit) * 4);
}

.top-list__items {
  list-style: none;
}

.top-list__item {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  padding: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 2);
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.top-list__item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.top-rank {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.top-rank--gold {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #fff;
}

.top-rank--silver {
  background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
  color: #fff;
}

.top-rank--bronze {
  background: linear-gradient(135deg, #CD7F32 0%, #B8733E 100%);
  color: #fff;
}

.top-item-cover {
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.top-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-item-info {
  flex: 1;
}

.top-item-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit));
  color: var(--text-primary);
}

.top-item-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.group {
  margin-bottom: calc(var(--spacing-unit) * 5);
}

.group__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--text-primary);
  padding-bottom: calc(var(--spacing-unit));
  border-bottom: 2px solid var(--border-color);
}

.group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: calc(var(--spacing-unit) * 3);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: calc(var(--spacing-unit));
  margin-top: calc(var(--spacing-unit) * 5);
}

.pagination a,
.pagination span {
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s;
}

.pagination a:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.pagination .current {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.site-footer {
  background: var(--bg-secondary);
  padding: calc(var(--spacing-unit) * 4) 0;
  margin-top: calc(var(--spacing-unit) * 8);
  border-top: 1px solid var(--border-color);
}

.footer-content {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing-unit) * 4);
  right: calc(var(--spacing-unit) * 4);
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
  z-index: 999;
}

.back-to-top.visible {
  display: flex;
}

.back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
    align-items: flex-start;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: calc(var(--spacing-unit));
  }

  .main-nav a {
    font-size: 14px;
    padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 1.5);
  }

  .page-title {
    font-size: 24px;
  }

  .section-title {
    font-size: 20px;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
  }

  .video-cover {
    padding-top: 50%;
  }

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

  .video-one-line {
    font-size: 13px;
  }

  .page--with-sidebar {
    grid-template-columns: 1fr;
  }

  .top-item-cover {
    width: 80px;
    height: 45px;
  }

  .top-item-title {
    font-size: 14px;
  }

  .top-item-desc {
    font-size: 13px;
  }

  .player-play-btn {
    width: 60px;
    height: 60px;
  }

  .player-play-icon {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 calc(var(--spacing-unit) * 1.5);
  }
}
