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

:root {
  --primary-color: #1e90ff;
  --secondary-color: #ff6b6b;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #e0e0e0;
  --hover-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

body.ui-style-0 {
  --primary-color: #000;
  --secondary-color: #ff3b5c;
  --text-color: #fff;
  --bg-color: #0a0a0a;
  --card-bg: #1a1a1a;
}

body.ui-style-1 {
  --primary-color: #ff6347;
  --secondary-color: #ffa500;
  --text-color: #333;
  --bg-color: #1c1c1c;
  --card-bg: #2a2a2a;
}

body.ui-style-2 {
  --primary-color: #ff6b35;
  --secondary-color: #004e89;
  --text-color: #333;
  --bg-color: #ffffff;
  --card-bg: #fafafa;
}

body.ui-style-3 {
  --primary-color: #ff2d55;
  --secondary-color: #ff9500;
  --text-color: #333;
  --bg-color: #ffffff;
  --card-bg: #fff;
}

body.ui-style-4 {
  --primary-color: #e50914;
  --secondary-color: #b20710;
  --text-color: #333;
  --bg-color: #ffffff;
  --card-bg: #fff;
}

body.ui-style-5 {
  --primary-color: #e50914;
  --secondary-color: #831010;
  --text-color: #fff;
  --bg-color: #141414;
  --card-bg: #222;
}

body.ui-style-6 {
  --primary-color: #0063e5;
  --secondary-color: #ff3366;
  --text-color: #f9f9f9;
  --bg-color: #1a1d29;
  --card-bg: #252a34;
}

body.ui-style-7 {
  --primary-color: #00b8d4;
  --secondary-color: #ffd600;
  --text-color: #fff;
  --bg-color: #0a2540;
  --card-bg: #132f4c;
}

body.ui-style-8 {
  --primary-color: #00e676;
  --secondary-color: #1de9b6;
  --text-color: #e0e0e0;
  --bg-color: #181818;
  --card-bg: #282828;
}

body.ui-style-9 {
  --primary-color: #fff;
  --secondary-color: #909090;
  --text-color: #fff;
  --bg-color: #000;
  --card-bg: #141414;
}

body.ui-style-10 {
  --primary-color: #00c75a;
  --secondary-color: #00e268;
  --text-color: #333;
  --bg-color: #f0f9f4;
  --card-bg: #fff;
}

body.ui-style-11 {
  --primary-color: #0099ff;
  --secondary-color: #ff6633;
  --text-color: #333;
  --bg-color: #ffffff;
  --card-bg: #fafafa;
}

body.ui-style-12 {
  --primary-color: #ff6700;
  --secondary-color: #ff9500;
  --text-color: #333;
  --bg-color: #fff;
  --card-bg: #fff;
}

body.ui-style-13 {
  --primary-color: #00a1d6;
  --secondary-color: #fb7299;
  --text-color: #333;
  --bg-color: #f4f5f7;
  --card-bg: #fff;
}

body.ui-style-14 {
  --primary-color: #2932e1;
  --secondary-color: #ff6600;
  --text-color: #333;
  --bg-color: #ffffff;
  --card-bg: #fff;
}

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

.site-nav {
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--primary-color);
}

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

.site-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 30px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 5px;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: nowrap;
  overflow-x: auto;
}

.nav-menu li {
  flex-shrink: 0;
}

.nav-menu a {
  display: block;
  padding: 18px 16px;
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  font-size: 15px;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-color);
  background: rgba(0, 0, 0, 0.05);
}

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

.hero-section {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  padding: 60px 40px;
  border-radius: 16px;
  margin-bottom: 40px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hero-title {
  font-size: 32px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.8;
  max-width: 800px;
  opacity: 0.95;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary-color);
}

.section-title {
  font-size: 26px;
  color: var(--text-color);
}

.section-more {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.section-more:hover {
  text-decoration: underline;
}

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

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

.video-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hover-shadow);
}

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

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

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

.video-card:hover .video-cover img {
  transform: scale(1.05);
}

.video-info {
  padding: 16px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  min-height: 2.8em;
}

.video-one-line {
  font-size: 13px;
  color: var(--text-color);
  opacity: 0.7;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 8px;
  line-height: 1.5;
}

.video-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-color);
  opacity: 0.6;
}

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

.page-header h1 {
  font-size: 36px;
  margin-bottom: 12px;
  color: var(--text-color);
}

.page-desc {
  font-size: 16px;
  color: var(--text-color);
  opacity: 0.8;
  line-height: 1.6;
}

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

.layout__side--filters {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 12px;
  height: fit-content;
  position: sticky;
  top: 80px;
}

.layout__side--filters h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--text-color);
}

.filter-group {
  margin-bottom: 24px;
}

.filter-group h4 {
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text-color);
  opacity: 0.8;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  padding: 6px 14px;
  background: var(--bg-color);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-tag:hover {
  background: var(--primary-color);
  color: #fff;
}

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

.top-list__item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card-bg);
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.top-list__item:hover {
  box-shadow: var(--hover-shadow);
}

.top-rank {
  font-size: 32px;
  font-weight: bold;
  min-width: 50px;
  text-align: center;
}

.top-rank--highlight {
  color: var(--primary-color);
}

.top-rank--normal {
  color: var(--text-color);
  opacity: 0.5;
}

.top-item__cover {
  width: 120px;
  height: 170px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #ddd;
}

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

.top-item__info {
  flex: 1;
}

.top-item__info h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

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

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

.top-item__meta {
  font-size: 13px;
  color: var(--text-color);
  opacity: 0.6;
  margin-bottom: 8px;
}

.top-item__desc {
  font-size: 14px;
  color: var(--text-color);
  opacity: 0.8;
  line-height: 1.6;
}

.group {
  margin-bottom: 50px;
}

.group__title {
  font-size: 28px;
  margin-bottom: 24px;
  color: var(--text-color);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-color);
}

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

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.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: var(--transition);
  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: 36px;
  color: var(--primary-color);
  margin-left: 4px;
}

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

.detail-header h1 {
  font-size: 36px;
  color: var(--text-color);
  margin-bottom: 16px;
}

.detail-module {
  background: var(--card-bg);
  padding: 32px;
  margin-bottom: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.detail-module h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text-color);
  border-left: 4px solid var(--primary-color);
  padding-left: 16px;
}

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

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 24px;
  font-size: 15px;
}

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

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

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

.tag {
  padding: 8px 16px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
}

.video-grid--related {
  margin-top: 24px;
}

.site-footer {
  background: var(--card-bg);
  padding: 40px 20px;
  text-align: center;
  margin-top: 60px;
  border-top: 2px solid var(--primary-color);
}

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

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 99;
}

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

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 12px;
  }

  .site-logo {
    font-size: 20px;
    margin-right: 15px;
  }

  .nav-menu {
    gap: 2px;
  }

  .nav-menu a {
    padding: 18px 10px;
    font-size: 14px;
  }

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

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

  .hero-desc {
    font-size: 14px;
  }

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

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

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

  .video-title {
    font-size: 14px;
    min-height: 2.5em;
  }

  .video-one-line {
    font-size: 12px;
  }

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

  .layout__side--filters {
    position: static;
  }

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

  .top-item__cover {
    width: 160px;
    height: 225px;
  }

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

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

  .detail-header h1 {
    font-size: 26px;
  }

  .detail-module {
    padding: 20px;
  }

  .detail-module h2 {
    font-size: 20px;
  }

  .detail-module p {
    font-size: 15px;
  }

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

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

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

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

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