:root {
  --primary-color: #1a73e8;
  --secondary-color: #34a853;
  --text-color: #333;
  --bg-color: #f5f5f5;
  --card-bg: #fff;
  --border-color: #e0e0e0;
  --hover-bg: #f8f9fa;
}

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

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #1557b0;
  text-decoration: underline;
}

ul {
  list-style: none;
}

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

.logo {
  padding: 15px 20px;
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.nav-bar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  padding: 0;
  border-bottom: 2px solid var(--border-color);
}

.nav-bar a {
  flex: 1 1 0;
  min-width: 0;
  padding: 15px 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  border-right: 1px solid var(--border-color);
  transition: background 0.2s;
}

.nav-bar a:last-child {
  border-right: none;
}

.nav-bar a:hover {
  background: var(--hover-bg);
  text-decoration: none;
}

@media (min-width: 768px) {
  .nav-bar a {
    font-size: 16px;
    padding: 18px 20px;
  }
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  text-align: center;
}

.hero h1 {
  font-size: 28px;
  line-height: 1.4;
  margin: 0;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 36px;
  }
}

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

section h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
}

.site-intro p {
  margin-bottom: 15px;
  line-height: 1.8;
}

.section-desc {
  margin-bottom: 20px;
  color: #666;
}

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

.video-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.video-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.video-card .meta {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
}

.video-card .desc {
  color: #555;
  font-size: 14px;
  line-height: 1.5;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.video-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--hover-bg);
  transition: background 0.2s;
}

.video-item:hover {
  background: #eef2f7;
}

.video-item .rank {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 40px;
}

.video-item .info h3 {
  font-size: 18px;
  margin-bottom: 5px;
}

.video-item .info p {
  color: #666;
  font-size: 14px;
}

.detail-page h1 {
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.basic-info ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.basic-info li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.basic-info strong {
  color: var(--primary-color);
  margin-right: 10px;
}

.one-line, .summary, .review {
  margin-top: 20px;
}

.one-line p, .summary p, .review p {
  line-height: 1.8;
  color: #444;
}

.recommendations {
  margin-top: 30px;
}

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

.rec-item {
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--hover-bg);
  transition: background 0.2s;
}

.rec-item:hover {
  background: #eef2f7;
}

.rec-item h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.rec-item p {
  font-size: 14px;
  color: #666;
}

.list-page h1 {
  font-size: 32px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.intro {
  margin-bottom: 25px;
  line-height: 1.8;
  color: #666;
}

.full-list, .ranked-list, .latest-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.list-item, .ranked-item, .latest-item {
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  transition: background 0.2s;
}

.list-item:hover, .ranked-item:hover, .latest-item:hover {
  background: var(--hover-bg);
}

.list-item h3, .ranked-item h3, .latest-item h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.list-item .meta, .ranked-item .meta, .latest-item .meta {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
}

.list-item .desc, .ranked-item .desc, .latest-item .desc {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

.ranked-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.rank-badge {
  display: inline-block;
  min-width: 50px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
}

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

.latest-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.date-badge {
  display: inline-block;
  padding: 5px 12px;
  background: var(--secondary-color);
  color: white;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
}

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

.topic-group {
  margin-bottom: 30px;
}

.topic-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.topic-item {
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--hover-bg);
  transition: background 0.2s;
}

.topic-item:hover {
  background: #eef2f7;
}

.topic-item h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.topic-item .meta {
  color: #666;
  font-size: 14px;
  margin-bottom: 8px;
}

.topic-item .desc {
  color: #555;
  font-size: 14px;
  line-height: 1.5;
}

footer {
  background: var(--card-bg);
  padding: 20px;
  text-align: center;
  margin-top: 40px;
  border-top: 2px solid var(--border-color);
}

footer p {
  color: #666;
  font-size: 14px;
}

@media (max-width: 767px) {
  main {
    padding: 15px;
  }

  section {
    padding: 20px 15px;
  }

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

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

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