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

:root {
  --color-primary: #1a1a1a;
  --color-secondary: #333;
  --color-accent: #007bff;
  --color-bg: #fff;
  --color-text: #333;
  --color-text-light: #666;
  --spacing-unit: 8px;
}

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

body.ui-style-0 { --color-accent: #00f2ea; --color-primary: #000; --color-bg: #000; --color-text: #fff; }
body.ui-style-1 { --color-accent: #ff6b6b; --color-primary: #1a1a1a; --color-bg: #0a0a0a; --color-text: #f5f5f5; }
body.ui-style-2 { --color-accent: #ff6347; --color-primary: #222; --color-bg: #fafafa; --color-text: #333; }
body.ui-style-3 { --color-accent: #ff0050; --color-primary: #fff; --color-bg: #fff; --color-text: #333; }
body.ui-style-4 { --color-accent: #e50914; --color-primary: #fff; --color-bg: #fff; --color-text: #000; }
body.ui-style-5 { --color-accent: #e50914; --color-primary: #000; --color-bg: #141414; --color-text: #fff; }
body.ui-style-6 { --color-accent: #0063e5; --color-primary: #0a1929; --color-bg: #0a1929; --color-text: #f9f9f9; }
body.ui-style-7 { --color-accent: #0073e6; --color-primary: #040714; --color-bg: #040714; --color-text: #f9f9f9; }
body.ui-style-8 { --color-accent: #2dce89; --color-primary: #0d0d0d; --color-bg: #0d0d0d; --color-text: #fff; }
body.ui-style-9 { --color-accent: #e5e5e5; --color-primary: #000; --color-bg: #000; --color-text: #fff; }
body.ui-style-10 { --color-accent: #00c75a; --color-primary: #fff; --color-bg: #f5f5f5; --color-text: #222; }
body.ui-style-11 { --color-accent: #0099ff; --color-primary: #fff; --color-bg: #fff; --color-text: #333; }
body.ui-style-12 { --color-accent: #ff6700; --color-primary: #fff; --color-bg: #fff; --color-text: #1a1a1a; }
body.ui-style-13 { --color-accent: #00a1d6; --color-primary: #fff; --color-bg: #fff; --color-text: #212121; }
body.ui-style-14 { --color-accent: #c00; --color-primary: #fff; --color-bg: #f7f7f7; --color-text: #333; }

.site-header {
  background: var(--color-primary);
  color: var(--color-bg);
  padding: calc(var(--spacing-unit) * 2);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-unit);
}

.site-logo a {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
}

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

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

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

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

.page-title {
  font-size: 2rem;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--color-text);
  line-height: 1.3;
}

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

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

.section-title {
  font-size: 1.5rem;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--color-text);
  padding-left: calc(var(--spacing-unit) * 2);
  border-left: 4px solid var(--color-accent);
}

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

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

.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: 140%;
  overflow: hidden;
  background: #ddd;
}

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

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

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

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

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

.page-desc {
  color: var(--color-text-light);
  margin-top: calc(var(--spacing-unit) * 2);
}

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

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

.top-list__item {
  background: var(--color-primary);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.top-list__item:hover {
  transform: translateX(4px);
}

.top-item__link {
  display: flex;
  text-decoration: none;
  color: inherit;
  padding: calc(var(--spacing-unit) * 2);
  gap: calc(var(--spacing-unit) * 2);
}

.top-item__cover {
  width: 120px;
  flex-shrink: 0;
}

.top-item__cover img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
}

.top-item__info {
  flex: 1;
}

.top-item__title {
  font-size: 1.1rem;
  margin-bottom: calc(var(--spacing-unit) * 1);
  color: var(--color-text);
}

.top-item__meta {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: calc(var(--spacing-unit) * 1);
}

.top-item__desc {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.video-player-section {
  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;
  border-radius: 50%;
  background: var(--color-accent);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.player-play-icon {
  color: #fff;
  font-size: 2rem;
  padding-left: 4px;
}

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

.video-main-title {
  font-size: 2rem;
  color: var(--color-text);
  text-align: center;
}

.video-basic-info {
  background: var(--color-primary);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.info-title {
  font-size: 1.3rem;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--color-text);
}

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

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

.info-label {
  font-weight: bold;
  color: var(--color-text-light);
}

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

.detail-module {
  margin-bottom: calc(var(--spacing-unit) * 4);
  padding: calc(var(--spacing-unit) * 3);
  background: var(--color-primary);
  border-radius: 8px;
}

.module-title {
  font-size: 1.3rem;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--color-text);
  padding-left: calc(var(--spacing-unit) * 2);
  border-left: 4px solid var(--color-accent);
}

.module-content {
  color: var(--color-text);
  line-height: 1.8;
}

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

.tag {
  display: inline-block;
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  background: var(--color-accent);
  color: #fff;
  border-radius: 4px;
  font-size: 0.875rem;
}

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

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

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

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    justify-content: center;
    font-size: 0.9rem;
    gap: var(--spacing-unit);
  }

  .site-nav a {
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 1.25);
  }

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

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

  .page-title {
    font-size: 1.5rem;
  }

  .video-main-title {
    font-size: 1.5rem;
  }

  .top-item__link {
    flex-direction: column;
  }

  .top-item__cover {
    width: 100%;
  }

  .top-item__cover img {
    width: 100%;
    height: auto;
    max-height: 250px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: calc(var(--spacing-unit) * 2);
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
