/* ============================================================
   Borneo Play 首页增强：许愿开盒开场 + 首页 Hero / 信任条 / 购买指南 / 页脚
   ============================================================ */

/* ---------------- 开场遮罩 ---------------- */
.bp-intro {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 70% at 50% 110%, #22c55e33 0%, transparent 60%),
    radial-gradient(90% 60% at 50% -10%, #fde68a22 0%, transparent 55%),
    linear-gradient(180deg, #0b2e1a 0%, #14532d 55%, #0f3d21 100%);
  color: #fff; overflow: hidden; text-align: center;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: opacity .6s ease, transform .6s ease;
}
.bp-intro.leaving { opacity: 0; transform: scale(1.06); pointer-events: none; }

.bp-intro-skip {
  position: absolute; z-index: 6; top: max(14px, env(safe-area-inset-top)); right: 14px;
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; backdrop-filter: blur(6px);
}

.bp-intro-brand { font-size: 12px; letter-spacing: 6px; opacity: .75; margin-bottom: 6px; }
.bp-intro-title { font-size: 26px; font-weight: 800; letter-spacing: 2px; margin-bottom: 4px; }
.bp-intro-sub { font-size: 14px; opacity: .8; min-height: 22px; transition: opacity .3s; }

/* 漂浮的叶子和光点（雨林氛围） */
.bp-leaf {
  position: absolute; z-index: 0; pointer-events: none; top: -40px; width: 22px; height: 22px; opacity: .55;
  background: #4ade80; border-radius: 0 70% 0 70%;
  animation: bp-fall linear infinite;
}
.bp-leaf.alt { background: #86efac; width: 16px; height: 16px; }
.bp-leaf.gold { background: #fcd34d; width: 10px; height: 10px; border-radius: 50%; opacity: .7; }
@keyframes bp-fall {
  0%   { transform: translate3d(0,-40px,0) rotate(0deg); }
  50%  { transform: translate3d(30px,50vh,0) rotate(180deg); }
  100% { transform: translate3d(-20px,110vh,0) rotate(360deg); }
}

/* ---------------- 盲盒 ---------------- */
.bp-stage { position: relative; width: 220px; height: 250px; margin: 26px auto 10px; cursor: pointer; }
.bp-glow {
  position: absolute; left: 50%; top: 55%; width: 260px; height: 260px; margin: -130px 0 0 -130px;
  border-radius: 50%; background: radial-gradient(circle, #fde68a 0%, #facc1555 30%, transparent 65%);
  opacity: 0; transform: scale(.4); transition: opacity .5s, transform .8s cubic-bezier(.2,.9,.3,1.4);
}
.bp-stage.charge-1 .bp-glow { opacity: .25; transform: scale(.6); }
.bp-stage.charge-2 .bp-glow { opacity: .5;  transform: scale(.8); }
.bp-stage.opened  .bp-glow { opacity: 1;   transform: scale(1.5); }

.bp-box { position: absolute; left: 30px; bottom: 20px; width: 160px; height: 150px; }
.bp-box-body {
  position: absolute; inset: 22px 0 0 0; border-radius: 10px 10px 14px 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fbcfe8 55%, #bfdbfe 100%);
  box-shadow: inset -12px -10px 0 rgba(0,0,0,.06), 0 18px 30px rgba(0,0,0,.35);
  overflow: hidden;
}
.bp-box-body::before { /* 竖丝带 */
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 22px; margin-left: -11px;
  background: #dc2626; box-shadow: inset 4px 0 0 rgba(255,255,255,.2);
}
.bp-box-q {
  position: absolute; left: 0; right: 0; top: 34px; font-size: 54px; font-weight: 900;
  color: #fff; text-shadow: 0 3px 0 #14532d, 0 0 18px rgba(255,255,255,.6); z-index: 1;
}
.bp-box-lid {
  position: absolute; left: -10px; right: -10px; top: 0; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #fde68a, #f9a8d4);
  box-shadow: 0 6px 0 rgba(0,0,0,.1);
  transform-origin: 50% 100%; z-index: 2;
}
.bp-box-lid::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 24px; margin-left: -12px; background: #dc2626; }
.bp-bow { position: absolute; left: 50%; top: -22px; width: 0; height: 0; }
.bp-bow::before, .bp-bow::after {
  content: ""; position: absolute; top: 0; width: 34px; height: 26px; border: 7px solid #dc2626; border-radius: 50% 50% 10% 50%;
}
.bp-bow::before { right: 2px; transform: rotate(-20deg); }
.bp-bow::after  { left: 2px;  transform: rotate(20deg) scaleX(-1); }

.bp-stage.shake .bp-box { animation: bp-shake .45s ease; }
@keyframes bp-shake {
  0%,100% { transform: rotate(0) translateY(0); }
  20% { transform: rotate(-9deg) translateY(-6px); }
  40% { transform: rotate(8deg)  translateY(-10px); }
  60% { transform: rotate(-5deg) translateY(-4px); }
  80% { transform: rotate(3deg); }
}
.bp-stage.idle .bp-box { animation: bp-bob 2.4s ease-in-out infinite; }
@keyframes bp-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.bp-stage.opened .bp-box-lid { animation: bp-lid 1s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes bp-lid {
  0%   { transform: translate(0,0) rotate(0); }
  100% { transform: translate(90px,-170px) rotate(38deg); opacity: 0; }
}
.bp-stage.opened .bp-box { animation: bp-pop .5s ease; }
@keyframes bp-pop { 0% { transform: scale(1); } 40% { transform: scale(1.08,.92); } 100% { transform: scale(1); } }

/* 点击时飞出的小爱心 / 星星 */
.bp-spark {
  position: absolute; left: 50%; top: 45%; font-size: 18px; pointer-events: none;
  animation: bp-spark .9s ease-out forwards;
}
@keyframes bp-spark {
  0% { transform: translate(-50%,-50%) scale(.4); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2); opacity: 0; }
}

/* 愿望能量条 */
.bp-energy { width: 200px; margin: 6px auto 0; }
.bp-energy-label { font-size: 12px; opacity: .8; margin-bottom: 6px; display: flex; justify-content: space-between; }
.bp-energy-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; }
.bp-energy-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #86efac, #fde68a, #f9a8d4);
  transition: width .4s cubic-bezier(.2,.9,.3,1.3);
}
.bp-hint { margin-top: 14px; font-size: 13px; opacity: .85; animation: bp-pulse 1.6s ease-in-out infinite; }
@keyframes bp-pulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

/* 愿望签（开盒结果） */
.bp-card {
  position: absolute; left: 50%; bottom: max(28px, env(safe-area-inset-bottom));
  width: min(340px, calc(100vw - 40px)); transform: translate(-50%, 140%);
  background: #fff; color: #1a1a1a; border-radius: 20px; padding: 20px 18px 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
  transition: transform .7s cubic-bezier(.2,.9,.3,1.15), visibility 0s .7s;
  visibility: hidden; z-index: 5;
}
.bp-card.show { transform: translate(-50%, 0); visibility: visible; transition: transform .7s cubic-bezier(.2,.9,.3,1.15); }
.bp-card-tag { display: inline-block; font-size: 11px; letter-spacing: 2px; color: #14532d; background: #dcfce7; padding: 3px 10px; border-radius: 999px; }
.bp-card-luck { font-size: 22px; margin: 8px 0 2px; letter-spacing: 3px; color: #f59e0b; }
.bp-card-text { font-size: 17px; font-weight: 700; line-height: 1.5; margin: 4px 0 6px; }
.bp-card-sub { font-size: 13px; color: #6b7280; margin-bottom: 14px; }
.bp-card .btn-row { gap: 8px; }
.bp-card .btn { height: 44px; line-height: 44px; font-size: 14px; }

#bp-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 4; }

/* 开盒后从盒子里弹出的奖品 */
.bp-prize {
  position: absolute; left: 50%; bottom: 70px; width: 116px; height: 116px; margin-left: -58px;
  border-radius: 50%; border: 4px solid #fff; background-color: #fff; background-repeat: no-repeat;
  box-shadow: 0 0 0 6px rgba(253,230,138,.45), 0 12px 30px rgba(0,0,0,.35);
  transform: translateY(40px) scale(.2); opacity: 0; z-index: 1;
}
.bp-stage.opened .bp-prize { animation: bp-rise .9s .25s cubic-bezier(.2,1.2,.3,1) forwards; }
@keyframes bp-rise {
  0%   { transform: translateY(40px) scale(.2); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: translateY(-72px) scale(1); opacity: 1; }
}
.bp-prize::after { /* 一圈闪光 */
  content: ""; position: absolute; inset: -16px; border-radius: 50%;
  border: 2px dashed rgba(253,230,138,.8); animation: bp-spin 6s linear infinite;
}
@keyframes bp-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .bp-leaf, .bp-stage.idle .bp-box, .bp-hint { animation: none !important; }
}

/* ---------------- 首页 Hero 轮播 ---------------- */
.hero {
  position: relative; border-radius: 20px; overflow: hidden; margin-bottom: 14px;
  background: linear-gradient(135deg, #14532d, #166534 60%, #15803d);
  color: #fff; min-height: 168px;
}
.hero-track { display: flex; transition: transform .5s cubic-bezier(.3,.8,.3,1); }
.hero-slide { flex: 0 0 100%; display: flex; align-items: center; gap: 10px; padding: 18px 0 18px 18px; min-height: 168px; }
.hero-text { flex: 1; min-width: 0; }
.hero-kicker { font-size: 11px; letter-spacing: 2px; background: rgba(255,255,255,.16); display: inline-block; padding: 2px 10px; border-radius: 999px; }
.hero-title { font-size: 19px; font-weight: 800; line-height: 1.35; margin: 8px 0 4px; }
.hero-sub { font-size: 12px; opacity: .85; margin-bottom: 10px; }
.hero-cta { display: inline-block; background: #fde68a; color: #14532d; font-weight: 700; font-size: 13px; padding: 7px 16px; border-radius: 999px; }
.hero-img { flex: 0 0 44%; align-self: stretch; position: relative; }
.hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 16px 0 0 16px; }
.hero-dots { position: absolute; left: 18px; bottom: 10px; display: flex; gap: 5px; }
.hero-dots span { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.4); transition: width .3s; }
.hero-dots span.active { width: 16px; background: #fde68a; }

/* 信任条 */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; }
.trust div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; text-align: center; font-size: 11px; color: var(--muted); line-height: 1.35; }
.trust b { display: block; font-size: 18px; margin-bottom: 2px; }

/* 首页区块标题 */
.home-head { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 0 10px; }
.home-head h2 { font-size: 17px; }
.home-head span { font-size: 12px; color: var(--muted); }

/* 卡片轻微交互 */
.card { transition: transform .2s ease, box-shadow .2s ease; }
.card:active { transform: scale(.98); }
@media (hover: hover) { .card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20,83,45,.12); } }
.card .thumb img { transition: transform .4s ease; }
@media (hover: hover) { .card:hover .thumb img { transform: scale(1.05); } }

/* 购买指南 */
.howto { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-top: 18px; }
.howto h3 { font-size: 15px; margin-bottom: 10px; }
.howto ol { list-style: none; display: grid; gap: 10px; }
.howto li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.howto li b { color: var(--text); display: block; font-size: 14px; }
.howto .n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--green-light); color: var(--green); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 13px; }

