:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --error-color: #c0392b;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --spacing: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Microsoft YaHei", "微软雅黑", STHeiti, "华文黑体";
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  font-size: 16px;
}

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

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

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

.main-nav .logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--secondary-color);
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.main-nav .nav-links {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  gap: calc(var(--spacing) * 3);
  align-items: center;
  margin: 0;
  padding: 0;
}

.main-nav .nav-links li {
  flex-shrink: 0;
}

.main-nav .nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
  padding: calc(var(--spacing) * 1) calc(var(--spacing) * 2);
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: block;
}

.main-nav .nav-links a:hover {
  color: var(--primary-color);
  background: rgba(52, 152, 219, 0.1);
}

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

h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: calc(var(--spacing) * 3);
  line-height: 1.2;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-top: calc(var(--spacing) * 4);
  margin-bottom: calc(var(--spacing) * 2);
  line-height: 1.2;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: calc(var(--spacing) * 1);
  line-height: 1.3;
}

p {
  margin-bottom: calc(var(--spacing) * 2);
  line-height: 1.8;
}

section {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  margin-bottom: calc(var(--spacing) * 3);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.site-intro {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: calc(var(--spacing) * 4);
}

.site-intro h2 {
  color: white;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: calc(var(--spacing) * 1);
  margin-bottom: calc(var(--spacing) * 2);
}

.site-intro a {
  color: #ffd700;
  font-weight: 600;
  text-decoration: underline;
}

.site-intro a:hover {
  color: #ffed4e;
}

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

.video-card {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.video-card h3 {
  font-size: 1.1rem;
  margin-bottom: calc(var(--spacing) * 1);
}

.video-card h3 a {
  color: var(--secondary-color);
  font-weight: 600;
}

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

.video-card .meta {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: calc(var(--spacing) * 1);
}

.video-card .desc {
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

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

.video-item {
  padding: calc(var(--spacing) * 2);
  border-left: 3px solid var(--primary-color);
  background: rgba(52, 152, 219, 0.05);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.video-item:hover {
  background: rgba(52, 152, 219, 0.1);
  padding-left: calc(var(--spacing) * 3);
}

.video-item h3 {
  font-size: 1.1rem;
  margin-bottom: calc(var(--spacing) * 0.5);
}

.video-item .meta {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-right: calc(var(--spacing) * 2);
}

.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: calc(var(--spacing) * 3);
  margin-top: calc(var(--spacing) * 2);
}

.nav-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: calc(var(--spacing) * 3);
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.nav-card:hover {
  transform: translateY(-4px);
}

.nav-card h3 a {
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
}

.nav-card p {
  margin: calc(var(--spacing) * 1) 0 0 0;
  opacity: 0.95;
}

.detail-page .video-info {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.detail-page .video-info h2 {
  color: white;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: calc(var(--spacing) * 1);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: calc(var(--spacing) * 2);
  margin-top: calc(var(--spacing) * 2);
}

.info-item {
  font-size: 0.95rem;
}

.info-item strong {
  font-weight: 600;
}

.one-line {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  border-left: 4px solid var(--accent-color);
}

.one-line h2 {
  color: var(--secondary-color);
}

.highlight {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--secondary-color);
  line-height: 1.8;
  margin: 0;
}

.summary, .review {
  background: var(--card-bg);
}

.summary p, .review p {
  font-size: 1rem;
  line-height: 1.9;
  margin: 0;
  text-align: justify;
}

.related {
  background: var(--bg-color);
  border: 2px dashed var(--border-color);
}

.top-list, .topic-list, .latest-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 3);
}

.top-item {
  display: flex;
  gap: calc(var(--spacing) * 3);
  padding: calc(var(--spacing) * 3);
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

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

.top-item .rank {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
  flex-shrink: 0;
}

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

.top-item h3 {
  font-size: 1.3rem;
  margin-bottom: calc(var(--spacing) * 1);
}

.top-item .meta {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: calc(var(--spacing) * 1);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 1);
  margin: calc(var(--spacing) * 1) 0;
}

.tag {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 1.5);
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
}

.top-item .reason {
  color: var(--text-color);
  line-height: 1.8;
  margin: calc(var(--spacing) * 1) 0 0 0;
}

.topic-item {
  padding: calc(var(--spacing) * 3);
  background: var(--card-bg);
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow);
}

.topic-item h3 {
  font-size: 1.3rem;
  margin-bottom: calc(var(--spacing) * 1);
}

.topic-item .intro, .topic-item .reason {
  line-height: 1.8;
  margin-top: calc(var(--spacing) * 1);
}

.topic-item .reason {
  color: var(--text-light);
  font-style: italic;
  border-top: 1px dashed var(--border-color);
  padding-top: calc(var(--spacing) * 1);
}

.latest-item {
  display: flex;
  gap: calc(var(--spacing) * 3);
  padding: calc(var(--spacing) * 2);
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.latest-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-color);
}

.latest-item .date {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  background: var(--primary-color);
  padding: calc(var(--spacing) * 1) calc(var(--spacing) * 1.5);
  border-radius: 4px;
  min-width: 100px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.latest-item h3 {
  font-size: 1.15rem;
  margin-bottom: calc(var(--spacing) * 0.5);
}

.latest-item .brief {
  color: var(--text-color);
  margin: calc(var(--spacing) * 1) 0 0 0;
  line-height: 1.6;
}

.year-group {
  margin-bottom: calc(var(--spacing) * 4);
}

.year-group h2 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing) * 2);
}

.intro {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: calc(var(--spacing) * 3);
}

.topic-intro {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  padding: calc(var(--spacing) * 3);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing) * 3);
}

.topic-intro p {
  line-height: 1.9;
  margin-bottom: calc(var(--spacing) * 2);
}

.topic-intro p:last-child {
  margin-bottom: 0;
}

footer {
  background: var(--secondary-color);
  color: #ecf0f1;
  padding: calc(var(--spacing) * 4);
  text-align: center;
  margin-top: calc(var(--spacing) * 6);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(var(--spacing) * 3);
  margin-bottom: calc(var(--spacing) * 2);
}

.footer-nav a {
  color: #ecf0f1;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

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

footer p {
  margin: 0;
  opacity: 0.8;
}

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

  .main-nav .logo {
    font-size: 1.3rem;
  }

  .main-nav .nav-links {
    gap: calc(var(--spacing) * 1);
    flex: 1;
    justify-content: flex-end;
  }

  .main-nav .nav-links a {
    font-size: 0.85rem;
    padding: calc(var(--spacing) * 0.75) calc(var(--spacing) * 1);
  }

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

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: calc(var(--spacing) * 2);
  }

  .top-item {
    flex-direction: column;
    gap: calc(var(--spacing) * 2);
  }

  .top-item .rank {
    min-width: auto;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

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

  .latest-item .date {
    min-width: auto;
    width: fit-content;
  }

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

  section {
    padding: calc(var(--spacing) * 2);
  }
}

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

  .main-nav .logo {
    font-size: 1.1rem;
  }

  .main-nav .nav-links {
    gap: calc(var(--spacing) * 0.5);
  }

  .main-nav .nav-links a {
    font-size: 0.75rem;
    padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 0.75);
  }

  h1 {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1.15rem;
  }

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

  .footer-nav {
    gap: calc(var(--spacing) * 1.5);
  }
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing) * 4);
  right: calc(var(--spacing) * 4);
  background: var(--primary-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top:hover {
  background: var(--accent-color);
  transform: translateY(-4px);
}

.back-to-top.show {
  display: flex;
}
