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

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

body.ui-style-0 {
  --primary-color: #ff6b6b;
  --bg-dark: #0a0a0a;
  --bg-card: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --border-color: #2a2a2a;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

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

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

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

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  white-space: nowrap;
}

nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

nav a {
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s;
  white-space: nowrap;
  font-size: 14px;
}

nav a:hover,
nav a.active {
  background: var(--primary-color);
  color: #000;
}

.layout__wrapper {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  gap: 30px;
}

.layout__side {
  width: 280px;
  flex-shrink: 0;
  padding: 30px 20px;
}

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

.hero-section {
  padding: 60px 0;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-dark) 100%);
}

.hero-content h1 {
  font-size: 42px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

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

.section {
  padding: 60px 0;
}

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

.section-header h2 {
  font-size: 28px;
  color: var(--text-primary);
}

.section-header a {
  color: var(--primary-color);
  font-size: 14px;
}

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

.video-card {
  background: var(--bg-card);
  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, 107, 107, 0.2);
}

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

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

.video-info {
  padding: 16px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

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

.page-header {
  padding: 40px 0 30px;
}

.page-header h1 {
  font-size: 36px;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.page-header p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 800px;
}

.page--top .top-list__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.top-list__item:hover {
  transform: translateX(8px);
}

.top-rank {
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 50px;
  text-align: center;
}

.top-rank.gold {
  color: #ffd700;
}

.top-rank.silver {
  color: #c0c0c0;
}

.top-rank.bronze {
  color: #cd7f32;
}

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

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

.top-info {
  flex: 1;
}

.top-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.top-info .video-meta {
  margin-bottom: 10px;
}

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

.video-player {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

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

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

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

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

.detail-title {
  font-size: 36px;
  margin: 30px 0 20px;
  color: var(--text-primary);
}

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

.info-card h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text-primary);
  border-left: 4px solid var(--primary-color);
  padding-left: 16px;
}

.info-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  width: 100px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

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

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

.content-module h3 {
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.content-module p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

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

.tag {
  background: var(--bg-dark);
  color: var(--primary-color);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
}

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

.related-section h3 {
  font-size: 28px;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.video-card--related {
  background: var(--bg-card);
}

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

.group h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}

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

.page--with-sidebar .layout__side--filters {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 20px;
}

.filter-section {
  margin-bottom: 20px;
}

.filter-section h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

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

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

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

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

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

  .layout__side {
    width: 100%;
  }

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

  .hero-content p {
    font-size: 15px;
  }

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

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

  .video-info {
    padding: 12px;
  }

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

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

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

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

  nav {
    gap: 6px;
  }

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