:root {
  --portal-bg: #f5f7fb;
  --portal-card: #ffffff;
  --portal-text: #1f2329;
  --portal-muted: #7a8194;
  --portal-line: #ebedf2;
  --portal-primary: #2b6ef2;
  --portal-primary-deep: #1d4fd7;
  --portal-primary-soft: #e8f0ff;
  --portal-accent: #ff7d3c;
  --portal-radius: 14px;
  --portal-shadow: 0 6px 24px rgba(31, 48, 96, 0.08);
  --portal-font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--portal-bg);
  color: var(--portal-text);
  font-family: var(--portal-font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

.portal-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

/* ===== 顶部导航 ===== */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--portal-line);
}

.portal-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 62px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}

.portal-brand__logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--portal-primary-soft);
  box-shadow: 0 4px 10px rgba(43, 110, 242, 0.18);
}

.portal-brand__logo img { width: 100%; height: 100%; object-fit: cover; }

.portal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
}

.portal-nav__link {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #4b5265;
  transition: background 0.16s ease, color 0.16s ease;
}

.portal-nav__link:hover { color: var(--portal-primary); background: var(--portal-primary-soft); }

.portal-nav__link--active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--portal-primary), var(--portal-primary-deep));
  box-shadow: 0 6px 14px rgba(43, 110, 242, 0.28);
}

.portal-header__extra {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.portal-btn:hover { transform: translateY(-1px); }

.portal-btn--primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--portal-primary), var(--portal-primary-deep));
  box-shadow: 0 8px 18px rgba(43, 110, 242, 0.3);
}

.portal-btn--member {
  color: #5a3400;
  background: linear-gradient(135deg, #ffd36e, #ffab2e);
  box-shadow: 0 8px 18px rgba(255, 171, 46, 0.35);
}

/* ===== 搜索栏 ===== */
.portal-search {
  margin: 22px 0 18px;
}

.portal-search__box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 10px 0 20px;
  border-radius: 999px;
  background: #ffffff;
  border: 1.5px solid var(--portal-line);
  box-shadow: var(--portal-shadow);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.portal-search__box:focus-within {
  border-color: var(--portal-primary);
  box-shadow: 0 0 0 4px rgba(43, 110, 242, 0.12);
}

.portal-search__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-search__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portal-search__input {
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  height: 100%;
  font-size: 15px;
  font-family: inherit;
  color: var(--portal-text);
  background: transparent;
}

.portal-search__input::placeholder { color: #a8aec0; }

.portal-search__btn {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--portal-primary), var(--portal-primary-deep));
}

/* ===== 轮播图 ===== */
.portal-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(29, 79, 215, 0.16);
  margin-bottom: 26px;
}

.portal-carousel__track {
  display: flex;
  transition: transform 0.45s ease;
}

.portal-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 34px 44px;
  background:
    linear-gradient(120deg, #1d4fd7 0%, #2b6ef2 48%, #5fa0ff 100%);
  color: #ffffff;
}

.portal-slide--has-image { justify-content: center; padding-bottom: 34px; }

.portal-slide__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portal-slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 10, 40, 0.55) 0%, rgba(0, 10, 40, 0.15) 55%, transparent 100%);
}

/* 有背景图时文字收窄到左侧，避免遮挡图片主体内容 */
.portal-slide--has-image .portal-slide__title,
.portal-slide--has-image .portal-slide__subtitle {
  max-width: 46%;
}

.portal-slide--has-image .portal-slide__tag {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.portal-slide__tag {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.portal-slide__title {
  position: relative;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 20, 60, 0.25);
}

.portal-slide__subtitle {
  position: relative;
  max-width: 70%;
  font-size: 15px;
  opacity: 0.92;
}

.portal-carousel__dots {
  position: absolute;
  right: 18px;
  bottom: 14px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.portal-carousel__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.16s ease, width 0.16s ease;
}

.portal-carousel__dot--active {
  width: 26px;
  background: #ffffff;
}

/* ===== 分类标签 ===== */
.portal-cats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.portal-cats__link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #4b5265;
  background: #ffffff;
  border: 1px solid var(--portal-line);
  transition: all 0.16s ease;
}

