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

:root {
  --primary-color: #00A1D6;
  --secondary-color: #FB7299;
  --text-color: #333;
  --bg-color: #fff;
  --border-color: #e5e5e5;
  --hover-color: #f5f5f5;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --spacing: 8px;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing) * 2);
}

.site-header {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--spacing) * 2) 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

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

.main-nav {
  display: flex;
  gap: calc(var(--spacing) * 2);
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  padding: calc(var(--spacing)) calc(var(--spacing) * 2);
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

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

.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: calc(var(--spacing) * 8) 0;
  text-align: center;
}

.main-title {
  font-size: 2rem;
  margin-bottom: calc(var(--spacing) * 2);
  line-height: 1.4;
}

.site-intro {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
}

.content-section {
  padding: calc(var(--spacing) * 6) 0;
}

.section-header {
  margin-bottom: calc(var(--spacing) * 4);
}

.section-header h2 {
  font-size: 1.8rem;
  color: var(--text-color);
  position: relative;
  padding-bottom: calc(var(--spacing) * 2);
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
}

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

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

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

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

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

.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.05);
}

.video-info {
  padding: calc(var(--spacing) * 2);
}

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

.video-one-line {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: calc(var(--spacing));
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  display: flex;
  gap: calc(var(--spacing));
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #999;
}

.video-meta span {
  background: #f5f5f5;
  padding: calc(var(--spacing) / 2) calc(var(--spacing));
  border-radius: 4px;
}

.page-header {
  margin-bottom: calc(var(--spacing) * 4);
  padding-top: calc(var(--spacing) * 4);
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: calc(var(--spacing) * 2);
}

.page-header p {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.8;
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: calc(var(--spacing) * 4);
}

.layout__side--filters {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.layout__side--filters h3 {
  margin-bottom: calc(var(--spacing) * 2);
  font-size: 1.2rem;
}

.filter-info {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
}

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

.top-list__item {
  display: grid;
  grid-template-columns: 60px 150px 1fr;
  gap: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 2);
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  align-items: center;
  transition: transform 0.3s ease;
}

.top-list__item:hover {
  transform: translateX(4px);
}

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

.top-list__item:nth-child(1) .top-rank { color: #FFD700; }
.top-list__item:nth-child(2) .top-rank { color: #C0C0C0; }
.top-list__item:nth-child(3) .top-rank { color: #CD7F32; }

.top-cover {
  width: 150px;
  height: 84px;
  border-radius: 4px;
  overflow: hidden;
  background: #f0f0f0;
}

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

.top-info h3 {
  margin-bottom: calc(var(--spacing));
}

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

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

.top-desc {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: calc(var(--spacing));
}

.top-meta {
  display: flex;
  gap: calc(var(--spacing));
  font-size: 0.85rem;
  color: #999;
}

.group {
  margin-bottom: calc(var(--spacing) * 6);
}

.group-title {
  font-size: 1.5rem;
  margin-bottom: calc(var(--spacing) * 3);
  padding-bottom: calc(var(--spacing));
  border-bottom: 2px solid var(--primary-color);
}

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

.video-player-section {
  background: #000;
  padding: calc(var(--spacing) * 4) 0;
}

.video-player {
  max-width: 1000px;
  margin: 0 auto;
}

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

.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 ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.player-play-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-left: 4px;
}

.page-detail {
  background: #fafafa;
}

.detail-header {
  padding: calc(var(--spacing) * 4) 0 calc(var(--spacing) * 2) 0;
}

.detail-header h1 {
  font-size: 2.2rem;
  color: var(--text-color);
}

.detail-info {
  background: white;
  padding: calc(var(--spacing) * 3);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing) * 3);
  box-shadow: var(--shadow);
}

.detail-info h2 {
  font-size: 1.4rem;
  margin-bottom: calc(var(--spacing) * 2);
}

.info-grid {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: calc(var(--spacing) * 2);
  row-gap: calc(var(--spacing));
}

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

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

.detail-module {
  background: white;
  padding: calc(var(--spacing) * 3);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing) * 3);
  box-shadow: var(--shadow);
}

.detail-module h2 {
  font-size: 1.4rem;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--text-color);
}

.module-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #555;
}

.module-content p {
  margin-bottom: calc(var(--spacing) * 2);
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing));
}

.tag {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: calc(var(--spacing)) calc(var(--spacing) * 2);
  border-radius: 20px;
  font-size: 0.9rem;
}

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

.video-card--related {
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.site-footer {
  background: #2c3e50;
  color: white;
  padding: calc(var(--spacing) * 4) 0;
  margin-top: calc(var(--spacing) * 8);
  text-align: center;
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing) * 4);
  right: calc(var(--spacing) * 4);
  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;
  box-shadow: var(--shadow);
}

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

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

.ui-style-13 {
  --primary-color: #00A1D6;
  --secondary-color: #FB7299;
}

.ui-style-13 .hero-section {
  background: linear-gradient(135deg, #00A1D6 0%, #FB7299 100%);
}

.ui-style-13 .video-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ui-style-13 .video-card:hover {
  transform: translateY(-6px);
}

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

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    padding-bottom: calc(var(--spacing));
    gap: calc(var(--spacing));
  }

  .main-nav a {
    padding: calc(var(--spacing)) calc(var(--spacing) * 1.5);
    font-size: 0.9rem;
  }

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

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: calc(var(--spacing) * 2);
  }

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

  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .layout__side--filters {
    position: static;
  }

  .top-list__item {
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    gap: calc(var(--spacing));
  }

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

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

  .top-info {
    grid-column: 2;
  }

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

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

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

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

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