
/* 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: #f5f5f5;
}

a { color: #3498db; text-decoration: none; transition: color 0.3s; }
a:hover { color: #2980b9; }

/* Header */
header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logo a {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  display: inline-block;
  margin-bottom: 1rem;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

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

nav a {
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav a:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

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

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  border-bottom: 3px solid #3498db;
  padding-bottom: 0.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #34495e;
}

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

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

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

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

.video-card h3 { margin-bottom: 0.5rem; }
.video-card .meta { color: #7f8c8d; font-size: 0.9rem; margin-bottom: 0.5rem; }
.video-card .desc { color: #555; line-height: 1.6; }

/* Video List */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.video-item, .list-item {
  padding: 1rem;
  border-left: 4px solid #3498db;
  background: #f8f9fa;
  border-radius: 4px;
}

.video-item h3, .list-item h3 { margin-bottom: 0.3rem; }
.video-item .meta, .list-item .meta { color: #7f8c8d; font-size: 0.9rem; margin-bottom: 0.5rem; }

/* Detail Page */
.video-detail {
  background: white;
  padding: 2rem;
  border-radius: 8px;
}

.video-info dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem 1rem;
}

.video-info dt {
  font-weight: bold;
  color: #555;
}

.video-info dd {
  color: #333;
}

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

.related-card {
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

/* Top List */
.top-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.top-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.top-item .rank {
  font-size: 2rem;
  font-weight: bold;
  color: #3498db;
  min-width: 50px;
  text-align: center;
}

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

.top-item h3 {
  margin-bottom: 0.5rem;
}

.top-item .meta {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.top-item .recommend {
  color: #555;
  line-height: 1.6;
}

/* Topic Page */
.topic-intro {
  background: #e8f4f8;
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.topic-item {
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.topic-item h3 {
  margin-bottom: 0.5rem;
}

.topic-item .meta {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.topic-desc {
  line-height: 1.8;
  color: #555;
}

.topic-desc .review-note {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-left: 3px solid #3498db;
}

/* Latest Page */
.latest-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.latest-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 4px solid #27ae60;
}

.latest-item .date {
  font-size: 1.2rem;
  font-weight: bold;
  color: #27ae60;
  min-width: 80px;
  text-align: center;
}

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

.latest-item h3 {
  margin-bottom: 0.3rem;
}

.latest-item .meta {
  color: #7f8c8d;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.latest-item .brief {
  color: #555;
}

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

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

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

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

.link-card p {
  margin-top: 0.5rem;
  opacity: 0.9;
}

/* Year Group */
.year-group {
  margin-bottom: 2rem;
}

.year-group h2 {
  background: #3498db;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Footer */
footer {
  background: #2c3e50;
  color: white;
  padding: 2rem;
  text-align: center;
  margin-top: 3rem;
}

footer nav {
  margin-bottom: 1rem;
}

footer nav a {
  color: white;
  margin: 0 1rem;
  padding: 0.5rem 1rem;
}

footer nav a:hover {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  .logo a {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }

  nav ul {
    gap: 0.25rem;
  }

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

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

  main {
    padding: 0 0.5rem;
  }

  section {
    padding: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

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

  .top-item {
    flex-direction: column;
    text-align: center;
  }

  .latest-item {
    flex-direction: column;
  }

  .video-info dl {
    grid-template-columns: 100px 1fr;
    font-size: 0.9rem;
  }

  footer nav a {
    display: block;
    margin: 0.5rem 0;
  }
}
