:root {
  --phone: 430px;
  --bg: #f6f0ff;
  --surface: #ffffff;
  --surface-2: #f3ecff;
  --text: #2a1b3d;
  --muted: #6b5a86;
  --line: rgba(124, 58, 237, 0.18);
  --primary: #8b5cf6;
  --primary-2: #a855f7;
  --btn-primary: #ff3b9d;
  --btn-primary-2: #ff7ac8;
  --btn-shadow: 0 12px 22px rgba(255, 59, 157, 0.26);
  --shadow: 0 14px 34px rgba(17, 9, 34, 0.12);
  --shadow-2: 0 10px 26px rgba(17, 9, 34, 0.08);
  --glow: 0 0 0 1px rgba(124, 58, 237, 0.12),
    0 16px 40px rgba(124, 58, 237, 0.14);
  --glass-top: rgba(246, 240, 255, 0.9);
  --glass-mid: rgba(246, 240, 255, 0.78);
  --glass-bot: rgba(246, 240, 255, 0);
  --radius: 16px;
  --swiper-pagination-bullet-inactive-color: rgba(91, 33, 182, 0.28);
  --swiper-pagination-color: #5b21b6;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    Arial, sans-serif;
  background:
    radial-gradient(1100px 560px at 50% -12%, rgba(168, 85, 247, 0.26), transparent 62%),
    radial-gradient(900px 520px at 18% 8%, rgba(139, 92, 246, 0.18), transparent 60%),
    var(--bg);
  color: var(--text);
  letter-spacing: 0.2px;
  display: flex;
  justify-content: center;
}
ul,
li {
  padding: 0;
  margin: 0;
  list-style: none;
}
.page {
  width: min(var(--phone), 100%);
  min-height: 100dvh;
  position: relative;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  max-width: var(--phone);
  margin: 0 auto;
  padding: 0 0 100px;
  min-height: 80%;
}

/* 顶部 */
.appbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px calc(12px + env(safe-area-inset-top));
  background: linear-gradient(180deg, var(--glass-top), var(--glass-mid) 60%, var(--glass-bot));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
  width: 100%;
}
.logo {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  background: conic-gradient(from 210deg, #ede6ff, #f7f1ff 40%, #e7ddff 80%);
  border: 1px solid rgba(124, 58, 237, 0.14);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 18px rgba(124, 58, 237, 0.18);
}
.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.brand h1 {
  margin: 0 0 2px;
  font-size: 18px;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  opacity: 0.9;
}
.brand .sub {
  margin-top: 4px;
  color: rgba(42, 27, 61, 0.78);
  font-size: 12px;
  opacity: 0.9;
}
.cta {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-2));
  color: #fff;
  box-shadow: var(--btn-shadow),
    inset 0 0 18px rgba(255, 255, 255, 0.22);
  border: 0;
  display: inline-grid;
  place-items: center;
  transition: 0.2s;
}
.cta:active {
  transform: translateY(1px) scale(0.99);
}

/* 公告（可点击、悬停暂停） */
.notice {
  margin: 8px 14px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: var(--shadow-2);
}
.notice .tag {
  color: rgba(42, 27, 61, 0.88);
  opacity: 0.9;
}
.marquee {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  color: rgba(42, 27, 61, 0.76);
}
.marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: scroll 12s linear infinite;
}
.notice:hover .marquee span {
  animation-play-state: paused;
}
@keyframes scroll {
  to {
    transform: translateX(-100%);
  }
}

/* 轮播 */
.hero {
  margin: 12px 16px 8px;
}
.swiper-container {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  /* 原来是固定高度 168px，改为按原图 800:295 自适应 */
  aspect-ratio: 800 / 295;
  height: auto;
  box-shadow: var(--glow);
}

.swiper-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.swiper-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), var(--surface-2));
}

/* 关键：完整显示图片（不裁切） */
.swiper-slide .cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;              /* 原来是 cover，改为 contain */
  background: var(--surface-2);
  display: block;
  filter: contrast(1.02) brightness(0.98);
}

/* 顶部红色光效叠加（保持不变，可按需调透明度） */
.swiper-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    100% 80% at 60% -20%,
    rgba(168, 85, 247, 0.26),
    transparent 70%
  );
  pointer-events: none;
}

/* 指示点 */
.dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(91, 33, 182, 0.22);
  border: 1px solid rgba(91, 33, 182, 0.22);
}
.dot.active {
  background: #5b21b6;
  box-shadow: 0 0 0 4px rgba(91, 33, 182, 0.14);
}

