/* 全站样式 - 移动端单行导航版 */

/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.8;
  color: #2c3e50;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

/* 头部导航 */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

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

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

nav a {
  display: block;
  padding: 0.6rem 1.2rem;
  color: #555;
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

nav a:hover,
nav a.active {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

/* 主内容区 */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* 首页介绍 */
.site-intro {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.site-intro h1 {
  font-size: 2rem;
  color: #1a202c;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.site-intro p {
  color: #4a5568;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.site-intro p:last-child {
  margin-bottom: 0;
}

/* 首页模块 */
.home-section {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.home-section h2 {
  font-size: 1.6rem;
  color: #2d3748;
  margin-bottom: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #667eea;
}

.section-desc {
  color: #718096;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* 视频网格 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.video-card {
  background: #f7fafc;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

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

.video-card h3 a {
  color: #2d3748;
  font-weight: 600;
}

.video-card h3 a:hover {
  color: #667eea;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #718096;
}

.video-meta span {
  background: #e2e8f0;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.video-intro {
  color: #4a5568;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* 入口网格 */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.entry-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 2rem;
  color: #fff;
  transition: all 0.3s ease;
}

.entry-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.3);
}

.entry-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.entry-card h3 a {
  color: #fff;
}

.entry-card p {
  font-size: 0.9rem;
  opacity: 0.95;
  line-height: 1.6;
}

/* 视频列表 */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.video-card-compact {
  background: #f7fafc;
  border-radius: 10px;
  padding: 1.2rem;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.video-card-compact:hover {
  background: #fff;
  border-left-color: #667eea;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-card-compact h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.video-card-compact h3 a {
  color: #2d3748;
}

.video-card-compact h3 a:hover {
  color: #667eea;
}

/* 列表页 */
.list-header {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.list-header h1 {
  font-size: 2rem;
  color: #1a202c;
  margin-bottom: 1rem;
}

.list-intro {
  color: #4a5568;
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
}

.video-list-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.video-list-section .video-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  position: relative;
}

.video-list-section .video-card h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #2d3748;
}

.video-list-section .video-card h2 a {
  color: #2d3748;
}

.video-list-section .video-card h2 a:hover {
  color: #667eea;
}

.video-summary {
  color: #718096;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-top: 0.8rem;
}

.rank-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
}

.date-info {
  background: #48bb78;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.topic-tag {
  display: inline-block;
  background: #ed8936;
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* 详情页 */
.video-detail {
  background: #fff;
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.detail-header h1 {
  font-size: 2rem;
  color: #1a202c;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #667eea;
}

.detail-info,
.detail-oneline,
.detail-summary,
.detail-review {
  margin-bottom: 2.5rem;
}

.detail-info h2,
.detail-oneline h2,
.detail-summary h2,
.detail-review h2 {
  font-size: 1.4rem;
  color: #2d3748;
  margin-bottom: 1rem;
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.info-list li {
  font-size: 1rem;
  color: #4a5568;
  line-height: 1.6;
}

.info-list strong {
  color: #2d3748;
  margin-right: 0.5rem;
}

.oneline-text {
  font-size: 1.1rem;
  color: #667eea;
  font-weight: 500;
  line-height: 1.8;
  padding: 1rem;
  background: rgba(102, 126, 234, 0.05);
  border-left: 4px solid #667eea;
  border-radius: 4px;
}

.summary-text,
.review-text {
  font-size: 1.05rem;
  color: #4a5568;
  line-height: 1.9;
  text-align: justify;
}

.review-text {
  background: #f7fafc;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #48bb78;
}

/* 相关推荐 */
.related-section {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.related-section h2 {
  font-size: 1.6rem;
  color: #2d3748;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #667eea;
}

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

.related-card {
  background: #f7fafc;
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
}

.related-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.related-card h3 a {
  color: #2d3748;
  font-weight: 600;
}

.related-card h3 a:hover {
  color: #667eea;
}

.related-meta {
  color: #718096;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.related-intro {
  color: #4a5568;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* 页脚 */
footer {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  color: #e2e8f0;
  text-align: center;
  padding: 2.5rem;
  margin-top: 4rem;
}

footer p {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  nav {
    width: 100%;
  }

  nav ul {
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }

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

  nav a {
    padding: 0.4rem 0.3rem;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-intro,
  .home-section,
  .video-detail {
    padding: 1.5rem;
  }

  .site-intro h1,
  .list-header h1,
  .detail-header h1 {
    font-size: 1.5rem;
  }

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

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

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

  main {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  nav a {
    font-size: 0.75rem;
    padding: 0.4rem 0.2rem;
  }

  .logo {
    font-size: 1.2rem;
  }
}
