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

:root {
  --primary: #00A1D6;
  --secondary: #FB7299;
  --bg: #ffffff;
  --text: #222222;
  --border: #e5e5e5;
  --shadow: rgba(0,0,0,0.08);
  --hover: rgba(0,161,214,0.1);
  --spacing: 8px;
}

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

body.ui-style-13 {
  --primary: #00A1D6;
  --secondary: #FB7299;
  --bg: #ffffff;
  --text: #222222;
}

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

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

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

.nav {
  display: flex;
  gap: calc(var(--spacing) * 3);
  list-style: none;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
}

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

.nav a {
  color: var(--text);
  text-decoration: none;
  padding: calc(var(--spacing) * 1.5) calc(var(--spacing) * 2);
  border-radius: calc(var(--spacing) * 2);
  transition: all 0.3s ease;
  white-space: nowrap;
  display: block;
}

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

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

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: calc(var(--spacing) * 3);
  padding: calc(var(--spacing) * 8) calc(var(--spacing) * 6);
  margin-bottom: calc(var(--spacing) * 6);
  color: white;
  text-align: center;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: calc(var(--spacing) * 3);
  font-weight: 600;
  line-height: 1.3;
}

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

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

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: calc(var(--spacing) * 4);
}

.section-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
}

.section-more {
  color: var(--primary);
  text-decoration: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 1);
  transition: all 0.3s ease;
}

.section-more:hover {
  gap: calc(var(--spacing) * 2);
}

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

.video-card {
  background: var(--bg);
  border-radius: calc(var(--spacing) * 2);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  display: block;
  text-decoration: none;
  color: var(--text);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
  border-color: var(--primary);
}

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

.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;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-meta {
  display: flex;
  gap: calc(var(--spacing) * 2);
  font-size: 14px;
  color: #666;
  margin-bottom: calc(var(--spacing) * 1);
}

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

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

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

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

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

.video-player {
  position: relative;
  width: 100%;
  max-width: 1200px;
  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-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.detail-main {
  max-width: 1200px;
  margin: 0 auto;
}

.detail-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 4);
  color: var(--text);
}

.detail-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 4);
  margin-bottom: calc(var(--spacing) * 4);
}

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

.info-table {
  display: grid;
  gap: calc(var(--spacing) * 2);
}

.info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 2) 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

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

.info-value {
  color: var(--text);
}

.detail-text {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-wrap;
}

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

.video-card--related {
  display: flex;
  flex-direction: column;
}

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

.video-card--related .video-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.footer {
  background: #f8f9fa;
  border-top: 1px solid var(--border);
  padding: calc(var(--spacing) * 6) 0;
  margin-top: calc(var(--spacing) * 10);
  text-align: center;
  color: #666;
}

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

.top-list__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 3);
}

.top-list__item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 3);
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text);
}

.top-list__item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px var(--shadow);
}

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

.top-list__item:nth-child(1) .top-rank { background: linear-gradient(135deg, #FFD700, #FFA500); }
.top-list__item:nth-child(2) .top-rank { background: linear-gradient(135deg, #C0C0C0, #808080); }
.top-list__item:nth-child(3) .top-rank { background: linear-gradient(135deg, #CD7F32, #8B4513); }

.top-cover {
  flex-shrink: 0;
  width: 160px;
  height: 90px;
  overflow: hidden;
  border-radius: calc(var(--spacing) * 1);
  background: var(--border);
}

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

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

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

.top-meta {
  display: flex;
  gap: calc(var(--spacing) * 2);
  font-size: 14px;
  color: #666;
  margin-bottom: calc(var(--spacing) * 1);
}

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

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

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

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

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing) * 4);
  right: calc(var(--spacing) * 4);
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--shadow);
  transition: all 0.3s ease;
  z-index: 99;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
}

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

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

  .nav {
    justify-content: flex-start;
    gap: calc(var(--spacing) * 2);
  }

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

  .hero {
    padding: calc(var(--spacing) * 5) calc(var(--spacing) * 3);
  }

  .hero 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-title {
    font-size: 16px;
  }

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

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

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

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

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

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