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

:root {
  --color-primary: #1a1a1a;
  --color-secondary: #333;
  --color-accent: #ff6b6b;
  --color-bg: #fff;
  --color-text: #333;
  --color-border: #e0e0e0;
  --spacing: 8px;
}

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

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

.site-header {
  background: var(--color-primary);
  color: white;
  padding: calc(var(--spacing) * 2) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.site-logo {
  font-size: 24px;
  font-weight: bold;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: calc(var(--spacing) * 3);
  white-space: nowrap;
  flex-wrap: nowrap;
  overflow: visible;
}

.site-nav a {
  color: white;
  text-decoration: none;
  padding: calc(var(--spacing)) calc(var(--spacing) * 2);
  border-radius: 4px;
  transition: background 0.3s;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--color-accent);
}

.main-content {
  min-height: 60vh;
}

.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  padding: calc(var(--spacing) * 8) 0;
  text-align: center;
}

.hero-title {
  font-size: 32px;
  margin-bottom: calc(var(--spacing) * 2);
}

.hero-desc {
  font-size: 18px;
  opacity: 0.9;
}

.site-intro {
  padding: calc(var(--spacing) * 6) 0;
  background: #f8f9fa;
}

.site-intro p {
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

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

.section-title {
  font-size: 28px;
  margin-bottom: calc(var(--spacing) * 4);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 3px solid var(--color-accent);
}

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

.video-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

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

.video-cover {
  position: relative;
  padding-top: 140%;
  background: #f0f0f0;
  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: 18px;
  margin-bottom: calc(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: #666;
  margin-bottom: calc(var(--spacing));
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  display: flex;
  gap: calc(var(--spacing) * 2);
  font-size: 12px;
  color: #999;
}

.page-header {
  padding: calc(var(--spacing) * 6) 0 calc(var(--spacing) * 4) 0;
}

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

.page-desc {
  font-size: 16px;
  color: #666;
}

.page--top .top-list__items {
  list-style: none;
}

.top-list-item {
  display: flex;
  gap: calc(var(--spacing) * 3);
  padding: calc(var(--spacing) * 3);
  background: white;
  margin-bottom: calc(var(--spacing) * 2);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  align-items: center;
}

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

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

.top-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.top-info {
  flex: 1;
}

.top-title a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 20px;
}

.top-title a:hover {
  color: var(--color-accent);
}

.top-one-line {
  color: #666;
  margin: calc(var(--spacing)) 0;
}

.top-meta {
  display: flex;
  gap: calc(var(--spacing) * 2);
  font-size: 14px;
  color: #999;
}

.page--with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: calc(var(--spacing) * 4);
}

.layout__side--filters {
  background: #f8f9fa;
  padding: calc(var(--spacing) * 3);
  border-radius: 8px;
  align-self: start;
}

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

.group__title {
  font-size: 24px;
  margin-bottom: calc(var(--spacing) * 3);
  padding-bottom: calc(var(--spacing) * 2);
  border-bottom: 2px solid var(--color-accent);
}

.detail-page {
  padding: calc(var(--spacing) * 4) 0;
}

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

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

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

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

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

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

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

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

.detail-info {
  background: #f8f9fa;
  padding: calc(var(--spacing) * 4);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing) * 4);
}

.detail-info h2 {
  font-size: 24px;
  margin-bottom: calc(var(--spacing) * 3);
}

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

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

.info-label {
  font-weight: bold;
  color: #666;
}

.detail-module {
  margin-bottom: calc(var(--spacing) * 4);
  padding: calc(var(--spacing) * 4);
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-module h2 {
  font-size: 24px;
  margin-bottom: calc(var(--spacing) * 3);
  color: var(--color-accent);
}

.detail-module p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: calc(var(--spacing) * 2);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 2);
}

.tag {
  background: var(--color-accent);
  color: white;
  padding: calc(var(--spacing)) calc(var(--spacing) * 2);
  border-radius: 20px;
  font-size: 14px;
}

.related-videos {
  margin-top: calc(var(--spacing) * 3);
}

.site-footer {
  background: var(--color-primary);
  color: white;
  padding: calc(var(--spacing) * 4) 0;
  text-align: center;
  margin-top: calc(var(--spacing) * 8);
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing) * 4);
  right: calc(var(--spacing) * 4);
  background: var(--color-accent);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: background 0.3s;
  z-index: 99;
}

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

