/* 基础样式 - UI Style 9 - Layout D */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

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

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

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #e74c3c;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  gap: 5px;
}

.nav-menu li {
  white-space: nowrap;
}

.nav-menu a {
  display: block;
  padding: 8px 15px;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s;
}

.nav-menu a:hover {
  background: #e74c3c;
  color: #fff;
}

/* 主内容区 */
main {
  padding: 30px 0;
}

h1 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #2c3e50;
  line-height: 1.3;
}

h2 {
  font-size: 22px;
  margin: 30px 0 20px;
  color: #34495e;
  border-left: 4px solid #e74c3c;
  padding-left: 15px;
}

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

.intro-text {
  line-height: 1.8;
  color: #555;
  margin-bottom: 20px;
}

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

.video-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s;
}

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

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

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

.video-card h3 a:hover {
  color: #e74c3c;
}

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

.video-meta span {
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 3px;
}

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

/* 详情页特殊样式 */
.detail-header {
  border-bottom: 2px solid #e74c3c;
  padding-bottom: 15px;
  margin-bottom: 25px;
}

.info-table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid #eee;
}

.info-table td {
  padding: 12px 10px;
}

.info-table td:first-child {
  width: 100px;
  font-weight: bold;
  color: #555;
}

.summary-box {
  background: #f9f9f9;
  padding: 20px;
  border-left: 4px solid #e74c3c;
  margin: 20px 0;
  line-height: 1.8;
  color: #444;
}

.review-box {
  background: #fff3cd;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  line-height: 1.8;
  color: #856404;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.related-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.related-item h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.related-item h4 a {
  color: #2c3e50;
  text-decoration: none;
}

.related-item h4 a:hover {
  color: #e74c3c;
}

.related-item p {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.5;
}

/* 列表页样式 */
.video-list {
  list-style: none;
}

.video-list-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s;
}

.video-list-item:hover {
  box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.rank-number {
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  font-weight: bold;
  margin-right: 10px;
}

/* 页脚 */
footer {
  background: #2c3e50;
  color: #ecf0f1;
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 15px;
    padding: 12px;
  }

  .logo {
    font-size: 20px;
  }

  .nav-menu {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 2px;
    overflow: hidden;
  }

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

  .nav-menu a {
    padding: 6px 4px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

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

  section {
    padding: 15px;
  }
}
