/* 首页精选：路线图 / 大厂笔试 / 面试手撕 / 性格测评 / 课程 — 选项卡 + 卡片 */

#home-featured-card {
  margin-bottom: 4px;
}

.hfc-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 12px;
  padding: 0 2px;
  border-bottom: none;
  flex-wrap: wrap;
}

.hfc-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 12px;
  margin: 0;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.hfc-tab:hover {
  color: #334155;
}

.hfc-tab.is-active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.hfc-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.hfc-tab-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.hfc-tab.is-active .hfc-tab-icon {
  color: #2563eb;
}

.hfc-card .hfc-card-header {
  align-items: flex-start;
  padding: 20px 24px 16px;
  background: #fff;
  border-bottom: none;
}

.hfc-card-heading {
  min-width: 0;
  flex: 1;
}

.hfc-card .cb-card-title.hfc-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.hfc-subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
  font-weight: 400;
}

.hfc-card-body {
  padding: 0 24px 24px;
}

.hfc-panel[hidden] {
  display: none !important;
}

/* 大厂笔试：紧凑 chip，一屏展示更多公司（完整名仅 title 悬停） */
.hfc-panel--company .hfc-company-ps-list {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 5px;
  max-height: 300px;
  overflow-y: auto;
  padding: 2px 0;
}

.hfc-panel--company .cb-company-ps-chip {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 11px;
  border-radius: 7px;
}

.hfc-panel--company .cb-company-ps-icon,
.hfc-panel--company .cb-company-ps-icon--default {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.hfc-panel--company .cb-company-ps-icon--default svg {
  width: 12px;
  height: 12px;
}

.hfc-item-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}

.hfc-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}

.hfc-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.hfc-item-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hfc-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.hfc-item-icon svg {
  width: 22px;
  height: 22px;
}

.hfc-item-icon--blue {
  background: #eff6ff;
  color: #2563eb;
}

.hfc-item-icon--green {
  background: #ecfdf5;
  color: #059669;
}

.hfc-item-icon--purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.hfc-item-icon--amber {
  background: #fffbeb;
  color: #d97706;
}

.hfc-item-icon--teal {
  background: #f0fdfa;
  color: #0f766e;
}

.hfc-panel--personality .hfc-item-grid {
  grid-template-columns: 1fr;
}

.hfc-item--personality {
  align-items: center;
  min-height: 88px;
}

.hfc-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hfc-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hfc-item-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.hfc-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  pointer-events: none;
}

.hfc-badge--hidden {
  color: #ff4d4f;
  background: #fff0f0;
  border: 1px solid #ffccc7;
}

.hfc-badge--free {
  color: #fa8c16;
  background: #fff7e6;
  border: 1px solid #ffd591;
}

.hfc-item-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hfc-item-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.3;
  color: #94a3b8;
}

.hfc-item-stat-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* 面试手撕 Tab：八股题库 / 大厂专项 分区卡（与 /codenote 分区同配置） */
.hfc-hub {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}

.hfc-hub-card {
  display: block;
  min-width: 0;
  padding: 14px 16px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hfc-hub-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.hfc-hub-card__head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.hfc-hub-card__icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f5f3ff;
  color: #7c3aed;
}

.hfc-hub-card__icon--blue {
  background: #eff6ff;
  color: #2563eb;
}

.hfc-hub-card__icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.hfc-hub-card__title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.hfc-hub-card__more {
  flex-shrink: 0;
  font-size: 12px;
  color: #94a3b8;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.hfc-hub-card__more:hover {
  color: #2563eb;
}

.hfc-hub-block + .hfc-hub-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

/* 多块（如大厂专项的华为/字节）并排，平衡左右卡高度 */
.hfc-hub-card__body--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
  align-items: start;
}

.hfc-hub-card__body--grid .hfc-hub-block + .hfc-hub-block {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.hfc-hub-block__label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #94a3b8;
  line-height: 1.4;
}

.hfc-hub-block__links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
}

.hfc-hub-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 7px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #475569;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.hfc-hub-link:hover {
  background: #f8fafc;
  color: #2563eb;
}

