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

:root {
  --brand-green: #00C75A;
  --bg-dark: #1a1a1a;
  --bg-darker: #0d0d0d;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --card-bg: #252525;
  --border-color: #333;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
}

body.ui-style-8 {
  background: var(--bg-darker);
}

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

header {
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-green);
  text-decoration: none;
  transition: opacity 0.3s;
}

.logo:hover {
  opacity: 0.8;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--brand-green);
}

main {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
}

.layout__side {
  width: 220px;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 8px;
}

.layout__main {
  flex: 1;
  padding-left: 30px;
}

.hero {
  background: var(--card-bg);
  padding: 60px 40px;
  border-radius: 12px;
  margin-bottom: 50px;
  text-align: center;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.site-intro {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  margin-bottom: 50px;
}

.site-intro h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--brand-green);
}

.site-intro p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.section {
  margin-bottom: 60px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
}

.section-link {
  color: var(--brand-green);
  text-decoration: none;
  font-size: 16px;
}

.section-link:hover {
  text-decoration: underline;
}

.horizontal-scroll {
  overflow-x: auto;
  padding-bottom: 20px;
  margin: 0 -20px;
  padding-left: 20px;
}

.horizontal-scroll::-webkit-scrollbar {
  height: 8px;
}

.horizontal-scroll::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

.horizontal-scroll::-webkit-scrollbar-thumb {
  background: var(--brand-green);
  border-radius: 4px;
}

.scroll-container {
  display: flex;
  gap: 20px;
}

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

.video-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  min-width: 280px;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 199, 90, 0.2);
}

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

.video-cover {
  width: 100%;
  padding-top: 140%;
  position: relative;
  overflow: hidden;
  background: var(--bg-darker);
}

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

.video-card:hover .video-cover img {
  transform: scale(1.05);
}

.video-info {
  padding: 20px;
}

.video-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  display: flex;
  gap: 15px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.video-one-line {
  font-size: 14px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-header {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 12px;
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 38px;
  margin-bottom: 15px;
}

.page-header p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.video-player-section {
  margin-bottom: 40px;
}

.video-player {
  width: 100%;
  background: var(--bg-darker);
  border-radius: 12px;
  overflow: hidden;
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.player-play-icon {
  font-size: 36px;
  color: white;
  margin-left: 5px;
}

.detail-main {
  max-width: 1000px;
  margin: 0 auto;
}

.detail-title {
  font-size: 42px;
  margin: 30px 0;
  line-height: 1.3;
}

.detail-section {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.detail-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--brand-green);
  border-left: 4px solid var(--brand-green);
  padding-left: 15px;
}

.detail-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

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

.info-item {
  font-size: 15px;
}

.info-label {
  color: var(--text-secondary);
  margin-right: 10px;
}

.info-value {
  color: var(--text-primary);
}

.related-section {
  margin-top: 60px;
}

.related-section h2 {
  font-size: 32px;
  margin-bottom: 30px;
}

.video-card--related {
  min-width: 240px;
}

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

.top-item {
  counter-increment: top-counter;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  transition: transform 0.3s;
}

.top-item:hover {
  transform: translateX(5px);
}

.top-rank {
  font-size: 48px;
  font-weight: 700;
  color: var(--brand-green);
  min-width: 80px;
  text-align: center;
}

.top-rank::before {
  content: counter(top-counter);
}

.top-cover {
  width: 120px;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.top-info {
  flex: 1;
}

.top-title {
  font-size: 24px;
  margin-bottom: 10px;
}

.top-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.top-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.group {
  margin-bottom: 50px;
}

.group-title {
  font-size: 28px;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-green);
}

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

.filter-bar {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.layout__side--filters {
  margin-bottom: 30px;
}

.layout__side--filters h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--brand-green);
}

.layout__side--filters p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--border-color);
  padding: 30px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: var(--brand-green);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s;
  z-index: 99;
}

.back-to-top:hover {
  background: #00a048;
  transform: translateY(-5px);
}

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

@media (max-width: 768px) {
  nav ul {
    gap: 15px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  nav a {
    white-space: nowrap;
    font-size: 14px;
  }

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

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

  .section-title {
    font-size: 24px;
  }

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

  .video-card {
    min-width: 140px;
  }

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

  .video-info {
    padding: 12px;
  }

  .video-title {
    font-size: 14px;
  }

  .video-meta, .video-one-line {
    font-size: 12px;
  }

  .detail-title {
    font-size: 28px;
  }

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

  .top-cover {
    width: 100%;
    height: 200px;
  }

  .layout__main {
    padding-left: 0;
  }
}

@media (min-width: 769px) {
  .layout--sidebar {
    display: flex;
    gap: 30px;
  }
}
