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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #fff;
  background: #000;
}

body.ui-style-1 {
  --primary-color: #ff5722;
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --accent: #ff6b35;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

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

header {
  background: var(--bg-dark);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

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

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
}

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

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

.hero-section {
  width: 100%;
  min-height: 400px;
  background: linear-gradient(135deg, var(--bg-card) 0%, #2a2a2a 100%);
  border-radius: 16px;
  padding: 3rem;
  margin-bottom: 3rem;
}

.hero-section h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-section p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.filter-bar {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-item {
  padding: 0.5rem 1rem;
  background: rgba(255, 87, 34, 0.1);
  border: 1px solid var(--primary-color);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.filter-item:hover {
  background: var(--primary-color);
  color: #fff;
}

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

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

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(255, 87, 34, 0.3);
}

.video-card__link {
  display: block;
}

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

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

.video-info {
  padding: 1.2rem;
}

.video-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-one-line {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

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

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

.video-player {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

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

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(255, 87, 34, 0.5);
}

.player-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 30px rgba(255, 87, 34, 0.7);
}

.player-play-icon::before {
  content: '▶';
  margin-left: 4px;
}

.detail-info {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

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

.detail-section {
  margin-bottom: 2rem;
}

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

.detail-section p,
.detail-section ul {
  color: var(--text-secondary);
  line-height: 1.8;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.info-item {
  display: flex;
  gap: 0.5rem;
}

.info-label {
  font-weight: 600;
  color: var(--text-primary);
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tag {
  padding: 0.3rem 0.8rem;
  background: rgba(255, 87, 34, 0.15);
  border: 1px solid var(--primary-color);
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--primary-color);
}

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

.video-card--related {
  background: var(--bg-card);
}

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

.top-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 1rem;
  align-items: center;
  transition: all 0.3s;
}

.top-item:hover {
  background: #2a2a2a;
  transform: translateX(8px);
}

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

.top-rank::before {
  content: counter(top-counter);
}

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

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

.top-info {
  flex: 1;
}

.top-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.top-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.group {
  margin-bottom: 3rem;
}

.group__header {
  margin-bottom: 1.5rem;
}

.group__title {
  font-size: 1.6rem;
  color: var(--primary-color);
}

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

.back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4);
  transition: all 0.3s;
  z-index: 999;
}

.back-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.6);
}

.back-top.visible {
  display: flex;
}

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

@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  nav ul {
    gap: 0.8rem;
    font-size: 0.85rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  nav ul::-webkit-scrollbar {
    display: none;
  }

  .hero-section {
    padding: 2rem 1.5rem;
    min-height: 300px;
  }

  .hero-section h1 {
    font-size: 1.8rem;
  }

  .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: 0.95rem;
  }

  .video-one-line {
    font-size: 0.8rem;
  }

  .top-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-cover {
    width: 100%;
    height: auto;
    padding-top: 56.25%;
    position: relative;
  }

  .top-cover img {
    position: absolute;
    top: 0;
    left: 0;
  }

  main {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 1.4rem;
  }

  nav ul {
    gap: 0.5rem;
  }

  nav a {
    font-size: 0.8rem;
    white-space: nowrap;
  }
}