.hfc-hub-link__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hfc-hub-link__icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: #cbd5e1;
}

.hfc-hub-link__arrow {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #cbd5e1;
  transition: color 0.15s ease, transform 0.15s ease;
}

.hfc-hub-link:hover .hfc-hub-link__arrow {
  color: #2563eb;
  transform: translateX(2px);
}

.hfc-hub-link.is-locked {
  color: #94a3b8;
}

.hfc-hub-link.is-locked:hover {
  color: #64748b;
}

@media (max-width: 768px) {
  .hfc-item-grid {
    grid-template-columns: 1fr;
  }

  .hfc-hub {
    grid-template-columns: 1fr;
  }

  .hfc-hub-card__body--grid {
    grid-template-columns: 1fr;
  }

  .hfc-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .hfc-tab {
    flex-shrink: 0;
  }

  .hfc-card .hfc-card-header,
  .hfc-card-body {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* 深色模式 */
.theme--dark .hfc-tab {
  color: #94a3b8;
}

.theme--dark .hfc-tab:hover {
  color: #cbd5e1;
}

.theme--dark .hfc-tab.is-active {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
}

.theme--dark .hfc-card .hfc-card-header {
  background: #1f222a;
}

.theme--dark .hfc-subtitle {
  color: #94a3b8;
}

.theme--dark .hfc-item {
  background: #252830;
  border-color: #3f3f46;
}

.theme--dark .hfc-item:hover {
  border-color: #52525b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.theme--dark .hfc-item-title {
  color: #f1f5f9;
}

.theme--dark .hfc-item-desc {
  color: #94a3b8;
}

.theme--dark .hfc-item-stat {
  color: #71717a;
}

.theme--dark .hfc-hub-card {
  background: #252830;
  border-color: #3f3f46;
}

.theme--dark .hfc-hub-card:hover {
  border-color: #52525b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.theme--dark .hfc-hub-card__icon {
  background: rgba(124, 58, 237, 0.15);
  color: #a78bfa;
}

.theme--dark .hfc-hub-card__icon--blue {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
}

.theme--dark .hfc-hub-card__title {
  color: #f1f5f9;
}

.theme--dark .hfc-hub-card__more {
  color: #71717a;
}

.theme--dark .hfc-hub-card__more:hover {
  color: #60a5fa;
}

.theme--dark .hfc-hub-block + .hfc-hub-block {
  border-top-color: #3f3f46;
}

.theme--dark .hfc-hub-block__label {
  color: #71717a;
}

.theme--dark .hfc-hub-link {
  color: #a1a1aa;
}

.theme--dark .hfc-hub-link:hover {
  background: #1f222a;
  color: #60a5fa;
}

.theme--dark .hfc-hub-link__icon {
  color: #52525b;
}

.theme--dark .hfc-hub-link__arrow {
  color: #52525b;
}

.theme--dark .hfc-hub-link:hover .hfc-hub-link__arrow {
  color: #60a5fa;
}

.theme--dark .hfc-hub-link.is-locked,
.theme--dark .hfc-hub-link.is-locked:hover {
  color: #71717a;
}

.theme--dark .hfc-item-icon--blue {
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
}

.theme--dark .hfc-item-icon--green {
  background: rgba(5, 150, 105, 0.15);
  color: #34d399;
}

.theme--dark .hfc-item-icon--purple {
  background: rgba(124, 58, 237, 0.15);
  color: #a78bfa;
}

.theme--dark .hfc-item-icon--amber {
  background: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
}

.theme--dark .hfc-item-icon--teal {
  background: rgba(13, 148, 136, 0.16);
  color: #5eead4;
}

.theme--dark .hfc-badge--hidden {
  color: #ff9b9b;
  background: rgba(255, 77, 79, 0.15);
  border-color: rgba(255, 77, 79, 0.35);
}

.theme--dark .hfc-badge--free {
  color: #ffb38a;
  background: rgba(250, 140, 22, 0.15);
  border-color: rgba(250, 140, 22, 0.35);
}
