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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.8;
  color: #333;
  background: #f8f9fa;
}

a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #0056b3;
  text-decoration: underline;
}

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

header nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

header nav a {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 1.2rem 1rem;
  color: #333;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
}

header nav a:hover,
header nav a.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 767px) {
  header nav a {
    padding: 1rem 0.4rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  header nav a {
    padding: 0.9rem 0.3rem;
    font-size: 0.75rem;
  }
}

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

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

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  border-left: 4px solid #667eea;
  padding-left: 1rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #34495e;
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

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

.hero h1 {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.site-intro {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
}

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

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

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

.video-card h3 {
  margin-bottom: 0.5rem;
}

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

.video-card .desc {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.6;
}

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

.video-item {
  display: flex;
  gap: 1rem;
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.video-item .rank {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
  min-width: 50px;
  text-align: center;
}

.item-content {
  flex: 1;
}

.item-content .meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.item-content .desc {
  color: #555;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.item-content .review {
  color: #777;
  font-style: italic;
  font-size: 0.95rem;
  border-left: 3px solid #ddd;
  padding-left: 1rem;
}

/* 详情页 */
.video-detail {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
}

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

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

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

.more-link {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #eee;
  font-size: 1.1rem;
}

/* 页脚 */
footer {
  background: #2c3e50;
  color: #ecf0f1;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

footer p {
  margin: 0;
}

/* 响应式 */
@media (max-width: 768px) {
  main {
    padding: 1.5rem 1rem;
  }

  section {
    padding: 1.5rem;
  }

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

  .site-intro {
    font-size: 1rem;
  }

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

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }
}

/* UI 变体样式 */
body.ui-style-15 {
  --primary-color: #ff9a9e;
  --secondary-color: #fecfef;
}
