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

body.ui-style-4 {
  --primary-color: hsl(96, 70%, 50%);
  --bg-color: #1a1a1a;
  --text-color: #ffffff;
}

header {
  background: var(--bg-color, #fff);
  color: var(--text-color, #333);
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  flex-wrap: nowrap;
}

.nav-links a {
  color: var(--text-color, #333);
  text-decoration: none;
  transition: color 0.3s;
}

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

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

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.video-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  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 {
  display: block;
  text-decoration: none;
  color: inherit;
}

.video-cover {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #eee;
}

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

.video-info {
  padding: 1rem;
}

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

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

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

.video-player {
  width: 100%;
  max-width: 1000px;
  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;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  cursor: pointer;
  transition: background 0.3s;
}

.player-play-btn:hover {
  background: rgba(255,255,255,1);
}

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

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

.detail-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

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

.info-item {
  padding: 0.5rem 0;
}

.info-label {
  font-weight: 600;
  color: #666;
  margin-right: 0.5rem;
}

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

.top-list__items li {
  counter-increment: top-counter;
  background: white;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top-list__items li::before {
  content: counter(top-counter);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  width: 40px;
  text-align: center;
}

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

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

footer {
  background: #333;
  color: white;
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }

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

  .video-cover {
    aspect-ratio: 3/2;
  }

  .detail-section {
    padding: 1rem;
  }
}