/* Reset */
* {
  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;
}

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

body.ui-style-5::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  z-index: -1;
}

a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #1d4ed8;
}

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

/* Header */
header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.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: bold;
  color: #1e293b;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  align-items: center;
}

.nav a {
  white-space: nowrap;
  font-size: 16px;
  color: #475569;
  transition: color 0.3s;
}

.nav a:hover {
  color: #2563eb;
}

/* Main */
main {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
}

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

h1 {
  font-size: 32px;
  margin-bottom: 24px;
  color: #1e293b;
  line-height: 1.2;
}

h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #334155;
  line-height: 1.2;
}

h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: #475569;
}

p {
  margin-bottom: 16px;
  line-height: 1.8;
}

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

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

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

.video-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #1e293b;
}

.video-card .meta {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 12px;
}

.video-card .desc {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 16px;
}

.video-card .link {
  display: inline-block;
  color: #2563eb;
  font-size: 14px;
  font-weight: 500;
}

/* Video List (Alternative Layout) */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.video-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  transition: all 0.3s;
}

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

.video-item h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.video-item .meta {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 12px;
}

.video-item .desc {
  font-size: 15px;
  color: #475569;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* Detail Page */
.detail-header {
  margin-bottom: 32px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
  padding: 24px;
  background: #f8fafc;
  border-radius: 8px;
}

.detail-meta .meta-item {
  display: flex;
  gap: 8px;
}

.detail-meta .meta-label {
  font-weight: 600;
  color: #475569;
}

.detail-meta .meta-value {
  color: #64748b;
}

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

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 4px;
  font-size: 14px;
}

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

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

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

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

.related-item p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Footer */
footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 32px 0;
  margin-top: 60px;
}

footer .container {
  text-align: center;
}

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

  .logo {
    font-size: 20px;
  }

  .nav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
    overflow: hidden;
  }

  .nav a {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-size: 13px;
    padding: 8px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  section {
    padding: 20px;
    margin-bottom: 20px;
  }

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

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

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

@media (max-width: 480px) {
  .nav a {
    font-size: 12px;
    padding: 6px 2px;
  }

  .container {
    padding: 0 16px;
  }

  main {
    padding: 24px 0;
  }
}