/* 全局样式 */
:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --text-color: #333;
  --text-light: #666;
  --border-color: #ddd;
}

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

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

/* 头部 */
header {
  background: var(--secondary-color);
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.main-nav {
  background: var(--secondary-color);
  border-top: 1px solid rgba(255,255,255,0.1);
}

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

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

.main-nav a {
  display: block;
  padding: 1rem 0.75rem;
  text-align: center;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
  transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
  background: #34495e;
}

/* 主内容区 */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* 首页专用 */
.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 12px rgba(0,0,0,0.15);
}

.hero h1 {
  font-size: 2rem;
  line-height: 1.4;
  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.08);
}

section h2 {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--primary-color);
  font-size: 1.5rem;
}

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

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

.video-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  transition: all 0.3s;
  position: relative;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  border-color: var(--primary-color);
}

.video-card .rank {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--accent-color);
  color: white;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 8px 0 8px 0;
}

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

.video-card h3 a {
  color: inherit;
  text-decoration: none;
}

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

.video-card .meta {
  font-size: 0.9rem;
  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: 2rem;
  font-size: 1.05rem;
}

.more-link a {
  color: var(--primary-color);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 6px;
  display: inline-block;
  transition: all 0.3s;
}

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

/* 列表页 */
.list-page h1 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 2rem;
}

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

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

/* 详情页 */
.detail-page {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

.detail-page section {
  margin-bottom: 2rem;
  padding: 0;
  box-shadow: none;
}

.detail-page section h2 {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.basic-info ul {
  list-style: none;
}

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

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

.basic-info strong {
  color: var(--secondary-color);
  display: inline-block;
  min-width: 80px;
}

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

.related .video-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* 底部 */
footer {
  background: var(--secondary-color);
  color: white;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

/* 链接 */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

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

/* 响应式 */
@media (max-width: 768px) {
  .logo {
    font-size: 1.4rem;
    padding: 1rem;
  }

  .main-nav a {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

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

  section {
    padding: 1.5rem 1rem;
  }

  section h2 {
    font-size: 1.3rem;
  }

  .video-grid,
  .video-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .detail-page {
    padding: 1.5rem 1rem;
  }

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

@media (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
  }

  .main-nav a {
    padding: 0.6rem 0.3rem;
    font-size: 0.75rem;
  }

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

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

/* UI 风格变体 */
.ui-style-0 { --primary-color: #3498db; --accent-color: #e74c3c; }
.ui-style-1 { --primary-color: #2ecc71; --accent-color: #f39c12; }
.ui-style-2 { --primary-color: #9b59b6; --accent-color: #e67e22; }
.ui-style-3 { --primary-color: #1abc9c; --accent-color: #e74c3c; }
.ui-style-4 { --primary-color: #34495e; --accent-color: #3498db; }
.ui-style-5 { --primary-color: #16a085; --accent-color: #f39c12; }
.ui-style-6 { --primary-color: #27ae60; --accent-color: #c0392b; }
.ui-style-7 { --primary-color: #2980b9; --accent-color: #e67e22; }
.ui-style-8 { --primary-color: #8e44ad; --accent-color: #d35400; }
.ui-style-9 { --primary-color: #2c3e50; --accent-color: #27ae60; }
.ui-style-10 { --primary-color: #f39c12; --accent-color: #2c3e50; }
.ui-style-11 { --primary-color: #d35400; --accent-color: #16a085; }
.ui-style-12 { --primary-color: #c0392b; --accent-color: #2980b9; }
.ui-style-13 { --primary-color: #16a085; --accent-color: #e74c3c; }
.ui-style-14 { --primary-color: #27ae60; --accent-color: #8e44ad; }
.ui-style-15 { --primary-color: #2980b9; --accent-color: #f39c12; }
