:root {
  --primary-color: #2c5f7c;
  --secondary-color: #4a90b5;
  --accent-color: #e8926f;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #ddd;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --spacing: 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* Header */
header {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem var(--spacing);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.3s;
  white-space: nowrap;
}

nav a:hover {
  color: var(--secondary-color);
}

/* Main content */
main {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--primary-color);
}

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

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

.hero {
  text-align: center;
  padding: 2rem 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.hero h1 {
  color: white;
  margin: 0;
}

.site-intro, .intro {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.site-intro p, .intro p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-light);
}

.site-intro a, .intro a {
  color: var(--secondary-color);
  text-decoration: underline;
}

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

.video-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.video-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.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 h3 a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

.video-card h3 a:hover {
  color: var(--secondary-color);
}

.video-card .meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.video-card .tags {
  color: var(--secondary-color);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.video-card .desc {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.video-card .rank {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent-color);
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
}

.video-card .date {
  display: block;
  color: var(--secondary-color);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

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

.entry-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s;
}

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

.entry-card h3 a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.3rem;
}

.entry-card p {
  color: var(--text-light);
  margin-top: 1rem;
}

/* Detail page */
.video-detail {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.video-info dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  line-height: 1.8;
}

.video-info dt {
  font-weight: bold;
  color: var(--primary-color);
}

.video-info dd {
  color: var(--text-light);
}

.video-highlight {
  background: linear-gradient(135deg, rgba(44, 95, 124, 0.1), rgba(74, 144, 181, 0.1));
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--secondary-color);
}

.video-highlight p {
  font-size: 1.1rem;
  color: var(--text-color);
  font-weight: 500;
}

.video-summary p, .video-review p {
  line-height: 1.8;
  color: var(--text-light);
}

/* Year groups */
.year-group h2 {
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

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

/* Topic cards */
.topic-card {
  border-left: 4px solid var(--accent-color);
}

.topic-card .desc {
  font-size: 1rem;
  line-height: 1.7;
}

/* Latest cards */
.latest-card {
  border-left: 4px solid var(--secondary-color);
}

/* Footer */
footer {
  background: var(--card-bg);
  padding: 2rem 0;
  margin-top: 3rem;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

footer nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

footer nav a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}

footer nav a:hover {
  color: var(--secondary-color);
}

footer p {
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

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

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

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

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

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

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

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

  .video-detail {
    padding: 1.5rem;
  }
}

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

  .logo {
    font-size: 1.2rem;
  }

  .container {
    padding: 0 0.75rem;
  }
}
