/* K77 主题色变量：跟随后台在线装修的主题色（--th 由 themeApply 注入） */
body.k77-on {
  --k77-main: var(--th, #FFC400);
  --k77-soft: var(--th-light, #FFE610);
  --k77-deep: var(--th-deep, #C99A00);
}

/* ==========================================================================
   K77 模板 —— 1:1 仿 maladj.qjhw1.cn/h5（麻辣电竞）
   仅在 body.k77-on 下生效
   基准：390px 宽；主黄 var(--k77-main) / var(--k77-soft)；价格红 #FD2C28；跑马灯橙 #F5B451
   ========================================================================== */

body.k77-on { background: #fff; }

body.k77-on .k77-page {
  /* 【上下滑动修复】页面自身作为滚动容器：商品/达人/我的都能上下滑 */
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding-bottom: 18px;
  background: #fff;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- 首页：顶部搜索条 ---------------- */
.k77-sbar {
  height: 46px;
  background: #F8F8F8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  box-sizing: border-box;
}
.k77-sbar-kf {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.k77-sbar-kf svg { width: 22px; height: 22px; display: block; }
.k77-sbar-in {
  flex: 1; height: 38px;
  border-radius: 38px;
  background: #fff;
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px;
  color: #999; font-size: 14px;
  overflow: hidden;
}
.k77-sbar-in svg { width: 18px; height: 18px; flex: 0 0 18px; display: block; }
.k77-sbar-in span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- 轮播 ---------------- */
.k77-swiper {
  margin: 10px 15px 0;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #F3F4F6;
}
.k77-swiper img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k77-swiper-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.k77-swiper-track::-webkit-scrollbar { display: none; }
.k77-swiper-track > img { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: start; }
.k77-sw-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 4px; }
.k77-sw-dots i { width: 6px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.55); display: block; }
.k77-sw-dots i.on { width: 14px; background: #fff; }
.k77-banner-txt {
  padding: 16px; box-sizing: border-box;
  background: linear-gradient(135deg, #1b1b1f, #33333c);
  color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.k77-banner-txt b { font-size: 16px; }
.k77-banner-txt span { font-size: 12px; opacity: .82; }

/* ---------------- 跑马灯 ---------------- */
.k77-notice {
  margin: 10px 15px 0;
  height: 38px;
  border-radius: 2px;
  background: #F5B451;
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  box-sizing: border-box;
  overflow: hidden;
}
.k77-notice svg { width: 19px; height: 19px; flex: 0 0 19px; display: block; }
.k77-notice-box { flex: 1; overflow: hidden; position: relative; height: 20px; }
.k77-notice-mq {
  display: inline-block; white-space: nowrap; font-size: 14px; color: #3a2a10;
  animation: k77Mq 18s linear infinite;
}
@keyframes k77Mq {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ---------------- 金刚区（保底/低价/考核/鸭金） ---------------- */
.k77-king {
  padding: 8px 15px 6px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.k77-king::-webkit-scrollbar { display: none; }
.k77-king-i {
  flex: 0 0 auto;
  width: 76px; height: 74px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
}
.k77-king-i img { width: 40px; height: 40px; object-fit: contain; display: block; }
.k77-king-i b {
  font-size: 13px; font-weight: 500; color: #1a1a1a; line-height: 1.2;
  text-align: center; white-space: nowrap;
}
.k77-king-i.on b { font-weight: 700; }
.k77-king-emoji {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #ff5a3c, #ff8a1e);
  box-shadow: 0 2px 6px rgba(255,90,60,.28);
}

/* ---------------- 区块标题 ---------------- */
.k77-sec {
  padding: 6px 15px 8px;
  font-size: 16px; font-weight: 700; color: #1a1a1a;
}

/* ---------------- 首页商品流 ---------------- */
/* 商品改为双列网格：跟随页面上下滑动（不再是只能左右滑的单行） */
.k77-goods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 15px 18px;
}
.k77-goods > .k77-empty { grid-column: 1 / -1; }
.k77-gcard {
  width: 100%;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(17,17,17,.06);
}
.k77-gcard-img {
  width: 100%; aspect-ratio: 1 / 1; height: auto;
  background: #F7F8FA;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
}
.k77-gcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k77-gcard-name {
  height: 36px; padding: 0 7px; box-sizing: border-box;
  font-size: 14px; font-weight: 700; line-height: 18px; color: #1a1a1a;
  overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.k77-gcard-price {
  height: 25px; padding: 0 7px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between;
}
.k77-gcard-price .k77-p { color: #FD2C28; display: flex; align-items: baseline; }
.k77-gcard-price .k77-p i { font-style: normal; font-size: 13px; font-weight: 700; }
.k77-gcard-price .k77-p b { font-size: 17px; font-weight: 700; }
.k77-cart {
  width: 24px; height: 24px; border-radius: 100%;
  background: var(--k77-soft);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 24px;
}
.k77-cart svg { width: 15px; height: 15px; display: block; }
.k77-empty { width: 100%; text-align: center; color: #bbb; font-size: 13px; padding: 40px 0; }

/* ---------------- 分类页 ---------------- */
.k77-cat-tabs {
  height: 45px; background: #fff;
  display: flex; align-items: center;
  border-bottom: 1px solid #f4f4f4;
  overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 0; z-index: 6;
}
.k77-cat-tabs::-webkit-scrollbar { display: none; }
.k77-cat-tab {
  flex: 0 0 auto; padding: 0 14px; height: 45px;
  display: flex; align-items: center;
  font-size: 14px; color: #333; position: relative;
  white-space: nowrap;
}
.k77-cat-tab.on { font-weight: 700; color: #111; }
.k77-cat-tab.on::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 6px; width: 18px; height: 3px; border-radius: 2px; background: #111;
}
.k77-cat-body { display: flex; height: calc(100vh - 45px - 56px); }
.k77-cat-bar {
  flex: 0 0 90px; width: 90px;
  background: #F3F4F6;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.k77-cat-bar::-webkit-scrollbar { display: none; }
.k77-cat-bi {
  height: 55px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #444; position: relative; text-align: center; padding: 0 6px;
  box-sizing: border-box;
}
.k77-cat-bi.on { background: #fff; font-weight: 700; color: #111; }
.k77-cat-bi.on::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 2px 2px 0; background: var(--k77-main);
}
.k77-cat-main {
  flex: 1; background: #fff; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 10px 20px 12px; box-sizing: border-box;
}
.k77-cat-grp-t { font-size: 15px; font-weight: 700; padding: 14px 0 10px; }
.k77-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.k77-cat-cell { text-align: center; }
.k77-cat-cell img {
  width: 88px; height: 88px; border-radius: 6px; object-fit: cover; display: block;
  background: #F7F8FA;
}
.k77-cat-cell b { font-size: 12px; font-weight: 400; color: #333; line-height: 16px; display: block; margin-top: 4px; }
.k77-cat-cell .k77-cat-price { font-size: 12px; color: #FD2C28; font-weight: 700; }

/* ---------------- 达人页 ---------------- */
.k77-daren-search {
  height: 44px; background: #fff;
  display: flex; align-items: center; padding: 0 12px;
}
.k77-daren-search .box {
  flex: 1; height: 34px; border-radius: 100px;
  background: #F7F8FA; border: 1px solid #EFEFEF;
  display: flex; align-items: center; gap: 6px; padding: 0 12px;
  color: #999; font-size: 14px;
}
.k77-daren-search .box svg { width: 16px; height: 16px; flex: 0 0 16px; }
.k77-daren-search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 14px; color: #333; height: 100%;
}
.k77-daren-banners { display: flex; gap: 6px; padding: 6px 12px 4px; background: #fff; }
.k77-daren-banners .bn {
  flex: 1; height: 70px; border-radius: 8px; overflow: hidden; background: #F3F4F6;
}
.k77-daren-banners .bn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k77-daren-list { padding: 6px 12px 16px; background: #fff; }
.k77-dcard {
  height: 86px; background: #fff; border-radius: 10px;
  box-shadow: 0 1px 8px rgba(17,17,17,.07);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px; box-sizing: border-box;
}
.k77-dcard-av {
  width: 70px; height: 70px; flex: 0 0 70px; border-radius: 8px;
  background: #EEEEEE; overflow: hidden;
}
.k77-dcard-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.k77-dcard-mid { flex: 1; min-width: 0; }
.k77-dcard-name {
  font-size: 14px; font-weight: 700; color: #1a1a1a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 4px;
}
.k77-dcard-name .sex { font-size: 12px; color: #5aa9ff; font-weight: 400; }
.k77-dcard-sub { font-size: 12px; color: #999; margin-top: 6px; }
.k77-dcard-col { width: 55px; flex: 0 0 55px; text-align: center; }
.k77-dcard-st { font-size: 11px; font-weight: 700; color: #6DFF26; display: block; margin-bottom: 4px; }
.k77-dcard-st.off { color: #bbb; }
.k77-dbtn {
  width: 55px; height: 28px; border-radius: 18px; border: 0;
  background: var(--k77-soft); color: #111; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}

/* ---------------- 客服页 ---------------- */
.k77-chat-page {
  padding: 10px 15px 0; background: #F7F8FA; box-sizing: border-box;
  height: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
}
.k77-notice-card {
  height: 78px; background: #fff; border-radius: 12px;
  border: 2px solid #111; box-sizing: border-box;
  display: flex; align-items: center; gap: 12px; padding: 0 12px;
}
.k77-notice-ic {
  width: 45px; height: 45px; flex: 0 0 45px; border-radius: 100%;
  background: var(--k77-soft); border: 2px solid #111;
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box;
}
.k77-notice-ic svg { width: 24px; height: 24px; display: block; }
.k77-notice-tx { flex: 1; }
.k77-notice-tx b { font-size: 15px; font-weight: 700; display: block; }
.k77-notice-tx span { font-size: 12px; color: #999; display: block; margin-top: 4px; }
.k77-kf-card {
  margin-top: 12px; height: 70px; border-radius: 15px;
  background: #fff; box-shadow: 0 1px 8px rgba(17,17,17,.05);
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
}
.k77-kf-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 100%; overflow: hidden; background: #FFE8E8; display:flex;align-items:center;justify-content:center; }
.k77-kf-ic svg { width: 24px; height: 24px; }
.k77-kf-card .tx b { font-size: 14px; font-weight: 700; display: block; }
.k77-kf-card .tx span { font-size: 12px; color: #999; display: block; margin-top: 3px; }
.k77-seg {
  margin: 14px auto 0; width: 216px; height: 40px;
  border-radius: 50px; border: 2px solid #111; box-sizing: border-box;
  display: flex; overflow: hidden; background: #fff;
}
.k77-seg i {
  flex: 1; font-style: normal; font-size: 14px; color: #333;
  display: flex; align-items: center; justify-content: center;
}
.k77-seg i.on { background: var(--k77-soft); font-weight: 700; color: #111; }
.k77-ostabs {
  height: 44px; margin-top: 8px;
  display: flex; align-items: center; gap: 18px;
  overflow-x: auto; scrollbar-width: none;
}
.k77-ostabs::-webkit-scrollbar { display: none; }
.k77-ostab { flex: 0 0 auto; font-size: 14px; color: #666; position: relative; height: 44px; display: flex; align-items: center; }
.k77-ostab.on { color: #111; font-weight: 700; }
.k77-ostab.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 3px;
  border-radius: 2px; background: #111;
}
.k77-chat-empty { padding: 70px 0 0; text-align: center; }
.k77-chat-empty svg { width: 150px; height: 150px; display: block; margin: 0 auto; }
.k77-chat-empty span { display: block; margin-top: 14px; font-size: 14px; color: #b9c0cc; }

/* ---------------- 我的（1:1 目标站） ---------------- */
.k77-my-hd {
  position: relative; height: 195px;
  background: #23232a center/cover no-repeat;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-sizing: border-box; overflow: hidden;
}
.k77-my-hd::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.42) 100%);
}
.k77-my-hd-blur {
  position: absolute; inset: -24px; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(16px) saturate(115%) brightness(.72);
  transform: scale(1.06);
}
.k77-my-ava {
  position: relative; z-index: 2;
  width: 62px; height: 62px; border-radius: 100%;
  object-fit: cover; background: rgba(255,255,255,.5);
}
.k77-my-name {
  position: relative; z-index: 2; margin-top: 10px;
  font-size: 17px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.45); line-height: 1.2;
}
.k77-my-sub {
  position: relative; z-index: 2; margin-top: 4px;
  font-size: 11px; color: rgba(255,255,255,.92);
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.k77-card2 {
  background: #fff; border-radius: 10px; margin: 10px 10px 0;
  padding: 13px 6px 15px;
}
.k77-card2-hd { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 13px; }
.k77-card2-hd b { font-size: 14px; font-weight: 700; color: #222; }
.k77-card2-hd span { font-size: 11px; color: #9a9a9a; }
.k77-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 15px; }
.k77-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 15px; }
.k77-gi { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.k77-gi .ic { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.k77-gi .ic img { width: 26px; height: 26px; display: block; }
.k77-gi .ic svg { width: 24px; height: 24px; display: block; }
.k77-gi span { font-size: 11px; color: #333; line-height: 1.1; }
.k77-my-ad { margin: 10px; border-radius: 10px; overflow: hidden; }
.k77-my-ad img { width: 100%; display: block; }
.k77-fn-grid { display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 18px; padding: 3px 0 5px; }
.k77-fn-grid .k77-gi .ic,
.k77-fn-grid .k77-gi .ic img { width: 26px; height: 26px; }
.k77-my-ft { text-align: center; font-size: 11px; color: #ccc; padding: 18px 0 8px; }

/* ---------------- 底部 tabbar（1:1 目标站，真实 png 图标） ---------------- */
body.k77-on #tabbar {
  display: block !important;
  height: auto !important;
  padding: 0 !important;
  background: #fff !important;
  border-top: 0 !important;
  box-shadow: 0 -1px 0 rgba(0,0,0,.07);
}
body.k77-on #tabbar .k77-tabbar {
  display: flex !important;
  width: 100% !important;
  height: 52px;
  align-items: center;
}
body.k77-on #tabbar .k77-tab {
  flex: 1 1 0 !important;
  min-width: 0;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 52px;
  position: relative;
  background: transparent;
}
body.k77-on #tabbar .k77-tab-ic { width: 23px; height: 23px; display: block; }
body.k77-on #tabbar .k77-tab-tx { font-size: 10px; line-height: 1; color: #9a9a9a; }
body.k77-on #tabbar .k77-tab.on .k77-tab-tx { color: #2b2b2b; font-weight: 700; }


/* ---------------- 金刚区：图片标题 + 胶囊按钮（1:1 目标站） ---------------- */
.k77-king {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 6px; padding: 14px 10px 8px; box-sizing: border-box;
}
.k77-king-i {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
}
.k77-king-ic { width: 40px; height: 40px; display: block; object-fit: contain; }
.k77-king-tx {
  display: block; max-width: 100%; height: 27px; line-height: 25px;
  padding: 0 10px; box-sizing: border-box;
  font-size: 12px; color: #2b2b2b; font-weight: 500; white-space: nowrap;
  background: #fff; border: 1px solid #ededed; border-radius: 999px;
}
.k77-king-i.on .k77-king-tx {
  background: var(--k77-soft); border-color: var(--k77-soft); font-weight: 700;
}

/* ---------------- 我的页：浅灰底 + 顶部图加深蒙版 ---------------- */
body.k77-on .k77-page-mine { background: #f2f3f5; min-height: 100%; }
.k77-page-mine .k77-my-hd::after {
  background: linear-gradient(180deg, rgba(0,0,0,.10) 0%, rgba(0,0,0,.58) 100%);
}
.k77-page-mine .k77-card2 { box-shadow: 0 1px 2px rgba(17,17,24,.04); }
