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

:root {
  --primary-color: #FF6700;
  --primary-dark: #E55A00;
  --bg-dark: #1a1a1a;
  --bg-gray: #2a2a2a;
  --text-white: #ffffff;
  --text-gray: #cccccc;
  --text-dim: #999999;
  --border-color: #3a3a3a;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-white);
  background: var(--bg-dark);
  min-height: 100vh;
}

body.ui-style-1 {
  --primary-color: #FF6700;
  --primary-dark: #E55A00;
}

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

.layout--s2 {
  flex-direction: row;
}

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

.site-brand {
  margin-bottom: 2rem;
}

.brand-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.brand-slogan {
  font-size: 0.875rem;
  color: var(--text-dim);
}

.side-nav__list {
  list-style: none;
}

.side-nav__list li {
  margin-bottom: 0.5rem;
}

.side-nav__list a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-gray);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.side-nav__list a:hover,
.side-nav__list a.active {
  background: var(--primary-color);
  color: var(--text-white);
}

.side-info {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.side-info h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-gray);
}

.side-info p {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

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

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-dark);
  color: var(--text-gray);
  border-radius: 20px;
  font-size: 0.75rem;
  border: 1px solid var(--border-color);
}

.layout__main {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

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

.page-header--home {
  background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-dark) 100%);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-white);
  margin-bottom: 0.5rem;
}

.page-desc {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.5;
}

.site-intro {
  background: var(--bg-gray);
  padding: 2rem;
  border-radius: var(--radius);
  margin-bottom: 3rem;
  border: 1px solid var(--border-color);
}

.intro-content p {
  color: var(--text-gray);
  line-height: 1.8;
  font-size: 0.95rem;
}

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

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-white);
  position: relative;
  padding-left: 1rem;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--primary-color);
  border-radius: 2px;
}

.hero-slider {
  margin-bottom: 3rem;
}

.slider-container {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--bg-gray);
}

.slider-track {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 1rem;
}

.hero-card {
  flex: 0 0 400px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-gray);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

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

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

.hero-card__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.hero-card__info {
  padding: 1.5rem;
}

.hero-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-white);
}

.hero-card__desc {
  font-size: 0.875rem;
  color: var(--text-gray);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

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

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

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: var(--bg-dark);
  overflow: hidden;
}

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

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

.video-info {
  padding: 1.25rem;
}

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

.video-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

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

.top-preview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.top-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-gray);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.top-rank {
  flex: 0 0 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
}

.top-rank--1 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #000;
}

.top-rank--2 {
  background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
  color: #000;
}

.top-rank--3 {
  background: linear-gradient(135deg, #CD7F32, #B8860B);
  color: #000;
}

.top-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.top-info {
  flex: 1;
}

.top-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-white);
}

.top-desc {
  font-size: 0.875rem;
  color: var(--text-gray);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.875rem;
}

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

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

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

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

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

.video-player {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: linear-gradient(135deg, var(--bg-gray) 0%, var(--bg-dark) 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;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(255, 103, 0, 0.4);
}

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

.player-play-icon {
  color: var(--text-white);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.detail-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.3;
}

.detail-info {
  background: var(--bg-gray);
  padding: 2rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.module-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-white);
}

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

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

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

.detail-module {
  background: var(--bg-gray);
  padding: 2rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.module-content {
  color: var(--text-gray);
  line-height: 1.8;
  font-size: 1rem;
}

.module-content p {
  margin-bottom: 1rem;
}

.module-content p:last-child {
  margin-bottom: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-list .tag {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.related-section {
  background: transparent;
  border: none;
  padding: 0;
}

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

.page--grid,
.page--with-sidebar,
.page--top,
.page--grouped {
  width: 100%;
}

.page--with-sidebar {
  display: flex;
  gap: 2rem;
}

.layout__side--filters {
  width: 200px;
  background: var(--bg-gray);
  padding: 1.5rem;
  border-radius: var(--radius);
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.layout__main--list {
  flex: 1;
}

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

.top-list__item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-gray);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.top-cover {
  flex: 0 0 120px;
}

.top-cover img {
  width: 120px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.top-info {
  flex: 1;
}

.top-title a {
  color: var(--text-white);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  transition: var(--transition);
}

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

.top-meta {
  color: var(--text-dim);
  font-size: 0.875rem;
  margin: 0.5rem 0;
}

.page--grouped .group {
  margin-bottom: 3rem;
}

.group-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-white);
}

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

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

  .layout__side {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .side-nav__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .side-nav__list li {
    margin-bottom: 0;
  }

  .side-info {
    display: none;
  }
}

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

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

  .section-title {
    font-size: 1.25rem;
  }

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

  .hero-card {
    flex: 0 0 300px;
  }

  .detail-title {
    font-size: 1.75rem;
  }

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

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

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

  .top-rank {
    align-self: flex-start;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

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

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
  }

  .slider-track {
    gap: 1rem;
  }

  .hero-card {
    flex: 0 0 280px;
  }
}
