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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

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

.site-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand .brand-link {
  font-size: 24px;
  font-weight: bold;
  color: #000;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 5px;
}

.nav-links li a {
  padding: 8px 15px;
  color: #666;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s;
  white-space: nowrap;
  font-size: 15px;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: #000;
  background: #f0f0f0;
}

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
}

.hero-title {
  font-size: 32px;
  margin-bottom: 20px;
  font-weight: 600;
}

.intro-section {
  background: white;
  padding: 40px 20px;
  margin-bottom: 40px;
}

.intro-text {
  max-width: 900px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.8;
  color: #555;
}

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

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

.section-title {
  font-size: 28px;
  font-weight: 600;
}

.section-more {
  color: #667eea;
  text-decoration: none;
  font-size: 16px;
}

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

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

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

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px 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%;
  background: #e0e0e0;
  overflow: hidden;
}

.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: opacity 0.3s;
}

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

.play-icon {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #667eea;
}

.video-info {
  padding: 16px;
}

.video-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-one-line {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.5;
}

.video-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #999;
}

.meta-item::after {
  content: "·";
  margin-left: 12px;
}

.meta-item:last-child::after {
  content: "";
}

.page-header {
  margin-bottom: 30px;
  padding: 30px 0;
}

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

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

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

.layout__side--filters {
  background: white;
  padding: 20px;
  border-radius: 8px;
  height: fit-content;
}

.layout__side--filters h3 {
  margin-bottom: 15px;
}

.page--top {
  background: white;
  padding: 30px;
  border-radius: 8px;
}

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

.top-list__item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.top-list__item:last-child {
  border-bottom: none;
}

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

.top-cover {
  width: 120px;
  flex-shrink: 0;
}

.top-cover img {
  width: 100%;
  border-radius: 8px;
}

.top-info {
  flex: 1;
}

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

.top-info h3 a {
  color: #333;
  text-decoration: none;
}

.top-info h3 a:hover {
  color: #667eea;
}

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

.top-oneline {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
}

.page--grouped {
  background: white;
  padding: 30px;
  border-radius: 8px;
}

.group {
  margin-bottom: 50px;
}

.group:last-child {
  margin-bottom: 0;
}

.group-title {
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
}

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

.video-player-section {
  background: #000;
  padding: 40px 0;
  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: 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.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}

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

.player-play-icon {
  font-size: 32px;
  color: #667eea;
}

.detail-container {
  background: white;
  padding: 40px;
  border-radius: 8px;
  margin-bottom: 40px;
}

.detail-title {
  font-size: 36px;
  margin-bottom: 30px;
}

.detail-info-card {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.detail-info-card h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

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

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

.info-list dd {
  color: #333;
}

.detail-module {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}

.detail-module:last-of-type {
  border-bottom: none;
}

.detail-module h2 {
  font-size: 24px;
  margin-bottom: 15px;
}

.oneline-content,
.summary-content p,
.review-content p,
.audience-content p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
}

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

.tag-item {
  padding: 6px 16px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 14px;
  color: #666;
}

.related-section {
  margin-top: 40px;
}

.related-section h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

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

.video-card--related {
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.site-footer {
  background: #333;
  color: white;
  padding: 30px 20px;
  text-align: center;
  margin-top: 60px;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
}

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

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

@media (max-width: 768px) {
  .main-nav {
    flex-direction: column;
    gap: 15px;
  }

  .nav-links {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    justify-content: flex-start;
    padding: 0 5px;
  }

  .nav-links li a {
    font-size: 14px;
    padding: 6px 12px;
  }

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

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

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

  .video-title {
    font-size: 16px;
  }

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

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

  .layout__side--filters {
    order: 2;
  }

  .detail-container {
    padding: 20px;
  }

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

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

  .top-cover {
    width: 100%;
  }

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

body.ui-style-2 {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.ui-style-2 .hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.ui-style-2 .video-card:hover {
  transform: translateY(-6px);
}

body.ui-style-2 .nav-links li a:hover,
body.ui-style-2 .nav-links li a.active {
  background: linear-gradient(135deg, rgba(102,126,234,0.1) 0%, rgba(118,75,162,0.1) 100%);
  color: #667eea;
}
