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

:root {
  --primary-color: #000;
  --secondary-color: #fff;
  --accent-color: #ff0050;
  --text-color: #fff;
  --bg-color: #000;
  --card-bg: #1a1a1a;
  --border-radius: 12px;
  --spacing: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

body.ui-style-0 {
  --primary-color: #000;
  --bg-color: #0a0a0a;
  --card-bg: #1a1a1a;
  --accent-color: #00f5ff;
  --border-radius: 16px;
}

header {
  background: rgba(0, 0, 0, 0.95);
  padding: calc(var(--spacing) * 2);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: calc(var(--spacing) * 3);
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-color);
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  gap: calc(var(--spacing) * 3);
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
  transition: color 0.3s;
  padding: calc(var(--spacing) / 2) 0;
}

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

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: calc(var(--spacing) * 3);
}

h1 {
  font-size: 32px;
  margin-bottom: calc(var(--spacing) * 3);
  font-weight: 700;
}

h2 {
  font-size: 24px;
  margin-bottom: calc(var(--spacing) * 2);
  font-weight: 600;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--spacing);
}

section {
  margin-bottom: calc(var(--spacing) * 5);
}

.intro-section {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing) * 5);
  line-height: 1.8;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: calc(var(--spacing) * 3);
}

.video-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

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

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

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

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

.video-info {
  padding: calc(var(--spacing) * 2);
}

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

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

.video-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: var(--spacing);
}

.video-player-section {
  margin-bottom: calc(var(--spacing) * 4);
}

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

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

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border: 3px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

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

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

.detail-section {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 3);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing) * 3);
}

.detail-section h2 {
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: var(--spacing);
  margin-bottom: calc(var(--spacing) * 2);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: calc(var(--spacing) * 2);
}

.info-item {
  display: flex;
  gap: var(--spacing);
}

.info-label {
  font-weight: 600;
  color: var(--accent-color);
  min-width: 60px;
}

.info-value {
  color: rgba(255, 255, 255, 0.9);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing);
  margin-top: calc(var(--spacing) * 2);
}

.tag {
  padding: calc(var(--spacing) / 2) calc(var(--spacing) * 1.5);
  background: rgba(0, 245, 255, 0.1);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: calc(var(--border-radius) / 2);
  font-size: 14px;
  color: var(--accent-color);
}

.video-card--related {
  background: rgba(255, 255, 255, 0.05);
}

.page-header {
  margin-bottom: calc(var(--spacing) * 4);
}

.page-header h1 {
  margin-bottom: calc(var(--spacing) * 2);
}

.page-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
}

.filter-bar {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 2);
  border-radius: var(--border-radius);
  margin-bottom: calc(var(--spacing) * 3);
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 2);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: var(--spacing);
  margin-top: calc(var(--spacing) * 4);
}

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

.top-list__item {
  counter-increment: item;
  background: var(--card-bg);
  margin-bottom: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 2);
  border-radius: var(--border-radius);
  display: flex;
  gap: calc(var(--spacing) * 2);
  align-items: center;
  transition: transform 0.3s;
}

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

.top-list__item::before {
  content: counter(item);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 50px;
  text-align: center;
}

.top-list__cover {
  width: 120px;
  height: 68px;
  flex-shrink: 0;
  border-radius: calc(var(--border-radius) / 2);
  overflow: hidden;
}

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

.top-list__info {
  flex: 1;
}

.group {
  margin-bottom: calc(var(--spacing) * 5);
}

.group__header {
  margin-bottom: calc(var(--spacing) * 3);
  padding-bottom: calc(var(--spacing) * 1.5);
  border-bottom: 2px solid var(--accent-color);
}

.group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: calc(var(--spacing) * 3);
}

footer {
  background: rgba(0, 0, 0, 0.5);
  padding: calc(var(--spacing) * 4);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  margin-top: calc(var(--spacing) * 6);
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing) * 4);
  right: calc(var(--spacing) * 4);
  width: 50px;
  height: 50px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s;
  z-index: 999;
}

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

.back-to-top:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: calc(var(--spacing) * 2);
  }

  nav {
    width: 100%;
    justify-content: flex-start;
  }

  .video-grid,
  .group__grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: calc(var(--spacing) * 2);
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .container {
    padding: calc(var(--spacing) * 2);
  }

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

  .top-list__item {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-list__cover {
    width: 100%;
    height: auto;
    padding-top: 56.25%;
    position: relative;
  }

  .top-list__cover img {
    position: absolute;
    top: 0;
    left: 0;
  }
}

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

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

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