/* 全局样式 - UI风格8 / 布局C */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

body.ui-style-8 {
  --primary-color: #2563eb;
  --secondary-color: #1e40af;
  --accent-color: #3b82f6;
  --text-color: #1e293b;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --hover-color: #dbeafe;
}

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

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

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: 1px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 5px;
  flex-wrap: nowrap;
  align-items: center;
}

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

nav ul li a {
  display: block;
  padding: 8px 12px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 15px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav ul li a:hover {
  background: var(--hover-color);
  color: var(--primary-color);
}

/* 主内容区 */
main {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
}

/* 标题样式 */
h1 {
  font-size: 32px;
  color: var(--text-color);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.3;
}

h2 {
  font-size: 26px;
  color: var(--text-color);
  margin: 30px 0 20px;
  font-weight: 600;
}

h3 {
  font-size: 20px;
  color: var(--text-color);
  margin: 20px 0 15px;
  font-weight: 600;
}

/* 卡片列表 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 30px 0;
}

.video-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.video-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.video-card h3 a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 18px;
}

.video-card h3 a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
  font-size: 13px;
  color: #64748b;
}

.video-meta span {
  background: var(--hover-color);
  padding: 4px 10px;
  border-radius: 4px;
}

.video-desc {
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 列表样式 */
.video-list {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.video-list-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.video-list-item:last-child {
  border-bottom: none;
}

.video-list-item h3 {
  margin: 0 0 8px 0;
}

/* 详情页 */
.video-detail {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 40px;
  margin: 20px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.video-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 8px;
}

.info-item {
  display: flex;
  gap: 8px;
}

.info-label {
  font-weight: 600;
  color: var(--text-color);
  min-width: 60px;
}

.info-value {
  color: #475569;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.tag {
  background: var(--primary-color);
  color: white;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
}

.video-summary, .video-review {
  background: var(--bg-color);
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  line-height: 1.8;
  color: var(--text-color);
}

/* 相关推荐 */
.related-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid var(--border-color);
}

/* 区块样式 */
section {
  margin: 40px 0;
}

.intro-section {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  margin: 30px 0;
  line-height: 1.8;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

/* 页脚 */
footer {
  background: var(--card-bg);
  padding: 30px 0;
  margin-top: 60px;
  text-align: center;
  color: #64748b;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

/* 响应式 - 移动端 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
    padding: 12px 15px;
  }

  nav ul {
    width: 100%;
    justify-content: space-between;
    gap: 3px;
  }

  nav ul li a {
    padding: 6px 8px;
    font-size: 13px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

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

  .video-detail {
    padding: 20px;
  }

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

  .container {
    padding: 0 15px;
  }
}

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

  nav ul li a {
    padding: 5px 6px;
    font-size: 12px;
  }
}
