
/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

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

/* Header */
header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: #fff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-align: center;
  letter-spacing: 2px;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

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

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

nav a:hover {
  background: rgba(74, 158, 255, 0.2);
  color: #4a9eff;
  transform: translateY(-2px);
}

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

h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #4a9eff;
}

h2 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  color: #2d2d2d;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

/* Sections */
section {
  background: #fff;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.intro, .site-intro, .topic-intro {
  line-height: 1.8;
  font-size: 1rem;
}

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

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

.intro a:hover, .site-intro a:hover {
  border-bottom-color: #4a9eff;
}

/* Video Cards */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 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 ease;
  border: 1px solid #e0e0e0;
}

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

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

.video-card h3 a:hover {
  color: #4a9eff;
}

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

.video-desc, .video-brief {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 0.5rem;
}

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

.video-item {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  border-left: 4px solid #4a9eff;
  transition: all 0.3s ease;
}

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

.video-item h3 a {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 1.1rem;
}

.video-item h3 a:hover {
  color: #4a9eff;
}

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

.entrance-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
}

.entrance-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.entrance-card h3 a {
  color: #fff;
  text-decoration: none;
  font-size: 1.3rem;
}

.entrance-card p {
  margin-top: 1rem;
  opacity: 0.95;
  line-height: 1.6;
}

/* Detail Page */
.detail-page article {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.basic-info .info-list {
  list-style: none;
  padding-left: 0;
}

.basic-info .info-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

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

.highlight {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Ranking Page */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

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

.rank-number {
  font-size: 2rem;
  font-weight: bold;
  color: #4a9eff;
  min-width: 60px;
  text-align: center;
  line-height: 1;
  padding-top: 0.5rem;
}

.ranking-item:nth-child(1) .rank-number { color: #ffd700; }
.ranking-item:nth-child(2) .rank-number { color: #c0c0c0; }
.ranking-item:nth-child(3) .rank-number { color: #cd7f32; }

.ranking-content {
  flex: 1;
}

.ranking-content h3 a {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 1.2rem;
}

.ranking-content h3 a:hover {
  color: #4a9eff;
}

.video-recommend {
  margin-top: 0.8rem;
  line-height: 1.8;
  color: #555;
}

/* Topic Page */
.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);
  border-left: 4px solid #667eea;
}

.topic-item h3 a {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 1.3rem;
}

.topic-item h3 a:hover {
  color: #667eea;
}

.topic-highlight {
  background: #f8f9ff;
  padding: 1rem;
  border-left: 3px solid #667eea;
  margin: 1rem 0;
  font-style: italic;
  color: #444;
}

.topic-analysis {
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

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

.latest-item {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  transition: all 0.3s ease;
}

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

.latest-date {
  background: #4a9eff;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  white-space: nowrap;
  min-width: 110px;
  text-align: center;
  font-weight: 500;
}

.latest-content {
  flex: 1;
}

.latest-content h3 a {
  color: #1a1a1a;
  text-decoration: none;
  font-size: 1.1rem;
}

.latest-content h3 a:hover {
  color: #4a9eff;
}

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

.year-group h2 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

/* Footer */
footer {
  background: #2d2d2d;
  color: #fff;
  padding: 2rem 0;
  margin-top: 3rem;
}

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

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

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

footer p {
  text-align: center;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }

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

  nav ul {
    flex-wrap: nowrap;
    overflow-x: hidden;
  }

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

  nav a {
    font-size: 0.85rem;
    padding: 0.4rem 0.2rem;
  }

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

  .rank-number {
    min-width: auto;
  }

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

  .latest-date {
    min-width: auto;
  }

  section {
    padding: 1.5rem;
  }

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

/* UI Style Variations */
body.ui-style-0 { --primary-color: #4a9eff; }
body.ui-style-1 { --primary-color: #667eea; }
body.ui-style-2 { --primary-color: #06b6d4; }
body.ui-style-3 { --primary-color: #f59e0b; }
body.ui-style-4 { --primary-color: #10b981; }
body.ui-style-5 { --primary-color: #8b5cf6; }
body.ui-style-6 { --primary-color: #ec4899; }
body.ui-style-7 { --primary-color: #6366f1; }
body.ui-style-8 { --primary-color: #14b8a6; }
body.ui-style-9 { --primary-color: #3b82f6; }
body.ui-style-10 { --primary-color: #a855f7; }
body.ui-style-11 { --primary-color: #22c55e; }
body.ui-style-12 { --primary-color: #0ea5e9; }
body.ui-style-13 { --primary-color: #f43f5e; }
body.ui-style-14 { --primary-color: #84cc16; }
body.ui-style-15 { --primary-color: #ef4444; }
