/* 本地化修复与缺失资源回退 - 参考 www.tronlink.org/cn 完善 */
/* 确保各区块背景与页底显示 */

/* 本地化修复：仅做必要调整，严格参考原站 home.css / fullpage.css 的样式，不随意改动 */

/* ===== 修复：header 必须置于最顶层，不被 section/page-bg 遮挡 ===== */
.pc .header-container {
  position: fixed !important;
  z-index: 10000 !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%);
}

/* ===== 首屏无悬浮：header 与蓝底融合，白色文字；划完首屏后加 whiteBg 悬浮 ===== */
.pc .header-container:not(.whiteBg) {
  background: transparent !important;
  box-shadow: none !important;
}

/* ===== 悬浮框：背景与内容白有细微区别，细微阴影，文字深色 ===== */
.header-container.whiteBg,
.pc .header-container.whiteBg {
  background: rgba(250, 251, 252, 0.98) !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  -webkit-box-shadow: 0 2px 12px rgba(0, 70, 179, 0.06);
  box-shadow: 0 2px 12px rgba(0, 70, 179, 0.06);
}
.pc .header-container.whiteBg .header a,
.pc .header-container.whiteBg .header .developer,
.pc .header-container.whiteBg .header .language-content .selectedLan,
.pc .header-container.whiteBg .header .language-content .selectedLan * {
  color: #021c31 !important;
}
.pc .header-container.whiteBg .header .language-content .selectedLan {
  border-color: #cfd3d6 !important;
}
.pc .header-container.whiteBg .header .language-content .selectedLan:hover {
  border-color: #021c31 !important;
}
.pc .header-container.whiteBg .header .logo {
  background-image: url(../images/logo2.png) !important;
}

/* ===== 左侧球 + 圆点：固定悬浮，球从左缓慢显出，点圆点跳转 ===== */
.fp-nav-ball-wrap {
  position: fixed;
  transform: translateY(-50%) translateX(-1.5rem);
  z-index: 999;
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
  pointer-events: none;
}
.fp-nav-ball-wrap.nav-ball-enter {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-50%) translateX(0) !important;
}
.fp-nav-ball-wrap.nav-ball-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-50%) translateX(-2rem) !important;
}
.fp-nav-ball {
  width: 0.6rem;
  height: 0.6rem;
  /* 使用原站首屏球素材，与 ball-l-t 一致 */
  background: url(../images/page0-ball1.svg) no-repeat center/100% 100%;
  border-radius: 50%;
  box-shadow: 0 2px 16px rgba(19, 93, 205, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
#fp-nav {
  margin-left: 0 !important;
}
#fp-nav ul li a {
  cursor: pointer;
}

/* 首屏：圆点显示，但左侧球隐藏；划出首屏后球出现 */
.pc .fp-viewing-hero .fp-nav-ball-wrap {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-50%) translateX(-2rem) !important;
}

/* ===== 网络支持：两颗白球沿轨道运动（原站 animX/animY/animX2/animY2/scale） ===== */
#section2.section,
#section2 .page2-bg,
#section2 .secure-right,
#section2 .secure-earth,
#section2 .secure-earth-rotate {
  overflow: visible !important;
}
#section2 .secure-earth-ball1.secure-earth-ball1-animate,
#section2 .secure-earth-ball2.secure-earth-ball2-animate {
  animation-play-state: running !important;
  will-change: left, top, transform;
}
/* 当 body 有 fp-viewing-network 时，强制白球动画（不依赖 JS 事件） */
body.fp-viewing-network #section2 .secure-earth-ball1 {
  animation: animX 2s cubic-bezier(.36,0,.64,1) -1s infinite alternate,
             animY 2s cubic-bezier(.36,0,.64,1) 0s infinite alternate,
             scale 2s cubic-bezier(.36,0,.64,1) 0s infinite alternate !important;
}
body.fp-viewing-network #section2 .secure-earth-ball2 {
  animation: animX2 1.5s cubic-bezier(.36,0,.64,1) -.75s infinite alternate,
             animY2 1.5s cubic-bezier(.36,0,.64,1) 0s infinite alternate,
             scale 1.5s cubic-bezier(.36,0,.64,1) 0s infinite alternate !important;
}

/* ===== 保护钱包安全：使用原站素材 ball.png，不覆盖 ===== */
/* home.css 已定义 background:url(../images/ball.png)，确保素材从原站下载即可 */

