/* home.css —— 首页：快捷入口、头部、分类栏、下拉刷新、公告轮播、档案统计条 */

/* ====================== 首页快捷入口网格 ====================== */
.home-quick-grid {
  display: flex; justify-content: space-between;
  background: var(--bg-card); border-radius: 16px;
  margin: 12px 12px 4px; padding: 16px 6px 12px;
  box-shadow: var(--shadow);
}
.home-quick-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
}
.home-quick-item:active { opacity: .6; }
.home-quick-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: linear-gradient(135deg, rgba(79,195,247,0.16), rgba(126,87,194,0.16));
  border: 1.5px solid rgba(79,195,247,0.4);
}
.home-quick-label {
  font-size: 11.5px; color: var(--text-body); font-weight: 600;
}
/* ====================== 首页快捷入口弹窗内容 ====================== */
.quick-action-desc {
  font-size: 13px; color: var(--text-body); margin-bottom: 12px; line-height: 1.5;
}
.quick-action-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px; border-bottom: 1px solid var(--border-light);
  gap: 12px;
}
.quick-action-option:last-child { border-bottom: none; }
.quick-action-option-info { flex: 1; min-width: 0; }
.quick-action-option-name { font-size: 14px; color: var(--text-title); font-weight: 600; }
.quick-action-option-sub { font-size: 12px; color: var(--text-tip); margin-top: 3px; line-height: 1.4; }
.quick-action-option-btn {
  flex-shrink: 0; padding: 6px 16px; border-radius: 16px;
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; user-select: none;
}
.quick-action-option-btn:active { opacity: .7; }

/* ====================== 首页：分类标签栏 ====================== */
/* ====================== 首页头部（蓝紫色渐变色块，现在只装topbar，分类栏挪到下面滚动区里了） ====================== */
#page-home .home-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 100;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 55%, #7e57c2 130%);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 10px 24px rgba(41,151,222,0.3);
  overflow: hidden; padding-bottom: 14px; padding-top: 6px;
}
#page-home .home-header .topbar {
  position: static; background: transparent; box-shadow: none;
  height: 64px;
}
/* 分类栏现在紧挨着帖子列表，跟在公告栏下面，用的是浅色底、深色文字的版本 */
.cat-bar {
  display: flex; overflow-x: auto; white-space: nowrap;
  padding: 4px 4px 0; gap: 24px; margin: 8px 12px 4px;
  border-bottom: 1px solid var(--border-light);
  -webkit-overflow-scrolling: touch;
}
.cat-bar::-webkit-scrollbar { display: none; }
/* 参考图那种“文字+下划线”的标签风格，不用胶囊底色，安静一点 */
.cat-item {
  flex-shrink: 0; padding: 6px 0 11px;
  font-size: 14.5px; color: var(--text-tip);
  position: relative;
  transition: color .18s;
}
.cat-item.active {
  color: var(--text-title); font-weight: 700;
}
.cat-item.active::after {
  content: ''; position: absolute; left: 1px; right: 1px; bottom: 0;
  height: 3px; border-radius: 2px;
}
/* 每个板块选中态用不同颜色的下划线，一眼能区分 */
.cat-item[data-cat="recommend"].active::after { background: #ff9800; }
.cat-item[data-cat="cafe"].active::after { background: #ff7043; }
.cat-item[data-cat="exchange"].active::after { background: #43a047; }
.cat-item[data-cat="survey"].active::after { background: #8e24aa; }

#page-home .page-content { top: 84px; padding-top: 0; }

/* 总部信号灯：竖着挂在首页头部右上角，跟着topbar-right走，不会跟下面的分类栏抢位置 */
#page-home .home-header .topbar-right { align-items: center; }
#page-home .home-header .hq-mood-light {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 6px 6px; border-radius: 13px;
  background: rgba(8, 16, 30, 0.5);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.45), 0 3px 8px rgba(0,0,0,0.22);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#page-home .home-header .hq-mood-light-bulb {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.55);
  transition: background .4s, box-shadow .4s;
}
#page-home .home-header .hq-mood-light-bulb.lit[data-color="red"] {
  background: #ff5252;
  box-shadow: 0 0 8px 3px rgba(255,82,82,0.9), inset 0 0 2px rgba(255,255,255,0.7);
}
#page-home .home-header .hq-mood-light-bulb.lit[data-color="yellow"] {
  background: #ffca28;
  box-shadow: 0 0 8px 3px rgba(255,202,40,0.9), inset 0 0 2px rgba(255,255,255,0.7);
}
#page-home .home-header .hq-mood-light-bulb.lit[data-color="green"] {
  background: #66bb6a;
  box-shadow: 0 0 8px 3px rgba(102,187,106,0.9), inset 0 0 2px rgba(255,255,255,0.7);
}
/* 紫色状态要求"只亮暗紫色的灯"——特意比其它三色暗一些、光晕也收敛一些 */
#page-home .home-header .hq-mood-light-bulb.lit[data-color="purple"] {
  background: #5e2f78;
  box-shadow: 0 0 5px 2px rgba(94,47,120,0.75), inset 0 0 2px rgba(255,255,255,0.3);
}

