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

:root {
  --primary-color: #00A1D6;
  --secondary-color: #FB7299;
  --text-color: #333;
  --bg-color: #fff;
  --border-color: #e0e0e0;
  --hover-color: #f5f5f5;
  --spacing-unit: 8px;
}

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-color);
  background: var(--bg-color);
}

body.ui-style-7 {
  --primary-color: #00A1D6;
  --secondary-color: #00C75A;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

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

.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-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.3s;
}

.logo a:hover {
  opacity: 0.8;
}

.main-nav {
  display: flex;
  gap: calc(var(--spacing-unit) * 3);
  flex-wrap: nowrap;
  overflow-x: auto;
}

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

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

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

.hero-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 2);
  text-align: center;
  border-radius: 12px;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

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

.hero-subtitle {
  font-size: 18px;
  opacity: 0.95;
  line-height: 1.6;
}

.site-intro {
  background: rgba(255, 255, 255, 0.95);
  padding: calc(var(--spacing-unit) * 4);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing-unit) * 4);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.site-intro p {
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

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

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

.video-grid {
  display: grid;
  gap: calc(var(--spacing-unit) * 3);
}

.video-grid.waterfall {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

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

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

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

.video-cover {
  position: relative;
  padding-top: 56.25%;
  background: #f0f0f0;
  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);
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s;
}

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

.play-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary-color);
}

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

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

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

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

.page-header {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

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

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

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

.top-item {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  padding: calc(var(--spacing-unit) * 3);
  background: #fff;
  border-radius: 8px;
  margin-bottom: calc(var(--spacing-unit) * 2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.3s;
}

.top-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.top-rank {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  width: 50px;
  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-title {
  font-size: 18px;
  margin-bottom: calc(var(--spacing-unit) * 1);
}

.top-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

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

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

.top-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

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

.group__title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 3);
  padding-left: calc(var(--spacing-unit) * 1);
  border-left: 4px solid var(--secondary-color);
}

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

.video-player {
  max-width: 900px;
  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;
  background: rgba(255,255,255,0.95);
  border: none;
  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: 36px;
  color: var(--primary-color);
}

.detail-page .container {
  max-width: 900px;
}

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

.detail-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-color);
}

.detail-info {
  background: #fff;
  padding: calc(var(--spacing-unit) * 3);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing-unit) * 3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: calc(var(--spacing-unit) * 2);
  margin-top: calc(var(--spacing-unit) * 2);
}

.info-item {
  font-size: 15px;
  line-height: 1.8;
}

.info-label {
  font-weight: 600;
  color: #555;
}

.detail-module {
  background: #fff;
  padding: calc(var(--spacing-unit) * 3);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing-unit) * 3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detail-module .section-title {
  font-size: 20px;
  margin-bottom: calc(var(--spacing-unit) * 2);
  border-left: none;
  padding-left: 0;
}

.summary-text,
.review-text {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

.detail-related {
  margin-top: calc(var(--spacing-unit) * 4);
}

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

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

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

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

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

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

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

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

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

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

  .video-meta,
  .video-one-line {
    font-size: 12px;
  }

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

  .top-rank {
    width: auto;
  }

  .top-cover {
    width: 100%;
    max-width: 200px;
    height: auto;
    aspect-ratio: 3/4;
  }

  .detail-title {
    font-size: 28px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

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

  .main-nav {
    gap: calc(var(--spacing-unit) * 1);
    font-size: 14px;
  }

  .main-nav a {
    padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 1.5);
  }

  .header-inner {
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
  }
}

.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: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 999;
}

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

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