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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
}

.ui-style-2 {
  --primary-color: #ff6700;
  --bg-color: #fff;
  --text-color: #333;
  --border-color: #e5e5e5;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.layout-wrapper {
  display: flex;
  min-height: 100vh;
}

.layout__side {
  width: 260px;
  background: var(--bg-color);
  border-right: 1px solid var(--border-color);
  padding: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.layout__main {
  flex: 1;
  padding: 20px;
  background: #f8f8f8;
}

.side-brand {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.side-intro {
  margin-bottom: 30px;
}

.side-intro h2 {
  font-size: 16px;
  margin-bottom: 10px;
}

.side-intro p {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
}

.site-nav {
  background: var(--bg-color);
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: inline-block;
  font-size: 20px;
  font-weight: bold;
  margin-right: 30px;
}

.nav-brand a {
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: inline-flex;
  list-style: none;
  gap: 25px;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
}

.nav-links li a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
  font-size: 15px;
}

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

.home-intro {
  background: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: var(--card-shadow);
}

.home-intro h1 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text-color);
}

.home-intro p {
  color: #666;
  line-height: 1.8;
}

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

.section-title {
  font-size: 20px;
  margin-bottom: 20px;
  padding-left: 10px;
  border-left: 4px solid var(--primary-color);
}

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

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

.video-grid.masonry .video-card {
  grid-row-end: span 18;
}

.video-grid.masonry .video-card:nth-child(3n+1) {
  grid-row-end: span 20;
}

.video-grid.masonry .video-card:nth-child(4n+2) {
  grid-row-end: span 16;
}

.video-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.video-cover {
  width: 100%;
  padding-top: 56.25%;
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
}

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

.video-info {
  padding: 15px;
}

.video-title {
  font-size: 16px;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-one-line {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.page-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.page-header {
  background: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: var(--card-shadow);
}

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

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

.page--with-sidebar {
  display: flex;
  gap: 30px;
}

.layout__side--filters {
  width: 240px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.layout__main--list {
  flex: 1;
}

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

.top-list__item {
  background: white;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  display: flex;
  gap: 20px;
  align-items: center;
}

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

.top-item__cover {
  width: 120px;
  flex-shrink: 0;
}

.top-item__cover img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.top-item__info {
  flex: 1;
}

.top-item__info h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.top-item__info h3 a {
  color: var(--text-color);
  text-decoration: none;
}

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

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

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

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

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

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

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.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 {
  transform: translate(-50%, -50%) scale(1.1);
  background: white;
}

.player-play-icon {
  font-size: 32px;
  color: var(--primary-color);
}

.detail-header {
  background: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
}

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

.detail-info {
  background: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
}

.info-list {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 15px 20px;
  margin-top: 15px;
}

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

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

.detail-module {
  background: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
}

.detail-module h2 {
  font-size: 20px;
  margin-bottom: 15px;
  color: var(--text-color);
}

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

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  padding: 5px 15px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 14px;
  color: #666;
}

.related-section {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.related-section h2 {
  font-size: 20px;
  margin-bottom: 20px;
}

.site-footer {
  background: var(--bg-color);
  text-align: center;
  padding: 30px;
  color: #999;
  border-top: 1px solid var(--border-color);
  margin-top: 50px;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

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

@media (max-width: 768px) {
  .layout-wrapper {
    flex-direction: column;
  }

  .layout__side {
    width: 100%;
    height: auto;
    position: static;
  }

  .site-nav {
    position: static;
  }

  .nav-links {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

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

  .nav-links li a {
    white-space: nowrap;
    font-size: 14px;
  }

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

  .video-grid.masonry {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .video-grid.masonry .video-card {
    grid-row-end: auto;
  }

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

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

  .layout__side--filters {
    width: 100%;
    position: static;
  }

  .top-list__item {
    flex-direction: column;
    text-align: center;
  }

  .top-item__cover {
    width: 100%;
  }

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