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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

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

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

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

/* UI Style Variants */
.ui-style-0 { --primary: #000; --accent: #ff4757; }
.ui-style-1 { --primary: #2c3e50; --accent: #e74c3c; }
.ui-style-2 { --primary: #34495e; --accent: #f39c12; }
.ui-style-3 { --primary: #fff; --accent: #e74c3c; background: #fff; color: #333; }
.ui-style-4 { --primary: #fff; --accent: #c0392b; background: #fff; color: #2c3e50; }
.ui-style-5 { --primary: #141414; --accent: #e50914; background: #141414; color: #fff; }
.ui-style-6 { --primary: #0f1419; --accent: #0080ff; background: #0f1419; color: #e6edf3; }
.ui-style-7 { --primary: #0b0e11; --accent: #0ea5e9; background: #0b0e11; color: #e6edf3; }
.ui-style-8 { --primary: #181818; --accent: #00c896; background: #181818; color: #fff; }
.ui-style-9 { --primary: #000; --accent: #fff; background: #000; color: #fff; }
.ui-style-10 { --primary: #fff; --accent: #00C75A; background: #fff; color: #191919; }
.ui-style-11 { --primary: #fff; --accent: #0099FF; background: #fff; color: #333; }
.ui-style-12 { --primary: #fff; --accent: #FF6700; background: #fff; color: #333; }
.ui-style-13 { --primary: #fff; --accent: #00A1D6; background: #fff; color: #222; }
.ui-style-14 { --primary: #fff; --accent: #2932e1; background: #fff; color: #333; }

/* Header */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 20px 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 20px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.site-nav a {
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.3s;
}

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

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.hero-title {
  font-size: 32px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.hero-desc {
  font-size: 16px;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.95;
  line-height: 1.8;
}

/* Content Sections */
.content-section {
  padding: 40px 0;
}

.section-title {
  font-size: 28px;
  margin-bottom: 30px;
  color: var(--accent);
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.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(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.video-card__link {
  display: block;
}

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #ddd;
  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: bold;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

/* Detail Page */
.video-player-section {
  background: #000;
  margin-bottom: 30px;
}

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

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

.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;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.detail-title {
  font-size: 36px;
  margin: 30px 0;
  color: var(--accent);
}

.detail-section {
  background: #fff;
  padding: 30px;
  margin-bottom: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detail-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
}

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

.info-list dd {
  color: #333;
}

.oneline-text,
.summary-text,
.review-text {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  display: inline-block;
  padding: 6px 12px;
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
}

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

/* List Pages */
.page--grid,
.page--top,
.page--grouped {
  padding: 30px 0;
}

.page-header {
  margin-bottom: 40px;
  text-align: center;
}

.page-header h1 {
  font-size: 36px;
  color: var(--accent);
  margin-bottom: 10px;
}

.page-header p {
  font-size: 18px;
  color: #666;
}

/* Sidebar Layout */
.page--with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 30px;
  padding: 30px 0;
}

.layout__side--filters {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.layout__side--filters h3 {
  color: var(--accent);
  margin-bottom: 15px;
}

/* Top List */
.top-list__items {
  list-style: none;
}

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

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

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

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

.top-info {
  flex: 1;
}

.top-info h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.top-info h3 a {
  color: var(--accent);
}

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

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

/* Grouped Layout */
.group {
  margin-bottom: 40px;
}

.group-title {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}

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

/* Footer */
.site-footer {
  background: var(--primary);
  color: #fff;
  padding: 30px 0;
  text-align: center;
  margin-top: 60px;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1000;
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: 15px;
  }

  .site-nav {
    gap: 10px;
    font-size: 14px;
  }

  .site-nav a {
    padding: 6px 10px;
  }

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

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

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

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

  .video-info {
    padding: 12px;
  }

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

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

  .detail-section {
    padding: 20px;
  }

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

  .layout__side--filters {
    position: static;
  }

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

  .top-cover {
    width: 100%;
    max-width: 200px;
  }

  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}