:root {
  --primary: #007bff;
  --secondary: #6c757d;
  --accent: #ff6b6b;
  --bg: #ffffff;
  --text: #333333;
  --border: #e1e4e8;
  --hover: #f6f8fa;
}

* {
  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: var(--text);
  background-color: var(--bg);
}

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

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
}

.site-logo a {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.3s;
}

.site-logo a:hover {
  opacity: 0.8;
}

.main-nav {
  display: flex;
  gap: 5px;
  align-items: center;
}

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

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

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

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

.hero-title {
  font-size: 32px;
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 18px;
  opacity: 0.95;
  line-height: 1.6;
}

.intro-section {
  padding: 50px 0;
  background: #f8f9fa;
}

.intro-content p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  text-align: justify;
}

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

.section-title {
  font-size: 28px;
  margin-bottom: 30px;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}

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

.video-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s;
}

.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: #f0f0f0;
  overflow: hidden;
}

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

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s;
}

.video-card:hover .play-overlay {
  background: rgba(0,0,0,0.4);
  opacity: 1;
}

.play-icon {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary);
}

.video-info {
  padding: 16px;
}

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

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

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

.page-header {
  padding: 40px 0;
  text-align: center;
  border-bottom: 2px solid var(--border);
  margin-bottom: 40px;
}

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

.page-description {
  font-size: 16px;
  color: #666;
}

.page--with-sidebar .page-content {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
}

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

.filter-section h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--primary);
}

.page--top .top-list__items {
  list-style: none;
  display: grid;
  gap: 20px;
}

.top-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

.video-card--rank {
  flex: 1;
  box-shadow: none;
}

.video-card--rank .video-card__link {
  display: flex;
  gap: 16px;
}

.video-card--rank .video-cover {
  width: 180px;
  flex-shrink: 0;
  padding-top: 0;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
}

.video-card--rank .video-cover img {
  position: static;
  width: 100%;
  height: 100%;
}

.video-card--rank .video-info {
  flex: 1;
  padding: 0;
}

.page--grouped .group {
  margin-bottom: 50px;
}

.group__title {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--primary);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.detail-page {
  padding: 40px 0;
}

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

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border: none;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

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

.player-play-icon {
  font-size: 32px;
  color: var(--primary);
  display: block;
  margin-left: 4px;
}

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

.detail-info {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 40px;
}

.detail-info h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--primary);
}

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

.info-item {
  font-size: 15px;
}

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

.info-value {
  color: #333;
}

.detail-module {
  margin-bottom: 40px;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  background: var(--primary);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
}

.site-footer {
  background: #2c3e50;
  color: white;
  padding: 40px 0;
  text-align: center;
  margin-top: 60px;
}

.footer-content p {
  margin: 8px 0;
  opacity: 0.9;
}

.ui-style-7 {
  --primary: #00C75A;
  --accent: #00a048;
}

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

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

  .main-nav {
    width: 100%;
    justify-content: space-between;
    overflow-x: visible;
    flex-wrap: wrap;
    gap: 4px;
  }

  .main-nav a {
    padding: 6px 10px;
    font-size: 13px;
    flex: 0 0 auto;
  }

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

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

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

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

  .page-header h1 {
    font-size: 28px;
  }

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

  .layout__side--filters {
    position: static;
  }

  .video-card--rank .video-card__link {
    flex-direction: column;
  }

  .video-card--rank .video-cover {
    width: 100%;
    padding-top: 56.25%;
    height: auto;
  }

  .detail-header h1 {
    font-size: 24px;
  }

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

.layout-g .hero-section {
  padding: 40px 0;
}

.layout-g .section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin-top: 8px;
}
