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

:root {
  --primary-color: #333;
  --bg-color: #fff;
  --text-color: #333;
  --border-color: #e0e0e0;
  --hover-color: #f5f5f5;
  --accent-color: #e74c3c;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

body.ui-style-0 { --primary-color: #000; --bg-color: #1a1a1a; --text-color: #fff; --accent-color: #ff4444; }
body.ui-style-1 { --primary-color: #1a1a1a; --bg-color: #0f0f0f; --text-color: #fff; --accent-color: #ff6b35; }
body.ui-style-2 { --primary-color: #333; --bg-color: #fff; --text-color: #333; --accent-color: #ff5722; }
body.ui-style-3 { --primary-color: #fff; --bg-color: #fafafa; --text-color: #333; --accent-color: #ff2d55; }
body.ui-style-4 { --primary-color: #fff; --bg-color: #f8f9fa; --text-color: #212529; --accent-color: #e50914; }
body.ui-style-5 { --primary-color: #141414; --bg-color: #000; --text-color: #fff; --accent-color: #e50914; }
body.ui-style-6 { --primary-color: #0b1622; --bg-color: #0f1419; --text-color: #f9f9f9; --accent-color: #00a8e1; }
body.ui-style-7 { --primary-color: #0e1726; --bg-color: #121a26; --text-color: #fff; --accent-color: #1d88e5; }
body.ui-style-8 { --primary-color: #141414; --bg-color: #181818; --text-color: #fff; --accent-color: #1db954; }
body.ui-style-9 { --primary-color: #000; --bg-color: #0a0a0a; --text-color: #fff; --accent-color: #e5e5e5; }
body.ui-style-10 { --primary-color: #00C75A; --bg-color: #fff; --text-color: #333; --accent-color: #00C75A; }
body.ui-style-11 { --primary-color: #0099FF; --bg-color: #fff; --text-color: #333; --accent-color: #ff6b00; }
body.ui-style-12 { --primary-color: #FF6700; --bg-color: #fff; --text-color: #333; --accent-color: #FF6700; }
body.ui-style-13 { --primary-color: #00A1D6; --bg-color: #fff; --text-color: #333; --accent-color: #FB7299; }
body.ui-style-14 { --primary-color: #2c3e50; --bg-color: #fff; --text-color: #333; --accent-color: #3498db; }

.site-header {
  background: var(--primary-color);
  color: var(--bg-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

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

.main-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow: hidden;
}

.main-nav a {
  color: var(--bg-color);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background 0.3s;
  white-space: nowrap;
  font-size: 0.95rem;
}

.main-nav a:hover {
  background: rgba(255,255,255,0.1);
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.site-intro {
  margin-bottom: 3rem;
  text-align: center;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.intro-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-color);
  opacity: 0.85;
  max-width: 900px;
  margin: 0 auto;
}

.video-section {
  margin-bottom: 3rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  color: var(--text-color);
  border-left: 4px solid var(--accent-color);
  padding-left: 0.75rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  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.15);
}

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

.video-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #ddd;
  position: relative;
}

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

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-meta {
  font-size: 0.875rem;
  color: var(--text-color);
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

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

.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-desc {
  font-size: 1rem;
  color: var(--text-color);
  opacity: 0.75;
  margin-top: 0.5rem;
}

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

.top-list__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: transform 0.3s;
}

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

.top-rank {
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-color);
  min-width: 50px;
  text-align: center;
}

.top-cover {
  width: 120px;
  height: 67.5px;
  overflow: hidden;
  border-radius: 4px;
  flex-shrink: 0;
}

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

.top-info {
  flex: 1;
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
}

.layout__side--filters {
  padding: 1rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.layout__side--filters h3 {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.group {
  margin-bottom: 2rem;
}

.group__title {
  font-size: 1.25rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
}

.group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.video-player-section {
  margin-bottom: 2rem;
}

.video-player {
  max-width: 1000px;
  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: none;
  background: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 2rem;
  transition: transform 0.3s, background 0.3s;
}

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

.player-play-icon {
  display: block;
  margin-left: 6px;
}

.video-detail {
  max-width: 900px;
  margin: 0 auto;
}

.detail-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  text-align: center;
}

.detail-info {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.info-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.info-list {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.75rem;
}

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

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

.detail-module {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.module-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  border-left: 4px solid var(--accent-color);
  padding-left: 0.75rem;
}

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

.module-content p {
  margin-bottom: 1rem;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--hover-color);
  color: var(--text-color);
  border-radius: 20px;
  font-size: 0.875rem;
}

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

.video-card--related {
  border: 1px solid var(--border-color);
}

.site-footer {
  background: var(--primary-color);
  color: var(--bg-color);
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 3rem;
}

.site-footer p {
  font-size: 0.875rem;
  opacity: 0.75;
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: row;
    gap: 0.5rem;
  }

  .site-logo a {
    font-size: 1.2rem;
  }

  .main-nav {
    gap: 0.25rem;
  }

  .main-nav a {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
  }

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

  .intro-text {
    font-size: 0.9rem;
  }

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

  .video-cover {
    aspect-ratio: 16 / 9;
  }

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

  .layout__side--filters {
    position: static;
  }

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

  .top-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

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

  .info-list {
    grid-template-columns: 80px 1fr;
    gap: 0.5rem;
  }

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

@media (max-width: 480px) {
  .main-nav a {
    padding: 0.3rem 0.4rem;
    font-size: 0.8rem;
  }

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