* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #0f1014;
  color: #e8e8e8;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

/* ==================== 顶部 ==================== */
header {
  background: #1a1c24;
  border-bottom: 1px solid #2a2d38;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

nav {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }

.nav-item {
  padding: 6px 14px;
  border-radius: 6px;
  color: #b8bcc4;
  font-size: 14px;
  transition: all .2s;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-item:hover { background: #2a2d38; color: #4ea1ff; }
.nav-item.active { background: #4ea1ff; color: #fff; }

.search-box {
  display: flex;
  background: #0f1014;
  border: 1px solid #2a2d38;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s;
  flex-shrink: 0;
}
.search-box:focus-within { border-color: #4ea1ff; }
.search-box input {
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: #e8e8e8;
  width: 160px;
  font-size: 13px;
  outline: none;
}
.search-box button {
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 13px;
}
.search-box button:hover { color: #4ea1ff; }

/* ==================== 主区域 ==================== */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 16px;
}

/* ==================== 筛选栏 ==================== */
.filters {
  background: #1a1c24;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border: 1px solid #2a2d38;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #22252e;
}
.filter-row:last-child { border-bottom: none; padding-bottom: 0; }
.filter-row:first-child { padding-top: 0; }
.filter-label {
  color: #666;
  font-size: 12px;
  flex-shrink: 0;
  width: 32px;
}
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-tags::-webkit-scrollbar { display: none; }
.filter-tag {
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: #b8bcc4;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-tag:hover { background: #2a2d38; color: #4ea1ff; }
.filter-tag.active { background: #4ea1ff; color: #fff; }

/* ==================== 区块标题 ==================== */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #e8e8e8;
  position: relative;
  padding-left: 10px;
}
.section-header h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: #4ea1ff;
  border-radius: 2px;
}
.result-count { color: #666; font-size: 12px; }

/* ==================== 影片网格 ==================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.card {
  background: #1a1c24;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all .25s ease;
  border: 1px solid transparent;
}
.card:hover {
  transform: translateY(-4px);
  border-color: #4ea1ff;
  box-shadow: 0 10px 20px rgba(78, 161, 255, .15);
}

.cover {
  width: 100%;
  aspect-ratio: 2/3;
  background-size: cover;
  background-position: center;
  background-color: #2a2d38;
  position: relative;
  overflow: hidden;
}

.cover .hover-info {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, .92);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transition: all .25s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 12px;
  pointer-events: none;
  z-index: 2;
}
.card:hover .cover .hover-info {
  opacity: 1;
  visibility: visible;
}
.hover-title { font-size: 14px; font-weight: bold; margin-bottom: 6px; color: #4ea1ff; }
.hover-meta { color: #aaa; margin-bottom: 4px; }
.hover-score { color: #ffb400; margin-bottom: 6px; }
.hover-desc { color: #ccc; line-height: 1.5; margin-bottom: 6px; }
.hover-director { color: #999; }

.card-body { padding: 8px 10px 10px; }
.card .title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.card .meta {
  font-size: 11px;
  color: #666;
  display: flex;
  gap: 4px;
}
.card .meta .dot { color: #444; }

/* ==================== 空状态 ==================== */
.empty { text-align: center; padding: 60px 20px; color: #666; }
.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty p { font-size: 14px; }

/* ==================== 页脚 ==================== */
footer {
  text-align: center;
  padding: 24px 16px;
  color: #444;
  font-size: 12px;
  border-top: 1px solid #1a1c24;
  margin-top: 32px;
}

/* ==================== 手机端 ==================== */
@media (max-width: 768px) {
  .header-inner {
    padding: 8px 10px;
    gap: 8px;
  }
  nav { gap: 0; }
  .nav-item {
    padding: 5px 10px;
    font-size: 13px;
  }
  .search-box input { width: 100px; padding: 5px 8px; font-size: 12px; }
  .search-box button { padding: 5px 8px; font-size: 12px; }

  main { padding: 10px; }

  .filters { padding: 8px 10px; margin-bottom: 12px; border-radius: 8px; }
  .filter-row { gap: 6px; padding: 5px 0; }
  .filter-label { font-size: 11px; width: 28px; }
  .filter-tag { padding: 2px 8px; font-size: 11px; }

  .section-header h2 { font-size: 15px; }
  .result-count { font-size: 11px; }

  /* 手机上一行 4 个 */
  .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .card-body { padding: 5px 6px 6px; }
  .card .title { font-size: 11px; margin-bottom: 2px; }
  .card .meta { font-size: 9px; gap: 2px; }

  .cover .hover-info { display: none; }
}

/* 超小屏，一行 3 个 */
@media (max-width: 400px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .card .title { font-size: 10px; }
  .card .meta { font-size: 9px; }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f1014; }
::-webkit-scrollbar-thumb { background: #2a2d38; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3d48; }