.portal-cats__link:hover { color: var(--portal-primary); border-color: var(--portal-primary); }

.portal-cats__link--active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--portal-primary), var(--portal-primary-deep));
  box-shadow: 0 6px 14px rgba(43, 110, 242, 0.26);
}

/* ===== 主体布局 ===== */
.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  padding-bottom: 40px;
}

/* 首页 PC 端隐藏右侧榜单，让 4 列卡片充分展开 */
.portal-home .portal-layout {
  grid-template-columns: minmax(0, 1fr);
}
.portal-home .portal-layout > aside {
  display: none;
}

.portal-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.portal-section-head__bar {
  width: 5px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--portal-primary), var(--portal-primary-deep));
}

.portal-section-head__title { font-size: 20px; font-weight: 800; }

.portal-section-head__icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 6px;
}

.portal-section-head__count { color: var(--portal-muted); font-size: 13px; font-weight: 500; }

/* ===== 测评卡片 ===== */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.portal-card {
  display: flex;
  flex-direction: column;
  background: var(--portal-card);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  overflow: hidden;
  box-shadow: var(--portal-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(31, 48, 96, 0.14);
}

.portal-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #f2f5fa;
  overflow: hidden;
}

.portal-card__cover {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.portal-card:hover .portal-card__cover { transform: scale(1.04); }

.portal-card__badge {
  display: none;
}

.portal-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
  flex: 1 1 auto;
}

.portal-card__title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-card__desc {
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.portal-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.portal-card__price {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: var(--portal-accent);
  font-weight: 800;
}

.portal-card__price .portal-card__price-cur { font-size: 12px; }

.portal-card__price .portal-card__price-num { font-size: 18px; }

.portal-card__price--free { color: #16a675; font-size: 16px; }

.portal-card__count {
  color: var(--portal-muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== 右侧榜单 ===== */
.portal-aside-panel {
  position: sticky;
  top: 82px;
  background: var(--portal-card);
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow);
  overflow: hidden;
}

.portal-aside-panel + .portal-aside-panel { margin-top: 18px; }

.portal-aside-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--portal-line);
  background: linear-gradient(180deg, #f7faff, #ffffff);
}

.portal-aside-panel__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
}

.portal-aside-panel__title-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: transparent;
  color: var(--portal-primary);
  overflow: hidden;
}

.portal-aside-panel__title-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portal-rank__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px dashed var(--portal-line);
  transition: background 0.16s ease;
}

.portal-rank__item:last-child { border-bottom: 0; }

