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

:root {
  --color-primary: #e74c3c;
  --color-bg: #1a1a1a;
  --color-card: #2a2a2a;
  --color-text: #ffffff;
  --color-text-secondary: #cccccc;
  --color-border: #3a3a3a;
  --spacing-unit: 8px;
  --border-radius: 8px;
}

body.ui-style-0 {
  --color-primary: #ff0050;
  --color-bg: #000000;
  --color-card: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.ui-style-1 {
  --color-primary: #ff4500;
  --color-bg: #0f0f0f;
  --color-card: #1f1f1f;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-2 {
  --color-primary: #ff6b35;
  --color-bg: #ffffff;
  --color-card: #f8f8f8;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-border: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-3 {
  --color-primary: #ff2d55;
  --color-bg: #ffffff;
  --color-card: #fafafa;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-border: #e8e8e8;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-4 {
  --color-primary: #e50914;
  --color-bg: #ffffff;
  --color-card: #f5f5f5;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-border: #dddddd;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-5 {
  --color-primary: #e50914;
  --color-bg: #141414;
  --color-card: #2a2a2a;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-6 {
  --color-primary: #0063e5;
  --color-bg: #1a1d29;
  --color-card: #2a2d3a;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-7 {
  --color-primary: #0073e6;
  --color-bg: #0f1419;
  --color-card: #1f2429;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-8 {
  --color-primary: #00c853;
  --color-bg: #0d1117;
  --color-card: #1d2127;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-9 {
  --color-primary: #ffffff;
  --color-bg: #000000;
  --color-card: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-10 {
  --color-primary: #00c75a;
  --color-bg: #ffffff;
  --color-card: #f0f9f4;
  --color-text: #1a1a1a;
  --color-text-secondary: #555555;
  --color-border: #d0ead9;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-11 {
  --color-primary: #0099ff;
  --color-bg: #ffffff;
  --color-card: #fafbfc;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-border: #e1e4e8;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-12 {
  --color-primary: #ff6700;
  --color-bg: #ffffff;
  --color-card: #fff5f0;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-border: #ffd4b0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-13 {
  --color-primary: #00a1d6;
  --color-bg: #ffffff;
  --color-card: #f4f9fb;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-border: #d0e7f0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body.ui-style-14 {
  --color-primary: #003a70;
  --color-bg: #ffffff;
  --color-card: #f7f9fa;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-border: #dce0e3;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.main-nav {
  display: flex;
  gap: calc(var(--spacing-unit) * 3);
  white-space: nowrap;
}

.main-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

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

.home-main,
.list-main,
.detail-main {
  padding: calc(var(--spacing-unit) * 4) 0;
  min-height: 60vh;
}

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

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

.site-intro {
  font-size: 16px;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
  color: var(--color-text-secondary);
}

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

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

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

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

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

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

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

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

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}

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

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

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

.video-meta {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: calc(var(--spacing-unit));
}

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

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

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

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

.page-layout-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: calc(var(--spacing-unit) * 4);
}

.layout__side--filters {
  background-color: var(--color-card);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: var(--border-radius);
  height: fit-content;
}

.layout__side--filters h2 {
  font-size: 18px;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.filter-group p {
  margin-bottom: calc(var(--spacing-unit));
  font-size: 14px;
  color: var(--color-text-secondary);
}

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

.top-item {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  padding: calc(var(--spacing-unit) * 2);
  background-color: var(--color-card);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing-unit) * 2);
  align-items: center;
}

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

.top-cover {
  width: 120px;
  height: 68px;
  border-radius: calc(var(--border-radius) / 2);
  overflow: hidden;
  flex-shrink: 0;
}

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

.top-info {
  flex: 1;
}

.top-info h3 {
  font-size: 18px;
  margin-bottom: calc(var(--spacing-unit));
}

.top-info h3 a {
  color: var(--color-text);
  text-decoration: none;
}

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

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

.group-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
  padding-bottom: calc(var(--spacing-unit));
  border-bottom: 2px solid var(--color-primary);
}

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

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

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

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

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

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

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

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

.detail-header h1 {
  font-size: 32px;
  font-weight: 700;
}

.detail-info-card {
  background-color: var(--color-card);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.detail-info-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  font-size: 15px;
}

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

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

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

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

.detail-module p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing-unit));
}

.tag-item {
  display: inline-block;
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  background-color: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--border-radius) / 2);
  font-size: 14px;
  color: var(--color-text);
}

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

.related-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.video-card--related {
  background-color: var(--color-card);
}

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

.site-footer p {
  color: var(--color-text-secondary);
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing-unit) * 4);
  right: calc(var(--spacing-unit) * 4);
  width: 48px;
  height: 48px;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

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

@media (max-width: 768px) {
  .main-nav {
    gap: calc(var(--spacing-unit) * 1.5);
    font-size: 14px;
    flex-wrap: nowrap;
    overflow-x: visible;
  }

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

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

  .site-intro {
    font-size: 14px;
  }

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

  .page-layout-sidebar {
    grid-template-columns: 1fr;
  }

  .layout__side--filters {
    order: 2;
  }

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

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

  .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: 24px;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 calc(var(--spacing-unit));
  }

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

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

  .main-nav a {
    padding: calc(var(--spacing-unit) / 2);
  }

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

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

  .player-play-btn {
    width: 60px;
    height: 60px;
  }

  .player-play-icon {
    font-size: 24px;
  }
}
