
/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

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

a:hover {
  color: #764ba2;
}

/* Header */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
  transition: opacity 0.3s;
}

.logo:hover {
  opacity: 0.9;
}

nav ul {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.3s;
  white-space: nowrap;
}

nav a:hover {
  background: rgba(255,255,255,0.2);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 20px;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 2rem 0;
  background: white;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hero h1 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 1rem;
}

/* Sections */
section {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
  border-bottom: 2px solid #667eea;
  padding-bottom: 0.5rem;
}

.site-intro p {
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

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

.video-card {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #e0e0e0;
}

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

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

.video-card h3 a {
  color: #333;
}

.video-card h3 a:hover {
  color: #667eea;
}

.video-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.video-meta span {
  font-size: 0.85rem;
  padding: 0.2rem 0.6rem;
  background: #667eea;
  color: white;
  border-radius: 4px;
}

.one-line {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Link Cards */
.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.link-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 8px;
  transition: transform 0.3s;
}

.link-card:hover {
  transform: scale(1.05);
}

.link-card h3 a {
  color: white;
  font-size: 1.3rem;
}

.link-card p {
  margin-top: 0.5rem;
  color: rgba(255,255,255,0.9);
}

/* More Link */
.more-link {
  text-align: center;
  margin-top: 1.5rem;
}

.more-link a {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: #667eea;
  color: white;
  border-radius: 4px;
  transition: background 0.3s;
}

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

/* Detail Page */
.detail-page h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #333;
}

.basic-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.8rem;
  line-height: 1.8;
}

.basic-info dt {
  font-weight: bold;
  color: #667eea;
}

.basic-info dd {
  color: #555;
}

.one-line-section .highlight {
  font-size: 1.1rem;
  color: #764ba2;
  font-weight: 500;
  padding: 1rem;
  background: #f0f0f0;
  border-left: 4px solid #667eea;
  border-radius: 4px;
}

.summary-content p,
.review-content p {
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

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

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

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

.related-item h4 {
  margin-bottom: 0.5rem;
}

.related-item p {
  font-size: 0.9rem;
  color: #666;
}

/* List Pages */
.list-page h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #333;
}

.page-intro {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-intro p {
  line-height: 1.8;
  color: #555;
  text-align: justify;
  margin-bottom: 1rem;
}

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

.topic-intro {
  background: linear-gradient(to right, #f9f9f9, #fff);
  border-left: 4px solid #667eea;
}

/* Daquan Page */
.year-group {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.group-title {
  font-size: 1.5rem;
  color: #667eea;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #667eea;
}

.group-items {
  display: grid;
  gap: 1.5rem;
}

.list-item {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: transform 0.3s;
}

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

.list-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.list-item .item-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.list-item .item-meta span {
  font-size: 0.85rem;
  padding: 0.2rem 0.6rem;
  background: #667eea;
  color: white;
  border-radius: 4px;
}

.list-item p {
  color: #666;
  line-height: 1.6;
}

/* Top Page */
.top-list {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.top-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: transform 0.3s;
}

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

.rank-number {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
  min-width: 60px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-content {
  flex: 1;
}

.top-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.top-content .recommendation {
  color: #555;
  line-height: 1.7;
  margin-top: 0.8rem;
}

/* Topic Page */
.topic-list {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.topic-item {
  padding: 1.5rem;
  margin-bottom: 2rem;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.topic-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.topic-description {
  margin-top: 1rem;
}

.topic-description p {
  color: #555;
  line-height: 1.8;
  margin-bottom: 0.8rem;
  text-align: justify;
}

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

/* Latest Page */
.latest-list {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.latest-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: transform 0.3s;
}

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

.latest-date {
  font-size: 0.9rem;
  color: #667eea;
  font-weight: 500;
  min-width: 100px;
  padding: 0.5rem;
  background: white;
  border-radius: 4px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.latest-content {
  flex: 1;
}

.latest-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.latest-content p {
  color: #666;
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* Footer */
footer {
  background: #333;
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-content p {
  margin-bottom: 1rem;
}

.footer-content nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-content nav a {
  color: white;
  transition: opacity 0.3s;
}

.footer-content nav a:hover {
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 0.5rem;
  }

  nav ul {
    width: 100%;
    justify-content: space-between;
    gap: 0;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  nav li {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }

  nav a {
    padding: 0.5rem 0.3rem;
    font-size: 0.85rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .hero h1 {
    font-size: 1.5rem;
  }

  .detail-page h1,
  .list-page h1 {
    font-size: 1.5rem;
  }

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

  .top-item {
    flex-direction: column;
    gap: 1rem;
  }

  .rank-number {
    min-width: auto;
  }

  .latest-item {
    flex-direction: column;
    gap: 0.8rem;
  }

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

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

  section {
    padding: 1.5rem 1rem;
  }

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