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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

body.ui-style-0 {
  --primary-color: #000;
  --secondary-color: #fff;
  --accent-color: #ff4444;
  --text-color: #fff;
  --bg-color: #1a1a1a;
  --card-bg: #2a2a2a;
  background: var(--bg-color);
  color: var(--text-color);
}

body.ui-style-0 .site-nav {
  background: var(--primary-color);
}

body.ui-style-0 .video-card {
  background: var(--card-bg);
  border-radius: 12px;
  transition: transform 0.3s ease;
}

body.ui-style-0 .video-card:hover {
  transform: translateY(-8px);
}

.site-nav {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

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

.site-logo a {
  color: inherit;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
}

.nav-item a {
  display: block;
  padding: 8px 16px;
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s;
}

.nav-item a:hover,
.nav-item.active a {
  background: rgba(0, 0, 0, 0.05);
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-section {
  background: #fff;
  padding: 60px 40px;
  border-radius: 12px;
  margin-bottom: 40px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body.ui-style-0 .hero-section {
  background: var(--card-bg);
}

.site-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

.site-intro {
  font-size: 16px;
  line-height: 1.8;
  color: #666;
  max-width: 900px;
}

body.ui-style-0 .site-intro {
  color: #ccc;
}

.video-section {
  margin-bottom: 60px;
}

.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 3px solid #333;
  display: inline-block;
}

body.ui-style-0 .section-title {
  border-bottom-color: var(--accent-color);
}

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

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

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

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

.video-cover {
  width: 100%;
  padding-top: 56.25%;
  position: relative;
  overflow: hidden;
  background: #e0e0e0;
}

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

.video-info {
  padding: 16px;
}

.video-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-meta {
  font-size: 14px;
  color: #888;
  margin-bottom: 8px;
}

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

body.ui-style-0 .video-meta {
  color: #999;
}

body.ui-style-0 .video-one-line {
  color: #bbb;
}

.list-page {
  min-height: 60vh;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}

.page-desc {
  font-size: 16px;
  color: #666;
  line-height: 1.8;
}

body.ui-style-0 .page-desc {
  color: #ccc;
}

.filter-bar {
  background: #fff;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

body.ui-style-0 .filter-bar {
  background: var(--card-bg);
}

.page--with-sidebar .page-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
}

.layout__side--filters {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  height: fit-content;
}

body.ui-style-0 .layout__side--filters {
  background: var(--card-bg);
}

.layout__side--filters h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

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

.top-list__item {
  background: #fff;
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 50px 120px 1fr;
  gap: 20px;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.ui-style-0 .top-list__item {
  background: var(--card-bg);
}

.top-rank {
  font-size: 32px;
  font-weight: 700;
  color: #ff4444;
}

.top-cover {
  width: 120px;
}

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

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

.top-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.top-title a {
  color: inherit;
  text-decoration: none;
}

.top-title a:hover {
  color: #ff4444;
}

.top-meta {
  font-size: 14px;
  color: #888;
  margin-bottom: 8px;
}

.top-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

body.ui-style-0 .top-meta {
  color: #999;
}

body.ui-style-0 .top-desc {
  color: #bbb;
}

.page--grouped .groups-container {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.group__title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid #333;
}

body.ui-style-0 .group__title {
  border-bottom-color: var(--accent-color);
}

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

.detail-page .main-content {
  max-width: 900px;
}

.video-player-section {
  margin-bottom: 32px;
}

.video-player {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

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

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

.player-play-icon {
  margin-left: 4px;
}

.detail-header {
  margin-bottom: 32px;
}

.detail-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
}

.detail-info,
.detail-module {
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.ui-style-0 .detail-info,
body.ui-style-0 .detail-module {
  background: var(--card-bg);
}

.detail-info h2,
.detail-module h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e0e0e0;
}

body.ui-style-0 .detail-info h2,
body.ui-style-0 .detail-module h2 {
  border-bottom-color: #444;
}

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

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

.info-list dd {
  color: #333;
}

body.ui-style-0 .info-list dt {
  color: #999;
}

body.ui-style-0 .info-list dd {
  color: #ddd;
}

.detail-module p {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

body.ui-style-0 .detail-module p {
  color: #ddd;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag {
  display: inline-block;
  padding: 6px 16px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 14px;
  color: #666;
}

body.ui-style-0 .tag {
  background: #3a3a3a;
  color: #ccc;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

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

.video-card--related .video-info {
  padding: 12px;
}

.video-card--related .video-title {
  font-size: 16px;
}

.video-card--related .video-one-line {
  font-size: 13px;
}

.site-footer {
  background: #fff;
  padding: 40px 20px;
  text-align: center;
  color: #666;
  margin-top: 60px;
  border-top: 1px solid #e0e0e0;
}

body.ui-style-0 .site-footer {
  background: var(--card-bg);
  border-top-color: #444;
  color: #999;
}

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: nowrap;
  }

  .nav-menu {
    gap: 4px;
    font-size: 14px;
  }

  .nav-item a {
    padding: 6px 12px;
  }

  .hero-section {
    padding: 40px 24px;
  }

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

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

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

  .video-info {
    padding: 12px;
  }

  .video-title {
    font-size: 15px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

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

  .top-list__item {
    grid-template-columns: 40px 80px 1fr;
    gap: 12px;
    padding: 16px;
  }

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

  .top-cover {
    width: 80px;
  }

  .top-cover img {
    height: 110px;
  }

  .top-title {
    font-size: 16px;
  }

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

  .detail-info,
  .detail-module {
    padding: 20px;
  }

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

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