/* ============================================================
   炼竞陪玩 · H5 首页版式（对照「菜菜电竞」参考样式重做）
   ------------------------------------------------------------
   结构：顶部吸附栏 → 大图轮播 → 四宫格圆入口 → 分类胶囊筛选
        → 按分类分组横滑商品卡片 → 优选陪玩师 → 底部信息
   配色：电竞暖金 + 深色顶栏，与 h5.css / admin.css 共用同一套金色令牌
   本文件只在首页引入（h5/index.php），不影响其它页面
   ============================================================ */

/* ---------------- 顶部吸附栏 ---------------- */
.cc-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 54px; padding: 0 14px;
  background: rgba(11, 13, 18, .92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(224, 180, 76, .16);
}
.cc-topbar__main { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.cc-logo {
  width: 30px; height: 30px; border-radius: 9px; flex: none; overflow: hidden;
  background: var(--gold-grad); color: #1A1206;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
}
.cc-logo img { width: 100%; height: 100%; object-fit: cover; }
.cc-topbar__meta { min-width: 0; }
.cc-topbar__name {
  font-size: 15px; font-weight: 700; color: #fff; letter-spacing: .3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cc-topbar__host {
  font-size: 10.5px; color: rgba(255, 255, 255, .42); letter-spacing: .4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cc-topbar__side { display: flex; align-items: center; gap: 8px; flex: none; }
.cc-topbar__welcome {
  position: relative; font-size: 12.5px; color: var(--gold-1);
  padding: 5px 11px; border-radius: var(--r-pill);
  border: 1px solid rgba(224, 180, 76, .34);
  background: rgba(224, 180, 76, .08); white-space: nowrap;
}
.cc-topbar__more {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .1);
}
.cc-topbar__more svg { width: 16px; height: 16px; }
.cc-topbar__welcome .tabbar-badge {
  top: -6px; right: -4px; left: auto; margin-left: 0;
  border-color: #0B0D12;
}

/* ---------------- 公告条（跑马灯，图标固定不遮挡） ---------------- */
.cc-notice {
  margin: 10px 14px 0; border-radius: var(--r-pill);
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; overflow: hidden;
  background: var(--gold-grad-soft);
  border: 1px solid rgba(224, 180, 76, .22);
}
/* 喇叭图标：固定在左侧，不参与滚动，永远不被文字压住 */
.notice-ico {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; color: var(--gold-2); z-index: 2;
}
.notice-ico svg { width: 15px; height: 15px; }
/* 文字视口：从这里开始裁剪，滚动内容不会越界到图标上 */
.notice-viewport {
  flex: 1; min-width: 0; overflow: hidden; position: relative;
}
.notice-track {
  display: inline-flex; gap: 48px; white-space: nowrap;
  will-change: transform;
  animation: noticeMarquee 22s linear infinite;
}
.notice-track > span { flex: none; font-size: 12.5px; color: var(--txt-2); }
@keyframes noticeMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 24px)); }
}
/* 尊重系统「减少动态效果」设置：不动画，直接省略号截断 */
@media (prefers-reduced-motion: reduce) {
  .notice-track { animation: none; }
  .notice-track > span:last-child { display: none; }
  .notice-track > span:first-child {
    display: block; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  }
}

/* ---------------- 大图轮播（整屏吸附，一次只露一张） ---------------- */
.cc-banner { position: relative; margin: 12px 0 14px; }
.cc-banner__scroll {
  display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  scroll-behavior: smooth;
}
.cc-banner__scroll::-webkit-scrollbar { display: none; }
.cc-banner__item {
  /* 100% 宽 + 左右内边距，视觉上是「有边距的整屏卡片」，
     同时保证一次只完整显示一张，不会露出下一张的边 */
  flex: 0 0 100%; width: 100%;
  scroll-snap-align: center; scroll-snap-stop: always;
  position: relative; box-sizing: border-box;
  padding: 0 4px;
}
.cc-banner__item > * {
  border-radius: var(--r-lg); overflow: hidden;
}
.cc-banner__item {
  height: 178px;
}
.cc-banner__item img,
.cc-banner__solid {
  width: 100%; height: 100%; display: block;
  border: 1px solid rgba(224, 180, 76, .18);
  box-shadow: 0 10px 26px rgba(17, 24, 39, .16);
}
.cc-banner__item img { object-fit: cover; }
.cc-banner__item { position: relative; }
.cc-banner__solid {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 22px; text-align: center;
  background:
    radial-gradient(420px 200px at 20% 0%, rgba(224, 180, 76, .28), transparent 62%),
    linear-gradient(135deg, #16191F, #0B0D12);
}
.cc-banner__solid-title {
  font-size: 18.5px; font-weight: 800; letter-spacing: .6px;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold-1);
}
.cc-banner__solid-sub { font-size: 12px; color: rgba(255, 255, 255, .55); letter-spacing: .8px; }
.cc-banner__cap {
  position: absolute; left: 4px; right: 4px; bottom: 0;
  padding: 26px 14px 12px;
  font-size: 14px; font-weight: 650; color: #fff;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: linear-gradient(to top, rgba(5, 7, 10, .9), transparent);
}
.cc-banner__dots {
  display: flex; gap: 5px; justify-content: center; margin-top: 9px;
}
.cc-banner__dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(17, 24, 39, .2); transition: all .25s;
}
.cc-banner__dots i.is-active { width: 16px; border-radius: 3px; background: var(--gold-2); }

