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

:root {
  --primary: #2563eb;
  --text: #1f2937;
  --bg: #ffffff;
  --border: #e5e7eb;
  --hover: #f3f4f6;
}

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

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

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

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

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

.hero-section h1 {
  font-size: 32px;
  margin-bottom: 16px;
  line-height: 1.4;
}

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

.site-intro,
.content-section {
  padding: 48px 0;
}

.site-intro h2,
.content-section h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--text);
}

.site-intro p {
  font-size: 16px;
  line-height: 1.8;
  color: #6b7280;
  max-width: 900px;
}

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

.video-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.video-cover {
  position: relative;
  padding-top: 56.25%;
  background: #f3f4f6;
  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: 18px;
  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: 14px;
  color: #6b7280;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-player-section {
  background: #000;
  padding: 40px 0;
}

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #1a1a1a;
  border-radius: 12px;
  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.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #000;
  transition: all 0.3s;
}

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

.detail-page {
  background: #f9fafb;
}

.detail-content {
  padding: 48px 0;
}

.detail-content h1 {
  font-size: 36px;
  margin-bottom: 32px;
  color: var(--text);
}

.detail-module {
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-module h2 {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--text);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
}

.detail-module p {
  font-size: 16px;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 12px;
}

.info-list {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  font-size: 16px;
}

.info-list dt {
  font-weight: 600;
  color: #6b7280;
}

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

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags-container span,
.tag {
  display: inline-block;
  padding: 6px 12px;
  background: #e0e7ff;
  color: #4338ca;
  border-radius: 6px;
  font-size: 14px;
}

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

.related-section h2 {
  font-size: 28px;
  margin-bottom: 24px;
  color: var(--text);
}

.page-header {
  padding: 48px 0 32px;
}

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

.page-desc {
  font-size: 16px;
  color: #6b7280;
  line-height: 1.8;
  max-width: 900px;
}

.page--with-sidebar {
  padding: 48px 0;
}

.page--with-sidebar .container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

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

.layout__side h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.layout__side p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
}

.page--top {
  padding: 48px 0;
}

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

.top-list__item {
  display: flex;
  gap: 20px;
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.top-list__item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.top-rank {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.top-info {
  flex: 1;
}

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

.top-info h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

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

.top-info p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 8px;
}

.top-meta {
  font-size: 14px;
  color: #9ca3af;
}

.page--grouped {
  padding: 48px 0;
}

.group {
  margin-bottom: 48px;
}

.group__title {
  font-size: 28px;
  margin-bottom: 24px;
  color: var(--text);
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}

.site-footer {
  background: #1f2937;
  color: #fff;
  padding: 32px 0;
  text-align: center;
  margin-top: 48px;
}

#back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

#back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    gap: 12px;
  }

  .main-nav {
    gap: 8px;
    font-size: 14px;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
  }

  .main-nav a {
    padding: 6px 10px;
    flex-shrink: 0;
  }

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

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

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

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

  .video-info {
    padding: 12px;
  }

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

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

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

  .detail-module {
    padding: 20px;
  }

  .detail-module h2 {
    font-size: 20px;
  }

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

  .layout__side {
    position: static;
  }

  .top-list__item {
    flex-direction: column;
  }

  .top-cover {
    width: 100%;
  }

  .top-cover img {
    height: 180px;
  }

  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

.ui-style-0 {
  --primary: #18181b;
  --accent: #ef4444;
}

.ui-style-1 {
  --primary: #dc2626;
  --accent: #f97316;
}

.ui-style-2 {
  --primary: #ea580c;
  --accent: #dc2626;
}

.ui-style-3 {
  --primary: #dc2626;
  --accent: #f472b6;
}

.ui-style-4 {
  --primary: #b91c1c;
  --accent: #dc2626;
}

.ui-style-5 {
  --primary: #1e293b;
  --accent: #dc2626;
}

.ui-style-6 {
  --primary: #1e3a8a;
  --accent: #3b82f6;
}

.ui-style-7 {
  --primary: #1e40af;
  --accent: #fbbf24;
}

.ui-style-8 {
  --primary: #064e3b;
  --accent: #10b981;
}

.ui-style-9 {
  --primary: #18181b;
  --accent: #fafafa;
}

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

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

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

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

.ui-style-14 {
  --primary: #1e40af;
  --accent: #f97316;
}
