/* ============================================================
   全局 — 首页隐藏默认头部
   ============================================================ */
.home-layout .headband,
.home-layout .header {
  display: none !important;
}

/* ============================================================
   Hero 全屏轮播
   ============================================================ */
.hero-section {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  background: #111;
}

.hero-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- 遮罩 ---- */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.60) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* ---- 中央品牌区 ---- */
.hero-center {
  text-align: center;
  color: #fff;
  padding: 0 40px;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0;
  text-shadow: 0 2px 24px rgba(0,0,0,0.45);
  line-height: 1.2;
  opacity: 0;
  animation: heroIn 0.8s ease 0.3s forwards;
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 300;
  opacity: 0;
  color: rgba(255,255,255,0.8);
  margin: 14px 0 0;
  letter-spacing: 0.18em;
  text-shadow: 0 1px 12px rgba(0,0,0,0.3);
  animation: heroIn 0.8s ease 0.5s forwards;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- 右上角毛玻璃导航 ---- */
.hero-nav-bar {
  position: absolute;
  top: 28px;
  right: 5%;
  z-index: 30;
  display: flex;
  gap: 3px;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 5px 7px;
  opacity: 0;
  animation: heroIn 0.6s ease 0.1s forwards;
}

.hero-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.78) !important;
  text-decoration: none !important;
  border-bottom: none !important;
  border-radius: 9px;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.hero-nav-btn i { font-size: 0.8rem; opacity: 0.75; }

.hero-nav-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff !important;
}

.hero-nav-btn.active {
  background: rgba(255,255,255,0.18);
  color: #fff !important;
  font-weight: 500;
}

/* ---- 切换按钮 ---- */
.hero-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: all 0.2s;
  opacity: 0;
}

.hero-section:hover .hero-btn { opacity: 1; }

.hero-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-50%) scale(1.06);
}

.hero-btn-prev { left: 18px; }
.hero-btn-next { right: 18px; }

/* ---- 指示点 ---- */
.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all 0.3s;
}

.hero-dot.active {
  background: #fff;
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* ============================================================
   主内容区
   ============================================================ */
.home-layout .main-inner {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

.home-content {
  background: #f0f2f5;
  padding: 40px 10% 0;
}

.home-grid {
  display: grid;
  grid-template-columns: 4.5fr 1fr;
  gap: 36px;
  width: 100%;
  margin: 0 auto;
  align-items: start;
}

/* ============================================================
   统一卡片
   ============================================================ */
.hc-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
  margin-bottom: 28px;
  transition: box-shadow 0.25s;
}

.hc-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

.hc-card-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 20px 28px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a2e;
  letter-spacing: 0.03em;
  border-bottom: 1px solid #f0f0f0;
}

.hc-card-header i {
  font-size: 0.85rem;
  color: #5b7fff;
}

.hc-card-body { padding: 0; }

.hc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  color: #bbb;
  font-size: 0.85rem;
}

.hc-empty i { font-size: 2rem; margin-bottom: 10px; opacity: 0.4; }
.hc-empty p { margin: 0; }

/* ============================================================
   左栏：分类专区
   ============================================================ */
.hc-cat {
  padding: 18px 28px 16px;
  border-bottom: 1px solid #f3f4f6;
  border-left: 3px solid transparent;
}

.hc-cat:last-child { border-bottom: none; }

