/* 全站样式表 - UI Style 3, Layout C */

:root {
  --primary-color: #667eea;
  --primary-dark: #5568d3;
  --secondary-color: #764ba2;
  --text-color: #333;
  --text-light: #666;
  --bg-light: #f5f5f5;
  --white: #fff;
  --border-color: #eee;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  margin-top: 0;
  color: var(--text-color);
  font-weight: 600;
}

h1 { font-size: 28px; line-height: 1.3; margin-bottom: 20px; }
h2 { font-size: 22px; line-height: 1.3; margin-bottom: 15px; margin-top: 25px; }
h3 { font-size: 18px; line-height: 1.4; margin-bottom: 10px; }
h4 { font-size: 16px; line-height: 1.4; }

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

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 15px 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 5px;
}

.nav a {
  color: var(--white);
  padding: 8px 12px;
  border-radius: 4px;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  transition: var(--transition);
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

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

.section {
  background: var(--white);
  padding: 30px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.section:hover {
  box-shadow: var(--shadow-hover);
}

.video-list {
  margin-top: 20px;
}

.video-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.video-item:hover {
  background: #fafafa;
  padding-left: 10px;
  margin-left: -10px;
  border-radius: 4px;
}

.video-item h3, .video-item h4 {
  margin: 5px 0;
  color: var(--text-color);
}

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

.intro {
  color: #555;
  line-height: 1.7;
  margin: 8px 0;
}

.tags {
  color: #888;
  font-size: 13px;
  margin-top: 8px;
}

.rank {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  font-weight: bold;
  color: var(--white);
  background: var(--primary-color);
  border-radius: 50%;
  margin-right: 10px;
  font-size: 14px;
}

.group {
  margin-bottom: 35px;
}

.group h3 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.date {
  color: #888;
  font-size: 13px;
  margin: 5px 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.info-item {
  padding: 12px;
  background: #f9f9f9;
  border-radius: 6px;
  border-left: 3px solid var(--primary-color);
}

.info-label {
  font-weight: bold;
  color: var(--primary-color);
  margin-right: 5px;
}

.summary {
  line-height: 1.9;
  margin: 20px 0;
  text-align: justify;
  color: #444;
  font-size: 15px;
}

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

.related-item {
  padding: 18px;
  background: #f9f9f9;
  border-radius: 8px;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.related-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-color);
}

.link-list {
  margin-top: 15px;
}

.link-list li {
  padding: 10px 0;
}

.link-list a {
  font-size: 16px;
  display: inline-block;
  padding: 8px 15px;
  background: #f0f7ff;
  border-radius: 5px;
  transition: var(--transition);
}

.link-list a:hover {
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  transform: translateX(5px);
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  z-index: 99;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

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

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

  .header {
    padding: 12px 15px;
  }

  .logo {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .nav {
    gap: 3px;
  }

  .nav a {
    font-size: 12px;
    padding: 6px 8px;
  }

  .container {
    padding: 0 10px;
    margin: 15px auto;
  }

  .section {
    padding: 20px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
  }

  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  h3 { font-size: 16px; }

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

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

  .video-item {
    padding: 12px 0;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .nav a {
    font-size: 11px;
    padding: 5px 6px;
  }

  .logo {
    font-size: 18px;
  }

  .section {
    padding: 15px 12px;
  }
}
