:root {
  --primary-color: #e53935;
  --secondary-color: #1e88e5;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #e0e0e0;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
}

body.ui-style-8 {
  background: linear-gradient(135deg, #f5f7fa 0%, #fafafa 100%);
}

h1, h2, h3 {
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: 32px; font-weight: 700; color: var(--text-color); }
h2 { font-size: 24px; font-weight: 600; color: var(--text-color); }
h3 { font-size: 18px; font-weight: 600; }

a { transition: color 0.3s, opacity 0.3s; }
a:hover { opacity: 0.8; }

.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: var(--spacing-lg) var(--spacing-md);
  border-radius: 12px;
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.hero h1 {
  color: white;
  font-size: 28px;
  margin-bottom: var(--spacing-sm);
}

.hero .intro {
  font-size: 16px;
  line-height: 1.8;
  opacity: 0.95;
}

.hero a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

section {
  margin-bottom: var(--spacing-lg);
}

section h2 {
  padding-bottom: var(--spacing-sm);
  border-bottom: 3px solid var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.video-grid, .related-grid, .topic-grid, .nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.video-card, .related-card, .topic-card, .nav-card {
  background: var(--card-bg);
  padding: var(--spacing-md);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover, .related-card:hover, .topic-card:hover, .nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.video-card h3 a, .related-card h3 a, .topic-card h3 a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 18px;
}

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

.meta {
  color: var(--text-light);
  font-size: 14px;
  margin: var(--spacing-xs) 0;
}

.oneline, .desc {
  color: var(--text-color);
  font-size: 14px;
  line-height: 1.6;
  margin-top: var(--spacing-xs);
}

.more-link {
  text-align: center;
  margin-top: var(--spacing-md);
}

.more-link a {
  display: inline-block;
  padding: 12px 32px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 24px;
  font-weight: 600;
  transition: background 0.3s;
}

.more-link a:hover {
  background: #c62828;
  opacity: 1;
}

.video-list, .video-full-list, .latest-list {
  background: var(--card-bg);
  padding: var(--spacing-md);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.video-item, .list-item, .latest-item {
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.video-item h3 a, .list-item h3 a, .latest-item h3 a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 18px;
}

.video-item h3 a:hover, .list-item h3 a:hover, .latest-item h3 a:hover {
  color: var(--primary-color);
}

.summary {
  color: var(--text-color);
  line-height: 1.8;
  margin-top: var(--spacing-xs);
}

.tags {
  color: var(--text-light);
  font-size: 13px;
  margin-top: var(--spacing-xs);
}

.page-header {
  background: var(--card-bg);
  padding: var(--spacing-lg) var(--spacing-md);
  border-radius: 8px;
  margin-bottom: var(--spacing-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.page-header h1 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.page-header p {
  color: var(--text-light);
  line-height: 1.8;
}

.ranking-list {
  background: var(--card-bg);
  padding: var(--spacing-md);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.rank-item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--border-color);
}

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

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

.rank-content {
  flex: 1;
}

.rank-content h3 a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 18px;
}

.rank-content h3 a:hover {
  color: var(--primary-color);
}

.review {
  color: var(--text-light);
  font-style: italic;
  margin-top: var(--spacing-xs);
  padding-left: var(--spacing-sm);
  border-left: 3px solid var(--border-color);
}

.topic-group {
  margin-bottom: var(--spacing-lg);
}

.latest-item {
  display: flex;
  gap: var(--spacing-md);
}

.update-date {
  color: var(--primary-color);
  font-weight: 600;
  min-width: 100px;
  font-size: 14px;
}

.latest-content {
  flex: 1;
}

.detail-page {
  background: var(--card-bg);
  padding: var(--spacing-lg) var(--spacing-md);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.detail-header h1 {
  font-size: 32px;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.detail-meta span {
  color: var(--text-light);
  font-size: 14px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f5f5f5;
  color: var(--text-color);
  border-radius: 16px;
  font-size: 13px;
}

.tag-site {
  background: #e3f2fd;
  color: var(--secondary-color);
}

.detail-highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: var(--spacing-md);
  border-radius: 8px;
  margin-bottom: var(--spacing-md);
}

.detail-highlight h2 {
  color: white;
  border-bottom: none;
  margin-bottom: var(--spacing-sm);
}

.highlight-text {
  font-size: 18px;
  line-height: 1.8;
}

.detail-summary, .detail-review, .detail-related {
  margin-bottom: var(--spacing-lg);
}

.detail-summary p, .detail-review p {
  line-height: 1.8;
  color: var(--text-color);
}

.nav-card h3 {
  margin-bottom: var(--spacing-sm);
}

.nav-card h3 a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 20px;
}

.nav-card p {
  color: var(--text-light);
  line-height: 1.6;
}

@media (max-width: 768px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 16px; }

  .hero h1 { font-size: 22px; }
  .hero .intro { font-size: 14px; }

  .video-grid, .related-grid, .topic-grid, .nav-cards {
    grid-template-columns: 1fr;
  }

  main { padding: 20px 0; }

  section { margin-bottom: var(--spacing-md); }

  .detail-page { padding: var(--spacing-md) var(--spacing-sm); }

  .detail-header h1 { font-size: 24px; }

  .detail-meta { flex-direction: column; gap: var(--spacing-xs); }

  .rank-num { font-size: 20px; min-width: 32px; }

  .latest-item { flex-direction: column; gap: var(--spacing-xs); }

  .update-date { min-width: auto; }
}

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

  .video-card, .related-card, .topic-card, .nav-card {
    padding: var(--spacing-sm);
  }

  .hero { padding: var(--spacing-md) var(--spacing-sm); }

  .page-header { padding: var(--spacing-md) var(--spacing-sm); }
}
