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

:root {
  --primary: #003d7a;
  --secondary: #0056b3;
  --accent: #ff6b35;
  --text: #333;
  --text-light: #666;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --border: #e0e0e0;
  --shadow: rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.ui-style-14 {
  --primary: #003d7a;
  --secondary: #0056b3;
  --accent: #ff6b35;
}

.main-nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px var(--shadow);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.nav-links a {
  padding: 0.5rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s;
  white-space: nowrap;
  font-size: 0.95rem;
}

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

.layout-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  gap: 2rem;
}

.layout__side {
  width: 280px;
  flex-shrink: 0;
}

.layout__main {
  flex: 1;
  min-width: 0;
}

.side-intro,
.side-tags {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.side-intro h2,
.side-tags h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.side-intro p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.8;
}

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

.tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--primary);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
}

.hero-section {
  text-align: center;
  padding: 2rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.page-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.filter-bar {
  margin-bottom: 2rem;
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: 8px;
}

.filter-tags,
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.intro-section {
  background: var(--bg-alt);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  line-height: 2;
  color: var(--text-light);
}

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

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

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

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

.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;
  width: 100%;
  padding-top: 56.25%;
  background: var(--bg-alt);
  overflow: hidden;
}

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

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

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

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
  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: var(--text-light);
  margin-bottom: 0.5rem;
}

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

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

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

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

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

.page-header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

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

.layout__side--filters {
  width: 250px;
  flex-shrink: 0;
}

.layout__side--filters h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.filter-group {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: 8px;
}

.filter-group h4 {
  margin-bottom: 0.8rem;
  color: var(--text);
}

.list-main {
  flex: 1;
  min-width: 0;
}

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

.top-list__item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.3s;
}

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

.top-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  background: var(--bg-alt);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-light);
}

.top-rank--hot {
  background: linear-gradient(135deg, #ff6b35, #ff8c42);
  color: white;
}

.top-item-link {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

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

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

.top-item-info {
  flex: 1;
  min-width: 0;
}

.top-item-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.top-item-info p {
  font-size: 0.9rem;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group {
  margin-bottom: 3rem;
}

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

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

.video-card--small .video-cover {
  padding-top: 50%;
}

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

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

.video-player {
  width: 100%;
  max-width: 100%;
}

.video-player-inner {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  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);
  margin-left: 4px;
}

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

.detail-header h1 {
  font-size: 2.5rem;
  line-height: 1.3;
}

.detail-info,
.detail-module {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 2rem;
}

.detail-info h2,
.detail-module h2 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
}

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

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

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

.detail-module p {
  line-height: 2;
  color: var(--text-light);
}

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

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

.video-card--related {
  background: white;
}

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

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

  .layout__side {
    width: 100%;
  }

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

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

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

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

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-links a {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .layout-container,
  .list-page,
  .detail-page {
    padding: 1rem;
  }

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

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

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

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

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

  .top-item-link {
    flex-direction: column;
    width: 100%;
  }

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

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

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

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

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

@media (max-width: 480px) {
  .nav-links a {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }

  .page-title,
  .page-header h1 {
    font-size: 1.3rem;
  }

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

  .module-title,
  .detail-info h2,
  .detail-module h2 {
    font-size: 1.2rem;
  }

  .player-play-btn {
    width: 60px;
    height: 60px;
  }

  .player-play-icon {
    font-size: 1.5rem;
  }
}
