/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.8;
  font-size: 16px;
}

a {
  color: #1a73e8;
  text-decoration: none;
  transition: color 0.3s;
}

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

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

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

.page-header h1 {
  font-size: 28px;
  margin-bottom: 15px;
  line-height: 1.5;
}

.page-header .logo {
  font-size: 48px;
  font-weight: bold;
  margin-top: 10px;
  letter-spacing: 2px;
}

/* 导航栏 */
nav {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

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

nav a {
  display: block;
  padding: 15px 10px;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav a:hover {
  background: #f0f0f0;
  text-decoration: none;
}

/* 移动端导航 */
@media (max-width: 768px) {
  nav ul {
    padding: 0 10px;
  }

  nav li {
    font-size: 13px;
  }

  nav a {
    padding: 12px 5px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .page-header .logo {
    font-size: 32px;
  }
}

/* 站点介绍 */
.site-intro {
  background: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.site-intro p {
  font-size: 16px;
  line-height: 2;
}

/* 章节 */
section {
  background: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

.intro-text p {
  line-height: 2;
  margin-bottom: 15px;
}

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

.video-card {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.video-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

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

.video-card .intro {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
}

/* 视频列表 */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.video-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  transition: background 0.3s;
}

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

.video-item .rank {
  font-size: 24px;
  font-weight: bold;
  color: #667eea;
  margin-right: 20px;
  min-width: 40px;
  text-align: center;
}

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

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

/* 全部资源列表 */
.video-item-full {
  display: flex;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.video-item-full .number {
  font-size: 24px;
  font-weight: bold;
  color: #999;
  min-width: 60px;
}

.video-item-full .content h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.video-item-full .meta,
.video-item-full .tags {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.video-item-full .oneline {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
}

/* 排行榜 */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rank-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.rank-num {
  font-size: 32px;
  font-weight: bold;
  min-width: 60px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-num.rank-top {
  color: #ff6b6b;
}

.rank-num.rank-normal {
  color: #999;
}

.rank-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.rank-content .meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.rank-content .summary {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
}

/* 专题分组 */
.topic-group {
  margin-bottom: 40px;
}

.topic-group h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #667eea;
}

/* 最新列表 */
.latest-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.latest-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.date-badge {
  font-size: 24px;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 10px 20px;
  border-radius: 8px;
  min-width: 80px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.latest-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.latest-content .meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.latest-content .desc {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
}

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

.video-detail header h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.video-detail header .subtitle {
  font-size: 16px;
  opacity: 0.9;
}

.basic-info dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 15px;
  line-height: 1.8;
}

.basic-info dt {
  font-weight: bold;
  color: #666;
}

.basic-info dd {
  color: #333;
}

.highlight .oneline {
  font-size: 18px;
  color: #667eea;
  font-weight: 500;
  line-height: 1.8;
}

.summary p,
.review p {
  font-size: 16px;
  line-height: 2;
  text-indent: 2em;
}

/* 更多链接 */
.more-link {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.more-link a {
  font-size: 16px;
  color: #667eea;
  font-weight: 500;
}

.more-link a:hover {
  color: #764ba2;
}

/* 页脚 */
footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
}

footer p {
  font-size: 14px;
  opacity: 0.8;
}

/* UI 变体样式 */
body.ui-style-0 { --primary-color: #667eea; }
body.ui-style-1 { --primary-color: #f093fb; }
body.ui-style-2 { --primary-color: #4facfe; }
body.ui-style-3 { --primary-color: #43e97b; }
body.ui-style-4 { --primary-color: #fa709a; }
body.ui-style-5 { --primary-color: #30cfd0; }
body.ui-style-6 { --primary-color: #a8edea; }
body.ui-style-7 { --primary-color: #ff9a9e; }
body.ui-style-8 { --primary-color: #fecfef; }
body.ui-style-9 { --primary-color: #ffecd2; }
body.ui-style-10 { --primary-color: #fcb69f; }
body.ui-style-11 { --primary-color: #ff6e7f; }
body.ui-style-12 { --primary-color: #bfe9ff; }
body.ui-style-13 { --primary-color: #fddb92; }
body.ui-style-14 { --primary-color: #d299c2; }
body.ui-style-15 { --primary-color: #89f7fe; }

/* 响应式 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  section {
    padding: 20px 15px;
  }

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

  .video-detail header h1 {
    font-size: 24px;
  }

  .basic-info dl {
    grid-template-columns: 80px 1fr;
    gap: 10px;
  }
}