/* ---------------- 四宫格圆形快捷入口 ---------------- */
.cc-quick {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin: 0 14px 16px; padding: 16px 6px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
.cc-quick__item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; transition: transform .18s;
}
.cc-quick__item:active { transform: scale(.94); }
.cc-quick__ico {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #1A1206;
  background: linear-gradient(145deg, var(--qc, #F5C542), var(--qc2, var(--qc, #E39B1A)));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--qc, #E39B1A) 42%, transparent);
}
.cc-quick__ico svg { width: 23px; height: 23px; }
.cc-quick__name { font-size: 11.5px; color: var(--txt-2); white-space: nowrap; }

/* ---------------- 分类胶囊筛选条 ---------------- */
.cc-tabs {
  position: sticky; top: 54px; z-index: 40;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 8px 14px 10px;
  margin-bottom: 4px;
  background: linear-gradient(to bottom, var(--ink-1) 78%, rgba(242, 244, 248, 0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cc-tabs::-webkit-scrollbar { display: none; }
.cc-tab {
  flex: none; padding: 7px 15px; border-radius: var(--r-pill);
  font-size: 13px; color: var(--txt-2); white-space: nowrap;
  background: var(--paper); border: 1px solid var(--line);
  transition: all .18s;
}
.cc-tab.is-active {
  color: #1A1206; font-weight: 700; border-color: transparent;
  background: var(--gold-grad); box-shadow: var(--sh-gold);
}

/* ---------------- 分组区块 ---------------- */
.cc-sec { margin-bottom: 18px; }
.cc-sec__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 14px 11px;
}
.cc-sec__title {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: 16px; font-weight: 700; color: var(--txt-1); letter-spacing: .2px;
}
.cc-sec__ico {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--cc, var(--gold-1));
  background: color-mix(in srgb, var(--cc, #E8B54B) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cc, #E8B54B) 24%, transparent);
  overflow: hidden;
}
.cc-sec__ico svg { width: 15px; height: 15px; }
/* 分类图标若为上传图片：铺满圆角方块，而不是被压成小图标 */
.cc-sec__ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-sec__more {
  display: flex; align-items: center; gap: 2px;
  font-size: 12px; color: var(--txt-3); white-space: nowrap;
}
.cc-sec__more svg { width: 12px; height: 12px; }

/* ---------------- 商品卡片（每行 3 列） ---------------- */
.cc-scroll {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 2px 14px 6px;
}

.cc-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; text-decoration: none;
  box-shadow: var(--sh-1); transition: all .18s;
}
.cc-card:active { transform: scale(.98); border-color: rgba(224, 180, 76, .32); }
.cc-card__cover {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--placeholder-grad);
}
.cc-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-card__ph { color: rgba(200, 145, 42, .5); }
.cc-card__badge {
  position: absolute; left: 6px; top: 6px; max-width: calc(100% - 12px);
  padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 700;
  line-height: 1.5;
  color: #1A1206; background: var(--gold-grad);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 3px 10px rgba(200, 145, 42, .35);
}
.cc-card__body {
  display: flex; flex-direction: column; gap: 4px;
  padding: 9px 10px 10px; flex: 1;
}
.cc-card__title {
  font-size: 13px; font-weight: 620; color: var(--txt-1); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cc-card__sub {
  font-size: 11px; color: var(--txt-3); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cc-card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin-top: auto; padding-top: 6px;
}
.cc-card__price {
  display: flex; align-items: baseline; gap: 1px;
  color: var(--price); font-size: 16px; font-weight: 780;
  font-variant-numeric: tabular-nums; letter-spacing: -.2px;
}
.cc-card__price i { font-size: 11px; font-style: normal; font-weight: 600; }
.cc-card__add {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--price); background: rgba(229, 56, 42, .1);
  border: 1.5px solid rgba(229, 56, 42, .55);
}
.cc-card__add svg { width: 13px; height: 13px; stroke-width: 2.6; }

/* 「查看全部」占位卡 */
.cc-card--more {
  align-items: center; justify-content: center; gap: 9px;
  background: var(--paper-2); border-style: dashed;
}
.cc-card__more-ico {
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-2); background: rgba(224, 180, 76, .12);
}
.cc-card__more-txt {
  font-size: 11.5px; color: var(--txt-3); text-align: center; line-height: 1.6;
}

/* ---------------- 陪玩师卡片 ---------------- */
.cc-player {
  flex: 0 0 31%; max-width: 124px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 13px 8px 11px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); text-decoration: none; box-shadow: var(--sh-1);
}
.cc-player__head { position: relative; width: 52px; height: 52px; }
.cc-player__avatar,
.cc-player__head .avatar-fallback {
  width: 52px; height: 52px; border-radius: 50%; display: block; object-fit: cover;
  border: 1.5px solid rgba(224, 180, 76, .4);
}
.cc-player__name {
  max-width: 100%; font-size: 13px; font-weight: 650; color: var(--txt-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cc-player__rank {
  max-width: 100%; font-size: 10px; padding: 1.5px 7px; border-radius: 4px;
  color: var(--gold-1); background: rgba(224, 180, 76, .12);
  border: 1px solid rgba(224, 180, 76, .24);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cc-player__foot { font-size: 10.5px; color: var(--txt-3); }
.cc-player__foot b { font-size: 14px; color: var(--price); font-weight: 750; }

/* ---------------- 底部信息 ---------------- */
.home-foot {
  margin-top: 20px; padding: 24px 20px calc(var(--tabbar-h) + 26px);
  text-align: center; border-top: 1px solid var(--line);
}
.foot-brand { font-size: 15px; font-weight: 700; color: var(--gold-1); margin-bottom: 7px; }
.foot-desc { font-size: 11.5px; color: var(--txt-3); line-height: 1.8; margin: 0 auto; max-width: 320px; }
.foot-service { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; margin: 12px 0 0; font-size: 11.5px; color: var(--txt-3); }
.foot-copy, .foot-icp { font-size: 11px; color: var(--txt-3); margin-top: 9px; line-height: 1.7; }
