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

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

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

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

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

.nav-links {
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.nav-links a {
  padding: 8px 16px;
  text-decoration: none;
  color: #666;
  border-radius: 4px;
  transition: all 0.3s;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  background: #f0f0f0;
  color: #333;
}

@media (max-width: 768px) {
  .nav-links {
    gap: 5px;
  }

  .nav-links a {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}

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

.hero-title {
  font-size: 2rem;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.5;
}

.site-intro {
  background: white;
  padding: 40px 20px;
}

.site-intro p {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 1.05rem;
  color: #555;
}

.video-section {
  padding: 40px 0;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 24px;
  color: #333;
  padding-left: 12px;
  border-left: 4px solid #667eea;
}

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

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

.video-card {
  background: white;
  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.15);
}

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

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

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

.video-meta {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: #999;
}

.page {
  padding: 40px 0;
}

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

.page-header h1 {
  font-size: 2rem;
  color: #333;
}

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

.layout__side--filters {
  background: white;
  padding: 24px;
  border-radius: 8px;
  height: fit-content;
}

.layout__side--filters h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

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

.top-list__item {
  background: white;
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 60px 120px 1fr;
  gap: 20px;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.top-rank {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
  text-align: center;
}

.top-cover {
  width: 120px;
  height: 180px;
  position: relative;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

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

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

.top-info h3 a {
  color: #333;
  text-decoration: none;
}

.top-info h3 a:hover {
  color: #667eea;
}

.top-info p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 8px;
}

.group {
  margin-bottom: 48px;
}

.group__title {
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: #333;
  padding-bottom: 12px;
  border-bottom: 2px solid #e0e0e0;
}

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

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

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 8px;
  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;
}

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

.player-play-icon {
  font-size: 2rem;
  color: #333;
}

.detail-page .container {
  max-width: 900px;
}

.detail-header {
  padding: 40px 0 24px;
}

.detail-header h1 {
  font-size: 2.25rem;
  color: #333;
}

.detail-info {
  background: white;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.detail-info h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: #333;
}

.info-list {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  line-height: 1.8;
}

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

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

.detail-module {
  background: white;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.detail-module h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: #333;
}

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

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

.tag {
  display: inline-block;
  padding: 6px 16px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #666;
}

.related-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid #e0e0e0;
}

.related-section h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  color: #333;
}

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

.video-card--related {
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.site-footer {
  background: #333;
  color: white;
  padding: 32px 20px;
  text-align: center;
  margin-top: 60px;
}

.footer-content p {
  color: #999;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.5rem;
  }

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

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

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

  .top-list__item {
    grid-template-columns: 40px 1fr;
    gap: 12px;
  }

  .top-cover {
    display: none;
  }

  .detail-header h1 {
    font-size: 1.75rem;
  }

  .info-list {
    grid-template-columns: 80px 1fr;
  }

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

.ui-style-0 .nav-links a:hover,
.ui-style-0 .nav-links a.active {
  background: #667eea;
  color: white;
}

.ui-style-1 .hero-section {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.ui-style-2 .hero-section {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.ui-style-3 .section-title {
  border-left-color: #ff6b6b;
}

.ui-style-4 .hero-section {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.ui-style-5 .hero-section {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.ui-style-6 .hero-section {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.ui-style-7 .section-title {
  border-left-color: #00b4db;
}

.ui-style-8 .hero-section {
  background: linear-gradient(135deg, #52c234 0%, #061700 100%);
}

.ui-style-9 .hero-section {
  background: linear-gradient(135deg, #434343 0%, #000000 100%);
}

.ui-style-10 .hero-section {
  background: linear-gradient(135deg, #00C75A 0%, #00963f 100%);
}

.ui-style-11 .hero-section {
  background: linear-gradient(135deg, #0099FF 0%, #006bb3 100%);
}

.ui-style-12 .hero-section {
  background: linear-gradient(135deg, #FF6700 0%, #cc5200 100%);
}

.ui-style-13 .hero-section {
  background: linear-gradient(135deg, #00A1D6 0%, #FB7299 100%);
}

.ui-style-14 .hero-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

#back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 999;
}

#back-to-top:hover {
  background: #5568d3;
  transform: translateY(-4px);
}

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