/* ============================================================
   L4D2 创意工坊首页 · 布局与主题覆盖
   与 style.css 分开；首页规则作用于 .l4d2-home，
   详情弹窗的评分行复用 .lf-modal-rating。
   ============================================================ */

.l4d2-home,
.l4d2-home *,
.l4d2-home *::before,
.l4d2-home *::after {
  box-sizing: border-box;
}

.l4d2-home [hidden] { display: none !important; }

.l4d2-container.l4d2-home {
  position: relative;
  z-index: 0;
  /* 主题顶部导航预留 40px；背景层向上补到页面顶部 */
  --l4d2-home-top-offset: 40px;
  max-width: 1200px;
  margin: 10px auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #acb2b8;
  font-family: inherit;
  font-size: 16px;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
}

.l4d2-home-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* 全宽背景层：不受主题内容宽度限制，覆盖整个视口宽度 */
.l4d2-home-bg {
  position: absolute;
  top: calc(-1 * var(--l4d2-home-top-offset, 0px));
  bottom: 0;
  left: 50%;
  z-index: 0;
  width: 100vw;
  overflow: hidden;
  background-color: #262b34;
  transform: translateX(-50%);
  pointer-events: none;
}

.l4d2-home-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 620px;
  background: url("img/library-hero.jpg") center top / cover no-repeat;
  filter: blur(24px) brightness(0.62) saturate(0.85);
  transform: scale(1.03);
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, rgba(0, 0, 0, 0.55) 76%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, rgba(0, 0, 0, 0.55) 76%, transparent 100%);
}

.l4d2-home-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 620px;
  background: linear-gradient(180deg, rgba(38, 43, 52, 0.08) 0%, rgba(38, 43, 52, 0.42) 22%, #262b34 78%, #262b34 100%);
  pointer-events: none;
}

/* 网格只在顶部出现，向下渐隐到纯色，不会在半路重新出现 */
.l4d2-home-bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 760px;
  background-image: conic-gradient(from 90deg at 2px 2px, rgba(0, 0, 0, 0) 90deg, rgba(255, 255, 255, 0.05) 0);
  background-size: 16px 16px;
  opacity: 0.9;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 30%, transparent 86%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.55) 30%, transparent 86%);
}

.l4d2-home-masthead,
.l4d2-home__body {
  position: relative;
  z-index: 1;
}

/* 清除主题对首页内容加的标题下划线和链接虚线 */
.l4d2-home-title-copy h1 {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.l4d2-home .l4d2-home-card__creator,
.l4d2-home .l4d2-home-card__creator:hover {
  border-bottom: 0 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}
.l4d2-home .l4d2-home-card__creator:hover {
  text-decoration: underline !important;
  text-decoration-style: solid !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 2px !important;
}
.l4d2-home .l4d2-home-steam-link {
  border: 1px solid rgba(102, 192, 244, 0.55) !important;
  text-decoration: none !important;
  box-shadow: none !important;
}
.l4d2-home .l4d2-home-steam-link:hover {
  border-color: #66c0f4 !important;
}

/* ---------- 游戏标识区 ---------- */

.l4d2-home-masthead {
  position: relative;
  overflow: visible;
  border-bottom: 0;
}

.l4d2-home-masthead__inner {
  position: relative;
  z-index: 1;
  padding: 26px 24px 28px;
}

.l4d2-home-notice {
  display: flex;
  align-items: center;
  min-height: 18px;
  color: #8f98a0;
  font-size: 12px;
  line-height: 18px;
}

.l4d2-home-notice .l4d2-info-container {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #8f98a0;
  font-family: inherit;
  font-size: 12px;
  line-height: 18px;
}

.l4d2-home-notice .l4d2-info-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.l4d2-home-notice .l4d2-info-icon {
  flex: none;
  color: #66c0f4;
  font-size: 12px;
  line-height: 1;
}

.l4d2-home-notice .l4d2-info-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #8f98a0;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.l4d2-home-notice .l4d2-info-text:hover { color: #acb2b8; }

.l4d2-home-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
}

.l4d2-home-eyebrow {
  color: #66c0f4;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.6px;
  line-height: 15px;
  text-transform: uppercase;
}

.l4d2-home-title-copy h1 {
  margin: 2px 0 0;
  color: #f1f2f3;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.l4d2-home-title-copy p {
  margin: 6px 0 0;
  color: #acb2b8;
  font-size: 14px;
  line-height: 20px;
}

