
/* Base Styles */
* {
  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;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Header */
header {
  background: #1a1a1a;
  padding: 0.8rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

.logo:hover {
  color: #4a9eff;
}

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

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

nav ul li a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s;
  border-radius: 4px;
}

nav ul li a:hover {
  color: #4a9eff;
  background: rgba(74, 158, 255, 0.1);
}

/* Main Content */
main {
  flex: 1;
  padding: 2rem 0;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: #2a2a2a;
  border-left: 4px solid #4a9eff;
  padding-left: 1rem;
}

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

h3 a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.3s;
}

h3 a:hover {
  color: #4a9eff;
}

/* Sections */
section {
  margin-bottom: 2.5rem;
}

.intro, .site-intro {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.site-intro a {
  color: #4a9eff;
  text-decoration: none;
  border-bottom: 1px solid #4a9eff;
}

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

.topic-intro {
  line-height: 1.9;
}

.topic-intro p {
  margin-bottom: 1rem;
}

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

.video-card {
  background: #fff;
  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 4px 16px rgba(0,0,0,0.15);
}

.video-card .meta {
  color: #666;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.video-card .desc {
  color: #555;
  line-height: 1.7;
  margin-top: 0.8rem;
}

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

.video-item {
  background: #fff;
  padding: 1.2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s;
}

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

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

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

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

.entrance-card h3 a {
  font-size: 1.3rem;
  color: #4a9eff;
}

.entrance-card p {
  margin-top: 1rem;
  color: #666;
  line-height: 1.8;
}

/* Detail Page */
.detail-page .basic-info ul {
  list-style: none;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detail-page .basic-info li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
}

.detail-page .basic-info li:last-child {
  border-bottom: none;
}

.detail-page .highlight,
.detail-page .summary,
.detail-page .review {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detail-page .highlight p,
.detail-page .summary p,
.detail-page .review p {
  line-height: 1.9;
  color: #444;
}

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

.ranked-item {
  display: flex;
  gap: 1.5rem;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s;
}

.ranked-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.rank-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 8px;
}

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

.ranked-item .tags {
  color: #888;
  font-size: 0.9rem;
  margin: 0.3rem 0;
}

.ranked-item .recommendation {
  margin-top: 0.8rem;
  line-height: 1.8;
  color: #555;
}

/* Topic List */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.topic-item {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.topic-analysis {
  margin-top: 1rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 6px;
}

.topic-analysis h4 {
  font-size: 1rem;
  color: #4a9eff;
  margin-bottom: 0.8rem;
}

.topic-analysis p {
  line-height: 1.8;
  color: #555;
  margin-bottom: 0.8rem;
}

.topic-analysis .reason {
  font-style: italic;
  color: #666;
}

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

.latest-item {
  display: flex;
  gap: 1rem;
  background: #fff;
  padding: 1.2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s;
}

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

.date-tag {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  background: #4a9eff;
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  min-width: 100px;
}

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

.latest-item .brief {
  margin-top: 0.5rem;
  color: #666;
  line-height: 1.7;
}

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

.year-group h2 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

/* Footer */
footer {
  background: #1a1a1a;
  color: #aaa;
  padding: 2rem;
  margin-top: auto;
}

footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

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

footer nav a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s;
}

footer nav a:hover {
  color: #4a9eff;
}

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

  header {
    padding: 0.6rem 1rem;
  }

  header .container {
    flex-direction: row;
    gap: 1rem;
  }

  .logo {
    font-size: 1.2rem;
  }

  nav ul {
    gap: 0;
    justify-content: space-between;
  }

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

  nav ul li a {
    padding: 0.4rem 0.3rem;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

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

  .entrance-cards {
    grid-template-columns: 1fr;
  }

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

  .rank-number {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

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

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

@media (max-width: 480px) {
  nav ul li a {
    font-size: 0.75rem;
    padding: 0.4rem 0.2rem;
  }

  h1 {
    font-size: 1.3rem;
  }

  .intro, .site-intro {
    padding: 1rem;
  }

  footer nav {
    gap: 0.8rem;
  }
}
