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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

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

.site-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  overflow: visible;
}

.nav-logo {
  font-size: 20px;
  font-weight: bold;
  color: #ff6b6b;
  text-decoration: none;
  padding: 16px 20px 16px 0;
  flex-shrink: 0;
}

.site-nav a:not(.nav-logo) {
  color: #333;
  text-decoration: none;
  padding: 16px 12px;
  transition: color 0.3s;
  flex-shrink: 0;
  font-size: 14px;
}

.site-nav a:not(.nav-logo):hover,
.site-nav a.active {
  color: #ff6b6b;
}

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

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  text-align: center;
}

.page-title {
  font-size: 28px;
  line-height: 1.4;
  margin-bottom: 10px;
}

.site-intro {
  background: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.site-intro p {
  line-height: 1.8;
  color: #555;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 24px;
  color: #333;
}

.section-more {
  color: #ff6b6b;
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.3s;
}

.section-more:hover {
  opacity: 0.8;
}

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

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

.video-card {
  background: white;
  border-radius: 12px;
  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 {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

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

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: white;
  opacity: 0;
  transition: opacity 0.3s;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.video-card:hover .play-overlay {
  opacity: 0.9;
}

.video-info {
  padding: 16px;
}

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

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

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

.page-list {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

.page-header h1 {
  font-size: 32px;
  margin-bottom: 10px;
  color: #333;
}

.page-desc {
  color: #666;
  line-height: 1.8;
}

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

.layout__side--filters {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
}

.layout__side--filters h3 {
  margin-bottom: 15px;
  color: #333;
}

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

.top-list__item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  margin-bottom: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  transition: background 0.3s;
}

.top-list__item:hover {
  background: #f0f0f0;
}

.top-rank {
  font-size: 28px;
  font-weight: bold;
  color: #ff6b6b;
  min-width: 40px;
  text-align: center;
}

.video-cover--small {
  width: 120px;
  padding-top: 0;
  height: 80px;
  flex-shrink: 0;
}

.video-cover--small img {
  position: static;
  width: 100%;
  height: 100%;
}

.group {
  margin-bottom: 40px;
}

.group__title {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
  border-left: 4px solid #ff6b6b;
  padding-left: 15px;
}

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

.video-player {
  background: #000;
  border-radius: 12px;
  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: none;
  background: rgba(255, 107, 107, 0.9);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
}

.player-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(255, 107, 107, 1);
}

.player-play-icon {
  font-size: 32px;
  color: white;
}

.video-header {
  margin-bottom: 20px;
}

.video-title-main {
  font-size: 32px;
  color: #333;
}

.video-basic-info,
.detail-module,
.related-section {
  background: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.video-basic-info h2,
.detail-module h2,
.related-section h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #333;
  border-bottom: 2px solid #ff6b6b;
  padding-bottom: 10px;
}

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

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

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

.detail-module p {
  line-height: 1.8;
  color: #555;
}

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

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

.tag:hover {
  background: #e0e0e0;
}

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

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

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

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

.site-footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 99;
}

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

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

@media (max-width: 768px) {
  .site-nav {
    font-size: 13px;
    padding: 0 10px;
  }

  .nav-logo {
    font-size: 16px;
    padding: 12px 10px 12px 0;
  }

  .site-nav a:not(.nav-logo) {
    padding: 12px 8px;
    font-size: 12px;
  }

  .page-title {
    font-size: 22px;
  }

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

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

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

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

  .layout__side--filters {
    order: 2;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .video-title-main {
    font-size: 24px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

.ui-style-0 {
  --primary-color: #ff6b6b;
  --secondary-color: #333;
}

.ui-style-1 {
  --primary-color: #ff5722;
  --secondary-color: #212121;
}

.ui-style-2 {
  --primary-color: #ff6600;
  --secondary-color: #1a1a1a;
}

.ui-style-3 {
  --primary-color: #e91e63;
  --secondary-color: #424242;
}

.ui-style-4 {
  --primary-color: #f44336;
  --secondary-color: #333;
}

.ui-style-5 {
  --primary-color: #d32f2f;
  --secondary-color: #1c1c1c;
}

body[class*="ui-style-5"] .hero-section,
body[class*="ui-style-6"] .hero-section,
body[class*="ui-style-7"] .hero-section {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.ui-style-6 {
  --primary-color: #2196f3;
  --secondary-color: #1a237e;
}

.ui-style-7 {
  --primary-color: #1976d2;
  --secondary-color: #0d47a1;
}

.ui-style-8 {
  --primary-color: #4caf50;
  --secondary-color: #1b5e20;
}

body[class*="ui-style-8"] .hero-section {
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
}

.ui-style-9 {
  --primary-color: #ff9800;
  --secondary-color: #212121;
}

.ui-style-10 {
  --primary-color: #00c75a;
  --secondary-color: #333;
}

body[class*="ui-style-10"] .hero-section {
  background: linear-gradient(135deg, #00c75a 0%, #00e676 100%);
}

.ui-style-11 {
  --primary-color: #0099ff;
  --secondary-color: #333;
}

body[class*="ui-style-11"] .hero-section {
  background: linear-gradient(135deg, #0099ff 0%, #00b8d4 100%);
}

.ui-style-12 {
  --primary-color: #ff6700;
  --secondary-color: #333;
}

body[class*="ui-style-12"] .hero-section {
  background: linear-gradient(135deg, #ff6700 0%, #ff8800 100%);
}

.ui-style-13 {
  --primary-color: #00a1d6;
  --secondary-color: #333;
}

body[class*="ui-style-13"] .hero-section {
  background: linear-gradient(135deg, #00a1d6 0%, #fb7299 100%);
}

.ui-style-14 {
  --primary-color: #1e40af;
  --secondary-color: #1e3a8a;
}

body[class*="ui-style-14"] .hero-section {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

body[class*="ui-style-"] .nav-logo,
body[class*="ui-style-"] .section-more,
body[class*="ui-style-"] .site-nav a.active,
body[class*="ui-style-"] .top-rank,
body[class*="ui-style-"] .back-to-top,
body[class*="ui-style-"] .player-play-btn {
  color: var(--primary-color, #ff6b6b);
  background-color: var(--primary-color, #ff6b6b);
}

body[class*="ui-style-"] .nav-logo,
body[class*="ui-style-"] .section-more,
body[class*="ui-style-"] .site-nav a.active,
body[class*="ui-style-"] .top-rank {
  background-color: transparent;
  color: var(--primary-color, #ff6b6b);
}

body[class*="ui-style-"] .group__title {
  border-left-color: var(--primary-color, #ff6b6b);
}

body[class*="ui-style-"] .video-basic-info h2,
body[class*="ui-style-"] .detail-module h2,
body[class*="ui-style-"] .related-section h2 {
  border-bottom-color: var(--primary-color, #ff6b6b);
}