/* ===== 首屏二维码：hover/click 展示二维码（原站 qr-code-img + qr-code-contain） ===== */
.download-contain-wrapper .qr-code-wrapper,
.download-contain-wrapper .qr-code-wrapper .qr-code-img {
  cursor: pointer;
}
/* CSS 兜底：即使 JS 事件冲突，hover 也能显示弹层 */
.qr-code-wrapper:hover .qr-code-contain {
  display: block;
}

/* ===== 1. 一屏一切换：确保每屏 100vh（与原站 fullpage 一致） ===== */
#fullpage .section,
.fp-section {
  min-height: 100vh !important;
}
#fullpage .section .page1-bg,
#fullpage .section .page2-bg,
#fullpage .section .page3-bg {
  min-height: 100%;
}

/* Section 1-4 白底保障（page-bg 动画外的备用） */
.page1-bg,
.page2-bg,
.page3-bg {
  background: #fff;
  min-height: 100%;
}
#section1 .page1-bg,
#section2 .page2-bg,
#section5 .page3-bg,
#section3 .page1-bg {
  background: #fff;
}

/* ===== 关键修复：强制下半部分文案与标题可见 ===== */
/* 原逻辑依赖 fullpage onLeave 添加动画类，本地化时可能未触发 */
/* 仅强制文案可见，保留装饰元素动画（盾牌、雷达、星球、闪电） */
#section1 .secure-left .opacity,
#section1 .secure-info.opacity,
#section2 .secure-left .opacity,
#section2 .secure-info.opacity,
#section5 .secure-left .opacity,
#section5 .secure-info.opacity,
#section3 .secure-left .opacity,
#section3 .secure-info.opacity {
  opacity: 1 !important;
}
#section1 .page1-secure-title,
#section2 .page2-secure-title,
#section5 .page5-secure-title,
#section3 .page3-secure-title {
  opacity: 1 !important;
}

/* 导航栏「安装」按钮始终可见，便于访问下载页 */
.home_nav_download_btn_wrapper {
  display: flex !important;
}

/* 首屏：确保标题、副标题、前往安装、扫码安装、下载图标可见 */
.section.page0 .tronWallet .title,
.section.page0 .tronWallet .desc,
.section.page0 .download-contain-wrapper,
.section.page0 .to-dlDetail {
  opacity: 1 !important;
}
.section.page0 .features {
  opacity: 1 !important;
}

/* ===== 页脚：仅在最后一屏（section3）显示，不在首屏出现 ===== */
.pc #fullpage .fp-section:not(.active) .page5-footer-wrap {
  visibility: hidden !important;
  pointer-events: none !important;
}
.pc #fullpage .fp-section.active#section3 .page5-footer-wrap {
  visibility: visible !important;
}

/* 页底 Footer：确保在最后一屏底部可见，不覆盖原站 page5-bg.png */
#section3 .page5-footer-wrap,
.pc .page5-footer-wrap {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  min-height: 1.2rem !important;
  z-index: 2 !important;
}
#section3,
#section3.fp-section {
  position: relative !important;
}
/* 页脚内 maxWidth 居中 */
.page5-footer-wrap .page5-footer.maxWidth {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 缺失图片回退 */
.page0-line {
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.15) 100%) !important;
}

/* ===== 资管选择：雷达边框内框（原站有边框内框） ===== */
#section5 .secure-radar,
.pc #section5 .secure .secure-radar {
  border: 2px solid rgba(19, 93, 205, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(19, 93, 205, 0.08),
    0 1px 4px rgba(0, 70, 179, 0.06);
  border-radius: 50%;
  box-sizing: border-box;
  background: url(../images/page5-radar-bg.png) no-repeat center/100% 100% !important;
}

/* ===== 4. 各板块装饰动画：确保盾牌环、地球、雷达、闪电动画可见 ===== */
.secure-shield .secure-ball.ring-animate,
.secure-shield .secure-ball-line.line-animate,
.secure-earth-ball1.secure-earth-ball1-animate,
.secure-earth-ball2.secure-earth-ball2-animate,
.secure-radar-scan.secure-radar-scan-animate,
.shooting-star1-animate,
.shooting-star2-animate,
.shooting-star3-animate,
.shooting-star4-animate,
.shooting-star5-animate,
.shooting-star6-animate {
  animation-play-state: running !important;
}

/* 确保文案与图标对齐 */
.secure .secure-info ul li {
  align-items: flex-start;
}
.secure .secure-info ul li img {
  flex-shrink: 0;
}

/* 确保 secure 区块左右布局正常，文案可读 */
.secure .secure-left {
  flex: 1;
  min-width: 0;
}
.secure .secure-info ul li p {
  color: #03214f;
  opacity: 1;
}
