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

:root {
  --primary-color: #00C75A;
  --bg-color: #ffffff;
  --text-color: #333333;
  --border-color: #e0e0e0;
  --hover-color: #f5f5f5;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

body.ui-style-0, body.ui-style-1, body.ui-style-5, body.ui-style-6,
body.ui-style-7, body.ui-style-8, body.ui-style-9 {
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
  --border-color: #333333;
  --hover-color: #2a2a2a;
}

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

body.ui-style-12 {
  --primary-color: #FF6700;
  --bg-color: #ffffff;
}

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

body.ui-style-14 {
  --primary-color: #003d7a;
  --bg-color: #ffffff;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.site-header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

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

.site-nav {
  display: flex;
  gap: 8px;
  white-space: nowrap;
  overflow: visible;
}

.site-nav a {
  padding: 8px 16px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s;
  font-size: 15px;
}

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

main {
  flex: 1;
  padding: 40px 0;
}

.hero-section {
  text-align: center;
  padding: 60px 0 40px;
  background: linear-gradient(135deg, var(--primary-color)22, var(--bg-color));
}

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

.hero-subtitle {
  font-size: 18px;
  opacity: 0.8;
}

.intro-section {
  padding: 40px 0;
}

.intro-content p {
  font-size: 16px;
  line-height: 1.8;
  text-align: justify;
}

.video-section {
  padding: 40px 0;
}

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

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

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

.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%;
  overflow: hidden;
  background: #f0f0f0;
}

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

.video-info {
  padding: 16px;
}

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

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

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

.video-player-section {
  background: #000;
  padding: 20px 0;
}

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

.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;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  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;
}

.detail-page .container {
  max-width: 900px;
}

.detail-header {
  padding: 40px 0 20px;
}

.detail-title {
  font-size: 32px;
  line-height: 1.3;
}

.detail-info {
  padding: 24px;
  background: var(--hover-color);
  border-radius: 8px;
  margin-bottom: 32px;
}

.info-title {
  font-size: 20px;
  margin-bottom: 16px;
}

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

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

.detail-module {
  margin-bottom: 32px;
  padding: 24px;
  background: var(--hover-color);
  border-radius: 8px;
}

.module-title {
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--primary-color);
}

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

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

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

.related-section {
  padding: 40px 0;
}

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

.video-card--related {
  background: var(--hover-color);
}

.page-header {
  text-align: center;
  padding: 40px 0;
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: 12px;
}

.page-desc {
  font-size: 16px;
  opacity: 0.8;
}

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

.top-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--hover-color);
  border-radius: 8px;
  transition: all 0.3s;
}

.top-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

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

.top-item__link {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

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

.top-item .video-cover img {
  position: static;
}

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

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

.layout__side--filters {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.layout__side--filters h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--primary-color);
}

.group {
  margin-bottom: 48px;
}

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

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

.site-footer {
  background: var(--hover-color);
  padding: 32px 0;
  text-align: center;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}

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

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

@media (max-width: 768px) {
  .site-nav {
    gap: 4px;
    font-size: 14px;
  }

  .site-nav a {
    padding: 6px 10px;
    font-size: 13px;
  }

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

  .hero-subtitle {
    font-size: 16px;
  }

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

  .video-card {
    border-radius: 6px;
  }

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

  .video-info {
    padding: 12px;
  }

  .video-title {
    font-size: 15px;
    -webkit-line-clamp: 2;
  }

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

  .video-one-line {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

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

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

  .layout__side--filters {
    position: static;
  }

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

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

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

  .top-item .video-cover img {
    position: absolute;
    top: 0;
    left: 0;
  }

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

@media (max-width: 480px) {
  .site-logo a {
    font-size: 20px;
  }

  .site-nav a {
    padding: 5px 8px;
    font-size: 12px;
  }

  .container {
    padding: 0 12px;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

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

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

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