.hc-cat[data-category="Java"] { border-left-color: #e76f00; }
.hc-cat[data-category="Agent"] { border-left-color: #6c5ce7; }
.hc-cat[data-category="操作系统"] { border-left-color: #00b894; }
.hc-cat[data-category="计算机网络"] { border-left-color: #0984e3; }
.hc-cat[data-category="Python"] { border-left-color: #3776ab; }
.hc-cat[data-category="算法"] { border-left-color: #d63031; }

.hc-cat-title {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.04em;
}

.hc-cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hc-cat[data-category="Java"] .hc-cat-dot { background: #e76f00; }
.hc-cat[data-category="Agent"] .hc-cat-dot { background: #6c5ce7; }
.hc-cat[data-category="操作系统"] .hc-cat-dot { background: #00b894; }
.hc-cat[data-category="计算机网络"] .hc-cat-dot { background: #0984e3; }
.hc-cat[data-category="Python"] .hc-cat-dot { background: #3776ab; }
.hc-cat[data-category="算法"] .hc-cat-dot { background: #d63031; }

.hc-cat-count {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 400;
  color: #bbb;
}

.hc-cat-posts {
  padding: 0;
}

.hc-cat-post {
  display: flex;
  gap: 16px;
  padding: 14px 28px;
  text-decoration: none !important;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s;
  align-items: center;
}

.hc-cat-post:last-child { border-bottom: none; }
.hc-cat-post:hover { background: #fafbfc; }

.hc-cat-post-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  transition: transform 0.25s;
}

.hc-cat-post:hover .hc-cat-post-thumb { transform: scale(1.05); }

.hc-cat-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.hc-cat-post:hover .hc-cat-post-thumb img { transform: scale(1.06); }

.hc-cat-post-thumb-text { text-shadow: 0 1px 4px rgba(0,0,0,0.2); }

/* 分类缩略图颜色 */
.hc-cat-post-thumb[data-category="Java"] { background: linear-gradient(135deg, #e76f00, #f09819); }
.hc-cat-post-thumb[data-category="Agent"] { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }
.hc-cat-post-thumb[data-category="操作系统"] { background: linear-gradient(135deg, #00b894, #55efc4); }
.hc-cat-post-thumb[data-category="计算机网络"] { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.hc-cat-post-thumb[data-category="Python"] { background: linear-gradient(135deg, #3776ab, #6c9bcf); }
.hc-cat-post-thumb[data-category="算法"] { background: linear-gradient(135deg, #d63031, #e17055); }
.hc-cat-post-thumb[data-category=""] { background: linear-gradient(135deg, #636e72, #b2bec3); }

.hc-cat-post-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.hc-cat-post-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a2e;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.hc-cat-post:hover .hc-cat-post-title { color: #5b7fff; }

.hc-cat-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}

.hc-cat-post-tag {
  font-size: 0.62rem;
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hc-cat-post-tag[data-category="Java"] { background: rgba(231,111,0,0.1); color: #e76f00; }
.hc-cat-post-tag[data-category="Agent"] { background: rgba(108,92,231,0.1); color: #6c5ce7; }
.hc-cat-post-tag[data-category="操作系统"] { background: rgba(0,184,148,0.1); color: #00b894; }
.hc-cat-post-tag[data-category="计算机网络"] { background: rgba(9,132,227,0.1); color: #0984e3; }
.hc-cat-post-tag[data-category="Python"] { background: rgba(55,118,171,0.1); color: #3776ab; }
.hc-cat-post-tag[data-category="算法"] { background: rgba(214,48,49,0.1); color: #d63031; }
.hc-cat-post-tag[data-category=""] { background: #f3f4f6; color: #6b7280; }

/* ============================================================
   右栏：资料卡
   ============================================================ */
.hc-profile { overflow: hidden; }

.hc-profile-bg {
  height: 80px;
  background: linear-gradient(135deg, #5b7fff, #8b5cf6);
}

.hc-profile-body {
  text-align: center;
  padding: 0 24px 24px;
  margin-top: -36px;
}

/* 右栏窄版适配 */
.hc-sidebar .hc-card-header {
  padding: 14px 16px 10px;
  font-size: 0.88rem;
}
.hc-sidebar .hc-recent-link {
  padding: 9px 16px;
}
.hc-sidebar .hc-profile-body {
  padding: 0 14px 18px;
}
.hc-sidebar .hc-stats {
  gap: 16px;
  padding: 10px 0;
}

.hc-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 12px;
}

.hc-name {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a2e;
}

.hc-bio {
  margin: 0 0 16px;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.5;
}

.hc-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 14px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 16px;
}

.hc-stat { text-align: center; }

.hc-stat-num {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}

.hc-stat-label {
  display: block;
  font-size: 0.68rem;
  color: #9ca3af;
  margin-top: 2px;
}

.hc-social {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hc-social-link {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #6b7280 !important;
  text-decoration: none !important;
  border-bottom: none !important;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.hc-social-link:hover {
  background: #f0f2f5;
  color: #5b7fff !important;
}

/* ============================================================
   右栏：最近访问
   ============================================================ */
.hc-recent {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.hc-recent li { padding: 0; }

.hc-recent-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  text-decoration: none !important;
  border-bottom: none !important;
  color: #4b5563;
  font-size: 0.82rem;
  transition: all 0.18s;
}

.hc-recent-link:hover {
  color: #5b7fff !important;
  background: #f9fafb;
}

.hc-recent-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d1d5db;
}

.hc-recent-link[data-category="Java"] .hc-recent-dot { background: #e76f00; }
.hc-recent-link[data-category="Agent"] .hc-recent-dot { background: #6c5ce7; }
.hc-recent-link[data-category="操作系统"] .hc-recent-dot { background: #00b894; }
.hc-recent-link[data-category="计算机网络"] .hc-recent-dot { background: #0984e3; }
.hc-recent-link[data-category="Python"] .hc-recent-dot { background: #3776ab; }
.hc-recent-link[data-category="算法"] .hc-recent-dot { background: #d63031; }

.hc-recent-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hc-recent-date {
  flex-shrink: 0;
  font-size: 0.68rem;
  color: #bbb;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   页脚
   ============================================================ */
.hc-footer {
  text-align: center;
  padding: 28px 0 36px;
  color: #9ca3af;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.hc-footer p { margin: 0; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .hero-section { height: 400px; }
  .hero-title { font-size: 2.4rem; }

  .hero-nav-bar { top: 16px; right: 16px; padding: 4px 6px; border-radius: 10px; }
  .hero-nav-btn { padding: 5px 10px; font-size: 0.78rem; }
  .hero-nav-btn span { display: none; }
  .hero-nav-btn i { font-size: 1rem; opacity: 1; }

  .home-content { padding: 32px 32px 0; }
  .home-grid { gap: 28px; }

  .hc-post { padding: 16px 20px; }
  .hc-post-thumb { width: 72px; height: 56px; }
  .hc-card-header { padding: 16px 20px 12px; }
  .hc-cat { padding: 14px 20px; }
  .hc-recent-link { padding: 9px 20px; }
}

@media (max-width: 768px) {
  .hero-section { height: 340px; }
  .hero-title { font-size: 1.8rem; }
  .hero-subtitle { font-size: 0.85rem; margin-top: 10px; }

  .hero-nav-bar { top: 12px; right: 12px; padding: 3px 5px; border-radius: 8px; gap: 1px; }
  .hero-nav-btn { padding: 4px 8px; font-size: 0.72rem; }
  .hero-nav-btn span { display: none; }
  .hero-nav-btn i { font-size: 0.9rem; }
  .hero-btn { display: none; }
  .hero-dots { bottom: 12px; }

  .home-content { padding: 16px 16px 0; }
  .home-grid { grid-template-columns: 1fr; gap: 18px; }

  .hc-card { margin-bottom: 18px; }
  .hc-card-header { padding: 14px 16px 10px; font-size: 0.9rem; }

  .hc-post { padding: 14px 16px; gap: 14px; }
  .hc-post-thumb { width: 64px; height: 50px; font-size: 1rem; }
  .hc-post-title { font-size: 0.88rem; }
  .hc-post-excerpt { display: none; }

  .hc-cat { padding: 12px 16px; }

  .hc-profile-body { padding: 0 16px 20px; }
  .hc-avatar { width: 64px; height: 64px; margin-top: -4px; }
  .hc-stats { gap: 20px; }

  .hc-recent-link { padding: 8px 16px; }

  .hc-footer { padding: 20px 0 28px; font-size: 0.72rem; }
}