* {
  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;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 24px;
  font-weight: 700;
}

nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

nav a {
  transition: color 0.3s;
}

nav a:hover {
  color: #0099FF;
}

main {
  padding: 40px 0;
}

.hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
  margin-bottom: 48px;
  border-radius: 12px;
}

.hero-section h1 {
  font-size: 42px;
  margin-bottom: 16px;
  font-weight: 700;
}

.hero-section p {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

.section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 28px;
  margin-bottom: 24px;
  font-weight: 600;
}

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

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

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

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

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

.video-info {
  padding: 16px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-one-line {
  font-size: 14px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  font-size: 13px;
  color: #999;
  margin-top: 8px;
}

.page-header {
  background: white;
  padding: 32px;
  border-radius: 8px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.page-header h1 {
  font-size: 36px;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 16px;
  color: #666;
}

.video-player-section {
  background: white;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.video-player {
  position: relative;
  width: 100%;
  margin-bottom: 24px;
}

.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(255,255,255,0.9);
  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: 32px;
  color: #333;
}

.detail-section {
  background: white;
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.detail-section h2 {
  font-size: 24px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #0099FF;
}

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

.info-item {
  padding: 12px 0;
}

.info-label {
  font-weight: 600;
  color: #666;
  margin-bottom: 4px;
}

.info-value {
  font-size: 15px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f0f0;
  border-radius: 16px;
  font-size: 13px;
  color: #666;
}

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

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

footer {
  background: #333;
  color: white;
  padding: 32px 0;
  margin-top: 80px;
  text-align: center;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  background: #0099FF;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: all 0.3s;
  z-index: 999;
}

.back-to-top:hover {
  background: #0088dd;
  transform: translateY(-4px);
}

.back-to-top.show {
  display: flex;
}

body.ui-style-2 {
  background: #ffffff;
  color: #333;
}

body.ui-style-2 .hero-section {
  background: linear-gradient(135deg, #FFA500 0%, #FF6347 100%);
}

body.ui-style-2 nav a:hover {
  color: #FF6347;
}

body.ui-style-2 .detail-section h2 {
  border-bottom-color: #FF6347;
}

body.ui-style-2 .back-to-top {
  background: #FF6347;
}

body.ui-style-2 .back-to-top:hover {
  background: #FF4500;
}

.page--grid {
  background: #f5f5f5;
}

.filter-bar {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.top-list__items {
  list-style: none;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.top-list__item {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.3s;
}

.top-list__item:hover {
  background: #f9f9f9;
}

.top-list__rank {
  font-size: 32px;
  font-weight: 700;
  color: #FF6347;
  min-width: 60px;
}

.top-list__rank--1 { color: #FFD700; }
.top-list__rank--2 { color: #C0C0C0; }
.top-list__rank--3 { color: #CD7F32; }

.top-list__cover {
  width: 120px;
  height: 68px;
  margin: 0 20px;
  border-radius: 4px;
  overflow: hidden;
}

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

.top-list__content {
  flex: 1;
}

.top-list__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.top-list__desc {
  font-size: 14px;
  color: #666;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 12px;
  }

  nav ul {
    gap: 12px;
    font-size: 14px;
  }

  .hero-section h1 {
    font-size: 28px;
  }

  .hero-section p {
    font-size: 16px;
  }

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

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

  .section-title {
    font-size: 22px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .detail-section {
    padding: 20px;
  }

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

  .top-list__item {
    flex-wrap: wrap;
    padding: 16px;
  }

  .top-list__rank {
    font-size: 24px;
    min-width: 40px;
  }

  .top-list__cover {
    width: 80px;
    height: 45px;
    margin: 0 12px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}
