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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

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

a {
  text-decoration: none;
  color: inherit;
}

.ui-style-5 {
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --accent-color: #e94560;
  --text-color: #eee;
  --bg-color: #0f3460;
}

.ui-style-5 body {
  background: var(--bg-color);
  color: var(--text-color);
}

.ui-style-5 .header {
  background: var(--primary-color);
}

.ui-style-5 .video-card {
  background: var(--secondary-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.ui-style-5 .video-card:hover {
  transform: scale(1.05);
}

.ui-style-5 .module-title,
.ui-style-5 h1,
.ui-style-5 h2 {
  color: var(--text-color);
}

.ui-style-5 .nav-link:hover {
  color: var(--accent-color);
}

.header {
  padding: 1rem 2rem;
  background: #1a1a2e;
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.logo a {
  color: white;
}

.nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
}

.nav-link {
  color: white;
  padding: 0.5rem 0;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #e94560;
}

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

.layout__side {
  width: 280px;
  background: #16213e;
  padding: 2rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

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

.intro-section,
.tags-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.intro-section h2,
.tags-section h3 {
  margin-bottom: 1rem;
  color: #eee;
}

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

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(233, 69, 96, 0.2);
  border: 1px solid #e94560;
  border-radius: 20px;
  font-size: 0.875rem;
  color: #e94560;
}

.hero-section {
  padding: 3rem 0;
  text-align: center;
}

.hero-section h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #eee;
}

.module {
  margin-bottom: 3rem;
}

.module-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e94560;
  color: #eee;
}

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

.video-card {
  background: #16213e;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

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

.video-card__link {
  display: block;
}

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 140%;
  background: #0f3460;
  overflow: hidden;
}

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

.video-cover--small {
  padding-top: 60%;
  width: 120px;
  flex-shrink: 0;
}

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #eee;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-one-line {
  font-size: 0.875rem;
  color: #aaa;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  font-size: 0.75rem;
  color: #888;
}

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

.page-header {
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e94560;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #eee;
}

.page-header p {
  color: #aaa;
}

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

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

.layout__side--filters {
  width: 200px;
  flex-shrink: 0;
  background: #16213e;
  padding: 1.5rem;
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group h4 {
  margin-bottom: 0.75rem;
  color: #eee;
}

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

.filter-tag {
  padding: 0.25rem 0.75rem;
  background: rgba(233, 69, 96, 0.2);
  border: 1px solid #e94560;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-tag:hover {
  background: #e94560;
  color: white;
}

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

.top-list__item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: #16213e;
  border-radius: 8px;
  transition: all 0.3s;
}

.top-list__item:hover {
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.top-list__rank {
  font-size: 2rem;
  font-weight: bold;
  color: #e94560;
  min-width: 50px;
  text-align: center;
}

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

.group__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e94560;
  color: #eee;
}

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

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

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

.video-player {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.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;
  border: none;
  background: rgba(233, 69, 96, 0.9);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
}

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

.player-play-icon {
  color: white;
  font-size: 2rem;
}

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

.detail-header h1 {
  font-size: 2rem;
  color: #eee;
}

.detail-module {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #16213e;
  border-radius: 8px;
}

.detail-module h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #eee;
  border-bottom: 1px solid rgba(233, 69, 96, 0.3);
  padding-bottom: 0.5rem;
}

.detail-module p {
  line-height: 1.8;
  color: #ccc;
  margin-bottom: 0.75rem;
}

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

.info-list dt {
  font-weight: 600;
  color: #e94560;
}

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

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

.footer {
  padding: 2rem;
  text-align: center;
  background: #1a1a2e;
  color: #888;
  margin-top: 3rem;
}

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

  .layout__side {
    width: 100%;
    height: auto;
    position: relative;
  }

  .layout__main {
    padding: 1rem;
  }

  .header {
    padding: 1rem;
  }

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

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

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

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

  .main {
    padding: 1rem;
  }

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

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

  .layout__side--filters {
    width: 100%;
    position: relative;
    top: 0;
  }

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

  .top-list__rank {
    font-size: 1.5rem;
  }

  .video-cover--small {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

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

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

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

  .nav {
    font-size: 0.75rem;
    gap: 0.75rem;
  }

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

  .video-info {
    padding: 0.75rem;
  }

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

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