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

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

.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.site-logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.main-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  gap: 0.5rem;
}

.main-nav li {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.main-nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem;
  display: block;
  border-radius: 4px;
  transition: background 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255,255,255,0.2);
}

.main-content {
  padding: 2rem 0;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #333;
}

.page-intro {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  line-height: 1.8;
}

.section {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #667eea;
  border-left: 4px solid #667eea;
  padding-left: 1rem;
}

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

.video-card {
  background: #fafafa;
  padding: 1.25rem;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #e0e0e0;
}

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

.video-card-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #333;
}

.video-card-title a {
  color: inherit;
  text-decoration: none;
}

.video-card-title a:hover {
  color: #667eea;
}

.video-meta {
  font-size: 0.875rem;
  color: #666;
  margin: 0.25rem 0;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.tag {
  background: #667eea;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
}

.video-desc {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.75rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-container {
  max-width: 900px;
  margin: 0 auto;
}

.detail-header {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detail-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #333;
}

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

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

.info-label {
  font-weight: bold;
  color: #667eea;
  margin-bottom: 0.25rem;
}

.detail-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detail-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #667eea;
  border-left: 4px solid #667eea;
  padding-left: 1rem;
}

.detail-section p {
  line-height: 1.8;
  color: #555;
  margin-bottom: 1rem;
}

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

.related-item {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  transition: transform 0.3s;
}

.related-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.related-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.related-item h3 a {
  color: #333;
  text-decoration: none;
}

.related-item h3 a:hover {
  color: #667eea;
}

.related-item p {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
}

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

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #667eea;
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}

.back-to-top:hover {
  transform: scale(1.1);
}

.back-to-top.show {
  display: flex;
}

@media (max-width: 768px) {
  .main-nav {
    gap: 0.25rem;
  }

  .main-nav a {
    padding: 0.4rem 0.25rem;
    font-size: 0.85rem;
  }

  .site-logo {
    font-size: 1.5rem;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .detail-title {
    font-size: 1.75rem;
  }

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

  .info-grid {
    grid-template-columns: 1fr;
  }
}

body.ui-style-6 {
  /* UI Style 6 - Layout E */
}
