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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "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;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  max-width: 600px;
  margin-left: 30px;
}

nav a {
  color: #555;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.3s;
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  font-size: 14px;
}

nav a:hover {
  background: #f0f0f0;
  color: #2c3e50;
}

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

  .logo {
    font-size: 20px;
  }

  nav {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  nav a {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 4px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

main {
  padding: 30px 0;
}

h1 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #2c3e50;
}

h2 {
  font-size: 22px;
  margin: 30px 0 15px;
  color: #34495e;
}

.intro {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  line-height: 1.8;
}

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

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

.video-card {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 18px;
  transition: all 0.3s;
  cursor: pointer;
}

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

.video-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #2c3e50;
}

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

.video-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

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

.video-list li {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 15px;
  transition: all 0.3s;
}

.video-list li:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.video-list h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.video-list a {
  color: #2c3e50;
  text-decoration: none;
}

.video-list a:hover {
  color: #3498db;
}

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

.detail-header h1 {
  color: #fff;
  margin-bottom: 15px;
}

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

.detail-meta span {
  background: rgba(255,255,255,0.2);
  padding: 5px 12px;
  border-radius: 4px;
}

.detail-section {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-section h2 {
  border-left: 4px solid #3498db;
  padding-left: 12px;
  margin-top: 0;
}

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

.tag {
  background: #e8f4f8;
  color: #2980b9;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
}

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

.related-item {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 15px;
}

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

.related-item a {
  color: #2c3e50;
  text-decoration: none;
}

.related-item a:hover {
  color: #3498db;
}

footer {
  background: #2c3e50;
  color: #ecf0f1;
  text-align: center;
  padding: 25px;
  margin-top: 40px;
}

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

  h1 {
    font-size: 24px;
  }

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

  .detail-header {
    padding: 25px 20px;
  }

  .detail-meta {
    gap: 10px;
  }
}
