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

:root {
  --color-primary: #0099FF;
  --color-secondary: #FF6700;
  --color-bg: #ffffff;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #e0e0e0;
  --spacing-unit: 8px;
  --container-width: 1200px;
  --transition: all 0.3s ease;
}

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

body.ui-style-11 {
  --color-primary: #00C75A;
  --color-secondary: #00E066;
  --color-bg: #f5f5f5;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

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

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

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing-unit) * 3);
}

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

.site-logo a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

.site-logo a:hover {
  opacity: 0.8;
}

.main-nav {
  display: flex;
  gap: calc(var(--spacing-unit) * 3);
  white-space: nowrap;
}

.main-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  border-radius: 4px;
  transition: var(--transition);
}

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

.home-page,
.list-page,
.detail-page {
  min-height: calc(100vh - 200px);
  padding: calc(var(--spacing-unit) * 4) 0;
}

.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #fff;
  padding: calc(var(--spacing-unit) * 8) 0;
  margin: 0 0 calc(var(--spacing-unit) * 6);
  border-radius: 8px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
  line-height: 1.2;
}

.page-description {
  font-size: 16px;
  line-height: 1.8;
  max-width: 900px;
  opacity: 0.95;
}

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

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

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

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

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

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

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

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.play-overlay span {
  font-size: 48px;
  color: #fff;
}

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

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

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-meta {
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: calc(var(--spacing-unit));
}

.video-one-line {
  font-size: 14px;
  color: var(--color-text-light);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page--grid .page-header,
.page--top .page-header,
.page--grouped .page-header {
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.page--grid .page-title,
.page--top .page-title,
.page--grouped .page-title {
  font-size: 32px;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.page-intro {
  font-size: 16px;
  color: var(--color-text-light);
  line-height: 1.6;
}

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

.layout__side--filters {
  background: #fff;
  padding: calc(var(--spacing-unit) * 3);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  height: fit-content;
  position: sticky;
  top: 100px;
}

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

.layout__side--filters p {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.6;
}

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

.top-item {
  counter-increment: rank;
  background: #fff;
  margin-bottom: calc(var(--spacing-unit) * 2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.top-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.top-item__link {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 2);
  padding: calc(var(--spacing-unit) * 2);
  text-decoration: none;
  color: inherit;
}

.rank-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border-radius: 4px;
}

.top-item:nth-child(1) .rank-badge {
  background: linear-gradient(135deg, #FFD700, #FFA500);
}

.top-item:nth-child(2) .rank-badge {
  background: linear-gradient(135deg, #C0C0C0, #808080);
}

.top-item:nth-child(3) .rank-badge {
  background: linear-gradient(135deg, #CD7F32, #8B4513);
}

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

.top-item .video-cover img {
  border-radius: 4px;
}

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

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

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

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

.video-player-section {
  margin-bottom: calc(var(--spacing-unit) * 4);
}

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.player-play-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  transform: translate(-50%, -50%) scale(1.1);
}

.player-play-icon {
  display: block;
  padding-left: 6px;
}

.detail-header {
  margin-bottom: calc(var(--spacing-unit) * 4);
  text-align: center;
}

.detail-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-text);
}

.detail-module {
  background: #fff;
  padding: calc(var(--spacing-unit) * 4);
  margin-bottom: calc(var(--spacing-unit) * 3);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.module-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 2px solid var(--color-primary);
}

.module-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
}

.info-list {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: calc(var(--spacing-unit) * 2);
  font-size: 15px;
}

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

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

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

.tag {
  display: inline-block;
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 14px;
  color: var(--color-text);
  transition: var(--transition);
}

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

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

.site-footer {
  background: #2c3e50;
  color: #fff;
  padding: calc(var(--spacing-unit) * 4) 0;
  text-align: center;
  margin-top: calc(var(--spacing-unit) * 8);
}

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

@media (max-width: 768px) {
  .main-nav {
    gap: calc(var(--spacing-unit) * 1.5);
    font-size: 14px;
  }

  .main-nav a {
    padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit));
  }

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

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

  .hero-section {
    padding: calc(var(--spacing-unit) * 4) 0;
  }

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

  .layout__side--filters {
    position: static;
  }

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

  .top-item .video-cover {
    width: 100%;
    height: auto;
    padding-top: 56.25%;
  }

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

  .detail-module {
    padding: calc(var(--spacing-unit) * 2);
  }

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

  .video-info {
    min-height: 80px;
  }
}

@media (max-width: 480px) {
  .header-content {
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
  }

  .main-nav {
    width: 100%;
    justify-content: space-between;
  }

  .main-nav a {
    font-size: 13px;
    padding: calc(var(--spacing-unit) * 0.5);
  }
}
