/* ===== 男人之家 - 首页入口卡片 ===== */
.mens-home-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 28px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.15);
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.mens-home-banner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(34, 197, 94, 0.06) 100%);
  pointer-events: none;
}
.mens-home-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.mens-home-banner:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.2);
}
.mens-home-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}
.mens-home-icon-text {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  font-family: "Segoe UI", sans-serif;
}

.mens-home-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.mens-home-info {
  flex: 1;
  min-width: 0;
}
.mens-home-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ef4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 12px rgba(245, 158, 11, 0.4);
  letter-spacing: 2px;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}
.mens-home-desc {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: #94a3b8;
}
.mens-home-arrow {
  font-size: 0.88rem;
  font-weight: 600;
  color: #22c55e;
  white-space: nowrap;
}

/* ===== 男人之家 - 子页面 ===== */
.mens-home-back {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}
.mens-home-back:hover {
  text-decoration: underline;
}
.mens-home-hero {
  padding-bottom: 8px;
}
.mens-home-app .brand h1 {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ef4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 12px rgba(245, 158, 11, 0.35);
  letter-spacing: 3px;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

.mens-home-categories {
  margin-top: 20px;
}

/* ===== 类目切换标签 ===== */
.mens-category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.mens-category-tab {
  flex: 1;
  min-width: 100px;
  padding: 14px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font-size: 1rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.mens-category-tab:hover {
  border-color: #86efac;
  color: #16a34a;
}
.mens-category-tab.is-active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: #16a34a;
  color: #fff;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.25);
}

/* ===== 内容卡片网格 ===== */
.mens-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.mens-item-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.mens-item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}
.mens-item-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f1f5f9;
}
.mens-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.mens-item-card:hover .mens-item-image img {
  transform: scale(1.05);
}
.mens-item-image.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: #cbd5e1;
}
.mens-item-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mens-item-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}
.mens-item-desc {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.mens-item-video {
  margin-top: 8px;
}
.mens-item-video video {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #000;
}
.mens-empty {
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
  font-size: 0.95rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}

/* ===== 移动端适配 ===== */
@media (max-width: 720px) {
  .mens-home-banner {
    padding: 18px 16px;
    gap: 12px;
  }
  .mens-home-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }
  .mens-home-icon-text {
    font-size: 1.4rem;
  }
  .mens-home-title {
    font-size: 1.35rem;
    letter-spacing: 1px;
  }
  .mens-home-desc {
    font-size: 0.78rem;
  }
  .mens-home-arrow {
    font-size: 0.82rem;
  }

  .mens-category-tabs {
    flex-direction: column;
  }
  .mens-category-tab {
    padding: 12px 16px;
    font-size: 0.95rem;
  }
  .mens-item-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .mens-item-image {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .mens-home-banner {
    gap: 12px;
    padding: 18px 16px;
  }
  .mens-home-right {
    gap: 6px;
  }
  .mens-home-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
  .mens-home-icon-text {
    font-size: 1.5rem;
  }
  .mens-home-arrow {
    font-size: 0.8rem;
  }
}


/* ===== 品字形类目卡片 ===== */
.pinzhi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 580px;
  margin: 0 auto;
}
.pinzhi-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.pinzhi-card-inner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.pinzhi-card-inner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
  pointer-events: none;
}
.pinzhi-card:hover .pinzhi-card-inner {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.2);
}
.pinzhi-icon {
  font-size: 2.4rem;
  line-height: 1;
}
.pinzhi-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ef4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.pinzhi-count {
  font-size: 0.82rem;
  color: #94a3b8;
}
.pinzhi-enter {
  font-size: 0.85rem;
  font-weight: 600;
  color: #22c55e;
  margin-top: auto;
  padding-top: 4px;
}

/* Last card centered (品字形 bottom) */
.pinzhi-grid > .pinzhi-card:last-child .pinzhi-card-inner {
  max-width: 260px;
  margin: 0 auto;
  width: 100%;
}

/* When there are more than 3 cards, switch to normal grid */
.pinzhi-grid > .pinzhi-card:nth-child(n+4) .pinzhi-card-inner {
  max-width: none;
}

@media (max-width: 560px) {
  .pinzhi-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    gap: 14px;
  }
  .pinzhi-grid > .pinzhi-card:last-child .pinzhi-card-inner {
    max-width: none;
  }
  .pinzhi-card-inner {
    padding: 22px 16px;
  }
  .pinzhi-icon { font-size: 2rem; }
  .pinzhi-title { font-size: 1.15rem; }
}

/* ===== 类目详情页 ===== */
.mens-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.mens-cat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.mens-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}
.mens-cat-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f1f5f9;
}
.mens-cat-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.mens-cat-card:hover .mens-cat-image img {
  transform: scale(1.05);
}
.mens-cat-image.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: #cbd5e1;
}
.mens-cat-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mens-cat-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}
.mens-cat-desc {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.mens-cat-video {
  margin-top: 8px;
}
.mens-cat-video video {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #000;
}

/* Category quick switch */
.mens-cat-switch {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}
.mens-cat-switch-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.mens-cat-switch-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.mens-cat-switch-btn:hover {
  background: #22c55e;
  color: #fff;
  border-color: #22c55e;
}
.mens-cat-switch-back {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}
.mens-cat-switch-back:hover {
  background: #f59e0b;
  color: #fff;
  border-color: #f59e0b;
}

@media (max-width: 560px) {
  .mens-cat-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .mens-cat-image {
    height: 180px;
  }
  .mens-cat-switch-row {
    flex-direction: column;
    align-items: stretch;
  }
  .mens-cat-switch-btn {
    text-align: center;
  }
}


/* ===== Video Quality Switcher ===== */
.video-quality-wrap {
  position: relative;
}
.video-quality-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
}
.vq-toggle {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.2s;
  line-height: 1.4;
}
.vq-toggle:hover {
  background: rgba(0, 0, 0, 0.85);
}
.vq-toggle:active {
  background: rgba(0, 0, 0, 0.9);
}
.vq-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 8px;
  padding: 4px;
  min-width: 120px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.vq-option {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: #cbd5e1;
  border: none;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.vq-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.vq-option.active {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  font-weight: 700;
}
@media (max-width: 480px) {
  .vq-toggle {
    font-size: 11px;
    padding: 3px 8px;
  }
  .vq-option {
    font-size: 12px;
    padding: 6px 10px;
  }
}


/* ===== HLS 自适应清晰度菜单 ===== */
.hls-quality-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  line-height: 1.6;
  letter-spacing: 0.5px;
}
.hls-quality-btn:hover { background: rgba(0,0,0,0.85); }
.hls-quality-menu {
  position: absolute;
  top: 32px;
  right: 8px;
  z-index: 21;
  background: rgba(0,0,0,0.85);
  border-radius: 6px;
  padding: 4px 0;
  display: none;
  min-width: 80px;
}
.hls-quality-menu.show { display: block; }
.hls-quality-option {
  color: #fff;
  font-size: 12px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.hls-quality-option:hover { background: rgba(255,255,255,0.15); }
.hls-quality-option.active { color: #4fc3f7; font-weight: 600; }
