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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

a {
  color: #2c5aa0;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #1a3d7a;
}

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

/* Header & Navigation */
header {
  background: linear-gradient(135deg, #2c5aa0 0%, #1a3d7a 100%);
  color: white;
  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: 15px 0;
}

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

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  flex-wrap: nowrap;
}

nav a {
  color: white;
  font-weight: 500;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.3s;
}

nav a:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
  padding: 30px 0;
}

.page-title {
  font-size: 32px;
  margin-bottom: 20px;
  color: #1a3d7a;
}

.intro {
  background: white;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  line-height: 1.8;
}

/* Video Cards */
.section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #2c5aa0;
  color: #1a3d7a;
}

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

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

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

.video-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #1a3d7a;
}

.video-meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

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

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  background: #e8f0fc;
  color: #2c5aa0;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
}

/* List Pages */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.video-list .video-card {
  display: flex;
  flex-direction: column;
}

.rank-badge {
  display: inline-block;
  background: #ff6b6b;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 700;
  margin-right: 10px;
}

.group-header {
  background: #2c5aa0;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 20px;
}

/* Detail Page */
.detail-container {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.detail-title {
  font-size: 32px;
  margin-bottom: 25px;
  color: #1a3d7a;
  border-bottom: 3px solid #2c5aa0;
  padding-bottom: 15px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
}

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

.info-label {
  font-weight: 600;
  color: #2c5aa0;
}

.content-section {
  margin-bottom: 25px;
}

.content-section h2 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #1a3d7a;
}

.content-section p {
  line-height: 1.8;
  color: #444;
}

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

.related-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  border-left: 3px solid #2c5aa0;
}

.related-item h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #1a3d7a;
}

/* Footer */
footer {
  background: #2c2c2c;
  color: #ccc;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
  }
  
  nav ul {
    gap: 0;
    justify-content: space-between;
    width: 100%;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  
  nav li {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }
  
  nav a {
    padding: 8px 4px;
    font-size: 13px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
}

body.ui-style-8 {
  /* Layout variant C styling */
}
