:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-light: #777777;
  --border-color: #e0e0e0;
  --hover-color: #34495e;
}

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

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

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-color);
}

header {
  background: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ecf0f1;
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

nav ul {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

nav a {
  display: block;
  padding: 1rem 0.5rem;
  color: #ecf0f1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.3s ease;
}

nav a:hover {
  background: var(--hover-color);
  color: #fff;
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  min-height: calc(100vh - 200px);
}

.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.hero h1 {
  font-size: 2rem;
  line-height: 1.4;
  font-weight: 600;
  margin: 0;
}

section {
  background: var(--card-bg);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

section h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  border-bottom: 3px solid var(--secondary-color);
  padding-bottom: 0.5rem;
}

section h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.intro p {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text-light);
  text-align: justify;
}

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

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

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

.video-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

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

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

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

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

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

.more-link a {
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--secondary-color);
  color: white;
  border-radius: 4px;
  transition: background 0.3s ease;
  display: inline-block;
}

.more-link a:hover {
  background: var(--accent-color);
}

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

.topic-item {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}

.topic-item:hover {
  transform: scale(1.05);
}

.topic-item a {
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
}

.list-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.page-intro {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text-light);
  margin-bottom: 2rem;
  text-align: justify;
}

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

.video-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--secondary-color);
  padding: 1.5rem;
  border-radius: 4px;
  transition: border-left-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.video-item:hover {
  border-left-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

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

.video-item .date-tag {
  display: inline-block;
  background: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.video-item h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.video-item .desc {
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.8;
  margin-top: 0.5rem;
}

.detail-page h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--secondary-color);
  padding-bottom: 0.5rem;
}

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

.info-row {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 1rem;
}

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

.info-row strong {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

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

.detail-oneline h2,
.detail-summary h2,
.detail-review h2 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  border-left: 4px solid var(--secondary-color);
  padding-left: 1rem;
}

.detail-oneline p,
.detail-summary p,
.detail-review p {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text-color);
  text-align: justify;
}

.related {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
}

.related h2 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

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

.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.related-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

footer {
  background: var(--primary-color);
  color: #ecf0f1;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

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

@media (max-width: 768px) {
  nav a {
    padding: 0.8rem 0.3rem;
    font-size: 0.85rem;
  }

  .logo {
    font-size: 1.2rem;
    padding: 0.8rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

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

  section {
    padding: 1.5rem 1rem;
  }

  section h1 {
    font-size: 1.5rem;
  }

  section h2 {
    font-size: 1.2rem;
  }

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

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

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

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

  .video-item .rank {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

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

  .logo {
    font-size: 1rem;
    padding: 0.6rem;
  }

  main {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }

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

  section h1 {
    font-size: 1.3rem;
  }

  .video-card,
  .related-card {
    padding: 1rem;
  }
}
