:root {
  --primary-color: #2c5aa0;
  --secondary-color: #1a365d;
  --accent-color: #4a90e2;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f5f7fa;
  --card-bg: #ffffff;
  --border-color: #e1e8ed;
  --hover-color: #3d7ac7;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

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

header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.logo a {
  color: white;
  text-decoration: none;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

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

nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 8px 16px;
  display: block;
  border-radius: 4px;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav a:hover,
nav li.active a {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
}

h1 {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 24px;
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-color);
}

h3 {
  font-size: 1.2rem;
  color: var(--text-color);
  margin: 16px 0 8px;
}

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

h3 a:hover {
  color: var(--primary-color);
}

.site-intro,
.page-intro,
.topic-intro {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  line-height: 1.8;
}

.topic-intro p {
  margin-bottom: 16px;
}

.site-intro a,
.page-intro a {
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-color);
  transition: color 0.3s ease;
}

.site-intro a:hover,
.page-intro a:hover {
  color: var(--hover-color);
}

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

.video-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.video-meta {
  display: flex;
  gap: 12px;
  margin: 8px 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.video-meta span {
  padding: 2px 8px;
  background: var(--bg-color);
  border-radius: 4px;
}

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

.entrance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.entrance-card {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
  color: white;
  padding: 32px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.entrance-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.entrance-card h3 a {
  color: white;
  font-size: 1.4rem;
}

.entrance-card p {
  margin: 12px 0 0;
  opacity: 0.95;
  line-height: 1.7;
}

.latest-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.latest-item {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.latest-item:hover {
  box-shadow: var(--shadow-hover);
}

.latest-item h3 {
  margin: 0;
  flex: 0 0 auto;
}

.latest-year {
  color: var(--accent-color);
  font-weight: bold;
  flex: 0 0 auto;
}

.latest-desc {
  flex: 1 1 100%;
  color: var(--text-light);
  margin: 8px 0 0;
}

.detail-page .video-info {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 24px 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.info-item {
  display: flex;
  gap: 8px;
}

.info-item .label {
  font-weight: bold;
  color: var(--primary-color);
  flex: 0 0 auto;
}

.info-item .value {
  color: var(--text-color);
  flex: 1 1 auto;
}

.one-line-section,
.summary-section,
.review-section,
.related-section {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin: 24px 0;
}

.one-line-text {
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: 500;
  line-height: 1.8;
  padding: 16px;
  background: var(--bg-color);
  border-left: 4px solid var(--accent-color);
  border-radius: 4px;
}

.summary-text,
.review-text {
  line-height: 1.9;
  color: var(--text-color);
  white-space: pre-wrap;
}

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

.related-item {
  padding: 16px;
  background: var(--bg-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.related-item:hover {
  background: #e8f0fe;
  transform: translateY(-2px);
}

.related-item h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.related-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 8px 0;
  line-height: 1.6;
}

.related-meta {
  font-size: 0.85rem;
  color: var(--accent-color);
}

.decade-section {
  margin: 32px 0;
}

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

.video-item {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.video-item:hover {
  box-shadow: var(--shadow-hover);
}

.item-meta {
  display: flex;
  gap: 12px;
  margin: 8px 0;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.item-meta span {
  padding: 2px 10px;
  background: var(--bg-color);
  border-radius: 4px;
  color: var(--text-light);
}

.item-desc {
  color: var(--text-light);
  margin: 12px 0 0;
  line-height: 1.7;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 0;
}

.ranking-item {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.ranking-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateX(4px);
}

.rank-number {
  flex: 0 0 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
  border-radius: 8px;
}

.rank-content {
  flex: 1 1 auto;
}

.rank-content h3 {
  margin: 0 0 8px;
}

.rank-meta {
  display: flex;
  gap: 12px;
  margin: 8px 0;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.rank-meta span {
  padding: 2px 10px;
  background: var(--bg-color);
  border-radius: 4px;
  color: var(--text-light);
}

.rank-review {
  color: var(--text-color);
  line-height: 1.8;
  margin: 12px 0 0;
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 24px 0;
}

.topic-item {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.topic-item:hover {
  box-shadow: var(--shadow-hover);
}

.topic-item h3 {
  margin: 0 0 8px;
}

.topic-meta {
  display: flex;
  gap: 12px;
  margin: 8px 0;
  font-size: 0.9rem;
}

.topic-meta span {
  padding: 2px 10px;
  background: var(--bg-color);
  border-radius: 4px;
  color: var(--text-light);
}

.topic-desc {
  color: var(--text-color);
  line-height: 1.8;
  margin: 12px 0;
}

.topic-reason {
  color: var(--text-light);
  line-height: 1.8;
  margin: 12px 0 0;
  padding: 12px;
  background: var(--bg-color);
  border-left: 3px solid var(--accent-color);
  border-radius: 4px;
  font-style: italic;
}

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

.latest-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.latest-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.latest-date {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-color);
  color: white;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.latest-card h3 {
  margin: 8px 0;
}

.latest-card .latest-meta {
  display: flex;
  gap: 12px;
  margin: 8px 0;
  font-size: 0.9rem;
}

.latest-card .latest-meta span {
  padding: 2px 8px;
  background: var(--bg-color);
  border-radius: 4px;
  color: var(--text-light);
}

.latest-brief {
  color: var(--text-light);
  line-height: 1.7;
  margin: 12px 0 0;
}

footer {
  background: var(--secondary-color);
  color: rgba(255, 255, 255, 0.9);
  padding: 32px 0;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: white;
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 16px 0 0;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--hover-color);
  transform: translateY(-4px);
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }

  .logo {
    font-size: 1.3rem;
  }

  nav ul {
    width: 100%;
    font-size: 0.85rem;
    gap: 4px;
  }

  nav a {
    padding: 8px 4px;
    font-size: 0.85rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

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

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

  .ranking-item {
    flex-direction: column;
    gap: 12px;
  }

  .rank-number {
    width: 100%;
    height: 50px;
  }

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

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  nav ul {
    font-size: 0.75rem;
  }

  nav a {
    padding: 6px 2px;
  }

  h1 {
    font-size: 1.3rem;
  }

  .site-intro,
  .page-intro,
  .topic-intro {
    padding: 16px;
  }

  .video-card,
  .video-item,
  .ranking-item,
  .topic-item,
  .latest-card {
    padding: 16px;
  }
}
