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

:root {
  --primary: #FF6700;
  --primary-dark: #E85D00;
  --bg: #fff;
  --text: #333;
  --text-light: #666;
  --border: #e0e0e0;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
  --spacing: 8px;
}

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

.ui-style-12 {
  --primary: #FF6700;
  --primary-dark: #E85D00;
}

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

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

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--spacing) * 2) 0;
}

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

.main-nav {
  display: flex;
  gap: calc(var(--spacing) * 3);
  white-space: nowrap;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  white-space: nowrap;
}

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

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

.hero-section h1 {
  font-size: 28px;
  margin-bottom: calc(var(--spacing) * 2);
  line-height: 1.4;
  color: var(--text);
}

.site-intro {
  font-size: 16px;
  color: var(--text-light);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.layout-b-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: calc(var(--spacing) * 4);
  margin-bottom: calc(var(--spacing) * 6);
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-widget {
  background: #f9f9f9;
  border-radius: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 3);
  margin-bottom: calc(var(--spacing) * 3);
}

.sidebar-widget h3 {
  font-size: 18px;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--text);
}

.sidebar-widget p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing);
}

.tag {
  display: inline-block;
  padding: calc(var(--spacing) / 2) calc(var(--spacing) * 1.5);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: calc(var(--spacing) * 2);
  font-size: 13px;
  color: var(--text-light);
  transition: all 0.3s;
}

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

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

.section-title {
  font-size: 24px;
  margin-bottom: calc(var(--spacing) * 3);
  color: var(--text);
  font-weight: 600;
}

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

.video-card {
  background: #fff;
  border-radius: calc(var(--spacing) * 2);
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: var(--card-shadow);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

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

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

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}

.video-card:hover .play-overlay {
  opacity: 1;
}

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

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) / 2);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.page-header {
  padding: calc(var(--spacing) * 4) 0 calc(var(--spacing) * 3);
  text-align: center;
}

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

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

.top-list__item {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
  background: #fff;
  border-radius: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 2);
  margin-bottom: calc(var(--spacing) * 2);
  box-shadow: var(--card-shadow);
  transition: all 0.3s;
}

.top-list__item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.rank-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.top-list__item .video-cover {
  flex-shrink: 0;
  width: 120px;
  padding-top: 0;
  height: 160px;
  border-radius: var(--spacing);
}

.top-list__item .video-info {
  flex: 1;
  padding: 0;
}

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

.group__title {
  font-size: 22px;
  margin-bottom: calc(var(--spacing) * 3);
  color: var(--text);
  padding-bottom: calc(var(--spacing) * 1.5);
  border-bottom: 2px solid var(--primary);
}

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

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

.layout__side--filters {
  background: #f9f9f9;
  border-radius: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 3);
  height: fit-content;
  position: sticky;
  top: 100px;
}

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

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

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: calc(var(--spacing) * 2);
  overflow: hidden;
}

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

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

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

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

.detail-header h1 {
  font-size: 32px;
  color: var(--text);
  line-height: 1.4;
}

.detail-info {
  background: #f9f9f9;
  border-radius: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 3);
  margin-bottom: calc(var(--spacing) * 4);
}

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

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

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

.info-list dd {
  color: var(--text-light);
}

.detail-module {
  margin-bottom: calc(var(--spacing) * 4);
}

.detail-module h2 {
  font-size: 22px;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--text);
  padding-bottom: calc(var(--spacing) * 1.5);
  border-bottom: 2px solid var(--primary);
}

.detail-module p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.8;
  text-align: justify;
}

.related-section {
  margin-top: calc(var(--spacing) * 6);
  padding-top: calc(var(--spacing) * 4);
  border-top: 1px solid var(--border);
}

.related-section h2 {
  font-size: 24px;
  margin-bottom: calc(var(--spacing) * 3);
  color: var(--text);
}

.site-footer {
  background: #f5f5f5;
  padding: calc(var(--spacing) * 4) 0;
  margin-top: calc(var(--spacing) * 8);
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
}

@media (max-width: 1024px) {
  .layout-b-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .layout__side--filters {
    position: static;
  }
}

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

  .main-nav {
    gap: calc(var(--spacing) * 2);
    flex-wrap: wrap;
    width: 100%;
  }

  .main-nav a {
    font-size: 14px;
  }

  .hero-section h1 {
    font-size: 22px;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--spacing) * 2);
  }

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

  .detail-header h1 {
    font-size: 24px;
  }

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

  .top-list__item .video-cover {
    width: 100%;
    height: 0;
    padding-top: 140%;
  }
}

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

  .main-nav {
    overflow-x: auto;
    white-space: nowrap;
    gap: calc(var(--spacing) * 1.5);
    padding-bottom: var(--spacing);
  }

  .logo {
    font-size: 20px;
  }
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

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

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