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

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

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

body.ui-style-7 {
  --primary-color: #00C75A;
}

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

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease;
}

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

.home-main,
.detail-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.hero-section {
  background: linear-gradient(135deg, var(--primary-color), #00A84D);
  padding: 3rem 2rem;
  border-radius: 12px;
  margin-bottom: 3rem;
  color: white;
  text-align: center;
}

.hero-content h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
}

.site-intro {
  margin-bottom: 3rem;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.intro-container h2 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.intro-container p {
  line-height: 1.8;
}

.video-section {
  margin-bottom: 3rem;
}

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

.section-header h2 {
  font-size: 1.5rem;
  color: var(--text-color);
}

.section-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

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

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

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

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

.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: 1rem;
}

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

.video-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.video-desc,
.video-one-line {
  font-size: 0.95rem;
  color: #777;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.page-header {
  margin-bottom: 2rem;
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.page-desc {
  color: #666;
}

.filter-bar {
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.filter-tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-num,
.page-more {
  padding: 0.5rem 1rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-num:hover,
.page-num.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

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

.top-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

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

.top-rank {
  font-size: 1.5rem;
  font-weight: 700;
  min-width: 2.5rem;
  text-align: center;
  color: #666;
}

.top-rank--gold {
  color: #FFD700;
}

.top-rank--silver {
  color: #C0C0C0;
}

.top-rank--bronze {
  color: #CD7F32;
}

.top-cover {
  width: 120px;
  height: 68px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
}

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

.top-info {
  flex: 1;
}

.top-title {
  margin-bottom: 0.5rem;
}

.top-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

.top-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.top-desc {
  font-size: 0.95rem;
  color: #777;
  line-height: 1.5;
}

.page--with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.layout__side--filters {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.layout__side--filters h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.filter-list {
  list-style: none;
}

.filter-item {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-item:hover,
.filter-item.active {
  background: var(--primary-color);
  color: white;
}

.sidebar-note {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
}

.page--grouped .group {
  margin-bottom: 3rem;
}

.group-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

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

.video-player-section {
  margin-bottom: 2rem;
}

.video-player {
  width: 100%;
  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;
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-play-btn:hover {
  background: #00A84D;
  transform: translate(-50%, -50%) scale(1.1);
}

.player-play-icon {
  font-size: 2rem;
  color: white;
  margin-left: 0.25rem;
}

.detail-header {
  margin-bottom: 2rem;
  text-align: center;
}

.detail-header h1 {
  font-size: 2rem;
  color: var(--text-color);
}

.detail-info,
.detail-module,
.related-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.detail-info h2,
.detail-module h2,
.related-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.info-item {
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 4px;
}

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

.module-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-item {
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
}

.video-card--related {
  height: 100%;
}

.site-footer {
  background: #2c3e50;
  color: white;
  padding: 2rem 0;
  text-align: center;
  margin-top: 3rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  z-index: 99;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

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

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.9rem;
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .video-masonry,
  .video-grid,
  .related-grid,
  .group__grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

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

  .layout__side--filters {
    position: static;
  }

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

  .video-info {
    padding: 0.75rem;
  }

  .video-title {
    font-size: 1rem;
  }

  .top-item {
    flex-wrap: wrap;
  }

  .top-cover {
    width: 100px;
    height: 56px;
  }

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

  .player-play-icon {
    font-size: 1.5rem;
  }

  .detail-info,
  .detail-module,
  .related-section {
    padding: 1.5rem;
  }

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