:root {
  --phone: 430px;
  --bg: #0b0c12;
  --surface: #151823;
  --surface-2: #0f121b;
  --text: #e9edf3;
  --muted: #9ca3af;
  --line: #232634;
  --primary: #ff3b30;
  --primary-2: #ff6b6b;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --swiper-pagination-bullet-inactive-color: #4b5164;
  --swiper-pagination-color: #ffffff;
}
* {
  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(
      1200px 600px at 75% -10%,
      rgba(255, 40, 40, 0.14),
      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,
    rgba(11, 12, 18, 0.96),
    rgba(11, 12, 18, 0.85) 60%,
    rgba(11, 12, 18, 0)
  );
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  width: 100%;
}
.logo {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  background: conic-gradient(from 210deg, #2a2f44, #373c57 40%, #2a2f44 80%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 20px rgba(255, 59, 48, 0.12);
}
.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: #cfd6e4;
  font-size: 12px;
  opacity: 0.9;
}
.cta {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 59, 48, 0.35),
    inset 0 0 18px rgba(255, 255, 255, 0.08);
  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;
}
.notice .tag {
  color: #cfd6e4;
  opacity: 0.9;
}
.marquee {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  color: #cfd3df;
}
.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(--shadow);
}

.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, #181b27, #0f121b);
}

/* 关键：完整显示图片（不裁切） */
.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(255, 59, 48, 0.25),
    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: #4b5164;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.dot.active {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

/* 兼容：不支持 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(--primary), var(--primary-2));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 14px rgba(255, 59, 48, 0.28),
    inset 0 0 10px rgba(255, 255, 255, 0.08);
  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, #171a25, #0f121b);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.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.1),
    rgba(255, 255, 255, 0) 26%
  );
  opacity: 0.32;
}
.domain-bar::after {
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.28);
}

.domain-center {
  grid-column: 2;
  text-align: center;
  white-space: nowrap;
}
.domain-center .label {
  color: #b8bfcc;
  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: #d7dbe6;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  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: #cfd6e4;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
}

.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, #171a25, #0f121b);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.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(0,0,0,.12), transparent 70%);
  z-index:1;
}

/* 播放器图片（替换成你的图标路径） */
.vcard .frame::after{
  --play-size:clamp(36px, 12vw, 50px);                         /* 最大不超过 50px */
  --play-icon:url("../../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 6px 16px rgba(0,0,0,.45));
  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: #cfd6e4;
  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.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  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, #171a25, #0f121b);
  color: #cfd6e4;
  font-weight: 600;
}
.dl-latency {
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  border: 1px solid var(--line);
  color: #e9edf3;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.04)
  );
  font-variant-numeric: tabular-nums; /* 数字等宽，避免跳动 */
  transition: filter 0.2s ease;
}
.dl-btn {
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: 0;
  box-shadow: 0 10px 18px rgba(255, 59, 48, 0.35);
  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: #ffdfe2;
  background: linear-gradient(
    180deg,
    rgba(255, 59, 48, 0.1),
    rgba(255, 59, 48, 0.06)
  );
  border: 1px solid rgba(255, 59, 48, 0.35);
  box-shadow: 0 8px 18px rgba(255, 59, 48, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.support-pill .ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--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(15, 18, 27, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  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, #2a2f44, #373c57 40%, #2a2f44 80%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 14px rgba(255, 59, 48, 0.12);
  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(--primary), var(--primary-2));
  color: #fff;
  font-weight: 700;
  border: 0;
  box-shadow: 0 10px 18px rgba(255, 59, 48, 0.35);
}

/* ===== 公告弹窗 ===== */
.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, #171a25, #0f121b);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}
.modal__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.modal__title {
  font-weight: 800;
}
.modal__close {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: #cfd6e4;
  font-size: 18px;
  cursor: pointer;
}
.modal__body {
  padding: 12px 14px 6px;
  color: #dfe4ee;
  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.06);
  color: #cfd6e4;
  font-weight: 700;
  cursor: pointer;
}
.m-btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: 0;
  box-shadow: 0 8px 16px rgba(255, 59, 48, 0.28);
}
.m-btn:active {
  transform: translateY(1px);
}

@media (max-width: 360px) {
  .brand .sub {
    display: none;
  }
}
