* {
  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;
}

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

.main-nav {
  display: flex;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
  overflow-x: auto;
  white-space: nowrap;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1a1a1a;
  text-decoration: none;
  flex-shrink: 0;
}

.main-nav a:not(.nav-logo) {
  color: #666;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: all 0.3s;
  flex-shrink: 0;
}

.main-nav a:not(.nav-logo):hover {
  background: #f0f0f0;
  color: #000;
}

.home-main, .detail-main, main {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.site-intro {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.site-intro h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
  line-height: 1.4;
}

.site-intro p {
  margin-bottom: 0.8rem;
  color: #555;
}

.home-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
  padding-left: 0.5rem;
  border-left: 4px solid #007bff;
}

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

.video-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  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;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #e0e0e0;
}

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

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.video-player-section {
  margin-bottom: 2rem;
}

.video-player {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  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;
  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: 2rem;
  color: #000;
  margin-left: 4px;
}

.detail-header {
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detail-header h1 {
  font-size: 2rem;
  color: #1a1a1a;
}

.detail-info, .detail-module, .detail-related {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detail-info h2, .detail-module h2, .detail-related h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0.5rem;
}

.detail-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.8rem;
}

.detail-info dt {
  font-weight: 600;
  color: #555;
}

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

.detail-module p {
  color: #444;
  line-height: 1.8;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #555;
}

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

.page-header {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.page-header p {
  color: #666;
}

.page--with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

.layout__side--filters {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  height: fit-content;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.layout__side--filters h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.top-list__items {
  list-style: none;
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.top-list__item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  gap: 1rem;
}

.top-list__item:last-child {
  border-bottom: none;
}

.top-rank {
  font-size: 1.5rem;
  font-weight: bold;
  color: #007bff;
  min-width: 40px;
  text-align: center;
}

.top-list__item .video-cover {
  width: 120px;
  min-width: 120px;
  padding-top: 67.5%;
}

.top-list__item .video-info {
  flex: 1;
  padding: 0;
}

.video-meta {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.5rem;
}

.page--grouped .group {
  margin-bottom: 3rem;
}

.group__title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
  padding-left: 0.5rem;
  border-left: 4px solid #007bff;
}

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

footer {
  background: #2c2c2c;
  color: #fff;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

footer p {
  color: #ccc;
}

.ui-style-0 {
  --primary-color: #000;
  --accent-color: #ff0050;
}

.ui-style-0 .nav-logo,
.ui-style-0 .section-title,
.ui-style-0 .top-rank {
  color: var(--accent-color);
}

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

.ui-style-1 .section-title {
  border-left-color: var(--accent-color);
}

.ui-style-2 {
  --primary-color: #fff;
  --accent-color: #ff4500;
}

.ui-style-2 body {
  background: #fafafa;
}

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

.ui-style-3 .video-card:hover {
  box-shadow: 0 8px 16px rgba(230, 0, 35, 0.2);
}

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

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

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

.ui-style-5 .video-card,
.ui-style-5 .site-intro,
.ui-style-5 .detail-info,
.ui-style-5 .detail-module {
  background: #1f1f1f;
  color: #fff;
}

.ui-style-6 {
  --primary-color: #0e1621;
  --accent-color: #00a8e1;
}

.ui-style-7 {
  --primary-color: #0c111b;
  --accent-color: #00a3ff;
}

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

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

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

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

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

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

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

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

.ui-style-14 {
  --primary-color: #fff;
  --accent-color: #003d82;
}

@media (max-width: 768px) {
  .main-nav {
    padding: 0.8rem 1rem;
    gap: 1rem;
  }

  .nav-logo {
    font-size: 1.2rem;
  }

  .main-nav a:not(.nav-logo) {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  .home-main, .detail-main, main {
    padding: 0 1rem;
  }

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

  .site-intro {
    padding: 1.5rem;
  }

  .site-intro h1 {
    font-size: 1.3rem;
  }

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

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

  .video-info {
    padding: 0.8rem;
  }

  .video-title {
    font-size: 0.95rem;
  }

  .video-one-line {
    font-size: 0.85rem;
  }

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

  .top-list__item {
    flex-wrap: wrap;
  }

  .top-list__item .video-cover {
    width: 80px;
    min-width: 80px;
    padding-top: 120%;
  }
}
