:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f8f9fa;
  --card-bg: #fff;
  --border-color: #ddd;
  --hover-color: #34495e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
}

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

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

header {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .logo {
  padding: 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
}

header .logo a {
  color: #fff;
  font-size: 28px;
  font-weight: bold;
  text-decoration: none;
  letter-spacing: 2px;
}

header nav {
  background: var(--primary-color);
  padding: 0;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
}

header nav ul li {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.1);
}

header nav ul li:last-child {
  border-right: none;
}

header nav ul li a {
  display: block;
  padding: 15px 10px;
  color: #ecf0f1;
  text-decoration: none;
  transition: background 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
}

header nav ul li a:hover {
  background: var(--hover-color);
  color: #fff;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: calc(100vh - 300px);
}

footer {
  background: var(--primary-color);
  color: #ecf0f1;
  padding: 40px 20px;
  margin-top: 60px;
}

footer nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

footer nav ul li a {
  color: #ecf0f1;
  text-decoration: none;
}

footer nav ul li a:hover {
  color: #fff;
}

footer p {
  text-align: center;
  margin: 10px 0 0 0;
  font-size: 14px;
  color: #95a5a6;
}

h1 {
  font-size: 32px;
  line-height: 1.3;
  margin: 0 0 20px 0;
  color: var(--primary-color);
}

h2 {
  font-size: 24px;
  line-height: 1.3;
  margin: 30px 0 20px 0;
  color: var(--primary-color);
  border-left: 4px solid var(--secondary-color);
  padding-left: 15px;
}

h3 {
  font-size: 20px;
  line-height: 1.3;
  margin: 15px 0 10px 0;
  color: var(--text-color);
}

section {
  margin-bottom: 50px;
}

.hero {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 10px;
  margin-bottom: 40px;
}

.hero h1 {
  color: #fff;
  margin: 0;
  font-size: 36px;
}

.site-intro {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 40px;
}

.site-intro h2 {
  margin-top: 0;
}

.site-intro p {
  line-height: 1.8;
  margin-bottom: 15px;
  font-size: 15px;
}

.page-header {
  margin-bottom: 40px;
}

.page-header .intro,
.page-header .topic-intro {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 8px;
  line-height: 1.8;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.topic-intro p {
  margin-bottom: 15px;
}

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

.video-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.video-card h3 {
  margin-top: 0;
  font-size: 18px;
}

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

.video-card .tags {
  color: var(--secondary-color);
  font-size: 13px;
  margin: 8px 0;
}

.video-card .oneline {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 10px;
  line-height: 1.6;
}

.entry-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.entry-card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

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

.entry-card h3 {
  margin-top: 0;
  font-size: 22px;
}

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

.video-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.video-item {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

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

.video-item h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

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

.video-item .summary {
  line-height: 1.7;
  color: var(--text-color);
}

.year-group {
  margin-bottom: 50px;
}

.year-group h2 {
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  border: none;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.rank-item {
  display: flex;
  gap: 20px;
  background: var(--card-bg);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease;
}

.rank-item:hover {
  transform: translateX(5px);
}

.rank-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  border-radius: 50%;
}

.rank-content {
  flex: 1;
}

.rank-content h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.rank-content .meta {
  color: var(--text-light);
  font-size: 14px;
  margin: 5px 0;
}

.rank-content .tags {
  color: var(--secondary-color);
  font-size: 13px;
  margin: 5px 0;
}

.rank-content .reason {
  line-height: 1.7;
  margin-top: 10px;
  color: var(--text-color);
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.topic-item {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.topic-item h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 22px;
}

.topic-item .meta {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 15px;
}

.topic-item .intro {
  line-height: 1.8;
  color: var(--text-color);
}

.latest-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.latest-item {
  display: flex;
  gap: 20px;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.latest-item .date {
  flex-shrink: 0;
  width: 100px;
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 14px;
}

.latest-item .content {
  flex: 1;
}

.latest-item h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

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

.latest-item .brief {
  color: var(--text-color);
  line-height: 1.6;
}

.video-detail {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.detail-header h1 {
  font-size: 32px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.basic-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 15px 20px;
  margin: 20px 0;
}

.basic-info dt {
  font-weight: bold;
  color: var(--primary-color);
}

.basic-info dd {
  margin: 0;
  color: var(--text-color);
}

.oneline p {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
}

.summary p,
.review p {
  line-height: 1.9;
  font-size: 16px;
  text-align: justify;
}

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

.related-item {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease;
}

.related-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.related-item h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

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

.related-item p {
  font-size: 14px;
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  header .logo a {
    font-size: 22px;
  }

  header nav ul li a {
    font-size: 14px;
    padding: 12px 6px;
  }

  main {
    padding: 20px 15px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 20px;
  }

  .hero h1 {
    font-size: 28px;
  }

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

  .entry-cards {
    grid-template-columns: 1fr;
  }

  .video-detail {
    padding: 25px 20px;
  }

  .basic-info dl {
    grid-template-columns: 80px 1fr;
    gap: 10px 15px;
  }

  .rank-item {
    flex-direction: column;
    gap: 15px;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .latest-item {
    flex-direction: column;
    gap: 10px;
  }

  .latest-item .date {
    width: auto;
  }

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

@media (max-width: 480px) {
  header nav ul li a {
    font-size: 12px;
    padding: 10px 3px;
  }

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

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

  .video-detail {
    padding: 20px 15px;
  }
}

body.ui-style-0 {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
}

body.ui-style-1 {
  --primary-color: #34495e;
  --secondary-color: #2ecc71;
}

body.ui-style-2 {
  --primary-color: #1e272e;
  --secondary-color: #e67e22;
}

body.ui-style-3 {
  --primary-color: #2d3436;
  --secondary-color: #6c5ce7;
}

body.ui-style-4 {
  --primary-color: #2c3e50;
  --secondary-color: #e74c3c;
}

body.ui-style-5 {
  --primary-color: #34495e;
  --secondary-color: #16a085;
}

body.ui-style-6 {
  --primary-color: #273c75;
  --secondary-color: #f39c12;
}

body.ui-style-7 {
  --primary-color: #2f3640;
  --secondary-color: #00d2d3;
}

body.ui-style-8 {
  --primary-color: #1e3799;
  --secondary-color: #ff6348;
}

body.ui-style-9 {
  --primary-color: #2c3e50;
  --secondary-color: #9b59b6;
}

body.ui-style-10 {
  --primary-color: #34495e;
  --secondary-color: #1abc9c;
}

body.ui-style-11 {
  --primary-color: #2d3436;
  --secondary-color: #fd79a8;
}

body.ui-style-12 {
  --primary-color: #273c75;
  --secondary-color: #feca57;
}

body.ui-style-13 {
  --primary-color: #192a56;
  --secondary-color: #48dbfb;
}

body.ui-style-14 {
  --primary-color: #2f3640;
  --secondary-color: #ee5a6f;
}

body.ui-style-15 {
  --primary-color: #2c3e50;
  --secondary-color: #55efc4;
}
