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

:root {
  --primary: #00A1D6;
  --secondary: #FB7299;
  --text: #212121;
  --bg: #ffffff;
  --card-bg: #f9f9f9;
  --border: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

header {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--shadow);
}

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

.logo {
  font-size: 24px;
  font-weight: 600;
  color: white;
  text-decoration: none;
  letter-spacing: 1px;
}

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

nav a {
  color: white;
  text-decoration: none;
  font-size: 15px;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 0.8;
}

.layout__wrapper {
  display: flex;
  gap: 24px;
  margin: 32px auto;
}

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

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

.side-card {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px var(--shadow);
}

.side-card h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--primary);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--bg);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  color: var(--text);
  border: 1px solid var(--border);
}

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 48px 0;
  margin-bottom: 32px;
  border-radius: 12px;
}

.hero-content {
  text-align: center;
}

.hero-content h1 {
  font-size: 36px;
  margin-bottom: 16px;
  font-weight: 700;
}

.hero-content p {
  font-size: 18px;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
}

.content-section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.section-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.more-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.3s;
}

.more-link:hover {
  opacity: 0.7;
}

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

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

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

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

.video-cover {
  position: relative;
  width: 100%;
  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: 16px;
}

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

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

.video-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #999;
  margin-top: 8px;
}

.page-header {
  background: var(--card-bg);
  padding: 32px;
  border-radius: 12px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px var(--shadow);
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: 16px;
  color: var(--text);
}

.page-header p {
  font-size: 16px;
  color: #666;
  line-height: 1.8;
}

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

.video-player {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px var(--shadow);
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #764ba2 100%);
}

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

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

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

.detail-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.info-card {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px var(--shadow);
}

.info-card h2 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--primary);
}

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

.info-item {
  display: flex;
  gap: 8px;
}

.info-label {
  font-weight: 600;
  color: #666;
  min-width: 60px;
}

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

.content-block {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px var(--shadow);
}

.content-block h2 {
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--primary);
}

.content-block p {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 12px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-item {
  background: var(--bg);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  border: 1px solid var(--border);
}

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

.related-section h2 {
  font-size: 24px;
  margin-bottom: 24px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.video-card--related {
  background: white;
}

.page--grid .video-grid {
  margin-top: 24px;
}

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

.top-item {
  counter-increment: top-counter;
  background: var(--card-bg);
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.3s;
}

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

.top-item__link {
  display: flex;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  padding: 16px;
  align-items: center;
}

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

.top-item:nth-child(1) .top-rank { color: #FFD700; }
.top-item:nth-child(2) .top-rank { color: #C0C0C0; }
.top-item:nth-child(3) .top-rank { color: #CD7F32; }

.top-cover {
  width: 80px;
  height: 112px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.top-info {
  flex: 1;
}

.top-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.top-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

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

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

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

.page--with-sidebar {
  display: flex;
  gap: 24px;
}

.layout__side--filters {
  width: 240px;
  flex-shrink: 0;
}

.filter-section {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px var(--shadow);
}

.filter-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--primary);
}

footer {
  background: #2c3e50;
  color: white;
  padding: 32px 0;
  margin-top: 64px;
  text-align: center;
}

.footer-content p {
  margin: 8px 0;
  opacity: 0.9;
  font-size: 14px;
}

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

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

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

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

  .layout__side {
    width: 100%;
  }

  nav ul {
    gap: 12px;
    font-size: 14px;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

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

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

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

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

  .page--with-sidebar {
    flex-direction: column;
  }

  .layout__side--filters {
    width: 100%;
  }

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

  .video-info {
    padding: 12px;
  }

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

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