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

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

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

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

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

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #e74c3c;
  text-decoration: none;
  white-space: nowrap;
}

nav ul {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  gap: 8px;
  align-items: center;
}

nav ul li a {
  display: block;
  padding: 8px 16px;
  color: #555;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s;
  white-space: nowrap;
}

nav ul li a:hover {
  background: #e74c3c;
  color: #fff;
}

main {
  padding: 30px 0;
  min-height: calc(100vh - 200px);
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #222;
  text-align: center;
}

.page-intro {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  line-height: 1.8;
  color: #555;
}

.section {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #222;
  padding-bottom: 12px;
  border-bottom: 3px solid #e74c3c;
}

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

.video-card {
  background: #fafafa;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s;
  border: 1px solid #e5e5e5;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  border-color: #e74c3c;
}

.video-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #222;
}

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

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

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #777;
}

.video-meta span {
  background: #f0f0f0;
  padding: 4px 10px;
  border-radius: 4px;
}

.video-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.video-list-item {
  background: #fafafa;
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  transition: all 0.3s;
}

.video-list-item:hover {
  border-color: #e74c3c;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.detail-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 40px 0;
  margin-bottom: 30px;
}

.detail-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 16px;
}

.detail-meta span {
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 20px;
}

.detail-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.detail-section {
  margin-bottom: 30px;
}

.detail-section-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #222;
  padding-bottom: 10px;
  border-bottom: 2px solid #e74c3c;
}

.detail-text {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  background: #e74c3c;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
}

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

.related-item {
  background: #fafafa;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  transition: all 0.3s;
}

.related-item:hover {
  border-color: #e74c3c;
  transform: translateY(-2px);
}

.related-item h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.related-item h4 a {
  color: #222;
  text-decoration: none;
}

.related-item h4 a:hover {
  color: #e74c3c;
}

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

footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 30px 0;
  text-align: center;
  margin-top: 50px;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links a {
  color: #ecf0f1;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #e74c3c;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }

  .logo {
    font-size: 20px;
  }

  nav ul {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 4px;
    overflow: visible;
  }

  nav ul li {
    flex: 1 1 0;
    min-width: 0;
  }

  nav ul li a {
    padding: 6px 8px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }

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

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

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

  .detail-meta {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  nav ul li a {
    padding: 6px 4px;
    font-size: 12px;
  }

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

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

body.ui-style-8 {
  background: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
}

body.ui-style-8 .logo {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.ui-style-8 .section {
  border-left: 4px solid #e74c3c;
}

body.ui-style-8 .video-card:hover {
  background: #fff;
}
