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

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

body.ui-style-4 {
  background: #ffffff;
  color: #1a1a1a;
}

.layout__container {
  display: flex;
  min-height: 100vh;
}

.layout__side {
  width: 260px;
  background: #2a2a2a;
  color: #fff;
  padding: 24px;
  flex-shrink: 0;
}

.layout__main {
  flex: 1;
  padding: 24px;
}

.site-header {
  background: #fff;
  padding: 16px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 24px;
}

.site-logo {
  font-size: 24px;
  font-weight: 700;
  color: #ff4757;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}

.site-nav a {
  color: #333;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s;
  font-size: 15px;
  white-space: nowrap;
}

.site-nav a:hover {
  background: #ff4757;
  color: #fff;
}

.section {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.section__title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #1a1a1a;
  border-left: 4px solid #ff4757;
  padding-left: 12px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.video-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

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

.video-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.video-cover {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #e9ecef;
  position: relative;
}

.video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-info {
  padding: 12px;
}

.video-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-one-line {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-player-section {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

.video-player {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  overflow: hidden;
}

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 71, 87, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.player-play-btn:hover {
  background: #ff4757;
  transform: translate(-50%, -50%) scale(1.1);
}

.player-play-icon {
  font-size: 32px;
  color: #fff;
  margin-left: 4px;
}

.detail-header h1 {
  font-size: 32px;
  margin-bottom: 16px;
  color: #1a1a1a;
}

.detail-meta {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.detail-meta h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #333;
}

.meta-item {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

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

.meta-label {
  width: 100px;
  color: #666;
  font-weight: 500;
}

.meta-value {
  flex: 1;
  color: #333;
}

.content-module {
  margin-bottom: 32px;
}

.content-module h2 {
  font-size: 20px;
  margin-bottom: 16px;
  color: #1a1a1a;
  border-left: 4px solid #ff4757;
  padding-left: 12px;
}

.content-module p {
  line-height: 1.8;
  color: #333;
  margin-bottom: 12px;
}

.page--with-sidebar {
  display: flex;
  gap: 24px;
}

.layout__side--filters {
  width: 240px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 24px;
}

.layout__side--filters h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #333;
}

.page--top .top-list__items {
  list-style: none;
}

.top-list__item {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.3s;
}

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

.top-rank {
  width: 40px;
  height: 40px;
  background: #ff4757;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin-right: 16px;
  flex-shrink: 0;
}

.top-list__item:nth-child(1) .top-rank {
  background: #ffd700;
  color: #333;
}

.top-list__item:nth-child(2) .top-rank {
  background: #c0c0c0;
  color: #333;
}

.top-list__item:nth-child(3) .top-rank {
  background: #cd7f32;
  color: #fff;
}

.top-cover {
  width: 80px;
  height: 106px;
  border-radius: 4px;
  overflow: hidden;
  margin-right: 16px;
  flex-shrink: 0;
}

.top-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-info {
  flex: 1;
}

.top-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.top-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page--grouped .group {
  margin-bottom: 40px;
}

.group__header {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #1a1a1a;
  padding-bottom: 12px;
  border-bottom: 2px solid #ff4757;
}

.group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 50px;
  height: 50px;
  background: #ff4757;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
  transition: all 0.3s;
}

.back-to-top:hover {
  background: #ff3838;
  transform: translateY(-4px);
}

.back-to-top.visible {
  display: flex;
}

@media (max-width: 768px) {
  .layout__container {
    flex-direction: column;
  }

  .layout__side {
    width: 100%;
  }

  .site-nav {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .video-cover {
    aspect-ratio: 2/3;
  }

  .page--with-sidebar {
    flex-direction: column;
  }

  .layout__side--filters {
    width: 100%;
    position: static;
  }

  .group__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}
