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

body {
  background-color: #f5f7fb;
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  color: #1e293b;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* 顶部导航栏 ———— 菜单居中，logo居左 */
.navbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #eef2f8;
}

.nav-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo-area {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.logo-img {
  height: 44px;
  width: auto;
}
.logo-img:hover {
  transform: scale(1.02);
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-weight: 500;
}

.nav-link {
  cursor: pointer;
  transition: 0.2s;
  color: #4b5563;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  font-size: 1rem;
}

.nav-link.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.nav-link:hover:not(.active) {
  color: #1e293b;
}

/* 布局: 侧边栏目录 + 内容区 */
.main-layout {
  max-width: 1600px;
  margin: 1.8rem auto;
  padding: 0 2rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* 侧边目录 */
.sidebar-directory {
  flex: 0 0 260px;
  background: white;
  border-radius: 1.5rem;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.02),
    0 2px 6px rgba(0, 0, 0, 0.04);
  border: 1px solid #eef2ff;
  padding: 1.2rem 0;
  position: sticky;
  top: 90px;
  transition: all 0.2s;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.7rem 1.2rem;
  margin: 0.2rem 0.6rem;
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  color: #334155;
}

.category-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.category-item.active-cat-side {
  background: #eef2ff;
  color: #1e40af;
  box-shadow: inset 0 0 0 1px #cbdffc;
}

.cat-icon {
  font-size: 1.3rem;
}

.cat-name {
  flex: 1;
  font-size: 0.95rem;
}

.cat-count {
  font-size: 0.7rem;
  background: #e2e8f0;
  padding: 0.15rem 0.45rem;
  border-radius: 30px;
  color: #475569;
}

/* 右侧内容区 */
.content-area {
  flex: 1;
  min-width: 0;
}

/* 视频区块布局 */
.category-section {
  margin-bottom: 2rem;
  scroll-margin-top: 85px; /* 锚点偏移，避免被顶部栏遮挡 */
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  border-left: 5px solid #3b82f6;
  padding-left: 1rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(120deg, #1e293b, #3b82f6);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: -0.3px;
}

.section-badge {
  background: #eef2ff;
  padding: 0.2rem 0.8rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #2563eb;
}

/* 视频网格：PC + 移动端 统一一行三个卡片 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.video-card {
  background: white;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.02),
    0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid #eef2f8;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.12);
  border-color: #cbdff2;
}

.thumbnail {
  background: #0f172a;
  /* aspect-ratio: 16 / 9; */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.thumbnail video,
.thumbnail .placeholder-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.placeholder-img {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.7);
}

.play-icon-overlay {
  position: absolute;
  background: rgba(0, 0, 0, 0.1);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(1px);
  color: white;
  font-size: 30px;
  padding-left: 5px;
}

.card-content {
  padding: 0.9rem 1rem 1.2rem;
}

.video-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-message {
  text-align: center;
  padding: 2rem;
  background: #ffffffd9;
  border-radius: 1.5rem;
  color: #5b6e8c;
  border: 1px dashed #cbd5e1;
  font-size: 0.9rem;
  grid-column: 1 / -1;
}

/* 简历卡片样式 */
.info-card {
  background: white;
  border-radius: 2rem;
  padding: 2rem 2rem 2.5rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef2ff;
  max-width: 800px;
  margin: 0 auto;
}
.info-avatar {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: white;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}
.info-name {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.info-bio {
  color: #4b5563;
  line-height: 1.6;
  margin: 1rem 0 1.5rem;
  border-left: 3px solid #3b82f6;
  padding-left: 1rem;
}
.skill-tag {
  display: inline-block;
  background: #eef2ff;
  padding: 0.3rem 0.9rem;
  border-radius: 40px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  margin: 3rem auto 2rem;
  max-width: 1600px;
  padding: 1.5rem 2rem;
  font-size: 0.75rem;
  color: #6c86a3;
  border-top: 1px solid #eef2fa;
}
.footer-logo {
  width: 100px;
}
.modal-video-box {
  padding: 0 1.5rem 1rem;
  width: 100%;
  height: 70vh;
}
@media screen and (min-width: 1440px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* 移动端适配：保持一行三个卡片，侧边栏横向滚动 */
@media (max-width: 800px) {
  .main-layout {
    flex-direction: column;
    padding: 0 1rem;
    gap: 1.2rem;
  }
  .sidebar-directory {
    flex: auto;
    width: 100%;
    position: relative;
    top: 0;
    display: flex;
    flex-wrap: wrap;
    padding: 0.8rem;
    gap: 0.5rem;
    overflow-x: auto;
  }
  .sidebar-directory .category-item {
    flex: 0 0 auto;
    justify-content: center;
    background: #f8fafc;
    margin: 0;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
  }
  .cat-count {
    display: inline-block;
    margin-left: 0.3rem;
  }
  .video-grid {
    gap: 0.8rem;
  }
  .card-content {
    padding: 0.6rem 0.6rem 0.8rem;
  }
  .video-title {
    font-size: 0.85rem;
  }
  .section-title {
    font-size: 1.3rem;
  }
  .nav-container {
    padding: 0.8rem 1rem;
  }
  .logo-area {
    left: 1rem;
  }
  .logo-img {
    height: 36px;
  }
  .nav-links {
    gap: 1.2rem;
  }
  .nav-link {
    font-size: 0.9rem;
  }
  .modal-video-box {
    height: 50vh;
  }
}

@media (max-width: 500px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    border-radius: 0.8rem;
  }
  .video-title {
    font-size: 0.75rem;
  }
  .section-title {
    font-size: 1.2rem;
  }
  .card-content {
    padding: 0.5rem;
  }
  .thumbnail video,
  .thumbnail .placeholder-img {
    height: 100px;
  }
  .play-icon-overlay {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}
