* {
  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: #333;
  background: #f5f5f5;
}

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

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

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

header {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 24px;
  font-weight: bold;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 25px;
  flex-wrap: nowrap;
  align-items: center;
}

nav a {
  transition: opacity 0.3s;
  white-space: nowrap;
}

nav a:hover {
  opacity: 0.7;
}

main {
  min-height: 60vh;
  padding: 30px 0;
}

footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 50px;
}

.page-header {
  margin-bottom: 30px;
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: 15px;
}

.page-intro {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  line-height: 1.8;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.video-card {
  background: #fff;
  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(-5px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 140%;
  overflow: hidden;
  background: #ddd;
}

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

.video-info {
  padding: 15px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

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

.video-player {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.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;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transition: all 0.3s;
}

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

.player-play-icon {
  padding-left: 5px;
}

.detail-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.detail-content h1 {
  font-size: 28px;
  margin-bottom: 20px;
}

.detail-content h2 {
  font-size: 22px;
  margin: 25px 0 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.info-table {
  width: 100%;
  margin: 20px 0;
}

.info-table tr {
  border-bottom: 1px solid #f0f0f0;
}

.info-table td {
  padding: 12px 8px;
  line-height: 1.6;
}

.info-table td:first-child {
  font-weight: 600;
  width: 100px;
  color: #666;
}

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

.related-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

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

.module-section {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.module-section h2 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #333;
}

.module-section p {
  line-height: 1.8;
  color: #555;
}

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

.tag-item {
  display: inline-block;
  padding: 5px 12px;
  background: #f0f0f0;
  border-radius: 15px;
  font-size: 13px;
  color: #666;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.3s;
  z-index: 999;
}

.back-to-top:hover {
  background: rgba(0,0,0,0.9);
}

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

.filter-bar {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
}

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

.top-item {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  display: flex;
  gap: 20px;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s;
}

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

.top-rank {
  font-size: 32px;
  font-weight: bold;
  width: 50px;
  text-align: center;
  flex-shrink: 0;
}

.top-rank--1 { color: #d4af37; }
.top-rank--2 { color: #c0c0c0; }
.top-rank--3 { color: #cd7f32; }

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

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

.top-info {
  flex: 1;
}

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

.top-meta {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

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

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

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

.layout__main {
  flex: 1;
}

.sidebar-section {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.sidebar-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.group {
  margin-bottom: 40px;
}

.group__header {
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
}

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

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 60px 20px;
  border-radius: 12px;
  color: #fff;
  margin-bottom: 40px;
  text-align: center;
}

.hero-section h1 {
  font-size: 42px;
  margin-bottom: 20px;
}

.hero-section p {
  font-size: 18px;
  opacity: 0.95;
}

body.ui-style-0 {
  --primary: #000;
  --accent: #ff6b6b;
}

body.ui-style-0 header {
  background: #000;
  color: #fff;
}

body.ui-style-0 .video-card:hover {
  transform: translateY(-8px) scale(1.02);
}

body.ui-style-1 {
  --primary: #1a1a1a;
  --accent: #ff4500;
}

body.ui-style-1 header {
  background: #1a1a1a;
  color: #fff;
}

body.ui-style-2 {
  --primary: #333;
  --accent: #ff6347;
}

body.ui-style-3 {
  --primary: #e60023;
  --accent: #e60023;
}

body.ui-style-3 .video-card {
  border-radius: 16px;
}

body.ui-style-4 {
  --primary: #e50914;
  --accent: #e50914;
}

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

body.ui-style-5 body {
  background: #141414;
  color: #fff;
}

body.ui-style-5 header {
  background: rgba(0,0,0,0.9);
  color: #fff;
}

body.ui-style-5 .video-card,
body.ui-style-5 .detail-content,
body.ui-style-5 .page-intro {
  background: #1f1f1f;
  color: #e5e5e5;
}

body.ui-style-6 {
  --primary: #0f1b2e;
  --accent: #00a8e1;
}

body.ui-style-6 body {
  background: #0f1b2e;
  color: #fff;
}

body.ui-style-6 header {
  background: rgba(15,27,46,0.95);
  color: #fff;
}

body.ui-style-7 {
  --primary: #0b1729;
  --accent: #00b4d8;
}

body.ui-style-7 body {
  background: #0b1729;
  color: #e5e5e5;
}

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

body.ui-style-8 header {
  background: #000;
  color: #fff;
}

body.ui-style-9 {
  --primary: #0a0a0a;
  --accent: #e5e5e5;
}

body.ui-style-9 body {
  background: #0a0a0a;
  color: #e5e5e5;
}

body.ui-style-9 header {
  background: rgba(10,10,10,0.98);
  color: #fff;
}

body.ui-style-10 {
  --primary: #00c75a;
  --accent: #00c75a;
}

body.ui-style-10 body {
  background: #f9f9f9;
}

body.ui-style-11 {
  --primary: #0099ff;
  --accent: #ff6b35;
}

body.ui-style-12 {
  --primary: #ff6700;
  --accent: #ff6700;
}

body.ui-style-12 .logo {
  color: #ff6700;
}

body.ui-style-13 {
  --primary: #00a1d6;
  --accent: #fb7299;
}

body.ui-style-13 .video-card {
  border-radius: 12px;
}

body.ui-style-14 {
  --primary: #003d82;
  --accent: #ff6600;
}

@media (max-width: 768px) {
  nav ul {
    gap: 15px;
    font-size: 14px;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

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

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

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

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

  .top-rank {
    width: 100%;
  }

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

  .detail-content {
    padding: 20px;
  }

  .player-play-btn {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  nav ul {
    gap: 10px;
    font-size: 12px;
  }

  .logo {
    font-size: 18px;
  }

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