/* 全局样式 */
* {
  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";
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #212529;
  line-height: 1.6;
}

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

a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* 头部样式 */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  margin-bottom: 2rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: white;
  display: inline-block;
  letter-spacing: 0.5px;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.9;
}

nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  transition: all 0.3s;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
}

nav a:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  text-decoration: none;
}

/* 主内容区 */
main {
  min-height: 60vh;
  padding: 2rem 0;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: #34495e;
  border-left: 4px solid #667eea;
  padding-left: 0.75rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
}

/* 首页样式 */
.intro-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.intro-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #555;
  margin-top: 1rem;
}

.hot-section,
.ranking-section,
.latest-section {
  margin-bottom: 3rem;
}

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

.video-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s;
}

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

.video-card h3 {
  margin-bottom: 0.5rem;
}

.video-card .meta {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.video-card .one-line {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

.video-list {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.video-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.video-item .year {
  color: #888;
  font-size: 0.9rem;
  margin-left: 1rem;
  flex-shrink: 0;
}

.ranking-intro {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin: 1rem 0;
}

.more-link {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 1rem;
}

.more-link a {
  font-weight: 600;
  padding: 0.5rem 1rem;
  background: #f0f0f0;
  border-radius: 4px;
  display: inline-block;
}

.more-link a:hover {
  background: #e0e0e0;
}

/* 列表页样式 */
.list-page {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.page-intro {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 2rem;
  line-height: 1.8;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #667eea;
}

.list-container,
.rank-container,
.topic-container,
.latest-container {
  margin-top: 2rem;
}

.list-card,
.rank-card,
.latest-card {
  background: #fafafa;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  display: flex;
  gap: 1rem;
  transition: all 0.3s;
}

.list-card:hover,
.rank-card:hover,
.latest-card:hover {
  background: #f5f5f5;
  border-color: #667eea;
  transform: translateX(4px);
}

.list-card .number,
.rank-card .rank-number,
.latest-card .date {
  font-size: 1.2rem;
  font-weight: 700;
  color: #667eea;
  flex-shrink: 0;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-card.top-three .rank-number {
  font-size: 1.8rem;
  color: #ff6b6b;
}

.list-content,
.rank-content,
.latest-content {
  flex: 1;
}

.list-content h3,
.rank-content h3,
.latest-content h3 {
  margin: 0 0 0.5rem 0;
}

.meta {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.desc,
.one-line,
.summary {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

.review-snippet {
  color: #666;
  font-size: 0.9rem;
  font-style: italic;
  margin-top: 0.5rem;
}

.topic-group {
  margin-bottom: 2rem;
  background: #fafafa;
  padding: 1.5rem;
  border-radius: 8px;
}

.topic-group h3 {
  color: #667eea;
  margin-bottom: 1rem;
}

.topic-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.topic-item {
  padding: 0.75rem;
  background: white;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.topic-item:hover {
  border-color: #667eea;
  transform: translateY(-2px);
}

/* 详情页样式 */
.detail-page article {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.detail-page h1 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #667eea;
}

.basic-info {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.info-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 1rem;
}

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

.info-list strong {
  color: #667eea;
  min-width: 80px;
  display: inline-block;
}

.highlight {
  background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.one-line-highlight {
  font-size: 1.15rem;
  font-weight: 500;
  color: #2c3e50;
  line-height: 1.8;
  margin: 0.5rem 0 0 0;
}

.summary,
.review {
  margin-bottom: 2rem;
}

.summary p,
.review p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #555;
}

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

.related-item {
  background: #f8f9fa;
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s;
}

.related-item:hover {
  background: #f0f0f0;
  border-color: #667eea;
  transform: translateY(-2px);
}

.related-item h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.related-item p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* 页脚 */
footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 0.95rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  nav {
    flex-wrap: nowrap;
    overflow-x: visible;
  }

  nav a {
    font-size: 0.85rem;
    padding: 0.5rem 0.6rem;
  }

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

  .intro-section,
  .list-page,
  .detail-page article {
    padding: 1.5rem;
  }

  .list-card,
  .rank-card,
  .latest-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-card .number,
  .rank-card .rank-number {
    margin-bottom: 0.5rem;
  }

  .topic-items {
    grid-template-columns: 1fr;
  }

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

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

  header {
    padding: 1rem 0;
  }

  .logo {
    font-size: 1.3rem;
  }

  nav a {
    font-size: 0.8rem;
    padding: 0.4rem 0.4rem;
  }

  h1 {
    font-size: 1.4rem;
  }

  .intro-section,
  .list-page,
  .detail-page article {
    padding: 1rem;
  }
}
