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

:root {
  --primary-color: #FF6700;
  --secondary-color: #FFA040;
  --text-color: #333;
  --bg-color: #fff;
  --border-color: #e0e0e0;
  --card-bg: #fff;
  --hover-shadow: 0 8px 24px rgba(0,0,0,0.15);
  --spacing-unit: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

body.ui-style-12 {
  --primary-color: #FF6700;
  --secondary-color: #FFA040;
}

.site-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: calc(var(--spacing-unit) * 2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing-unit) * 3);
}

.site-logo {
  flex-shrink: 0;
}

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

.site-nav {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  flex-wrap: nowrap;
  overflow: visible;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2);
  border-radius: 6px;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background: rgba(255, 103, 0, 0.1);
}

.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: calc(var(--spacing-unit) * 3);
}

.hero-section {
  text-align: center;
  padding: calc(var(--spacing-unit) * 6) 0 calc(var(--spacing-unit) * 4);
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: calc(var(--spacing-unit) * 2);
  line-height: 1.3;
}

.hero-desc {
  font-size: 16px;
  color: #666;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.site-intro {
  margin: calc(var(--spacing-unit) * 4) 0;
  padding: calc(var(--spacing-unit) * 3);
  background: #f8f9fa;
  border-radius: 12px;
}

.intro-container p {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
}

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

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

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color);
  padding-bottom: calc(var(--spacing-unit) * 1.5);
  border-bottom: 3px solid var(--primary-color);
  display: inline-block;
}

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

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

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

.video-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #f0f0f0;
}

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

.video-info {
  padding: calc(var(--spacing-unit) * 2);
}

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

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

.video-one-line {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-header {
  margin-bottom: calc(var(--spacing-unit) * 4);
  padding-bottom: calc(var(--spacing-unit) * 3);
  border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--text-color);
}

.page-desc {
  font-size: 15px;
  color: #666;
  line-height: 1.8;
}

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

.layout__side--filters {
  background: #f8f9fa;
  padding: calc(var(--spacing-unit) * 3);
  border-radius: 12px;
  height: fit-content;
  position: sticky;
  top: calc(var(--spacing-unit) * 10);
}

.layout__side--filters h2 {
  font-size: 18px;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.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(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  align-items: center;
}

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

.top-rank-badge {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.top-cover {
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
}

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

.top-info {
  flex: 1;
  min-width: 0;
}

.top-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit));
}

.top-title a {
  color: var(--text-color);
  text-decoration: none;
}

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

.top-meta {
  font-size: 13px;
  color: #888;
  margin-bottom: calc(var(--spacing-unit));
}

.top-desc {
  font-size: 14px;
  color: #666;
  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: 24px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--text-color);
  padding-left: calc(var(--spacing-unit) * 2);
  border-left: 4px solid var(--primary-color);
}

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

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

.video-player {
  max-width: 1200px;
  margin: 0 auto;
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

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

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

.player-play-icon {
  color: white;
  font-size: 32px;
  margin-left: 4px;
}

.detail-page {
  max-width: 1000px;
}

.detail-header {
  margin: calc(var(--spacing-unit) * 3) 0;
  text-align: center;
}

.detail-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
}

.detail-info,
.detail-module {
  margin: calc(var(--spacing-unit) * 4) 0;
  padding: calc(var(--spacing-unit) * 3);
  background: #f8f9fa;
  border-radius: 12px;
}

.detail-info h2,
.detail-module h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--text-color);
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: calc(var(--spacing-unit) * 2);
  font-size: 15px;
  line-height: 1.8;
}

.info-list dt {
  font-weight: 600;
  color: var(--text-color);
}

.info-list dd {
  color: #666;
}

.detail-module p {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing-unit) * 1.5);
}

.tag {
  display: inline-block;
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  background: white;
  border-radius: 20px;
  font-size: 14px;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

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

.video-card--related {
  background: white;
}

.site-footer {
  background: #2c3e50;
  color: white;
  padding: calc(var(--spacing-unit) * 4) 0;
  margin-top: calc(var(--spacing-unit) * 8);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
  text-align: center;
}

.footer-text {
  font-size: 14px;
  opacity: 0.9;
}

.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: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

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

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

  .site-nav {
    width: 100%;
    justify-content: space-around;
    gap: calc(var(--spacing-unit));
  }

  .nav-link {
    padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 1.5);
    font-size: 13px;
  }

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

  .hero-desc {
    font-size: 14px;
  }

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

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

  .layout__side--filters {
    position: static;
  }

  .top-list__item {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-cover {
    width: 100%;
    height: auto;
    padding-top: 56.25%;
    position: relative;
  }

  .top-cover img {
    position: absolute;
    top: 0;
    left: 0;
  }

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

  .video-info {
    padding: calc(var(--spacing-unit) * 1.5);
  }

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

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

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: calc(var(--spacing-unit) * 2);
    right: calc(var(--spacing-unit) * 2);
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: calc(var(--spacing-unit) * 2);
  }

  .hero-section {
    padding: calc(var(--spacing-unit) * 3) 0 calc(var(--spacing-unit) * 2);
  }

  .site-intro {
    padding: calc(var(--spacing-unit) * 2);
  }

  .detail-info,
  .detail-module {
    padding: calc(var(--spacing-unit) * 2);
  }
}
