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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
  letter-spacing: 2px;
}

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

nav ul li {
  flex: 0 0 auto;
}

nav ul li a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
  display: block;
  white-space: nowrap;
}

nav ul li a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

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

.page-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  border-left: 5px solid #667eea;
  padding-left: 1rem;
}

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

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

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  border-bottom: 2px solid #667eea;
  padding-bottom: 0.5rem;
}

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

.video-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

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

.video-card-content {
  padding: 1.5rem;
}

.video-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.8rem;
  color: #2c3e50;
}

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

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

.video-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: #666;
}

.video-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.video-desc {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1rem;
}

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

.tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.85rem;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.video-item {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.video-item:hover {
  box-shadow: 0 5px 25px rgba(0,0,0,0.1);
  transform: translateX(5px);
}

.rank-number {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.2rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.item-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.detail-page {
  background: white;
  padding: 2.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.detail-title {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.meta-label {
  font-weight: bold;
  color: #667eea;
  font-size: 0.9rem;
}

.meta-value {
  color: #555;
}

.content-block {
  margin-bottom: 2rem;
}

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

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

.related-videos {
  margin-top: 3rem;
}

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

.group-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  padding: 1rem;
  background: linear-gradient(90deg, #667eea 0%, transparent 100%);
  color: white;
  border-radius: 5px;
}

.date-badge {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 0.3rem 1rem;
  border-radius: 5px;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.link-section {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.link-card {
  flex: 1;
  min-width: 200px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.link-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

footer {
  background: #2c3e50;
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #667eea;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: stretch;
  }

  .logo {
    text-align: center;
    font-size: 1.5rem;
  }

  nav ul {
    justify-content: space-between;
    flex-wrap: nowrap;
    overflow-x: visible;
    gap: 0;
  }

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

  nav ul li a {
    padding: 0.5rem 0.3rem;
    font-size: 0.85rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

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

  .detail-page {
    padding: 1.5rem;
  }

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

  .detail-meta {
    grid-template-columns: 1fr;
  }

  .link-section {
    flex-direction: column;
  }

  .footer-nav {
    flex-direction: column;
    gap: 0.5rem;
  }
}

body.ui-style-0 { --primary: #667eea; --secondary: #764ba2; }
body.ui-style-1 { --primary: #f093fb; --secondary: #f5576c; }
body.ui-style-2 { --primary: #4facfe; --secondary: #00f2fe; }
body.ui-style-3 { --primary: #43e97b; --secondary: #38f9d7; }
body.ui-style-4 { --primary: #fa709a; --secondary: #fee140; }
body.ui-style-5 { --primary: #30cfd0; --secondary: #330867; }
body.ui-style-6 { --primary: #a8edea; --secondary: #fed6e3; }
body.ui-style-7 { --primary: #ff9a9e; --secondary: #fecfef; }
body.ui-style-8 { --primary: #ffecd2; --secondary: #fcb69f; }
body.ui-style-9 { --primary: #ff6e7f; --secondary: #bfe9ff; }
body.ui-style-10 { --primary: #e0c3fc; --secondary: #8ec5fc; }
body.ui-style-11 { --primary: #f093fb; --secondary: #f5576c; }
body.ui-style-12 { --primary: #4facfe; --secondary: #00f2fe; }
body.ui-style-13 { --primary: #43e97b; --secondary: #38f9d7; }
body.ui-style-14 { --primary: #fa709a; --secondary: #fee140; }
body.ui-style-15 { --primary: #30cfd0; --secondary: #330867; }