/* 兼容：不支持 aspect-ratio 的老浏览器（可选） */
@supports not (aspect-ratio: 1 / 1) {
  .swiper-container { height: auto; }
  .swiper-container::before {
    content: "";
    display: block;
    padding-top: calc(295 / 800 * 100%); /* 36.875% */
  }
  .swiper-wrapper,
  .swiper-slide { position: absolute; inset: 0; }
}


/* 版本号徽章 */
.ver-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 518;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-2));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 20px rgba(255, 59, 157, 0.2),
    inset 0 0 10px rgba(255, 255, 255, 0.18);
  vertical-align: middle;
  margin-left: 8px;
}
.ver-badge--bar {
  padding: 2px 6px;
  font-size: 10px;
  opacity: 0.95;
}

/* ===== 居中版：官方域名条 ===== */
.domain-bar {
  margin: 12px 10px;
  padding: 12px 14px;
  border-radius: 18px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), var(--surface-2));
  border: 1px solid var(--line);
  box-shadow: var(--glow), inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}
.domain-bar::before,
.domain-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
}
.domain-bar::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.42),
    rgba(255, 255, 255, 0) 26%
  );
  opacity: 0.5;
}
.domain-bar::after {
  box-shadow: inset 0 0 26px rgba(91, 33, 182, 0.08);
}

.domain-center {
  grid-column: 2;
  text-align: center;
  white-space: nowrap;
}
.domain-center .label {
  color: rgba(42, 27, 61, 0.72);
  font-size: 20px;
  letter-spacing: 3.8px;
  margin-right: 0.2em;
}
.domain-center .host {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.8px;
}
.domain-center .host .num {
  font-variant-numeric: tabular-nums;
}
.jumpwrap {
  display: inline-block;
  width: 0.95ch;
  text-align: center;
} /* 固定宽度，防抖 */
.tld {
  opacity: 0.98;
  margin-left: 0.28ch;
} /* 点号安全间距 */

.copy {
  grid-column: 3;
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(42, 27, 61, 0.84);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(124, 58, 237, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  cursor: pointer;
}
.copy:active {
  transform: translateY(1px);
}

/* 字母动画（大写 & 克制） */
@keyframes kb-flip {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-18%) scale(1.06);
    opacity: 0.98;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
.jump {
  display: inline-block;
  text-transform: uppercase;
}
.jump.play {
  animation: kb-flip 0.28s ease;
}
@media (prefers-reduced-motion: reduce) {
  .jump.play {
    animation: none;
  }
}

/* Chips */
.chips {
  margin: 8px 14px 12px;
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 2px;
}

.chip {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: rgba(42, 27, 61, 0.86);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.74),
    rgba(255, 255, 255, 0.56)
  );
  box-shadow: var(--shadow-2);
}

.chip:active {
  transform: scale(0.98);
}

/* 视频网格（固定封面比例，图自动拉伸） */
.video-grid {
  margin: 6px 14px 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.vcard {
  position: relative;
  display: block;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), var(--surface-2));
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--glow);
}

.vcard .frame {
  width: 100%;
  aspect-ratio: 3/2;
  /* 固定封面比例（也可改为 4/3 或 1/1） */
  position: relative;
  overflow: hidden;
}

.vcard .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* 自动拉伸铺满 */
}

.vcard .overlay {
  /* 轻微渐变遮罩，保证文案可读 */
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0.45) 100%
  );
  pointer-events: none;
}

/* 可选：轻微暗角，增强对比度（不需要可删） */
.vcard .frame::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(60% 60% at 50% 50%, rgba(91, 33, 182, 0.1), transparent 70%);
  z-index:1;
}

/* 播放器图片（替换成你的图标路径） */
.vcard .frame::after{
  --play-size:clamp(36px, 12vw, 50px);                         /* 最大不超过 50px */
  --play-icon:url("https://6t0eioe01p.kuaibo-download.vip/img/play.png");
  content:""; position:absolute; left:50%; top:50%;
  width:var(--play-size); height:var(--play-size);
  transform:translate(-50%,-50%) scale(1);
  background:var(--play-icon) center/contain no-repeat;
  filter:drop-shadow(0 8px 18px rgba(17, 9, 34, 0.26));
  z-index:3; pointer-events:none;

  /* 呼吸缩放 */
  animation:kb-breathe 1.8s ease-in-out infinite;
}

/* 悬停/点击的小反馈（桌面端） */
.vcard:hover .frame::after{ transform:translate(-50%,-50%) scale(1.04) }
.vcard:active .frame::after{ transform:translate(-50%,-50%) scale(0.96) }

@keyframes kb-breathe{
  0%   { transform:translate(-50%,-50%) scale(.92); opacity:.95 }
  50%  { transform:translate(-50%,-50%) scale(1.06); opacity:1 }
  100% { transform:translate(-50%,-50%) scale(.92); opacity:.95 }
}


