:root {
  --primary-color: #d32f2f;
  --secondary-color: #1976d2;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
  --spacing: 8px;
}

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.8;
  color: var(--text-color);
  background: var(--bg-color);
  font-size: 16px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing) * 2);
}

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

a:hover {
  color: var(--primary-color);
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 calc(var(--spacing) * 3);
}

.nav a {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: calc(var(--spacing) * 2) var(--spacing);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.nav a:hover {
  background: #f8f8f8;
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.site-header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: calc(var(--spacing) * 8) 0 calc(var(--spacing) * 6);
  text-align: center;
}

.site-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 2);
  line-height: 1.4;
}

.site-logo {
  display: inline-block;
  font-size: 20px;
  font-weight: 600;
  padding: calc(var(--spacing) * 1.5) calc(var(--spacing) * 3);
  background: rgba(255, 255, 255, 0.2);
  border-radius: calc(var(--spacing) * 3);
  backdrop-filter: blur(10px);
}

.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: calc(var(--spacing) * 6) 0 calc(var(--spacing) * 5);
  text-align: center;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 2);
}

.page-intro {
  font-size: 16px;
  line-height: 1.8;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
}

.main-content,
.list-content {
  padding: calc(var(--spacing) * 5) 0;
}

.site-intro {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 4);
  margin-bottom: calc(var(--spacing) * 5);
  border-radius: calc(var(--spacing) * 2);
  box-shadow: var(--shadow);
}

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

section {
  margin-bottom: calc(var(--spacing) * 6);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 3);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 3px solid var(--primary-color);
  display: inline-block;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: calc(var(--spacing) * 3);
}

.video-card {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: calc(var(--spacing) * 2);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.video-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 1.5);
  color: var(--text-color);
}

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

.video-meta {
  display: flex;
  gap: calc(var(--spacing) * 1.5);
  margin-bottom: calc(var(--spacing) * 2);
  font-size: 14px;
  color: var(--text-light);
}

.meta-item {
  padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5);
  background: var(--bg-color);
  border-radius: calc(var(--spacing) * 0.5);
}

.video-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: calc(var(--spacing) * 1.5);
}

.video-review {
  font-size: 13px;
  line-height: 1.6;
  color: #888;
  font-style: italic;
  padding-top: calc(var(--spacing) * 1.5);
  border-top: 1px solid var(--border-color);
}

.list-intro {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: calc(var(--spacing) * 2);
  margin-bottom: calc(var(--spacing) * 3);
  box-shadow: var(--shadow);
}

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

.list-preview {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: calc(var(--spacing) * 2);
  box-shadow: var(--shadow);
}

.list-item {
  display: flex;
  align-items: center;
  padding: calc(var(--spacing) * 2) 0;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

.list-item:hover {
  background: #f8f8f8;
  padding-left: calc(var(--spacing) * 2);
  margin-left: calc(var(--spacing) * -2);
  margin-right: calc(var(--spacing) * -2);
  padding-right: calc(var(--spacing) * 2);
}

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

.rank-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.list-item a {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
}

.item-year {
  color: var(--text-light);
  font-size: 14px;
  margin-left: auto;
}

.video-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: calc(var(--spacing) * 3);
}

.list-card {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: calc(var(--spacing) * 2);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.list-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 1.5);
}

.card-genre {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: var(--spacing);
}

.card-summary {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light);
}

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

.more-link a {
  display: inline-block;
  padding: calc(var(--spacing) * 2) calc(var(--spacing) * 4);
  background: var(--primary-color);
  color: white;
  border-radius: calc(var(--spacing) * 3);
  font-weight: 500;
  transition: all 0.3s ease;
}

.more-link a:hover {
  background: #b71c1c;
  transform: scale(1.05);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 3);
}

.rank-item {
  display: flex;
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: calc(var(--spacing) * 2);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.rank-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-hover);
}

.rank-item .rank-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  width: 60px;
  flex-shrink: 0;
  text-align: center;
}

.rank-content {
  flex: 1;
}

.rank-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--spacing);
}

.rank-meta {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: calc(var(--spacing) * 1.5);
}

.rank-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-light);
}

.topic-groups {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 5);
}

.topic-group {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 4);
  border-radius: calc(var(--spacing) * 2);
  box-shadow: var(--shadow);
}

.group-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 3);
  color: var(--primary-color);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 2px solid var(--border-color);
}

.group-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: calc(var(--spacing) * 3);
}

.group-card {
  padding: calc(var(--spacing) * 2);
  border-left: 3px solid var(--primary-color);
  background: #fafafa;
  transition: all 0.3s ease;
}

