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

:root {
  --spacing: 8px;
  --primary-color: #3498db;
  --text-color: #333;
  --bg-color: #fff;
  --border-color: #ddd;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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);
}

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

.site-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: calc(var(--spacing) * 2) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing) * 3);
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  white-space: nowrap;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  gap: calc(var(--spacing) * 3);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
}

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

.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  padding: calc(var(--spacing) * 1) 0;
  transition: color 0.3s;
  white-space: nowrap;
}

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

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: calc(var(--spacing) * 8) 0;
  text-align: center;
}

.hero-section h1 {
  font-size: 32px;
  margin-bottom: calc(var(--spacing) * 2);
  line-height: 1.2;
}

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

.intro-section {
  padding: calc(var(--spacing) * 6) 0;
  background: #f8f9fa;
}

.intro-section p {
  font-size: 16px;
  line-height: 1.8;
  text-align: justify;
}

.video-section {
  padding: calc(var(--spacing) * 6) 0;
}

.section-title {
  font-size: 28px;
  margin-bottom: calc(var(--spacing) * 4);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 2px solid var(--primary-color);
}

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

.video-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

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

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

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

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

.video-title {
  font-size: 18px;
  margin-bottom: calc(var(--spacing) * 1);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: calc(var(--spacing) * 6) 0;
  text-align: center;
}

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

.page-content {
  padding: calc(var(--spacing) * 6) 0;
}

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

.top-item {
  display: flex;
  gap: calc(var(--spacing) * 3);
  padding: calc(var(--spacing) * 3);
  margin-bottom: calc(var(--spacing) * 2);
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  align-items: center;
}

.top-rank {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 60px;
  text-align: center;
  flex-shrink: 0;
}

.top-cover {
  width: 120px;
  height: 160px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
}

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

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

.top-info h3 {
  font-size: 20px;
  margin-bottom: calc(var(--spacing) * 1);
}

.top-info h3 a {
  color: inherit;
  text-decoration: none;
}

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

.top-meta {
  font-size: 14px;
  color: #999;
  margin-bottom: calc(var(--spacing) * 1);
}

.top-desc {
  font-size: 14px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-player-section {
  background: #000;
  padding: calc(var(--spacing) * 4) 0;
}

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

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

.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.9);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.player-play-icon {
  font-size: 32px;
  color: #333;
}

.detail-header {
  padding: calc(var(--spacing) * 6) 0 calc(var(--spacing) * 4);
}

.detail-header h1 {
  font-size: 36px;
  text-align: center;
}

.detail-info {
  padding: calc(var(--spacing) * 4) 0;
  background: #f8f9fa;
}

.detail-info h2 {
  font-size: 24px;
  margin-bottom: calc(var(--spacing) * 3);
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
  max-width: 800px;
}

.info-list dt {
  font-weight: bold;
  color: #666;
}

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

.detail-module {
  padding: calc(var(--spacing) * 6) 0;
}

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

.module-content {
  font-size: 16px;
  line-height: 1.8;
}

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

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 2);
}

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

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

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

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing) * 4);
  right: calc(var(--spacing) * 4);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  box-shadow: var(--shadow);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: #2980b9;
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 24px;
  }

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

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

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

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

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

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

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

  .top-rank {
    font-size: 24px;
    min-width: auto;
  }

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

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

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

  .info-list {
    grid-template-columns: 1fr;
    gap: calc(var(--spacing) * 1);
  }

  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .main-nav {
    gap: calc(var(--spacing) * 2);
  }

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

  .site-header .container {
    gap: calc(var(--spacing) * 2);
  }

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

.ui-style-0 { --primary-color: #ff4757; }
.ui-style-1 { --primary-color: #ff6348; }
.ui-style-2 { --primary-color: #ff9f43; }
.ui-style-3 { --primary-color: #ee5a6f; }
.ui-style-4 { --primary-color: #e84393; }
.ui-style-5 { --primary-color: #e74c3c; }
.ui-style-6 { --primary-color: #00a8ff; }
.ui-style-7 { --primary-color: #ffd93d; }
.ui-style-8 { --primary-color: #6dd5ed; }
.ui-style-9 { --primary-color: #95afc0; }
.ui-style-10 { --primary-color: #26de81; }
.ui-style-11 { --primary-color: #0099ff; }
.ui-style-12 { --primary-color: #ff6700; }
.ui-style-13 { --primary-color: #00a1d6; }
.ui-style-14 { --primary-color: #2c5aa0; }
