:root {
  --primary-color: #e50914;
  --bg-dark: #1a1a1a;
  --bg-light: #f5f5f5;
  --text-dark: #333;
  --text-light: #666;
  --border-color: #eee;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #b20710;
}

.main-nav {
  background: var(--bg-dark);
  padding: 15px 20px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-logo a {
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 5px;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: nowrap;
  overflow: hidden;
}

.nav-menu li {
  flex: 0 0 auto;
}

.nav-menu a {
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  display: block;
  border-radius: 4px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.nav-menu a:hover {
  background: #333;
  color: #fff;
}

@media (max-width: 768px) {
  .main-nav {
    padding: 10px 8px;
  }

  .nav-logo a {
    font-size: 18px;
  }

  .nav-menu {
    gap: 2px;
  }

  .nav-menu a {
    padding: 6px 8px;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

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

.intro-section,
.video-section,
.page-header,
.detail-card,
.related-section {
  background: #fff;
  padding: 30px;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.intro-section h1,
.page-header h1,
.detail-card h1 {
  font-size: 28px;
  margin-bottom: 15px;
  color: var(--bg-dark);
}

.intro-section p,
.page-header p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-light);
}

.video-section h2,
.related-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-color);
  padding-left: 15px;
}

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

.video-card {
  background: #fafafa;
  border-radius: 6px;
  padding: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--border-color);
}

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

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

.video-card h3 a {
  color: var(--text-dark);
  text-decoration: none;
}

.video-card h3 a:hover {
  color: var(--primary-color);
}

.video-card .meta {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 8px;
}

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

.video-list {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
}

.video-item {
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.video-item:last-child {
  border-bottom: none;
}

.video-rank {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 40px;
  text-align: center;
}

.video-info {
  flex: 1;
}

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

.video-info h3 a {
  color: var(--text-dark);
  text-decoration: none;
}

.video-info h3 a:hover {
  color: var(--primary-color);
}

.video-meta {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 8px;
}

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

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 6px;
}

.info-item {
  font-size: 15px;
}

.info-item strong {
  color: var(--text-light);
  display: inline-block;
  min-width: 60px;
}

.section {
  margin: 25px 0;
}

.section h2 {
  font-size: 22px;
  margin-bottom: 15px;
  color: var(--bg-dark);
  border-left: 4px solid var(--primary-color);
  padding-left: 12px;
}

.section p {
  font-size: 16px;
  line-height: 1.8;
}

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

.related-card {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease;
}

.related-card:hover {
  transform: translateY(-3px);
}

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

.related-card h3 a {
  color: var(--text-dark);
  text-decoration: none;
}

.related-card h3 a:hover {
  color: var(--primary-color);
}

.related-card .desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
}

.footer {
  background: var(--bg-dark);
  color: #fff;
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
}

.footer p {
  font-size: 14px;
}

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

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

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

@media (max-width: 576px) {
  .intro-section,
  .video-section,
  .page-header,
  .detail-card,
  .related-section {
    padding: 20px 15px;
  }

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

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

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

body.ui-style-0 { --primary-color: #e50914; }
body.ui-style-1 { --primary-color: #0066cc; }
body.ui-style-2 { --primary-color: #00a86b; }
body.ui-style-3 { --primary-color: #ff6600; }
body.ui-style-4 { --primary-color: #9b59b6; }
body.ui-style-5 { --primary-color: #e74c3c; }
body.ui-style-6 { --primary-color: #3498db; }
body.ui-style-7 { --primary-color: #1abc9c; }
body.ui-style-8 { --primary-color: #f39c12; }
body.ui-style-9 { --primary-color: #c0392b; }
body.ui-style-10 { --primary-color: #2c3e50; }
body.ui-style-11 { --primary-color: #27ae60; }
body.ui-style-12 { --primary-color: #d35400; }
body.ui-style-13 { --primary-color: #8e44ad; }
body.ui-style-14 { --primary-color: #16a085; }
body.ui-style-15 { --primary-color: #c91a1a; }
