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

:root {
  --primary: #00C75A;
  --primary-hover: #00A84A;
  --bg-main: #f5f5f5;
  --bg-card: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --border: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --spacing: 8px;
}

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

.ui-style-0 body { --primary: #FF6700; --primary-hover: #E65A00; }
.ui-style-1 body { --primary: #FF4500; --primary-hover: #DD3D00; }
.ui-style-2 body { --primary: #FF6B6B; --primary-hover: #EE5555; }
.ui-style-3 body { --primary: #FF1744; --primary-hover: #DD1138; }
.ui-style-4 body { --primary: #E50914; --primary-hover: #CC070F; }
.ui-style-5 body { --primary: #B71C1C; --primary-hover: #9F1919; }
.ui-style-6 body { --primary: #2196F3; --primary-hover: #1976D2; }
.ui-style-7 body { --primary: #00C75A; --primary-hover: #00A84A; }
.ui-style-8 body { --primary: #1DB954; --primary-hover: #19A349; }
.ui-style-9 body { --primary: #E5E5E5; --primary-hover: #D0D0D0; }
.ui-style-10 body { --primary: #00D85A; --primary-hover: #00BF4F; }
.ui-style-11 body { --primary: #0099FF; --primary-hover: #0088DD; }
.ui-style-12 body { --primary: #FF6700; --primary-hover: #E65A00; }
.ui-style-13 body { --primary: #00A1D6; --primary-hover: #0090BD; }
.ui-style-14 body { --primary: #003B7A; --primary-hover: #003166; }

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

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

.site-logo {
  font-size: 24px;
  font-weight: 700;
}

.site-logo a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s;
}

.site-logo a:hover {
  color: var(--primary);
}

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

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

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

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

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

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

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

.intro-section,
.content-section {
  background: var(--bg-card);
  padding: calc(var(--spacing) * 4);
  border-radius: var(--radius);
  margin-bottom: calc(var(--spacing) * 4);
  box-shadow: 0 2px 12px var(--shadow);
}

.intro-section h2,
.content-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--text-primary);
}

.intro-section p {
  line-height: 1.8;
  color: var(--text-secondary);
}

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

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

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

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

.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;
  transition: transform 0.3s;
}

.video-card:hover .video-cover img {
  transform: scale(1.05);
}

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

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

.video-one-line {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--spacing);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  display: flex;
  gap: calc(var(--spacing) * 2);
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-light);
}

.video-meta span {
  padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5);
  background: var(--bg-main);
  border-radius: calc(var(--radius) / 2);
}

.page-header {
  margin-bottom: calc(var(--spacing) * 4);
  padding: calc(var(--spacing) * 4);
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--shadow);
}

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

.page-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.top-list__items {
  list-style: none;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--shadow);
}

.top-item {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
  padding: calc(var(--spacing) * 3);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.top-item:last-child {
  border-bottom: none;
}

.top-item:hover {
  background: var(--bg-main);
}

.top-rank {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  min-width: 40px;
  text-align: center;
}

.top-item .video-cover {
  width: 160px;
  flex-shrink: 0;
  padding-top: 90px;
}

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

.top-link {
  padding: var(--spacing) calc(var(--spacing) * 3);
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: calc(var(--radius) / 2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.3s;
}

.top-link:hover {
  background: var(--primary-hover);
}

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

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

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

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

.video-player {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

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

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

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

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

.title-section h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
}

.info-section {
  background: var(--bg-card);
  padding: calc(var(--spacing) * 4);
  border-radius: var(--radius);
  margin-bottom: calc(var(--spacing) * 4);
  box-shadow: 0 2px 12px var(--shadow);
}

.info-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 3);
  color: var(--text-primary);
}

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

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

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

.detail-module {
  background: var(--bg-card);
  padding: calc(var(--spacing) * 4);
  border-radius: var(--radius);
  margin-bottom: calc(var(--spacing) * 4);
  box-shadow: 0 2px 12px var(--shadow);
}

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

.detail-module p {
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: calc(var(--spacing) * 2);
}

.detail-module p:last-child {
  margin-bottom: 0;
}

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

.tag {
  padding: var(--spacing) calc(var(--spacing) * 2);
  background: var(--bg-main);
  color: var(--text-secondary);
  border-radius: calc(var(--radius) / 2);
  font-size: 14px;
  transition: all 0.3s;
}

.tag:hover {
  background: var(--primary);
  color: white;
}

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

.video-card--related {
  box-shadow: 0 2px 8px var(--shadow);
}

.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: calc(var(--spacing) * 4);
  text-align: center;
  color: var(--text-secondary);
  margin-top: calc(var(--spacing) * 6);
}

.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;
  font-size: 20px;
  box-shadow: 0 4px 12px var(--shadow);
  transition: all 0.3s;
  z-index: 99;
}

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

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

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

  .main-nav {
    width: 100%;
    gap: calc(var(--spacing) * 2);
    font-size: 14px;
  }

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

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

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

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

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

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

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

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

  .title-section h1 {
    font-size: 24px;
  }

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

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

  .home-main,
  .list-main,
  .detail-main {
    padding: calc(var(--spacing) * 2);
  }

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