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

:root {
  --color-bg-primary: #000000;
  --color-bg-secondary: #0a0a0a;
  --color-text-primary: #f5f5f7;
  --color-text-secondary: #a1a1a6;
  --color-accent: #0071e3;
  --color-border: #2d2d2d;
  --spacing-unit: 8px;
  --border-radius: 8px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
}

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

body.ui-style-9 {
  background: linear-gradient(180deg, #000 0%, #0a0a0a 100%);
}

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

.site-header {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
}

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

.logo h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.logo a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.logo a:hover {
  opacity: 0.7;
}

.main-nav {
  display: flex;
  gap: calc(var(--spacing-unit) * 4);
}

.main-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.2px;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--color-text-primary);
}

.hero-section {
  padding: calc(var(--spacing-unit) * 12) 0 calc(var(--spacing-unit) * 8);
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(0, 113, 227, 0.1) 0%, transparent 70%);
}

.hero-content h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: calc(var(--spacing-unit) * 3);
  background: linear-gradient(135deg, #f5f5f7 0%, #a1a1a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.site-intro {
  padding: calc(var(--spacing-unit) * 6) 0;
  background: rgba(10, 10, 10, 0.5);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.site-intro p {
  max-width: 980px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  text-align: center;
}

.featured-section,
.latest-section,
.top-preview-section {
  padding: calc(var(--spacing-unit) * 10) 0;
}

.section-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: calc(var(--spacing-unit) * 5);
  color: var(--color-text-primary);
}

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

.video-card {
  background: var(--color-bg-secondary);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  border: 1px solid var(--color-border);
}

.video-card:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

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

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

.video-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

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

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

.video-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing-unit) * 1);
  color: var(--color-text-primary);
  letter-spacing: -0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-one-line {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: calc(var(--spacing-unit) * 1.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  gap: calc(var(--spacing-unit) * 1.5);
  flex-wrap: wrap;
}

.meta-item {
  font-size: 12px;
  color: var(--color-text-secondary);
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

.site-footer {
  background: var(--color-bg-secondary);
  padding: calc(var(--spacing-unit) * 6) 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  margin-top: calc(var(--spacing-unit) * 10);
}

.site-footer p {
  color: var(--color-text-secondary);
  font-size: 14px;
  margin: calc(var(--spacing-unit) * 0.5) 0;
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing-unit) * 4);
  right: calc(var(--spacing-unit) * 4);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), visibility var(--transition-fast), background var(--transition-fast);
  z-index: 999;
}

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

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.2);
}

.page--grid .page-header,
.page--with-sidebar .page-header,
.page--top .page-header,
.page--grouped .page-header {
  padding: calc(var(--spacing-unit) * 8) 0 calc(var(--spacing-unit) * 4);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.page--grid .page-title,
.page--with-sidebar .page-title,
.page--top .page-title,
.page--grouped .page-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.page--grid .page-description,
.page--with-sidebar .page-description,
.page--top .page-description,
.page--grouped .page-description {
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.filter-bar {
  padding: calc(var(--spacing-unit) * 3) 0;
  margin-bottom: calc(var(--spacing-unit) * 4);
  text-align: center;
}

.page--grid .video-grid,
.page--grouped .group__grid {
  padding-bottom: calc(var(--spacing-unit) * 6);
}

.page--with-sidebar {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: calc(var(--spacing-unit) * 4);
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 3);
}

.layout__side--filters {
  background: rgba(10, 10, 10, 0.5);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  position: sticky;
  top: calc(var(--spacing-unit) * 10);
  height: fit-content;
}

.layout__side--filters h3 {
  font-size: 21px;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.page--top .top-list__items {
  list-style: none;
  max-width: 1200px;
  margin: 0 auto;
}

.page--top .top-list__item {
  display: grid;
  grid-template-columns: 60px 200px 1fr auto;
  gap: calc(var(--spacing-unit) * 3);
  align-items: center;
  padding: calc(var(--spacing-unit) * 3);
  margin-bottom: calc(var(--spacing-unit) * 2);
  background: var(--color-bg-secondary);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.page--top .top-list__item:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.top-list__rank {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-accent);
  text-align: center;
}

.top-list__cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-bg-secondary);
}

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

.top-list__info h3 {
  font-size: 21px;
  margin-bottom: calc(var(--spacing-unit) * 1);
  color: var(--color-text-primary);
}

.top-list__info p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.page--grouped .group {
  margin-bottom: calc(var(--spacing-unit) * 8);
}

.page--grouped .group__title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 3);
  padding-bottom: calc(var(--spacing-unit) * 2);
  border-bottom: 2px solid var(--color-border);
}

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

.video-player {
  max-width: 1280px;
  margin: 0 auto;
  border-radius: calc(var(--border-radius) * 2);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  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;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-medium);
}

.player-play-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 10px 40px rgba(0, 113, 227, 0.4);
}

.player-play-icon {
  font-size: 32px;
  color: var(--color-text-primary);
  margin-left: 4px;
}

.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 3);
}

.detail-header {
  margin-bottom: calc(var(--spacing-unit) * 4);
  padding-bottom: calc(var(--spacing-unit) * 3);
  border-bottom: 1px solid var(--color-border);
}

.detail-header h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.basic-info {
  background: rgba(10, 10, 10, 0.5);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.basic-info h2 {
  font-size: 24px;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--color-text-primary);
}

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

.info-item {
  display: flex;
  gap: calc(var(--spacing-unit) * 1);
}

.info-label {
  font-weight: 600;
  color: var(--color-text-primary);
}

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

.content-module {
  margin-bottom: calc(var(--spacing-unit) * 5);
  padding: calc(var(--spacing-unit) * 4);
  background: rgba(10, 10, 10, 0.3);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
}

.content-module h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 2);
  color: var(--color-text-primary);
}

.content-module p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing-unit) * 1.5);
}

.tag-item {
  padding: 6px 14px;
  background: rgba(0, 113, 227, 0.1);
  border: 1px solid rgba(0, 113, 227, 0.3);
  border-radius: 20px;
  font-size: 14px;
  color: var(--color-accent);
}

.related-section {
  margin-top: calc(var(--spacing-unit) * 8);
  padding-top: calc(var(--spacing-unit) * 6);
  border-top: 2px solid var(--color-border);
}

.related-section h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

.video-card--related {
  background: rgba(10, 10, 10, 0.5);
}

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

  .main-nav {
    gap: calc(var(--spacing-unit) * 2);
    font-size: 13px;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    justify-content: flex-start;
    padding-bottom: calc(var(--spacing-unit) * 1);
  }

  .hero-content h2 {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

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

  .video-grid {
    grid-template-columns: 1fr;
  }

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

  .page--with-sidebar {
    grid-template-columns: 1fr;
  }

  .layout__side--filters {
    position: static;
  }

  .page--top .top-list__item {
    grid-template-columns: 40px 120px 1fr;
    gap: calc(var(--spacing-unit) * 2);
  }

  .top-list__rank {
    font-size: 24px;
  }

  .detail-header h1 {
    font-size: 32px;
  }

  .content-module {
    padding: calc(var(--spacing-unit) * 2);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 calc(var(--spacing-unit) * 2);
  }

  .hero-section {
    padding: calc(var(--spacing-unit) * 6) 0 calc(var(--spacing-unit) * 4);
  }

  .main-nav {
    gap: calc(var(--spacing-unit) * 1.5);
  }

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

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