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

:root {
  --primary-color: #ff6700;
  --secondary-color: #333;
  --bg-color: #fff;
  --text-color: #333;
  --border-color: #e0e0e0;
  --hover-color: #ff8533;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
}

body.ui-style-4 {
  --primary-color: #ff6700;
  --secondary-color: #333;
  --bg-color: #ffffff;
  --text-color: #333;
  --border-color: #e0e0e0;
  --hover-color: #ff8533;
  background: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

.site-header {
  background: var(--bg-color);
  border-bottom: 2px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary-color);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  overflow: visible;
}

.site-nav a {
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

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

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

.main-content {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-module {
  background: #f8f8f8;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-module h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 103, 0, 0.3);
}

.quick-list {
  list-style: none;
  counter-reset: item;
}

.quick-list li {
  counter-increment: item;
  margin-bottom: 0.8rem;
  padding-left: 2rem;
  position: relative;
}

.quick-list li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.page-hero {
  background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
  color: white;
  padding: 3rem 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
}

.hero-title {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: bold;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-weight: bold;
  font-size: 0.9rem;
}

.filter-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-options button {
  padding: 0.4rem 1rem;
  background: white;
  color: var(--primary-color);
  border: 2px solid white;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-options button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  color: white;
  transform: translateY(-2px);
}

.section-intro {
  background: #f8f8f8;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-color);
}

.section-intro h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.section-intro p {
  line-height: 1.8;
  color: #555;
}

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

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}

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

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

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

.video-card__link {
  display: block;
}

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

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

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

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 103, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.video-info {
  padding: 1.2rem;
}

.video-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

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

.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;
  line-height: 1.5;
}

.page-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
  color: white;
  border-radius: 12px;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page-desc {
  font-size: 1.1rem;
  opacity: 0.95;
}

.page--top {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.top-list__items {
  list-style: none;
  counter-reset: toprank;
}

.top-item {
  counter-increment: toprank;
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
}

.top-item:hover {
  transform: translateX(8px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.rank-badge {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 3rem;
  text-align: center;
}

.top-item:nth-child(1) .rank-badge {
  color: #FFD700;
}

.top-item:nth-child(2) .rank-badge {
  color: #C0C0C0;
}

.top-item:nth-child(3) .rank-badge {
  color: #CD7F32;
}

.top-item-cover {
  width: 120px;
  height: 160px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.top-item-info {
  flex: 1;
}

.top-item-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.detail-page {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

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

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

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

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  border: none;
  background: rgba(255, 103, 0, 0.9);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-play-btn:hover {
  background: var(--primary-color);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 30px rgba(255, 103, 0, 0.6);
}

.player-play-icon {
  font-size: 2.5rem;
  color: white;
  margin-left: 5px;
}

.detail-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--hover-color));
  color: white;
  border-radius: 12px;
}

.detail-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0;
}

.detail-info {
  background: #f8f8f8;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.detail-info h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
}

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

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

.detail-module {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--primary-color);
}

.detail-module h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

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

.related-section {
  margin-top: 3rem;
}

.related-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  border-bottom: 3px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.video-card--related {
  background: #f8f8f8;
}

.site-footer {
  background: var(--secondary-color);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

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

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

@media (max-width: 1024px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .site-nav {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

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

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

  .video-info {
    padding: 0.8rem;
  }

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

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

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

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

  .info-list dt {
    margin-top: 1rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 0 1rem;
  }

  .site-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.8rem;
    padding-bottom: 0.5rem;
  }

  .site-nav a {
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .video-card {
    font-size: 0.9rem;
  }
}