.vcard .meta {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-size: 12px;
  color: rgba(42, 27, 61, 0.86);
  z-index: 1;
}

.vcard .badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(124, 58, 237, 0.18);
  z-index: 1;
}

/* —— 下载列表 —— */
.download-list {
  margin: 10px 14px 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dl-row {
  display: grid;
  grid-template-columns: 72px 1fr 106px;
  gap: 12px;
  align-items: center;
}
.dl-chip {
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), var(--surface-2));
  color: rgba(42, 27, 61, 0.86);
  font-weight: 600;
  box-shadow: var(--shadow-2);
}
.dl-latency {
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  border: 1px solid var(--line);
  color: rgba(42, 27, 61, 0.9);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.74),
    rgba(255, 255, 255, 0.56)
  );
  font-variant-numeric: tabular-nums; /* 数字等宽，避免跳动 */
  transition: filter 0.2s ease;
  box-shadow: var(--shadow-2);
}
.dl-btn {
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-2));
  color: #fff;
  border: 0;
  box-shadow: var(--btn-shadow);
  cursor: pointer;
}
.dl-btn:active {
  transform: translateY(1px) scale(0.99);
}

/* 延迟状态色（低/中/高） */
.ok {
  border-color: rgba(37, 187, 119, 0.35) !important;
  background: linear-gradient(
    180deg,
    rgba(37, 187, 119, 0.2),
    rgba(37, 187, 119, 0.08)
  ) !important;
}
.mid {
  border-color: rgba(255, 184, 0, 0.35) !important;
  background: linear-gradient(
    180deg,
    rgba(255, 184, 0, 0.2),
    rgba(255, 184, 0, 0.08)
  ) !important;
}
.bad {
  border-color: rgba(255, 77, 79, 0.35) !important;
  background: linear-gradient(
    180deg,
    rgba(255, 77, 79, 0.22),
    rgba(255, 77, 79, 0.08)
  ) !important;
}

/* 客服圆角条 */
.support-pill {
  margin: 16px 14px 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-weight: 700;
  color: rgba(42, 27, 61, 0.92);
  background: linear-gradient(
    180deg,
    rgba(139, 92, 246, 0.16),
    rgba(168, 85, 247, 0.1)
  );
  border: 1px solid rgba(124, 58, 237, 0.22);
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}
.support-pill .ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-2));
}
.support-pill:active {
  transform: translateY(1px);
}

/* 底部安装条 */
.install-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(var(--phone), 100%);
  padding: 10px calc(16px + env(safe-area-inset-right))
    calc(10px + env(safe-area-inset-bottom))
    calc(16px + env(safe-area-inset-left));
  background: rgba(255, 255, 255, 0.78);
  border-top: 1px solid rgba(124, 58, 237, 0.12);
  backdrop-filter: blur(8px);
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 9999;
}
.install-bar .mini-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: conic-gradient(from 210deg, #ede6ff, #f7f1ff 40%, #e7ddff 80%);
  border: 1px solid rgba(124, 58, 237, 0.14);
  box-shadow: inset 0 0 14px rgba(124, 58, 237, 0.16);
  overflow: hidden;
}
.install-bar .mini-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.install-bar .txt {
  line-height: 1.1;
}
.install-bar .txt b {
  display: block;
}
.btn {
  margin-left: auto;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-2));
  color: #fff;
  font-weight: 700;
  border: 0;
  box-shadow: var(--btn-shadow);
}

/* ===== 公告弹窗 ===== */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 10000;
}
.modal.open {
  display: grid;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal__dialog {
  position: relative;
  width: min(96%, 420px);
  max-height: 70vh;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), var(--surface-2));
  border: 1px solid rgba(124, 58, 237, 0.16);
  box-shadow: var(--glow);
}
.modal__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
}
.modal__title {
  font-weight: 800;
}
.modal__close {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: rgba(42, 27, 61, 0.78);
  font-size: 18px;
  cursor: pointer;
}
.modal__body {
  padding: 12px 14px 6px;
  color: rgba(42, 27, 61, 0.86);
  line-height: 1.65;
  overflow: auto;
}
.modal__footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 10px 14px 14px;
}
.m-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  color: rgba(42, 27, 61, 0.86);
  font-weight: 700;
  cursor: pointer;
}
.m-btn--primary {
  background: linear-gradient(135deg, var(--btn-primary), var(--btn-primary-2));
  color: #fff;
  border: 0;
  box-shadow: 0 10px 20px rgba(255, 59, 157, 0.18);
}
.m-btn:active {
  transform: translateY(1px);
}

@media (max-width: 360px) {
  .brand .sub {
    display: none;
  }
}
