:root {
  --primary-color: #ff5722;
  --primary-hover: #f4511e;
  --bg-color: #ffffff;
  --text-color: #212121;
  --text-secondary: #757575;
  --border-color: #e0e0e0;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --transition: all 0.3s ease;
}

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

body {
  font-family: var(--font-base);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

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

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-sm) var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.site-nav {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.site-nav a {
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}

.site-nav a:hover {
  background: rgba(255, 87, 34, 0.1);
  color: var(--primary-color);
}

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

.main-content {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
  width: 100%;
}

.hero-section {
  background: linear-gradient(135deg, #fff5f2 0%, #ffffff 100%);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl) var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  text-align: center;
  border: 1px solid var(--border-color);
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.intro-section {
  margin-bottom: var(--spacing-lg);
}

.intro-content {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
}

.intro-content h2 {
  font-size: 24px;
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

.intro-content p {
  color: var(--text-secondary);
  line-height: 1.8;
}

.video-section {
  margin-bottom: var(--spacing-xl);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
}

.more-link {
  color: var(--primary-color);
  font-weight: 500;
  transition: var(--transition);
}

.more-link:hover {
  color: var(--primary-hover);
}

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

.video-grid.waterfall {
  column-count: 4;
  column-gap: var(--spacing-md);
}

.video-grid.waterfall .video-card {
  break-inside: avoid;
  margin-bottom: var(--spacing-md);
}

.video-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--card-shadow);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-color);
}

.video-card__link {
  display: block;
}

.video-cover {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  aspect-ratio: 16 / 9;
}

.video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.video-card:hover .video-cover img {
  transform: scale(1.05);
}

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

.video-card:hover .play-overlay {
  opacity: 1;
}

.play-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.video-info {
  padding: var(--spacing-sm);
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
}

.video-one-line {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-header {
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: var(--spacing-sm);
}

.page-desc {
  color: var(--text-secondary);
  font-size: 16px;
}

.page--top .top-list__items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.top-list__item {
  display: flex;
  gap: var(--spacing-md);
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  transition: var(--transition);
  box-shadow: var(--card-shadow);
}

.top-list__item:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--primary-color);
}

.top-rank {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-color);
  color: var(--text-color);
  font-size: 20px;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.top-rank--1 {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #fff;
}

.top-rank--2 {
  background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
  color: #fff;
}

.top-rank--3 {
  background: linear-gradient(135deg, #cd7f32, #e9a968);
  color: #fff;
}

.top-cover {
  flex-shrink: 0;
  width: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

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

.top-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.top-title {
  font-size: 20px;
  font-weight: 600;
}

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

.top-meta {
  font-size: 14px;
  color: var(--text-secondary);
}

.top-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.page--grouped .group {
  margin-bottom: var(--spacing-xl);
}

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

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

.page--with-sidebar {
  display: flex;
  gap: var(--spacing-lg);
}

.layout__main {
  flex: 1;
}

.layout__side {
  width: 280px;
  flex-shrink: 0;
}

.sidebar-section {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
}

.sidebar-section h3 {
  font-size: 18px;
  margin-bottom: var(--spacing-sm);
}

.sidebar-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.detail-page {
  max-width: 1000px;
}

.video-player-section {
  margin-bottom: var(--spacing-lg);
}

.video-player {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow-hover);
}

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

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

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

.detail-header {
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.detail-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
}

.detail-info {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.info-title {
  font-size: 20px;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary-color);
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--spacing-sm) var(--spacing-md);
  font-size: 15px;
}

.info-list dt {
  font-weight: 600;
  color: var(--text-color);
}

.info-list dd {
  color: var(--text-secondary);
}

.detail-module {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.module-title {
  font-size: 20px;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary-color);
}

.module-content {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.module-content p {
  margin-bottom: var(--spacing-sm);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 87, 34, 0.1);
  color: var(--primary-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}

.related-section {
  margin-top: var(--spacing-xl);
}

.section-title {
  font-size: 24px;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--primary-color);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.video-card--related {
  height: 100%;
}

.site-footer {
  background: var(--bg-color);
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--card-shadow-hover);
  z-index: 99;
}

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

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

@media (max-width: 1200px) {
  .video-grid.waterfall {
    column-count: 3;
  }
}

@media (max-width: 900px) {
  .video-grid.waterfall {
    column-count: 2;
  }

  .page--with-sidebar {
    flex-direction: column;
  }

  .layout__side {
    width: 100%;
  }
}

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

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: var(--spacing-xs);
    font-size: 13px;
  }

  .site-nav a {
    padding: var(--spacing-xs);
    flex: 1;
    text-align: center;
  }

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

  .video-grid.waterfall {
    column-count: 1;
  }

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

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

  .top-cover {
    width: 100%;
  }

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

@media (max-width: 480px) {
  :root {
    --spacing-md: 16px;
    --spacing-lg: 24px;
  }

  .main-content {
    padding: var(--spacing-md);
  }

  .hero-section {
    padding: var(--spacing-lg) var(--spacing-md);
  }
}