.l4d2-home-steam-link {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  margin-bottom: 4px;
  border: 1px solid rgba(102, 192, 244, 0.55);
  border-radius: 2px;
  background: transparent;
  color: #66c0f4;
  font-size: 13px;
  line-height: 17px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.l4d2-home-steam-link:hover {
  background: rgba(26, 159, 255, 0.14);
  border-color: #66c0f4;
  color: #66c0f4;
}
.l4d2-home-steam-link i { font-size: 12px; }

.l4d2-home__body {
  position: relative;
  z-index: 1;
  padding: 0 24px 40px;
}

/* ---------- 顶部工具栏 ---------- */

.l4d2-home-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.l4d2-home-search {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#lf-search-tag-container {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  min-width: 0;
  max-width: 44%;
}

.l4d2-home .lf-search-term-bar {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  background: #5c7e10;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}
.l4d2-home .lf-search-term-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.l4d2-home .lf-search-term-close {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.l4d2-home .lf-search-term-close:hover { background: rgba(255, 255, 255, 0.2); }

.l4d2-home-search-field {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  height: 40px;
}

.l4d2-home .lf-search {
  display: block;
  width: 100%;
  height: 30px;
  padding: 0 38px 0 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  outline: none;
  background: rgba(0, 0, 0, 0.53);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  line-height: 17px;
  transition: background 0.15s, box-shadow 0.15s;
}
.l4d2-home .lf-search::placeholder { color: #acb2b8; opacity: 1; }
.l4d2-home .lf-search:focus {
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 0 0 1px rgba(102, 192, 244, 0.45);
}

.l4d2-home .lf-search-icon {
  position: absolute;
  right: 3px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #acb2b8;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.15s, background 0.15s;
}
.l4d2-home .lf-search-icon:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.l4d2-home .lf-search-icon i { font-size: 15px; }

.l4d2-home-toolbar-meta {
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
}

.l4d2-home-reset {
  padding: 0;
  border: 0;
  background: none;
  color: #66c0f4;
  font-family: inherit;
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
  white-space: nowrap;
}
.l4d2-home-reset:hover { color: #fff; text-decoration: underline; }

.l4d2-home-filter-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(102, 192, 244, 0.45);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.25);
  color: #66c0f4;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.l4d2-home-filter-toggle:hover { background: rgba(26, 159, 255, 0.14); }
.l4d2-home-filter-toggle i { font-size: 12px; }

/* ---------- 主体布局 ---------- */

.l4d2-home-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: 30px;
}

.l4d2-home-sidebar.lf-sidebar {
  flex: 0 0 300px;
  width: 300px;
  align-self: flex-start;
  padding: 10px;
  border: 0;
  border-radius: 0;
  background: radial-gradient(85.9% 84.18% at 34.28% 100%, rgba(41, 50, 61, 0) 27.5%, rgba(28, 30, 36, 0.396) 67.94%);
  box-shadow: none;
  color: #acb2b8;
  font-size: 15px;
}

.l4d2-home-content {
  flex: 1 1 auto;
  min-width: 0;
}

/* ---------- 侧栏快捷按钮 ---------- */

.l4d2-home .l4d2-home-sidebar-actions__bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.l4d2-home .l4d2-home-sidebar-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 34px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #acb2b8;
  font-family: inherit;
  font-size: 12px;
  line-height: 16px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.15s, color 0.15s;
}
.l4d2-home .l4d2-home-sidebar-action + .l4d2-home-sidebar-action {
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.07);
}
.l4d2-home .l4d2-home-sidebar-action i {
  flex: none;
  color: #66c0f4;
  font-size: 12px;
  line-height: 1;
  transition: color 0.15s;
}
.l4d2-home .l4d2-home-sidebar-action span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.l4d2-home .l4d2-home-sidebar-action:hover {
  background: rgba(26, 159, 255, 0.14);
  color: #fff;
}
.l4d2-home .l4d2-home-sidebar-action:hover i { color: #fff; }
.l4d2-home .l4d2-home-sidebar-action:active { background: rgba(26, 159, 255, 0.22); }
.l4d2-home .l4d2-home-sidebar-action:focus-visible {
  outline: 1px solid #66c0f4;
  outline-offset: -2px;
}

/* ---------- 侧栏筛选 ---------- */

.l4d2-home .lf-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}
.l4d2-home .lf-filter-group:last-child { margin-bottom: 0; }

.l4d2-home .lf-filter-title {
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 19px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.l4d2-home .lf-filter-item {
  display: block;
  margin: 0;
  border-radius: 2px;
  color: #acb2b8;
  font-size: 15px;
  line-height: 21px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.l4d2-home .lf-filter-item:hover { background: rgba(255, 255, 255, 0.03); color: #fff; }

.l4d2-home .lf-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  min-height: 21px;
  padding: 0;
}

.l4d2-home .lf-filter-check {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 21px;
  color: inherit;
  transition: color 0.12s;
}
.l4d2-home .lf-filter-check:hover { color: #fff; }

.l4d2-home .lf-filter-checkbox {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid #3d4450;
  border-radius: 2px;
  background: #1b1d21;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.6);
  transition: border-color 0.15s, background 0.15s;
}
.l4d2-home .lf-filter-item:hover .lf-filter-checkbox { border-color: #66c0f4; }
.l4d2-home .lf-filter-item.active .lf-filter-checkbox {
  border-color: #1a9fff;
  background: #1a9fff;
}
.l4d2-home .lf-filter-item.active .lf-filter-checkbox::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}

.l4d2-home .lf-filter-group:first-child .lf-filter-item.active .lf-filter-checkbox {
  border-color: #5c7e10;
  background: #5c7e10;
}

.l4d2-home .lf-tag-name {
  overflow: hidden;
  color: inherit;
  font-size: 15px;
  line-height: 21px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.l4d2-home .lf-filter-exclude {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 2px;
  border-radius: 2px;
  color: #636b74;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.l4d2-home .lf-filter-item:hover .lf-filter-exclude { opacity: 1; }
.l4d2-home .lf-filter-exclude:hover { color: #fff; background: #d83030; }
.l4d2-home .lf-filter-item.excluded .lf-filter-exclude { opacity: 1; color: #d83030; }
.l4d2-home .lf-filter-item.excluded .lf-filter-exclude:hover { color: #fff; }
.l4d2-home .lf-filter-item.excluded .lf-tag-name {
  color: #636b74;
  text-decoration: line-through;
}

/* ---------- 排序与副标题 ---------- */

.l4d2-home-list-head { margin-bottom: 12px; }

.l4d2-home-sort-native { display: none !important; }

.l4d2-home-sort-tabs {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  height: 33px;
  overflow-x: auto;
  scrollbar-width: none;
}
.l4d2-home-sort-tabs::-webkit-scrollbar { display: none; }

.l4d2-home-sort-tab {
  position: relative;
  flex: none;
  padding: 0 0 3px;
  border: 0;
  background: none;
  color: #fff;
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  white-space: nowrap;
  cursor: pointer;
}
.l4d2-home-sort-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: transparent;
  transition: background 0.15s;
}
.l4d2-home-sort-tab:hover::after { background: rgba(102, 192, 244, 0.45); }
.l4d2-home-sort-tab.active::after { background: #1a9fff; }
.l4d2-home-sort-tab:focus-visible { outline: 1px solid #66c0f4; outline-offset: 3px; }

.l4d2-home-sort-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
  margin-top: 2px;
}

.l4d2-home-sort-sub {
  min-height: 20px;
  color: #acb2b8;
  font-size: 15px;
  line-height: 20px;
}

.l4d2-home .lf-time {
  height: 30px;
  padding: 0 28px 0 10px;
  border: 1px solid #3d4450;
  border-radius: 2px;
  outline: none;
  background-color: rgba(0, 0, 0, 0.25);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 12 8'%3E%3Cpath fill='%23acb2b8' d='M5.629 7.5 0 0h11.258L5.63 7.5Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 8px 5px;
  color: #acb2b8;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, color 0.15s;
}
.l4d2-home .lf-time:hover { border-color: #66c0f4; color: #fff; }
.l4d2-home .lf-time:focus { border-color: #66c0f4; box-shadow: 0 0 0 1px rgba(102, 192, 244, 0.35); }
.l4d2-home .lf-time option { background: #1b2838; color: #c6d4df; }

/* ---------- 卡片网格 ---------- */

.l4d2-home .lf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  align-items: start;
  gap: 16px;
  margin: 0;
}

.l4d2-home-card {
  position: relative;
  min-width: 0;
  background: radial-gradient(62% 99% at 17% 35%, #3c4149, #1b1d21);
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.58);
  cursor: pointer;
  transition: box-shadow 0.2s, background 0.2s, transform 0.2s;
}
.l4d2-home-card:focus-visible { outline: 2px solid #66c0f4; outline-offset: 2px; }

.l4d2-home-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #070707;
}
.l4d2-home-card,
.l4d2-home-card__media,
.l4d2-home-card__media img {
  border-radius: 0 !important;
}
.l4d2-home-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.l4d2-home-card__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 42px 10px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 45%, rgba(0, 0, 0, 0.9) 100%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.l4d2-home-card__meta-tags {
  display: flex;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
}
.l4d2-home-tag {
  flex: none;
  height: 20px;
  padding: 0 7px;
  border: 0;
  border-radius: 2px;
  background: rgba(61, 68, 80, 0.94);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
}
.l4d2-home-tag:hover { background: #4b5563; }
.l4d2-home-card__reviews {
  max-width: calc(100% - 40px);
  overflow: hidden;
  color: #c6d4df;
  font-size: 11px;
  line-height: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.l4d2-home-card__zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  color: #acb2b8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.l4d2-home-card__zoom i { font-size: 14px; }
.l4d2-home-card__zoom:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

.l4d2-home-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 75px;
  padding: 10px;
  overflow: hidden;
}

.l4d2-home-card__stars {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0;
  height: 14px;
}
.l4d2-home-star {
  display: block;
  flex: none;
  width: 16.2px;
  height: 14px;
  fill: #1a9fff;
}
.l4d2-home-star.is-empty { fill: none; stroke: #1a9fff; stroke-width: 10; }

.l4d2-home-card__title {
  display: block;
  overflow: hidden;
  color: #acb2b8;
  font-family: inherit;
  font-size: clamp(13.5px, 1.05vw, 15px);
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.l4d2-home-card__creator {
  display: block;
  overflow: hidden;
  color: #acb2b8;
  font-size: 12px;
  line-height: 15.6px;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.15s;
}
.l4d2-home-card__creator:hover { color: #fff; }

.l4d2-home-card:hover,
.l4d2-home-card:focus-within {
  box-shadow: 0 0 0 1px rgba(102, 192, 244, 0.85), 0 0 18px rgba(26, 159, 255, 0.22), 0 8px 24px rgba(0, 0, 0, 0.75);
  transform: translateY(-2px);
  z-index: 2;
}
.l4d2-home-card:hover .l4d2-home-card__media img,
.l4d2-home-card:focus-within .l4d2-home-card__media img {
  transform: scale(1.035);
  filter: brightness(1.06);
}
.l4d2-home-card:hover .l4d2-home-card__title,
.l4d2-home-card:focus-within .l4d2-home-card__title { color: #fff; }
.l4d2-home-card:hover .l4d2-home-card__meta,
.l4d2-home-card:focus-within .l4d2-home-card__meta {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.l4d2-home-card:hover .l4d2-home-card__zoom,
.l4d2-home-card:focus-within .l4d2-home-card__zoom {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- 空状态 / 分页 ---------- */

.l4d2-home-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.16);
  text-align: center;
}
.l4d2-home-empty__title { color: #fff; font-size: 18px; font-weight: 600; line-height: 24px; }
.l4d2-home-empty__text { margin-top: 6px; color: #acb2b8; font-size: 13px; line-height: 18px; }
.l4d2-home-empty__reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  margin-top: 18px;
  padding: 0 16px;
  border: 1px solid rgba(102, 192, 244, 0.55);
  border-radius: 2px;
  background: transparent;
  color: #66c0f4;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.l4d2-home-empty__reset:hover { background: rgba(26, 159, 255, 0.14); border-color: #66c0f4; }

.l4d2-home .l4d2-home-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 4px;
}

.l4d2-home .l4d2-home-pagination .lf-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #3d4450;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.2);
  color: #acb2b8;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.l4d2-home .l4d2-home-pagination .lf-page-btn i { font-size: 22px; }
.l4d2-home .l4d2-home-pagination .lf-page-btn:hover:not(:disabled) {
  border-color: #1a9fff;
  background: rgba(26, 159, 255, 0.14);
  color: #fff;
}
.l4d2-home .l4d2-home-pagination .lf-page-btn:disabled { opacity: 0.35; cursor: default; }

.l4d2-home .l4d2-home-pagination .lf-page-num {
  display: block;
  width: 56px;
  height: 30px;
  min-height: 30px;
  padding: 0 4px;
  border: 1px solid #2a475e !important;
  border-radius: 2px;
  outline: none;
  background: #1b2838 !important;
  color: #fff !important;
  font-family: inherit;
  font-size: 13px;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.l4d2-home .l4d2-home-pagination .lf-page-num::-webkit-outer-spin-button,
.l4d2-home .l4d2-home-pagination .lf-page-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.l4d2-home .l4d2-home-pagination .lf-page-num:focus {
  border-color: #66c0f4;
  box-shadow: 0 0 0 1px rgba(102, 192, 244, 0.3);
}

/* 详情弹窗顶部评分（数据来自首页卡片，弹窗在 .l4d2-home 之外） */
.lf-modal-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
  color: #acb2b8;
  font-size: 12px;
  line-height: 15px;
}
.lf-modal-rating .l4d2-home-card__stars {
  display: flex;
  align-items: center;
  height: 14px;
}
.lf-modal-rating .l4d2-home-star {
  width: 16.2px;
  height: 14px;
  fill: #1a9fff;
}
.lf-modal-rating .l4d2-home-star.is-empty {
  fill: none;
  stroke: #1a9fff;
  stroke-width: 10;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1120px) {
  .l4d2-home-layout { gap: 20px; }
  .l4d2-home-sidebar.lf-sidebar { flex-basis: 260px; width: 260px; }
  .l4d2-home-sort-tabs { gap: 20px; }
  .l4d2-home-sort-tab { font-size: 18px; }
}

@media (max-width: 900px) {
  .l4d2-home-layout { flex-direction: column; align-items: stretch; gap: 18px; }
  .l4d2-home-sidebar.lf-sidebar { display: none; width: 100%; flex: 0 0 auto; }
  .l4d2-home-sidebar.lf-sidebar.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 24px;
  }
  .l4d2-home-sidebar .lf-filter-group { margin-bottom: 12px; }
  .l4d2-home .l4d2-home-sidebar-actions { grid-column: 1 / -1; }
  .l4d2-home-content { width: 100%; }
  .l4d2-home-filter-toggle { display: inline-flex; }
  .l4d2-home-toolbar { flex-wrap: wrap; }
  .l4d2-home-toolbar-meta { margin-left: auto; }
}

@media (max-width: 640px) {
  .l4d2-home-masthead__inner { padding: 24px 12px 22px; }
  .l4d2-home-title-row { flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 12px; }
  .l4d2-home-title-copy h1 { font-size: 26px; }
  .l4d2-home-title-copy p { font-size: 13px; line-height: 19px; }
  .l4d2-home-steam-link { margin-bottom: 0; }

  .l4d2-home__body { padding: 0 12px 28px; }
  .l4d2-home-toolbar { gap: 8px; padding: 8px; }
  .l4d2-home-search { flex-wrap: wrap; width: 100%; }
  .l4d2-home .lf-search-term-bar { max-width: 100%; }
  .l4d2-home-toolbar-meta { width: 100%; justify-content: flex-end; margin-left: 0; }

  .l4d2-home-layout { margin-top: 22px; }
  .l4d2-home-sidebar.lf-sidebar.is-open { grid-template-columns: minmax(0, 1fr); }
  .l4d2-home-sort-tabs { gap: 16px; height: 29px; }
  .l4d2-home-sort-tab { font-size: 17px; line-height: 26px; }
  .l4d2-home-sort-sub-row { flex-wrap: wrap; gap: 8px; }
  .l4d2-home-sort-sub { font-size: 14px; }

  .l4d2-home .lf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .l4d2-home-card__body { height: 72px; padding: 8px; }
  .l4d2-home-card__title { font-size: 14px; }
  .l4d2-home-card__creator { font-size: 11px; line-height: 14px; }
  .l4d2-home-card__stars { height: 13px; }
  .l4d2-home-star { width: 14px; height: 12px; }
  .l4d2-home .l4d2-home-pagination .lf-page-num { width: 56px; }
}

@media (max-width: 400px) {
  .l4d2-home-title-copy h1 { font-size: 24px; }
  .l4d2-home-sort-tabs { flex-wrap: wrap; height: auto; row-gap: 2px; overflow: visible; }
  .l4d2-home-sort-tab { line-height: 24px; }
  .l4d2-home-card__title { font-size: 13px; }
  .l4d2-home-card__creator { font-size: 10.5px; }
  .l4d2-home-star { width: 13px; height: 11.5px; }
}

@media (hover: none) {
  .l4d2-home-card__meta { opacity: 1; pointer-events: auto; transform: none; }
  .l4d2-home-card__zoom { opacity: 1; pointer-events: auto; }
  .l4d2-home .lf-filter-exclude { opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .l4d2-home *, .l4d2-home *::before, .l4d2-home *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
