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

:root {
  --color-bg: #141414;
  --color-bg-secondary: #1f1f1f;
  --color-text: #ffffff;
  --color-text-secondary: #b3b3b3;
  --color-primary: #e50914;
  --color-primary-hover: #f40612;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

body.ui-style-5 {
  --color-bg: #141414;
  --color-bg-secondary: #1f1f1f;
  --color-primary: #e50914;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: var(--transition);
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
  padding: var(--spacing-sm) var(--spacing-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: nowrap;
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.site-main {
  padding-top: 70px;
  min-height: 100vh;
}

.hero {
  position: relative;
  width: 100%;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  padding: var(--spacing-xl) var(--spacing-lg);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20, 20, 20, 1) 0%,
    rgba(20, 20, 20, 0.8) 30%,
    rgba(20, 20, 20, 0.4) 70%,
    transparent 100%
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.5;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.section-hot,
.section-top,
.section-latest,
.video-list-section,
.page-section {
  padding: var(--spacing-xl) var(--spacing-lg);
}

.section-header,
.page-header {
  margin-bottom: var(--spacing-lg);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.section-description {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  max-width: 900px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.video-card {
  position: relative;
  background: var(--color-bg-secondary);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.video-card__link {
  display: block;
}

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 150%;
  background: var(--color-bg-secondary);
  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: var(--spacing-sm);
}

.video-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-meta {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.video-one-line {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-page {
  padding-top: 70px;
}

.video-player-section {
  margin-bottom: var(--spacing-xl);
}

.video-player {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

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

.player-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(229, 9, 20, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
}

.player-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--color-primary-hover);
  box-shadow: 0 6px 24px rgba(229, 9, 20, 0.6);
}

.player-play-icon {
  font-size: 2rem;
  color: white;
  margin-left: 4px;
}

.detail-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg) var(--spacing-xl);
}

.detail-header {
  margin-bottom: var(--spacing-xl);
}

.detail-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.detail-section {
  margin-bottom: var(--spacing-xl);
}

.detail-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--color-primary);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
  background: var(--color-bg-secondary);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.info-value {
  font-size: 1rem;
  font-weight: 500;
}

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

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.85rem;
}

.related-videos {
  margin-top: var(--spacing-xl);
}

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

.site-footer {
  background: var(--color-bg-secondary);
  padding: var(--spacing-xl) var(--spacing-lg);
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-top: var(--spacing-xl);
}

@media (max-width: 768px) {
  .site-header {
    padding: var(--spacing-sm);
  }

  .site-logo {
    font-size: 1.25rem;
  }

  .site-nav {
    gap: 0.5rem;
  }

  .site-nav a {
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
  }

  .hero {
    min-height: 60vh;
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .section-hot,
  .section-top,
  .section-latest,
  .video-list-section,
  .page-section {
    padding: var(--spacing-lg) var(--spacing-sm);
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-sm);
  }

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

  .video-player {
    padding: 0 var(--spacing-sm);
  }

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

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

  .detail-content {
    padding: 0 var(--spacing-sm) var(--spacing-lg);
  }

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

@media (max-width: 480px) {
  .site-nav {
    gap: 0.25rem;
  }

  .site-nav a {
    font-size: 0.75rem;
    padding: 0.35rem 0.4rem;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