.back-to-top:hover {
  background: var(--color-primary);
}

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

  .site-nav {
    gap: calc(var(--spacing) * 1.5);
    font-size: 14px;
    width: 100%;
    justify-content: space-around;
  }

  .site-nav a {
    padding: calc(var(--spacing)) calc(var(--spacing) * 1.5);
  }

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

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

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

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

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

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

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

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

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

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

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

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

.ui-style-0 {
  --color-primary: #1a1a1a;
  --color-accent: #fe2c55;
}

.ui-style-1 {
  --color-primary: #000;
  --color-accent: #ff4500;
}

.ui-style-2 {
  --color-primary: #fff;
  --color-text: #1a1a1a;
  --color-accent: #ff6b00;
}

.ui-style-2 .site-header {
  background: white;
  color: var(--color-text);
  border-bottom: 1px solid #e0e0e0;
}

.ui-style-2 .site-logo,
.ui-style-2 .site-nav a {
  color: var(--color-text);
}

.ui-style-3 {
  --color-primary: #fff;
  --color-accent: #e60023;
  --color-text: #1a1a1a;
}

.ui-style-3 .site-header {
  background: white;
  color: var(--color-text);
  border-bottom: 1px solid #e0e0e0;
}

.ui-style-3 .site-logo,
.ui-style-3 .site-nav a {
  color: var(--color-text);
}

.ui-style-4 {
  --color-primary: #fff;
  --color-accent: #ff0000;
  --color-text: #1a1a1a;
}

.ui-style-4 .site-header {
  background: white;
  color: var(--color-text);
  border-bottom: 1px solid #e0e0e0;
}

.ui-style-4 .site-logo,
.ui-style-4 .site-nav a {
  color: var(--color-text);
}

.ui-style-5 {
  --color-primary: #141414;
  --color-accent: #e50914;
}

.ui-style-6 {
  --color-primary: #0f1419;
  --color-accent: #1e90ff;
}

.ui-style-7 {
  --color-primary: #1a1d29;
  --color-accent: #00a8e1;
}

.ui-style-8 {
  --color-primary: #1a1a1a;
  --color-accent: #1ed760;
}

.ui-style-9 {
  --color-primary: #000;
  --color-accent: #fff;
}

.ui-style-10 {
  --color-primary: #fff;
  --color-accent: #00c75a;
  --color-text: #1a1a1a;
}

.ui-style-10 .site-header {
  background: white;
  color: var(--color-text);
  border-bottom: 1px solid #e0e0e0;
}

.ui-style-10 .site-logo,
.ui-style-10 .site-nav a {
  color: var(--color-text);
}

.ui-style-11 {
  --color-primary: #fff;
  --color-accent: #0099ff;
  --color-text: #1a1a1a;
}

.ui-style-11 .site-header {
  background: white;
  color: var(--color-text);
  border-bottom: 1px solid #e0e0e0;
}

.ui-style-11 .site-logo,
.ui-style-11 .site-nav a {
  color: var(--color-text);
}

.ui-style-12 {
  --color-primary: #fff;
  --color-accent: #ff6700;
  --color-text: #1a1a1a;
}

.ui-style-12 .site-header {
  background: white;
  color: var(--color-text);
  border-bottom: 1px solid #e0e0e0;
}

.ui-style-12 .site-logo,
.ui-style-12 .site-nav a {
  color: var(--color-text);
}

.ui-style-13 {
  --color-primary: #fff;
  --color-accent: #00a1d6;
  --color-text: #1a1a1a;
}

.ui-style-13 .site-header {
  background: white;
  color: var(--color-text);
  border-bottom: 1px solid #e0e0e0;
}

.ui-style-13 .site-logo,
.ui-style-13 .site-nav a {
  color: var(--color-text);
}

.ui-style-14 {
  --color-primary: #fff;
  --color-accent: #003f8e;
  --color-text: #1a1a1a;
}

.ui-style-14 .site-header {
  background: white;
  color: var(--color-text);
  border-bottom: 1px solid #e0e0e0;
}

.ui-style-14 .site-logo,
.ui-style-14 .site-nav a {
  color: var(--color-text);
}
