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

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

.ui-style-5 {
  --primary-color: #0066cc;
  --secondary-color: #4a90e2;
  --accent-color: #ff6b6b;
  --bg-color: #f5f5f5;
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --text-color: #333;
  --text-light: #666;
}

a {
  color: var(--primary-color, #0066cc);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color, #4a90e2);
  text-decoration: underline;
}

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

/* 头部导航 */
.header {
  background: var(--card-bg, #fff);
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color, #0066cc);
  margin-bottom: 0.5rem;
}

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

.nav a {
  padding: 0.5rem 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.nav a:hover {
  background: var(--bg-color, #f5f5f5);
  text-decoration: none;
}

/* 主体内容 */
.main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* 首页英雄区 */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 3rem 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero .intro {
  font-size: 1rem;
  line-height: 1.8;
  opacity: 0.95;
  max-width: 900px;
  margin: 0 auto;
}

/* 区块样式 */
section {
  background: var(--card-bg, #fff);
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color, #333);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color, #0066cc);
}

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

.video-card {
  padding: 1rem;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.video-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.video-card .meta {
  font-size: 0.85rem;
  color: var(--text-light, #666);
  margin-bottom: 0.5rem;
}

.video-card .desc {
  font-size: 0.9rem;
  color: var(--text-color, #333);
  line-height: 1.5;
}

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

.video-item {
  padding: 1.5rem;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  transition: background 0.3s ease;
  position: relative;
}

.video-item:hover {
  background: var(--bg-color, #f5f5f5);
}

.video-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.video-item .meta {
  font-size: 0.85rem;
  color: var(--text-light, #666);
  margin-bottom: 0.5rem;
}

.video-item .tags {
  font-size: 0.8rem;
  color: var(--secondary-color, #4a90e2);
  margin-bottom: 0.5rem;
}

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

.video-item .review {
  font-size: 0.9rem;
  color: var(--text-light, #666);
  font-style: italic;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color, #e0e0e0);
}

.video-item .rank {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent-color, #ff6b6b);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.video-item .date {
  display: inline-block;
  background: var(--secondary-color, #4a90e2);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

/* 榜单网格 */
.rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.rank-item {
  padding: 1.5rem;
  border: 2px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  text-align: center;
  transition: border-color 0.3s ease;
}

.rank-item:hover {
  border-color: var(--primary-color, #0066cc);
}

.rank-item h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.rank-item p {
  color: var(--text-light, #666);
  line-height: 1.6;
}

/* 更多链接 */
.more-link {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e0e0e0);
}

.more-link a {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  background: var(--primary-color, #0066cc);
  color: #fff;
  border-radius: 4px;
  display: inline-block;
}

.more-link a:hover {
  background: var(--secondary-color, #4a90e2);
  text-decoration: none;
}

/* 详情页 */
.detail {
  background: var(--card-bg, #fff);
  padding: 2rem;
  border-radius: 8px;
}

.detail-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary-color, #0066cc);
}

.detail-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.detail-header .subtitle {
  font-size: 1rem;
  color: var(--text-light, #666);
}

.detail section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-color, #f5f5f5);
  border-radius: 6px;
}

.detail section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  border-bottom: none;
  color: var(--primary-color, #0066cc);
}

.detail-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.75rem;
  line-height: 1.8;
}

.detail-info dt {
  font-weight: 600;
  color: var(--text-light, #666);
}

.detail-info dd {
  color: var(--text-color, #333);
}

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

.detail-review {
  background: #fff9e6;
  border-left: 4px solid #ffd700;
}

/* 相关推荐 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.related-card {
  padding: 1rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  transition: box-shadow 0.3s ease;
}

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

.related-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.related-card .meta {
  font-size: 0.8rem;
  color: var(--text-light, #666);
  margin-bottom: 0.5rem;
}

.related-card .desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-color, #333);
}

/* 页面头部 */
.page-header {
  text-align: center;
  padding: 2rem;
  background: var(--card-bg, #fff);
  border-radius: 8px;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary-color, #0066cc);
}

.page-header p {
  font-size: 1rem;
  color: var(--text-light, #666);
  line-height: 1.6;
}

/* 页脚 */
.footer {
  background: var(--card-bg, #fff);
  border-top: 1px solid var(--border-color, #e0e0e0);
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-light, #666);
}

/* 响应式 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .hero .intro {
    font-size: 0.9rem;
  }

  .nav {
    flex-wrap: nowrap;
    overflow-x: visible;
  }

  .nav a {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
    flex: 1 1 0;
    min-width: 0;
  }

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

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

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

  .detail-info dl {
    grid-template-columns: 80px 1fr;
  }

  section {
    padding: 1rem;
  }

  .detail {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2rem 1rem;
  }

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

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

  .detail-header h1 {
    font-size: 1.5rem;
  }
}
