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

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

body.ui-style-5 {
  background: #0f0f0f;
  color: #e5e5e5;
}

body.ui-style-5 a {
  color: #e5e5e5;
  text-decoration: none;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  background: #1a1a1a;
  color: white;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

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

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

nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background 0.3s;
  white-space: nowrap;
}

nav a:hover {
  background: rgba(255,255,255,0.1);
}

.layout__side--filters {
  width: 240px;
  flex-shrink: 0;
  background: #1a1a1a;
  padding: 24px;
  border-radius: 8px;
  position: sticky;
  top: 80px;
  height: fit-content;
}

.layout__main-content {
  flex: 1;
  min-width: 0;
}

.page-container {
  display: flex;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.hero-section {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  padding: 60px 24px;
  margin-bottom: 40px;
  border-radius: 12px;
  text-align: center;
}

.hero-section h1 {
  font-size: 42px;
  margin-bottom: 16px;
  color: #fff;
}

.hero-section p {
  font-size: 18px;
  color: #ccc;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.section-title {
  font-size: 28px;
  margin: 40px 0 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid #ff0000;
  color: #e5e5e5;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.video-card {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

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

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

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

.video-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-info {
  padding: 16px;
}

.video-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: #999;
  margin-bottom: 8px;
}

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

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

.video-player {
  position: relative;
  width: 100%;
}

.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;
  background: rgba(255,0,0,0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
}

.player-play-btn:hover {
  background: rgba(255,0,0,1);
  transform: translate(-50%, -50%) scale(1.1);
}

.player-play-icon {
  color: white;
  font-size: 32px;
  display: block;
}

.detail-section {
  background: #1a1a1a;
  padding: 32px;
  margin-bottom: 24px;
  border-radius: 12px;
}

.detail-section h2 {
  font-size: 24px;
  margin-bottom: 16px;
  color: #ff0000;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255,0,0,0.3);
}

.detail-section p, .detail-section ul {
  font-size: 16px;
  line-height: 1.8;
  color: #ccc;
  margin-bottom: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

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

.info-label {
  color: #999;
  min-width: 60px;
}

.info-value {
  color: #fff;
  flex: 1;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  background: rgba(255,0,0,0.2);
  color: #ff6666;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 14px;
}

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

.video-card--related {
  background: #1a1a1a;
}

.page-header {
  background: #1a1a1a;
  padding: 32px;
  margin-bottom: 32px;
  border-radius: 12px;
  text-align: center;
}

.page-header h1 {
  font-size: 36px;
  color: #fff;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 16px;
  color: #999;
  line-height: 1.8;
}

.filter-bar {
  background: #1a1a1a;
  padding: 20px 32px;
  margin-bottom: 24px;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-label {
  color: #999;
  font-size: 14px;
}

.top-list__items {
  list-style: none;
  counter-reset: top-counter;
}

.top-list__item {
  counter-increment: top-counter;
  display: flex;
  gap: 20px;
  background: #1a1a1a;
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 8px;
  align-items: center;
  transition: transform 0.3s;
}

.top-list__item:hover {
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(255,0,0,0.2);
}

.top-rank {
  font-size: 32px;
  font-weight: bold;
  color: #ff0000;
  min-width: 60px;
  text-align: center;
}

.top-list__item:nth-child(1) .top-rank { color: #ffd700; }
.top-list__item:nth-child(2) .top-rank { color: #c0c0c0; }
.top-list__item:nth-child(3) .top-rank { color: #cd7f32; }

.top-cover {
  width: 120px;
  flex-shrink: 0;
}

.top-cover img {
  width: 100%;
  border-radius: 8px;
}

.top-info {
  flex: 1;
}

.top-title {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 8px;
}

.top-meta {
  color: #999;
  font-size: 14px;
  margin-bottom: 8px;
}

.top-desc {
  color: #ccc;
  font-size: 14px;
  line-height: 1.6;
}

.group {
  margin-bottom: 48px;
}

.group__header {
  font-size: 24px;
  color: #ff0000;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255,0,0,0.3);
}

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

.site-intro {
  background: #1a1a1a;
  padding: 40px;
  margin-bottom: 40px;
  border-radius: 12px;
  line-height: 1.8;
}

.site-intro h2 {
  font-size: 28px;
  color: #ff0000;
  margin-bottom: 16px;
}

.site-intro p {
  color: #ccc;
  font-size: 16px;
  margin-bottom: 12px;
}

footer {
  background: #1a1a1a;
  color: #999;
  padding: 32px 0;
  margin-top: 60px;
  text-align: center;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: #ff0000;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 20px;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
}

@media (max-width: 768px) {
  nav {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  nav a {
    padding: 6px 12px;
    font-size: 14px;
  }

  .page-container {
    flex-direction: column;
  }

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

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

  .hero-section h1 {
    font-size: 28px;
  }

  .hero-section p {
    font-size: 16px;
  }

  .video-cover {
    padding-top: 50%;
  }

  .detail-section {
    padding: 20px;
  }

  .top-list__item {
    flex-direction: column;
    text-align: center;
  }

  .top-cover {
    width: 100%;
  }
}
