/* UI Style 9 - Layout F */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

body.ui-style-9 {
  --primary-color: #7b1fa2;
  --bg-color: #ffffff;
  --text-color: #333333;
  --border-color: #e0e0e0;
}

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

/* 导航栏 */
nav {
  background: var(--primary-color);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  flex-wrap: nowrap;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.3s;
  white-space: nowrap;
}

.nav-links a:hover {
  background: rgba(255,255,255,0.2);
}

/* 移动端导航 - 单行不换行 */
@media (max-width: 768px) {
  nav .container {
    padding: 0 10px;
  }

  .logo {
    font-size: 1.2rem;
    margin-right: 10px;
  }

  .nav-links {
    gap: 0;
    flex: 1;
    min-width: 0;
  }

  .nav-links li {
    flex: 1 1 0;
    min-width: 0;
  }

  .nav-links a {
    padding: 0.4rem 0.3rem;
    font-size: 0.85rem;
    display: block;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* 主内容区 */
main {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

section {
  background: var(--bg-color);
  margin-bottom: 2rem;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

h1, h2, h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h1 { font-size: 2rem; line-height: 1.2; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* 卡片列表 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.video-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.video-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.video-card .meta {
  color: #666;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.video-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.tag {
  background: #e3f2fd;
  color: var(--primary-color);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.85rem;
}

.video-card a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.video-card a:hover {
  text-decoration: underline;
}

/* 详情页 */
.detail-header {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

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

.info-item {
  padding: 1rem;
  background: #f9f9f9;
  border-left: 3px solid var(--primary-color);
}

.info-item strong {
  display: block;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.content-block {
  margin: 2rem 0;
  line-height: 1.8;
}

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

.related-list li {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

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

.related-list a {
  color: var(--text-color);
  text-decoration: none;
  display: block;
}

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

.related-list .title {
  font-weight: 500;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.related-list .desc {
  color: #666;
  font-size: 0.9rem;
}

/* 页脚 */
footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}

footer a {
  color: #4fc3f7;
  text-decoration: none;
}

/* 响应式 */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  section {
    padding: 1.5rem;
  }

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

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
}