.portal-rank__item:hover { background: #f7faff; }

.portal-rank__no {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #9aa1b5;
  background: #f0f2f7;
}

.portal-rank__no--top { color: #fff; background: linear-gradient(135deg, #ff9a3c, #ff5e3c); }

.portal-rank__body { flex: 1 1 auto; min-width: 0; }

.portal-rank__title {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-rank__meta { color: var(--portal-muted); font-size: 12px; }

.portal-aside-link {
  display: block;
  padding: 12px 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--portal-primary);
  border-top: 1px solid var(--portal-line);
  transition: background 0.16s ease;
}

.portal-aside-link:hover { background: var(--portal-primary-soft); }

/* ===== 页脚 ===== */
.portal-footer {
  padding: 26px 0 40px;
  text-align: center;
  color: var(--portal-muted);
  font-size: 13px;
  border-top: 1px solid var(--portal-line);
  background: #ffffff;
}

.portal-footer a:hover { color: var(--portal-primary); }

.portal-footer__icp {
  color: var(--portal-muted);
  text-decoration: none;
  transition: color 0.16s ease;
}

.portal-footer__icp:hover { color: var(--portal-primary); }

/* ===== 热销榜单页 ===== */
.portal-hot { padding: 6px 0 48px; }

.portal-hot__list { display: flex; flex-direction: column; gap: 12px; }

.portal-hot__item {
  background: var(--portal-card);
  border: 1px solid var(--portal-line);
  border-radius: 14px;
  box-shadow: var(--portal-shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.portal-hot__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(31, 48, 96, 0.14);
}

.portal-hot__link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

.portal-hot__rank {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  background: #aeb7cc;
}

.portal-hot__rank--top1 { background: linear-gradient(135deg, #ffb43c, #ff8a1e); box-shadow: 0 6px 14px rgba(255, 138, 30, 0.35); }
.portal-hot__rank--top2 { background: linear-gradient(135deg, #c3cede, #8fa2bd); box-shadow: 0 6px 14px rgba(143, 162, 189, 0.35); }
.portal-hot__rank--top3 { background: linear-gradient(135deg, #f0a678, #d97c46); box-shadow: 0 6px 14px rgba(217, 124, 70, 0.35); }

.portal-hot__cover {
  flex: 0 0 96px;
  width: 96px;
  height: 66px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--portal-primary-soft);
}

.portal-hot__cover img { width: 100%; height: 100%; object-fit: cover; }

.portal-hot__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.portal-hot__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--portal-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-hot__desc {
  color: var(--portal-muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-hot__meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.portal-hot__price { font-size: 17px; font-weight: 800; color: var(--portal-accent); }
.portal-hot__price--free { color: var(--portal-primary); font-size: 15px; }
.portal-hot__sales { color: var(--portal-muted); font-size: 12.5px; }

.portal-footer__links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.portal-empty {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: var(--portal-muted);
  background: #ffffff;
  border: 1px dashed var(--portal-line);
  border-radius: var(--portal-radius);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .portal-layout { grid-template-columns: minmax(0, 1fr); }
  .portal-aside-panel { position: static; }
  .portal-rank { display: block; }
  .portal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* 平板/手机端恢复显示榜单 */
  .portal-home .portal-layout > aside { display: block; }
}

@media (max-width: 760px) {
  .portal-header__inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
    min-height: 0;
  }

  .portal-nav { order: 3; width: 100%; justify-content: space-between; gap: 2px; }
  .portal-nav__link { padding: 7px 12px; font-size: 14px; }
  .portal-header__extra { margin-left: auto; }
  .portal-btn--member span.portal-btn__price { display: none; }

  .portal-search__box { height: 46px; }
  .portal-slide { min-height: 180px; padding: 24px; }
  .portal-slide--has-image {
    justify-content: flex-end;
    padding-bottom: 44px;
  }
  .portal-slide--has-image .portal-slide__overlay {
    background: linear-gradient(0deg, rgba(0, 10, 40, 0.72) 0%, rgba(0, 10, 40, 0.2) 50%, transparent 100%);
  }
  .portal-slide--has-image .portal-slide__title,
  .portal-slide--has-image .portal-slide__subtitle {
    max-width: 100%;
  }
  .portal-slide__subtitle { max-width: 100%; }

  .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .portal-cats__link { height: 34px; padding: 0 14px; font-size: 13px; }

  .portal-hot__link { gap: 12px; padding: 12px 14px; }
  .portal-hot__rank { flex-basis: 34px; width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
  .portal-hot__cover { flex-basis: 72px; width: 72px; height: 52px; border-radius: 8px; }
  .portal-hot__title { font-size: 15px; }
  .portal-hot__desc { display: none; }
  .portal-hot__price { font-size: 15px; }
  .portal-hot__price--free { font-size: 14px; }
  .portal-hot__sales { font-size: 11px; }

  .portal-card__body { padding: 10px 12px 12px; gap: 5px; }
  .portal-card__title { font-size: 15px; }
  .portal-card__desc {
    font-size: 12px;
    -webkit-line-clamp: 1;
    min-height: 0;
  }
  .portal-card__meta {
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 2px;
  }
  .portal-card__price { white-space: nowrap; }
  .portal-card__price .portal-card__price-cur { font-size: 11px; }
  .portal-card__price .portal-card__price-num { font-size: 16px; }
  .portal-card__price--free { font-size: 14px; }
  .portal-card__count {
    flex: 0 1 auto;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 360px) {
  .portal-card__title { font-size: 14px; }
  .portal-card__price .portal-card__price-num { font-size: 15px; }
  .portal-card__count { font-size: 10px; }
}


.portal-btn__price {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(90, 52, 0, 0.16);
  font-size: 12px;
}
