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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

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

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

.site-logo {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
}

.site-nav {
  display: flex;
  gap: 24px;
  white-space: nowrap;
}

.site-nav a {
  color: #666;
  font-size: 15px;
  transition: color 0.3s;
  padding: 4px 0;
}

.site-nav a:hover,
.site-nav a.active {
  color: #3498db;
}

.home-main,
.list-main,
.detail-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
}

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

.intro-section h1 {
  font-size: 28px;
  color: #2c3e50;
  margin-bottom: 16px;
  line-height: 1.4;
}

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

.video-module {
  margin-bottom: 48px;
}

.video-module h2 {
  font-size: 24px;
  margin-bottom: 24px;
  color: #2c3e50;
  padding-bottom: 12px;
  border-bottom: 3px solid #3498db;
}

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

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

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

.video-card__link {
  display: block;
}

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

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

.video-info {
  padding: 16px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2c3e50;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-one-line,
.video-meta {
  font-size: 14px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-header h1 {
  font-size: 32px;
  color: #2c3e50;
  margin-bottom: 24px;
}

.filter-bar {
  margin-bottom: 24px;
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
  color: #666;
}

.page--l2 {
  display: flex;
  gap: 32px;
}

.layout__side--filters {
  width: 240px;
  flex-shrink: 0;
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  height: fit-content;
}

.layout__main {
  flex: 1;
}

.top-list__items {
  list-style: none;
  background: #fff;
  border-radius: 8px;
  padding: 0;
}

.top-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid #eee;
  align-items: center;
}

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

.top-rank {
  font-size: 32px;
  font-weight: 700;
  color: #3498db;
  min-width: 50px;
  text-align: center;
}

.top-cover {
  width: 80px;
  height: 112px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #e0e0e0;
}

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

.top-info {
  flex: 1;
}

.top-info h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #2c3e50;
}

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

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

.group {
  margin-bottom: 48px;
}

.group__title {
  font-size: 24px;
  margin-bottom: 20px;
  color: #2c3e50;
  padding-bottom: 8px;
  border-bottom: 2px solid #3498db;
}

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

.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;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.detail-header h1 {
  font-size: 32px;
  color: #2c3e50;
  margin-bottom: 24px;
}

.detail-info {
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  margin-bottom: 32px;
}

.detail-info h2 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #2c3e50;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  gap: 12px;
  font-size: 15px;
}

.info-label {
  font-weight: 600;
  color: #666;
  min-width: 60px;
}

.info-value {
  color: #333;
  flex: 1;
}

.detail-module {
  background: #fff;
  padding: 32px;
  border-radius: 8px;
  margin-bottom: 32px;
}

.detail-module h2 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #2c3e50;
  padding-bottom: 12px;
  border-bottom: 2px solid #3498db;
}

.module-content {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
}

.module-content p {
  margin-bottom: 16px;
}

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

.tag-item {
  padding: 6px 16px;
  background: #ecf0f1;
  border-radius: 20px;
  font-size: 14px;
  color: #555;
  transition: all 0.3s;
}

.tag-item:hover {
  background: #3498db;
  color: #fff;
}

.related-section {
  margin-top: 48px;
}

.related-section h2 {
  font-size: 24px;
  margin-bottom: 24px;
  color: #2c3e50;
}

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

.site-footer {
  background: #2c3e50;
  color: #ecf0f1;
  text-align: center;
  padding: 32px 20px;
  margin-top: 64px;
}

.site-footer p {
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  right: 32px;
  bottom: 32px;
  width: 48px;
  height: 48px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 99;
}

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

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

.ui-style-0 {
  --primary: #FF6B6B;
  --primary-dark: #EE5A5A;
}

.ui-style-1 {
  --primary: #FF5722;
  --primary-dark: #E64A19;
}

.ui-style-2 {
  --primary: #FF9800;
  --primary-dark: #F57C00;
}

.ui-style-3 {
  --primary: #00BCD4;
  --primary-dark: #0097A7;
}

.ui-style-4 {
  --primary: #E91E63;
  --primary-dark: #C2185B;
}

.ui-style-5 {
  --primary: #B71C1C;
  --primary-dark: #8B0000;
}

.ui-style-6 body {
  background: #1e3a5f;
  color: #ecf0f1;
}

.ui-style-6 .site-header {
  background: #2c3e50;
}

.ui-style-6 .video-card,
.ui-style-6 .detail-module,
.ui-style-6 .detail-info {
  background: #34495e;
}

.ui-style-7 body {
  background: #0f1419;
  color: #e1e8ed;
}

.ui-style-7 .site-header {
  background: #192734;
}

.ui-style-7 .video-card {
  background: #192734;
}

.ui-style-8 {
  --primary: #1DB954;
  --primary-dark: #1AA34A;
}

.ui-style-9 body {
  background: #141414;
  color: #fff;
}

.ui-style-9 .site-header {
  background: #000;
}

.ui-style-9 .video-card {
  background: #1a1a1a;
}

.ui-style-10 {
  --primary: #00E676;
  --primary-dark: #00C853;
}

.ui-style-11 {
  --primary: #0099FF;
  --primary-dark: #0080E6;
}

.ui-style-12 {
  --primary: #FF6700;
  --primary-dark: #E65C00;
}

.ui-style-13 {
  --primary: #00A1D6;
  --primary-dark: #0088B8;
}

.ui-style-14 {
  --primary: #003D7A;
  --primary-dark: #002A54;
}

body[class*="ui-style"] .site-nav a:hover,
body[class*="ui-style"] .site-nav a.active {
  color: var(--primary, #3498db);
}

body[class*="ui-style"] .video-module h2 {
  border-color: var(--primary, #3498db);
}

body[class*="ui-style"] .player-play-icon {
  color: var(--primary, #3498db);
}

body[class*="ui-style"] .detail-module h2 {
  border-color: var(--primary, #3498db);
}

body[class*="ui-style"] .back-to-top {
  background: var(--primary, #3498db);
}

body[class*="ui-style"] .back-to-top:hover {
  background: var(--primary-dark, #2980b9);
}

@media (max-width: 768px) {
  .site-nav {
    gap: 12px;
    font-size: 14px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .site-nav a {
    flex-shrink: 0;
  }

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

  .intro-section {
    padding: 24px;
  }

  .intro-section h1 {
    font-size: 22px;
  }

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

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

  .page--l2 {
    flex-direction: column;
  }

  .layout__side--filters {
    width: 100%;
  }

  .top-item {
    flex-wrap: wrap;
  }

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

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

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

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