/* 页脚 */
.site-foot { text-align: center; padding: 22px 16px 8px; font-size: 12px; color: var(--muted); }
.site-foot a { color: var(--green); font-weight: 600; }
.site-foot .foot-links { display: flex; justify-content: center; gap: 16px; margin-bottom: 8px; }
.replay-intro { background: none; border: 0; color: var(--green); font-size: 12px; text-decoration: underline; }
.bp-stage.opened .bp-box-q { opacity: 0; transition: opacity .3s; }
.bp-intro.is-open .bp-intro-brand, .bp-intro.is-open .bp-intro-title, .bp-intro.is-open .bp-intro-sub { transform: translateY(-28px); transition: transform .6s ease; }

/* 开盒优惠券 */
.bp-intro-prize { display: inline-block; font-size: 12px; background: rgba(253,230,138,.18); color: #fde68a; border: 1px solid rgba(253,230,138,.35); border-radius: 999px; padding: 3px 12px; margin: 2px 0 6px; }
.bp-coupon { display: flex; align-items: stretch; margin: 10px 0 8px; border-radius: 14px; overflow: hidden; background: #fff7ed; border: 1.5px dashed #fb923c; text-align: left; }
.bp-coupon.ship { background: #eff6ff; border-color: #60a5fa; }
.bp-coupon-l { flex: 0 0 46%; padding: 10px 12px; border-right: 1.5px dashed #fb923c; color: #c2410c; display: flex; flex-direction: column; justify-content: center; }
.bp-coupon.ship .bp-coupon-l { color: #1d4ed8; border-color: #60a5fa; }
.bp-coupon-l b { font-size: 26px; line-height: 1.1; }
.bp-coupon-l span { font-size: 11px; }
.bp-coupon-r { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; }
.bp-coupon-code { font-family: ui-monospace, Menlo, monospace; font-size: 15px; font-weight: 700; letter-spacing: 1.5px; color: #1a1a1a; }
.bp-copy { border: 0; background: #14532d; color: #fff; border-radius: 999px; padding: 4px 14px; font-size: 12px; }
.bp-card-fortune { font-size: 12px; color: #6b7280; margin: -6px 0 12px; }
.bp-card-fortune span { color: #f59e0b; letter-spacing: 1px; }
.bp-intro-title { font-size: clamp(20px, 6.4vw, 26px); padding: 0 20px; line-height: 1.25; text-wrap: balance; }
.bp-intro-sub, .bp-intro-prize { margin-left: 20px; margin-right: 20px; }
.bp-intro.is-open .bp-intro-prize { opacity: 0; transition: opacity .3s; }

.bp-prize.emoji { display: flex; align-items: center; justify-content: center; font-size: 56px; background: linear-gradient(135deg, #fef3c7, #fbcfe8); }

/* 开场：电脑大屏放大一点；手机横屏把内容放左边、愿望签放右边 */
@media (min-width: 1024px) and (min-height: 700px) {
  .bp-intro-title { font-size: 34px; }
  .bp-intro-sub { font-size: 16px; }
  .bp-stage { transform: scale(1.2); margin: 50px auto 30px; }
  .bp-card { width: 380px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .bp-intro { align-items: flex-start; padding-left: max(24px, 6vw); }
  .bp-intro > .bp-intro-brand, .bp-intro > .bp-intro-title, .bp-intro > .bp-intro-sub { width: 240px; }
  .bp-intro-title { font-size: 22px; }
  .bp-stage { transform: scale(.72); margin: -22px 10px -34px; transform-origin: center; }
  .bp-energy { margin: 0 20px; }
  .bp-hint { width: 240px; margin-top: 8px; }
  .bp-card {
    left: auto; right: max(20px, 5vw); bottom: auto; top: 50%;
    width: min(360px, 46vw); padding: 14px 16px 12px; max-height: calc(100vh - 24px); overflow-y: auto;
    transform: translate(130%, -50%);
  }
  .bp-card.show { transform: translate(0, -50%); }
  .bp-card-text { font-size: 15px; }
  .bp-card-sub { margin-bottom: 10px; }
}

/* 首页 Hero / 信任条 / 指南：平板和电脑 */
@media (min-width: 640px) {
  .trust div { font-size: 12px; padding: 10px 6px; }
  .hero-slide { min-height: 220px; padding-left: 28px; }
  .hero-title { font-size: 24px; }
}
@media (min-width: 1024px) {
  .hero-slide { min-height: 320px; padding: 32px 0 32px 44px; gap: 28px; }
  .hero-title { font-size: 34px; }
  .hero-sub { font-size: 15px; }
  .hero-cta { font-size: 15px; padding: 10px 22px; }
  .hero-img { flex-basis: 50%; }
  .hero-dots { left: 44px; bottom: 16px; }
  .trust { gap: 12px; }
  .trust div { font-size: 13px; padding: 14px 8px; }
  .trust b { font-size: 24px; }
  .howto ol { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .hero-slide { min-height: 150px; }
}
