/* 全局样式 */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* 视频网格布局 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 20px;
}

.video-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  cursor: pointer;
}

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

.video-card h3 {
  font-size: 18px;
  color: #2c3e50;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-card .meta {
  font-size: 13px;
  color: #95a5a6;
  margin-bottom: 8px;
}

.video-card .desc {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 列表样式 */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.list-item {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
}

.list-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.list-item .rank {
  position: absolute;
  top: 24px;
  right: 24px;
  background: #e74c3c;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
}

.list-item .date {
  position: absolute;
  top: 24px;
  right: 24px;
  background: #3498db;
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
}

.list-item h3 {
  font-size: 22px;
  color: #2c3e50;
  margin-bottom: 12px;
}

.list-item .meta {
  font-size: 14px;
  color: #95a5a6;
  margin-bottom: 10px;
}

.list-item .desc {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 8px;
}

.list-item .review {
  font-size: 14px;
  color: #7f8c8d;
  font-style: italic;
  border-left: 3px solid #3498db;
  padding-left: 12px;
  margin-top: 10px;
}

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

.related-card {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 16px;
  transition: all 0.3s ease;
}

.related-card:hover {
  background: #e9ecef;
  transform: translateX(4px);
}

.related-card h3 {
  font-size: 16px;
  color: #2c3e50;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-card p {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* UI样式变体 */
.ui-style-0 { --primary: #e74c3c; --secondary: #c0392b; }
.ui-style-1 { --primary: #3498db; --secondary: #2980b9; }
.ui-style-2 { --primary: #2ecc71; --secondary: #27ae60; }
.ui-style-3 { --primary: #f39c12; --secondary: #e67e22; }
.ui-style-4 { --primary: #9b59b6; --secondary: #8e44ad; }
.ui-style-5 { --primary: #1abc9c; --secondary: #16a085; }
.ui-style-6 { --primary: #34495e; --secondary: #2c3e50; }
.ui-style-7 { --primary: #e67e22; --secondary: #d35400; }
.ui-style-8 { --primary: #95a5a6; --secondary: #7f8c8d; }
.ui-style-9 { --primary: #c0392b; --secondary: #a93226; }
.ui-style-10 { --primary: #2980b9; --secondary: #21618c; }
.ui-style-11 { --primary: #27ae60; --secondary: #1e8449; }
.ui-style-12 { --primary: #d35400; --secondary: #ba4a00; }
.ui-style-13 { --primary: #8e44ad; --secondary: #7d3c98; }
.ui-style-14 { --primary: #16a085; --secondary: #138d75; }
.ui-style-15 { --primary: #c0392b; --secondary: #922b21; }

/* 响应式设计 */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }

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

  .list-item {
    padding: 16px;
  }

  .list-item .rank,
  .list-item .date {
    position: static;
    display: inline-block;
    margin-bottom: 8px;
  }

  main {
    padding: 20px 15px !important;
  }

  h1 {
    font-size: 24px !important;
  }

  h2 {
    font-size: 20px !important;
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-card,
.list-item {
  animation: fadeIn 0.5s ease-out;
}

/* 按钮样式 */
button,
.btn {
  cursor: pointer;
  border: none;
  outline: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

button:hover,
.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 信息框样式 */
.info-box p {
  margin: 8px 0;
  font-size: 15px;
  line-height: 1.8;
}

.info-box strong {
  color: #2c3e50;
  min-width: 80px;
  display: inline-block;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}
