/* ============================================================
   home.css —— 首页各模块样式
   模块顺序与 data-module 一致：
   notice_bar / header / banner / live_feed / message_ticker /
   category / sub_category / content
   ============================================================ */

/* ---------- ① 顶部提示条 ---------- */
.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px 9px 8px;
  background: #fff;
}

.notice-close {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #b3bccb;
}
.notice-close svg { width: 13px; height: 13px; }

.notice-logo {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2f8cf0, #0a5fd0);
}
.notice-logo svg { width: 13px; height: 13px; }

.notice-text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--orange);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notice-btn {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  color: #fff;
  border-radius: 6px;
  background: linear-gradient(135deg, #2f95f6, #1268d8);
  white-space: nowrap;
}

.notice-link {
  height: 26px;
  line-height: 1;
  padding: 0 8px;
  font-size: 12px;
  color: #2a6fc4;
  border: 1px solid #cfe3fb;
  border-radius: 6px;
  background: #f4faff;
}

/* ---------- ② 头部 ---------- */
.site-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 12px 12px;
  background: #fff;
}

.brand { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }

.brand-logo {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
  color: #7a4a12;
  background: radial-gradient(circle at 32% 28%, #ffe6a8, #f2b73c 58%, #c8871d);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6), 0 4px 10px rgba(190, 130, 30, .24);
}

.brand-meta { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .6px; line-height: 1.25; }
.brand-domain { font-size: 10.5px; color: #98a4b6; letter-spacing: .3px; }

.header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }

.btn {
  height: 30px;
  padding: 0 13px;
  font-size: 13px;
  border-radius: 7px;
  white-space: nowrap;
}
.btn-outline { color: var(--brand); background: #fff; border: 1px solid #9fcdf8; }
.btn-solid { color: #fff; background: linear-gradient(135deg, #2f95f6, #1268d8); }
.btn-solid:active { background: #0a5fc4; }

.icon-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--brand);
  border: 1px solid #9fcdf8;
  background: #f5fbff;
}
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- ③ 轮播 ---------- */
.banner {
  position: relative;
  margin: 10px 12px 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(26, 88, 180, .16);
  background: #dfe9f7;
}

.banner-track {
  display: flex;
  transition: transform .45s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

.banner-slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 2.45 / 1;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 16px 18px;
  color: #fff;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.banner-slide::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -40px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  box-shadow: -46px 58px 0 -22px rgba(255, 255, 255, .12);
}

.banner-tag {
  align-self: flex-start;
  padding: 1px 7px;
  font-size: 10px;
  letter-spacing: 1px;
  border-radius: 4px;
  color: #fff;
  background: rgba(255, 255, 255, .22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}

.banner-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

.banner-sub {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: .4px;
  color: rgba(255, 255, 255, .88);
}

.banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .55);
  transition: width .25s ease, background .25s ease;
}
.dot.is-active { width: 14px; background: #fff; }

/* ---------- ④ 实时动态 ---------- */
.live {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 12px 12px 0;
  padding: 8px 8px 8px 0;
  background: linear-gradient(180deg, #f3f9ff, #fff);
  border: 1px solid #e2effc;
  border-radius: 12px;
  overflow: hidden;
}

.live-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  width: 20px;
  font-size: 10px;
  letter-spacing: 1.5px;
  line-height: 1.1;
  color: #fff;
  writing-mode: vertical-rl;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, #2f95f6, #0a5fd0);
}

.live-scroll {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.live-scroll::-webkit-scrollbar { display: none; }

.live-card {
  flex: 0 0 calc(50% - 4px);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  background: #fff;
  border: 1px solid #edf3fb;
  border-radius: 10px;
}

.live-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.live-amount {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1a2233;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.live-unit { margin-left: 2px; font-size: 10px; font-weight: 500; color: #95a0b1; }

.live-title {
  margin: 0;
  font-size: 10.5px;
  color: #62707f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-user { margin: 0; font-size: 10px; color: #a8b2c1; }

.live-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--c1, #ff9d42), var(--c2, #ff6a3d));
  box-shadow: 0 4px 10px rgba(30, 60, 120, .14);
}
.live-thumb svg { width: 19px; height: 19px; }

.thumb-badge {
  position: absolute;
  top: -6px;
  right: -5px;
  padding: 0 3px;
  height: 13px;
  line-height: 13px;
  font-size: 9px;
  font-style: normal;
  color: #fff;
  background: var(--red);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(255, 77, 79, .4);
}

/* ---------- ⑤ 消息滚动 ---------- */
.msgbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px 0;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.msg-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(135deg, #3aa0ff, #1673e0);
}
.msg-icon svg { width: 14px; height: 14px; }

.msg-viewport { flex: 1; min-width: 0; overflow: hidden; height: 18px; }

.msg-track {
  display: flex;
  width: max-content;
  animation: msg-scroll 22s linear infinite;
}
.msg-item {
  padding-right: 48px;
  font-size: 12px;
  line-height: 18px;
  color: #5d6a7c;
  white-space: nowrap;
}
@keyframes msg-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.msg-mail {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--brand);
}
.msg-mail svg { width: 18px; height: 18px; }

.red-dot {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  line-height: 14px;
  padding: 0 3px;
  font-size: 9px;
  font-style: normal;
  text-align: center;
  color: #fff;
  background: var(--red);
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(255, 77, 79, .35);
}

/* ---------- ⑥ 分类 ---------- */
.catbar {
  margin-top: 12px;
  padding: 14px 8px 10px;
  background: #fff;
}

.cat-list { display: flex; justify-content: space-between; gap: 2px; }

.cat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.cat-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--c1, #ff9d42), var(--c2, #ff6a3d));
  box-shadow: 0 6px 12px rgba(30, 70, 140, .14);
  transition: transform .2s ease;
}
.cat-icon svg { width: 22px; height: 22px; }
.cat-item:active .cat-icon { transform: scale(.94); }

.cat-name { font-size: 11px; color: #3b4759; line-height: 1.2; }

.cat-item.is-active .cat-icon {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(31, 140, 240, .45), 0 6px 12px rgba(30, 70, 140, .18);
}
.cat-item.is-active .cat-name { color: var(--brand-deep); font-weight: 600; }

.cat-badge {
  position: absolute;
  top: -3px;
  left: 50%;
  margin-left: 12px;
  min-width: 15px;
  height: 15px;
  line-height: 15px;
  padding: 0 3px;
  font-size: 9px;
  font-style: normal;
  text-align: center;
  color: #fff;
  background: var(--red);
  border-radius: 8px;
}

/* ---------- ⑦ 子分类 ---------- */
.subbar { padding: 10px 12px 12px; background: #fff; }

.chip-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chip-list::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 13px;
  font-size: 12.5px;
  color: #5a6779;
  border-radius: 999px;
  background: #f4f6fa;
  border: 1px solid #edf0f5;
  transition: all .18s ease;
}
.chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, #35a0ff, #1a78e6);
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(31, 140, 240, .28);
}

/* ---------- ⑧ 内容区 ---------- */
.feed { padding: 12px; background: #fff; }

.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.feed-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 9px 11px 11px;
  background: #fff;
  border: 1px solid #edf1f7;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(24, 52, 92, .045);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feed-card:active { transform: scale(.985); box-shadow: 0 2px 6px rgba(24, 52, 92, .08); }

.feed-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.feed-title {
  margin: 0;
  padding-right: 12px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #1a2233;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-sub { margin: 0; font-size: 10.5px; color: #97a2b2; font-variant-numeric: tabular-nums; }

.feed-tag {
  align-self: flex-start;
  margin-top: 7px;
  padding: 1px 8px;
  font-size: 10.5px;
  color: #55606f;
  border: 1px solid #e3e8f0;
  border-radius: 999px;
  background: #fbfcfe;
  white-space: nowrap;
}

.feed-thumb {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--c1, #ff9d42), var(--c2, #ff6a3d));
  box-shadow: 0 5px 12px rgba(30, 60, 120, .16);
}
.feed-thumb svg { width: 24px; height: 24px; }

.feed-star {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #c8d1de;
}
.feed-star svg { width: 13px; height: 13px; }
.feed-star.is-on { color: #ffb020; }

.feed-more { display: flex; justify-content: center; padding: 14px 0 6px; }

.more-btn {
  height: 34px;
  padding: 0 22px;
  font-size: 12.5px;
  color: #7a8799;
  border-radius: 999px;
  background: #f6f8fb;
  border: 1px solid #eef1f6;
}

/* ---------- 窄屏收敛 ---------- */
@media (max-width: 359px) {
  .brand-name { font-size: 15px; }
  .banner-title { font-size: 19px; }
  .feed-title { font-size: 13.5px; }
  .feed-thumb { width: 44px; height: 44px; }
  .cat-icon { width: 42px; height: 42px; }
}
