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

:root {
  --spacing: 8px;
  --primary-color: #0099FF;
  --text-color: #333;
  --bg-color: #fff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

body.ui-style-1 {
  --primary-color: #ff4500;
  --text-color: #333;
  --bg-color: #f5f5f5;
}

body.ui-style-2 {
  --primary-color: #ff6b35;
  --text-color: #2c3e50;
  --bg-color: #ffffff;
}

body.ui-style-3 {
  --primary-color: #e74c3c;
  --text-color: #2d3436;
  --bg-color: #ffffff;
}

body.ui-style-4 {
  --primary-color: #c0392b;
  --text-color: #333;
  --bg-color: #fff;
}

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

body.ui-style-6 {
  --primary-color: #0056d2;
  --text-color: #f5f5f5;
  --bg-color: #0f1419;
}

body.ui-style-7 {
  --primary-color: #00a8e1;
  --text-color: #f0f0f0;
  --bg-color: #1a1d29;
}

body.ui-style-8 {
  --primary-color: #00b894;
  --text-color: #e8eaed;
  --bg-color: #202124;
}

body.ui-style-9 {
  --primary-color: #fff;
  --text-color: #e5e5e5;
  --bg-color: #0a0a0a;
}

body.ui-style-10 {
  --primary-color: #00C75A;
  --text-color: #333;
  --bg-color: #ffffff;
}

body.ui-style-11 {
  --primary-color: #0099FF;
  --text-color: #444;
  --bg-color: #fafafa;
}

body.ui-style-12 {
  --primary-color: #FF6700;
  --text-color: #333;
  --bg-color: #fff;
}

body.ui-style-13 {
  --primary-color: #00A1D6;
  --text-color: #212121;
  --bg-color: #ffffff;
}

body.ui-style-14 {
  --primary-color: #1e3a8a;
  --text-color: #333;
  --bg-color: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing) * 2);
}

.site-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: calc(var(--spacing) * 2) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo a {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: calc(var(--spacing) * 3);
}

.site-nav a {
  color: var(--text-color);
  text-decoration: none;
  padding: calc(var(--spacing) * 1) calc(var(--spacing) * 2);
  border-radius: 4px;
  transition: all 0.3s;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--primary-color);
  color: #fff;
}

.main-content {
  min-height: 70vh;
  padding: calc(var(--spacing) * 4) 0;
}

.site-intro {
  background: var(--primary-color);
  color: #fff;
  padding: calc(var(--spacing) * 6) 0;
  margin-bottom: calc(var(--spacing) * 4);
  border-radius: 8px;
}

.site-intro h1 {
  font-size: 28px;
  margin-bottom: calc(var(--spacing) * 2);
  line-height: 1.3;
}

.site-intro p {
  font-size: 16px;
  line-height: 1.8;
  opacity: 0.95;
}

.home-section {
  margin-bottom: calc(var(--spacing) * 6);
}

.section-title {
  font-size: 24px;
  margin-bottom: calc(var(--spacing) * 3);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 2px solid var(--primary-color);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: calc(var(--spacing) * 3);
}

.video-card {
  background: var(--bg-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

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

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

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

.video-info {
  padding: calc(var(--spacing) * 2);
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing));
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-one-line {
  font-size: 14px;
  color: #666;
  margin-bottom: calc(var(--spacing));
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  font-size: 12px;
  color: #999;
}

.page-header {
  margin-bottom: calc(var(--spacing) * 4);
  padding-bottom: calc(var(--spacing) * 3);
  border-bottom: 2px solid var(--primary-color);
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: calc(var(--spacing) * 2);
}

.page-header p {
  font-size: 16px;
  color: #666;
}

.page--grid,
.page--with-sidebar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing) * 2);
}

.page--with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: calc(var(--spacing) * 4);
}

.layout__side--filters {
  background: var(--bg-color);
  padding: calc(var(--spacing) * 3);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.layout__side--filters h2 {
  font-size: 18px;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--primary-color);
}

.page--top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing) * 2);
}

.top-list__items {
  list-style: none;
  counter-reset: rank;
}

.top-list__item {
  display: flex;
  gap: calc(var(--spacing) * 3);
  padding: calc(var(--spacing) * 3);
  margin-bottom: calc(var(--spacing) * 2);
  background: var(--bg-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
  align-items: center;
}

.top-rank {
  counter-increment: rank;
  font-size: 32px;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 50px;
  text-align: center;
}

.top-list__item .video-cover {
  width: 180px;
  flex-shrink: 0;
  padding-top: 0;
  height: 100px;
}

.top-list__item .video-cover img {
  position: static;
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.top-list__item .video-info {
  flex: 1;
  padding: 0;
}

.page--grouped {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing) * 2);
}

.group {
  margin-bottom: calc(var(--spacing) * 6);
}

.group__title {
  font-size: 24px;
  margin-bottom: calc(var(--spacing) * 3);
  color: var(--primary-color);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 2px solid var(--border-color);
}

.group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: calc(var(--spacing) * 3);
}

.video-player-section {
  background: #000;
  padding: calc(var(--spacing) * 4) 0;
}

.video-player {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing) * 2);
}

.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;
  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;
}

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

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

.video-detail {
  padding: calc(var(--spacing) * 6) 0;
}

.video-detail h1 {
  font-size: 36px;
  margin-bottom: calc(var(--spacing) * 4);
  color: var(--text-color);
}

.video-basic-info {
  background: var(--bg-color);
  padding: calc(var(--spacing) * 3);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing) * 4);
  box-shadow: var(--shadow);
}

.video-basic-info h2 {
  font-size: 20px;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--primary-color);
}

.video-basic-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: calc(var(--spacing) * 2);
}

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

.video-basic-info dd {
  color: var(--text-color);
}

.detail-module {
  margin-bottom: calc(var(--spacing) * 4);
  padding: calc(var(--spacing) * 3);
  background: var(--bg-color);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-module h2 {
  font-size: 20px;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--primary-color);
}

.detail-module p {
  line-height: 1.8;
  color: var(--text-color);
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 2);
}

.tag {
  display: inline-block;
  padding: calc(var(--spacing)) calc(var(--spacing) * 2);
  background: var(--primary-color);
  color: #fff;
  border-radius: 4px;
  font-size: 14px;
}

.related-videos {
  margin-top: calc(var(--spacing) * 6);
  padding-top: calc(var(--spacing) * 4);
  border-top: 2px solid var(--border-color);
}

.related-videos h2 {
  font-size: 24px;
  margin-bottom: calc(var(--spacing) * 3);
  color: var(--primary-color);
}

.site-footer {
  background: var(--bg-color);
  border-top: 1px solid var(--border-color);
  padding: calc(var(--spacing) * 4) 0;
  text-align: center;
  color: #666;
}

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: calc(var(--spacing) * 2);
  }

  .site-nav {
    gap: calc(var(--spacing));
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    justify-content: space-between;
  }

  .site-nav a {
    padding: calc(var(--spacing)) calc(var(--spacing) * 1.5);
    font-size: 14px;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: calc(var(--spacing) * 2);
  }

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

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

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

  .top-list__item .video-cover {
    width: 100%;
    height: 150px;
  }

  .video-basic-info dl {
    grid-template-columns: 80px 1fr;
    gap: calc(var(--spacing));
  }

  .site-intro h1 {
    font-size: 20px;
  }

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