/* ====================== 首页：下拉刷新 ====================== */
#home-pull-wrap { will-change: transform; }
#home-pull-wrap.no-transition { transition: none !important; }
#home-pull-wrap { transition: transform .25s ease; }
#home-pull-indicator {
  height: 50px; margin-top: -50px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-tip); font-size: 12px;
}
#home-pull-indicator .pull-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border-light); border-top-color: var(--primary);
  transition: transform .1s;
}
#home-pull-indicator.refreshing .pull-spinner { animation: pullSpin .7s linear infinite; }
@keyframes pullSpin { to { transform: rotate(360deg); } }

/* ====================== 首页公告轮播栏 ====================== */
.announce-bar {
  background: var(--bg-card);
  border-radius: 10px;
  margin: 0 12px 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.announce-slides {
  display: flex;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.announce-slide {
  min-width: 100%;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.announce-tag {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 10px; background: var(--primary); color: var(--ink-on-primary);
  margin-bottom: 2px; align-self: flex-start;
}
/* 公告按类型分配不同的渐变底色和标签颜色，替代原来统一的纯白卡片 */
.announce-slide.type-notice { background: linear-gradient(120deg, #e3f2fd, #ffffff 65%); }
.announce-slide.type-notice .announce-tag { background: #29b6f6; color: #fff; }
.announce-slide.type-event { background: linear-gradient(120deg, #f3e5f5, #ffffff 65%); }
.announce-slide.type-event .announce-tag { background: #8e24aa; color: #fff; }
.announce-slide.type-warning { background: linear-gradient(120deg, #fff3e0, #ffffff 65%); }
.announce-slide.type-warning .announce-tag { background: #fb8c00; color: #fff; }
.announce-slide.type-launch { background: linear-gradient(120deg, #e8f5e9, #ffffff 65%); }
.announce-slide.type-launch .announce-tag { background: #43a047; color: #fff; }
.announce-title {
  font-size: 14px; font-weight: 700; color: var(--text-title); line-height: 1.4;
}
.announce-desc {
  font-size: 12px; color: var(--text-body); line-height: 1.5;
}
.announce-footer {
  display: flex; align-items: center; justify-content: space-between; margin-top: 4px;
}
.announce-date { font-size: 11px; color: var(--text-tip); }
.announce-dots {
  display: flex; gap: 4px;
}
.announce-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--border-light); transition: background .2s;
}
.announce-dot.active { background: var(--primary); width: 14px; border-radius: 3px; }
.announce-arrows {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 100%; display: flex; justify-content: space-between;
  pointer-events: none; padding: 0 4px;
}
.announce-arrow {
  pointer-events: auto;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-body); cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  opacity: .75; transition: opacity .15s;
}
.announce-arrow:active { opacity: 1; }

/* ====================== 首页：档案统计条（signature元素） ====================== */
.archive-stat-strip {
  margin: 12px 12px 12px; padding: 10px 14px;
  background: linear-gradient(120deg, rgba(79,195,247,0.16), rgba(126,87,194,0.08));
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex; align-items: center; gap: 14px;
}
.stat-chip { display: flex; align-items: baseline; gap: 5px; }
.stat-num { font-size: 15px; font-weight: 700; color: var(--text-title); font-family: var(--font-display); }
.stat-label { font-size: 11px; color: var(--text-tip); letter-spacing: .3px; }
.stat-divider { width: 1px; height: 13px; background: var(--line); }
.stat-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #4caf50;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.18); display: inline-block; margin-right: 1px;
}