.group-card:hover {
  background: #f0f0f0;
  transform: translateX(4px);
}

.group-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--spacing);
}

.card-info {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: var(--spacing);
}

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

.video-list-simple {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 3);
}

.simple-card {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: calc(var(--spacing) * 2);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-color);
  transition: all 0.3s ease;
}

.simple-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
}

.simple-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 1.5);
}

.card-meta {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: calc(var(--spacing) * 1.5);
}

.detail-page {
  padding: calc(var(--spacing) * 5) 0;
}

.video-detail {
  background: var(--card-bg);
  border-radius: calc(var(--spacing) * 2);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: calc(var(--spacing) * 5) calc(var(--spacing) * 4);
  text-align: center;
}

.detail-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 2);
  line-height: 1.4;
}

.detail-subtitle {
  font-size: 16px;
  opacity: 0.9;
}

.detail-info,
.detail-oneline,
.detail-summary,
.detail-review,
.detail-related {
  padding: calc(var(--spacing) * 4);
  border-bottom: 1px solid var(--border-color);
}

.detail-related {
  border-bottom: none;
}

.info-title,
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 3);
  color: var(--primary-color);
}

.info-list {
  display: grid;
  gap: calc(var(--spacing) * 2);
  font-size: 15px;
}

.info-list dt {
  display: inline-block;
  font-weight: 600;
  color: var(--text-color);
  width: 80px;
}

.info-list dd {
  display: inline;
  color: var(--text-light);
}

.oneline-text {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-color);
  font-weight: 500;
  padding: calc(var(--spacing) * 2);
  background: #f8f8f8;
  border-left: 4px solid var(--primary-color);
  border-radius: calc(var(--spacing) * 1);
}

.summary-text,
.review-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-light);
  white-space: pre-line;
}

.review-text {
  font-style: italic;
  background: #f8f8f8;
  padding: calc(var(--spacing) * 3);
  border-radius: calc(var(--spacing) * 1);
  border-left: 3px solid var(--secondary-color);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: calc(var(--spacing) * 3);
}

.related-card {
  padding: calc(var(--spacing) * 3);
  background: #f8f8f8;
  border-radius: calc(var(--spacing) * 1);
  transition: all 0.3s ease;
}

.related-card:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.related-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--spacing);
}

.related-meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: var(--spacing);
}

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

.site-footer {
  background: #2c3e50;
  color: white;
  padding: calc(var(--spacing) * 4) 0;
  text-align: center;
  margin-top: calc(var(--spacing) * 8);
}

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

@media (max-width: 768px) {
  .nav {
    padding: 0 calc(var(--spacing) * 1);
  }

  .nav a {
    padding: calc(var(--spacing) * 1.5) calc(var(--spacing) * 0.5);
    font-size: 13px;
  }

  .site-title {
    font-size: 24px;
    padding: 0 calc(var(--spacing) * 2);
  }

  .page-header h1 {
    font-size: 22px;
  }

  .section-title {
    font-size: 20px;
  }

  .video-grid,
  .video-list,
  .group-items,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .detail-title {
    font-size: 24px;
  }

  .rank-item {
    flex-direction: column;
    text-align: center;
  }

  .rank-item .rank-num {
    width: 100%;
    margin-bottom: calc(var(--spacing) * 2);
  }

  .container {
    padding: 0 calc(var(--spacing) * 2);
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .nav a {
    font-size: 12px;
    padding: calc(var(--spacing) * 1.5) calc(var(--spacing) * 0.25);
  }

  .site-title {
    font-size: 20px;
  }

  .detail-title {
    font-size: 20px;
  }
}

.ui-style-0 { --primary-color: #d32f2f; }
.ui-style-1 { --primary-color: #c62828; }
.ui-style-2 { --primary-color: #b71c1c; }
.ui-style-3 { --primary-color: #e64a19; }
.ui-style-4 { --primary-color: #f57c00; }
.ui-style-5 { --primary-color: #ef6c00; }
.ui-style-6 { --primary-color: #e65100; }
.ui-style-7 { --primary-color: #1976d2; }
.ui-style-8 { --primary-color: #1565c0; }
.ui-style-9 { --primary-color: #0d47a1; }
.ui-style-10 { --primary-color: #00796b; }
.ui-style-11 { --primary-color: #00695c; }
.ui-style-12 { --primary-color: #004d40; }
.ui-style-13 { --primary-color: #5d4037; }
.ui-style-14 { --primary-color: #4e342e; }
.ui-style-15 { --primary-color: #3e2723; }
