/* UI Style: ui-style-8 (沉浸式流媒体风 - 深灰/黑+绿色点缀) */
/* Skeleton: S1 (经典顶部导航) */
/* Layout: E (瀑布流卡片布局) */

:root {
  --color-bg: #0f0f0f;
  --color-surface: #1a1a1a;
  --color-text: #e5e5e5;
  --color-text-secondary: #a3a3a3;
  --color-primary: #00c75a;
  --color-primary-dark: #009947;
  --color-border: #2a2a2a;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --radius: 8px;
  --transition: 0.25s ease;
}

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

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

.ui-style-8 {
  background: var(--color-bg);
}

/* Site Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--spacing-sm) var(--spacing-md);
}

.site-logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-block;
}

/* Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-sm);
  flex-wrap: nowrap;
}

.site-nav a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus {
  color: var(--color-primary);
}

/* Main Content */
.site-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
}

/* Sections */
.section-hot,
.section-top,
.section-latest,
.video-list-section {
  margin-bottom: var(--spacing-lg);
}

.section-hot h2,
.section-top h2,
.section-latest h2,
.page-header h1 {
  font-size: 28px;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
  font-weight: 600;
}

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

.page-header p {
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1.8;
  margin-top: var(--spacing-sm);
}

/* Video Card Grid - Waterfall Layout */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.video-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

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

.video-card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.video-cover {
  position: relative;
  width: 100%;
  padding-top: 150%;
  overflow: hidden;
  background: var(--color-border);
}

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

.video-card:hover .video-cover img {
  transform: scale(1.05);
}

.video-info {
  padding: var(--spacing-sm);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-one-line,
.video-meta {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-year,
.video-genre {
  display: inline-block;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: var(--spacing-xs);
}

/* Detail Page Player */
.video-player-section {
  margin-bottom: var(--spacing-lg);
}

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

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

.player-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 199, 90, 0.9);
  border: 3px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.player-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--color-primary);
  box-shadow: 0 4px 20px rgba(0, 199, 90, 0.4);
}

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

/* Detail Page Content */
.detail-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-lg) var(--spacing-md);
}

.detail-main h1 {
  font-size: 32px;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

.detail-section {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.detail-section h2,
.detail-section h3 {
  font-size: 20px;
  margin-bottom: var(--spacing-sm);
  color: var(--color-primary);
}

.detail-section p,
.detail-section ul {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-sm);
}

.detail-section ul {
  list-style: none;
  padding-left: 0;
}

.detail-section li {
  padding: var(--spacing-xs) 0;
}

.info-label {
  display: inline-block;
  width: 80px;
  color: var(--color-text);
  font-weight: 600;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-sm);
}

.tag-item {
  padding: 4px 12px;
  background: var(--color-border);
  border-radius: 16px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* Related Videos */
.related-section {
  margin-top: var(--spacing-lg);
}

.related-section h2 {
  font-size: 24px;
  margin-bottom: var(--spacing-md);
  color: var(--color-text);
}

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

.video-card--related {
  background: var(--color-surface);
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-lg) var(--spacing-md);
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-top: var(--spacing-lg);
}

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

  .site-nav {
    gap: var(--spacing-sm);
    font-size: 13px;
    padding: 4px 0;
  }

  .site-nav a {
    padding: 4px 8px;
  }

  .site-main,
  .detail-main {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .section-hot h2,
  .section-top h2,
  .section-latest h2 {
    font-size: 22px;
  }

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

  .video-cover {
    padding-top: 150%;
    max-height: 240px;
  }

  .video-title {
    font-size: 14px;
  }

  .detail-main h1 {
    font-size: 24px;
  }

  .detail-section {
    padding: var(--spacing-sm);
  }

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

  .player-play-icon {
    font-size: 24px;
  }

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

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

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