/* Layout Variant: A */
* { margin: 0; padding: 0; box-sizing: border-box; }

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

a { color: #0066cc; text-decoration: none; transition: color 0.2s; }
a:hover { color: #0052a3; text-decoration: underline; }

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

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

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

nav .logo {
  font-size: 24px;
  font-weight: bold;
  color: #0066cc;
  padding: 16px 0;
  white-space: nowrap;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

nav ul li a {
  display: block;
  padding: 16px 12px;
  color: #333;
  white-space: nowrap;
  transition: background 0.2s;
}

nav ul li a:hover {
  background: #f0f0f0;
  text-decoration: none;
}

.page-header {
  text-align: center;
  padding: 40px 0 30px;
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: 12px;
  color: #222;
}

.page-intro {
  font-size: 16px;
  color: #666;
  max-width: 800px;
  margin: 0 auto;
}

.site-intro {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.site-intro h2 {
  font-size: 22px;
  margin-bottom: 16px;
  color: #333;
}

.site-intro p {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
}

section {
  margin-bottom: 50px;
}

section h2 {
  font-size: 26px;
  margin-bottom: 24px;
  color: #222;
  border-bottom: 2px solid #0066cc;
  padding-bottom: 8px;
}

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

.video-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

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

.video-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #222;
}

.video-card .meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
}

.video-card .genre {
  font-size: 13px;
  color: #0066cc;
  margin-bottom: 8px;
  font-weight: 500;
}

.video-card .desc {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.ranked .video-card {
  padding-left: 50px;
}

.rank-badge {
  position: absolute;
  left: 15px;
  top: 15px;
  width: 30px;
  height: 30px;
  background: #0066cc;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.more-link {
  text-align: right;
  margin-top: 16px;
  font-size: 15px;
}

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

.topic-item {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.topic-item h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #0066cc;
}

.topic-item p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.detail-page .video-detail {
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}

.detail-page h1 {
  font-size: 32px;
  margin-bottom: 30px;
  color: #222;
  border-bottom: 3px solid #0066cc;
  padding-bottom: 12px;
}

.detail-page section {
  margin-bottom: 30px;
}

.detail-page section h2 {
  font-size: 20px;
  margin-bottom: 16px;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
}

.info-list {
  list-style: none;
}

.info-list li {
  padding: 8px 0;
  font-size: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list strong {
  color: #555;
  margin-right: 8px;
}

.one-line p, .summary p, .review p {
  font-size: 15px;
  line-height: 1.8;
  color: #444;
}

footer {
  background: #333;
  color: #fff;
  padding: 30px 0;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-content p {
  font-size: 14px;
  opacity: 0.8;
}

@media (max-width: 768px) {
  nav .nav-container {
    flex-wrap: nowrap;
  }

  nav ul {
    flex: 1;
    justify-content: space-between;
    gap: 4px;
    min-width: 0;
  }

  nav ul li {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }

  nav ul li a {
    padding: 16px 4px;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  nav .logo {
    font-size: 18px;
    padding: 12px 0;
    margin-right: 8px;
  }

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

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

  .topic-list {
    grid-template-columns: 1fr;
  }

  .detail-page .video-detail {
    padding: 20px;
  }
}

body.ui-style-2 {
  --primary-color: #0066cc;
  --hover-color: #0052a3;
}
