/* ===========================================================
   漫境 AiReelToon · 积分中心（签到 / 任务 / 游戏 / 钱包）
   与 app.css 设计系统共用变量，移动端 + 网站端通用
   =========================================================== */

/* ---------- 页面容器 ---------- */
.pt-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 14px calc(var(--nav-h) + 26px);
}
.page-web .pt-wrap { padding-bottom: 40px; }
.pt-head {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0 14px;
}
.pt-head .bk {
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg-3);
  font-size: 16px; color: var(--txt-2);
}
.pt-head h1 { font-size: 19px; margin: 0; flex: 1; font-weight: 800; letter-spacing: .3px; }
.pt-head .pt-hcoin {
  display: flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #2a2213, #3a2e14);
  border: 1px solid rgba(255,197,61,.32);
  color: var(--gold); font-weight: 800; font-size: 14px;
  padding: 6px 12px; border-radius: 999px;
}

/* ---------- 余额主卡 ---------- */
.pt-hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  padding: 20px 18px 22px;
  background: linear-gradient(135deg, #FF2E4D 0%, #FF6B3D 55%, #FFA93D 100%);
  box-shadow: 0 14px 36px rgba(255,46,77,.28);
}
.pt-hero::before {
  content: ''; position: absolute; right: -40px; top: -50px;
  width: 190px; height: 190px; border-radius: 50%;
  background: rgba(255,255,255,.16);
}
.pt-hero::after {
  content: ''; position: absolute; right: 34px; bottom: -70px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255,255,255,.10);
}
.pt-hero .lb { font-size: 12.5px; opacity: .9; letter-spacing: .5px; position: relative; }
.pt-hero .big {
  font-size: 40px; font-weight: 900; line-height: 1.1; margin: 4px 0 2px;
  letter-spacing: -1px; position: relative;
  display: flex; align-items: baseline; gap: 6px;
}
.pt-hero .big small { font-size: 14px; font-weight: 700; opacity: .92; }
.pt-hero .sub { font-size: 12.5px; opacity: .9; position: relative; }
.pt-hero .row { display: flex; gap: 10px; margin-top: 16px; position: relative; }

/* 紫色变体（钱包/游戏厅） */
.pt-hero.purple { background: linear-gradient(135deg, #7C3AED 0%, #A855F7 60%, #E879F9 100%); box-shadow: 0 14px 36px rgba(124,58,237,.28); }
.pt-hero.gold { background: linear-gradient(135deg, #F59E0B 0%, #FFC53D 60%, #FDE68A 100%); box-shadow: 0 14px 36px rgba(245,158,11,.26); color: #3a2b06; }
.pt-hero.gold .lb, .pt-hero.gold .sub { opacity: .82; }

/* ---------- 按钮 ---------- */
.pt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font-size: 15px; font-weight: 800; letter-spacing: .3px;
  background: var(--bg-3); color: var(--txt);
  transition: transform .12s, opacity .2s;
}
.pt-btn:active { transform: scale(.96); }
.pt-btn.pri { background: #fff; color: #E11D48; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.pt-btn.ghost { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(6px); }
.pt-btn.gold { background: linear-gradient(135deg, #FFC53D, #F59E0B); color: #3a2b06; }
.pt-btn.dim { opacity: .5; pointer-events: none; }
.pt-btn.big { height: 50px; font-size: 16.5px; width: 100%; }
.pt-btn.sm { height: 32px; padding: 0 14px; font-size: 13px; }

/* ---------- 通用卡片 ---------- */
.pt-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  margin-top: 14px;
}
.pt-card-hd {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.pt-card-hd h2 { font-size: 15.5px; margin: 0; font-weight: 800; flex: 1; }
.pt-card-hd .more { font-size: 12.5px; color: var(--txt-2); font-weight: 600; }
.pt-card-hd .ic { font-size: 17px; }

/* ---------- 签到日历 ---------- */
.pt-cells {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px;
  margin-top: 4px;
}
.pt-cell {
  position: relative;
  border-radius: 10px; padding: 8px 1px 7px;
  text-align: center; min-width: 0; overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line);
  transition: transform .18s;
}
.pt-cell .d { font-size: 10px; color: var(--txt-3); font-weight: 700; white-space: nowrap; }
.pt-cell .c {
  font-size: 12px; font-weight: 900; color: var(--gold);
  margin-top: 3px; display: block; line-height: 1.2; white-space: nowrap;
}
.pt-cell .ck {
  position: absolute; right: 3px; top: 3px;
  font-size: 10px; color: var(--ok); font-weight: 900;
}
.pt-cell.done { background: rgba(34,197,94,.13); border-color: rgba(34,197,94,.4); }
.pt-cell.done .c { color: var(--ok); }
.pt-cell.now {
  background: linear-gradient(160deg, rgba(255,46,77,.28), rgba(255,107,61,.18));
  border-color: var(--brand);
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 20px rgba(255,46,77,.3);
}
.pt-cell.now .d { color: #fff; }
.pt-cell.next { border-color: rgba(255,197,61,.5); }
.pt-cell.big .c { color: #FF9F1C; }
.pt-cell.big.done .c { color: var(--ok); }

.pt-streak {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--txt-2); margin-bottom: 14px;
}
.pt-streak b { color: var(--gold); font-size: 16px; font-weight: 900; }
.pt-streak .tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: rgba(255,197,61,.15); color: var(--gold); font-weight: 700;
}

/* ---------- 任务列表 ---------- */
.pt-task {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.pt-task:last-child { border-bottom: 0; }
.pt-task .ic {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; background: var(--bg-3);
}
.pt-task .mid { flex: 1; min-width: 0; }
.pt-task .nm { font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.pt-task .bar {
  height: 4px; border-radius: 4px; background: var(--bg-3); overflow: hidden;
}
.pt-task .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .35s; }
.pt-task .pg { font-size: 11px; color: var(--txt-3); margin-top: 5px; }
.pt-task .rw {
  font-size: 13px; font-weight: 900; color: var(--gold); white-space: nowrap;
  display: flex; align-items: center; gap: 3px;
}
.pt-task .act { flex: none; }
.pt-task.claimed .nm { color: var(--txt-3); }
.pt-task.claimed .rw { color: var(--txt-3); }

/* ---------- 游戏厅 ---------- */
.pt-games {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.pt-gcard { min-width: 0; }
@media (min-width: 700px) { .pt-games { grid-template-columns: repeat(4, 1fr); } }
.pt-gcard {
  position: relative; overflow: hidden;
  border-radius: var(--r); padding: 16px 14px 14px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  text-align: left;
  transition: transform .16s;
}
.pt-gcard:active { transform: scale(.97); }
.pt-gcard .em { font-size: 30px; display: block; margin-bottom: 10px; }
.pt-gcard .tt { font-size: 14.5px; font-weight: 800; margin-bottom: 4px; display: block; }
.pt-gcard .ds { font-size: 11.5px; color: var(--txt-3); line-height: 1.45; min-height: 32px; display: block; }
.pt-gcard .qt {
  margin-top: 10px; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--bg-3); color: var(--txt-2);
}
.pt-gcard .qt.ok { background: rgba(34,197,94,.16); color: var(--ok); }
.pt-gcard .qt.no { background: rgba(255,255,255,.06); color: var(--txt-3); }
.pt-gcard.g1 { background: linear-gradient(150deg, rgba(255,46,77,.20), var(--bg-2) 62%); }
.pt-gcard.g2 { background: linear-gradient(150deg, rgba(255,197,61,.20), var(--bg-2) 62%); }
.pt-gcard.g3 { background: linear-gradient(150deg, rgba(59,130,246,.20), var(--bg-2) 62%); }
.pt-gcard.g4 { background: linear-gradient(150deg, rgba(124,58,237,.22), var(--bg-2) 62%); }

/* ---------- 钱包 ---------- */
.pt-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pt-plan {
  border-radius: var(--r); padding: 14px 6px; text-align: center;
  background: var(--bg-3); border: 1px solid var(--line);
  transition: transform .14s; min-width: 0;
}
.pt-plan:active { transform: scale(.96); }
.pt-plan .dd { font-size: 17px; font-weight: 900; }
.pt-plan .dd small { font-size: 11px; font-weight: 600; color: var(--txt-2); }
.pt-plan .cc { font-size: 12.5px; color: var(--gold); font-weight: 800; margin-top: 7px; }
.pt-plan .off { font-size: 10.5px; color: var(--txt-3); margin-top: 3px; }

.pt-led { margin-top: 6px; }
.pt-led-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.pt-led-row:last-child { border-bottom: 0; }
.pt-led-row .ic {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  background: var(--bg-3);
}
.pt-led-row .mid { flex: 1; min-width: 0; }
.pt-led-row .nm { font-size: 13.5px; font-weight: 700; }
.pt-led-row .tm { font-size: 11px; color: var(--txt-3); margin-top: 3px; }
.pt-led-row .amt { font-size: 14.5px; font-weight: 900; white-space: nowrap; }
.pt-led-row .amt.in { color: var(--ok); }
.pt-led-row .amt.out { color: var(--txt-2); }

.pt-empty { text-align: center; padding: 30px 10px; color: var(--txt-3); font-size: 13px; }
.pt-empty .em { font-size: 34px; display: block; margin-bottom: 10px; opacity: .5; }

/* ---------- 首页横幅入口 ---------- */
.pt-banner {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 14px;
  padding: 13px 15px;
  border-radius: var(--r);
  background: linear-gradient(100deg, rgba(255,46,77,.22), rgba(255,197,61,.14) 70%, var(--bg-2));
  border: 1px solid rgba(255,197,61,.24);
  position: relative; overflow: hidden;
}
.pt-banner .em { font-size: 26px; }
.pt-banner .tt { font-size: 14px; font-weight: 800; }
.pt-banner .ds { font-size: 11.5px; color: var(--txt-2); margin-top: 3px; }
.pt-banner .go {
  margin-left: auto; flex: none;
  font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  padding: 8px 15px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(255,46,77,.32);
}
.pt-banner .go.done { background: var(--bg-3); color: var(--txt-2); box-shadow: none; }

/* ---------- 弹层（游戏 / 广告 / 结果） ---------- */
.pt-mask {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(6,6,10,.82);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.pt-mask.on { opacity: 1; pointer-events: auto; }
.pt-box {
  width: 100%; max-width: 380px;
  background: linear-gradient(170deg, #1B1B26, #12121A);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 20px 20px;
  text-align: center;
  transform: translateY(12px) scale(.97);
  transition: transform .26s cubic-bezier(.2,.9,.3,1.2);
  max-height: 88vh; overflow-y: auto;
}
.pt-mask.on .pt-box { transform: translateY(0) scale(1); }
.pt-box h3 { font-size: 18px; margin: 0 0 6px; font-weight: 900; }
.pt-box .tip { font-size: 12.5px; color: var(--txt-2); line-height: 1.6; }
.pt-box .ops { display: flex; gap: 10px; margin-top: 18px; }
.pt-box .ops .pt-btn { flex: 1; }

/* 转盘 */
.pt-wheel-wrap { position: relative; width: 250px; height: 250px; margin: 16px auto 4px; }
.pt-wheel-ring {
  position: absolute; inset: -8px; border-radius: 50%;
  background: conic-gradient(#FF2E4D 0 45deg, #FFC53D 45deg 90deg, #7C3AED 90deg 135deg, #22C55E 135deg 180deg,
    #FF6B3D 180deg 225deg, #3B82F6 225deg 270deg, #EC4899 270deg 315deg, #F59E0B 315deg 360deg);
  opacity: .85;
}
.pt-wheel {
  position: absolute; inset: 0; border-radius: 50%;
  background: #17171F;
  border: 6px solid #22222E;
  transition: transform 4.2s cubic-bezier(.16,.72,.16,1);
  overflow: hidden;
}
.pt-wheel .seg {
  position: absolute; left: 50%; top: 50%;
  width: 70px; margin-left: -35px;
  text-align: center; font-size: 12.5px; font-weight: 900; color: var(--gold);
  transform-origin: 50% 0;
}
.pt-wheel .seg .mini { display: block; font-size: 9px; font-weight: 700; color: var(--txt-3); margin-top: 1px; }
.pt-wheel-pin {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 56px; height: 56px; border-radius: 50%; z-index: 3;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 6px 18px rgba(255,46,77,.45);
  border: 3px solid #fff2;
}
.pt-wheel-arrow {
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%);
  width: 0; height: 0; z-index: 4;
  border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-top: 20px solid var(--gold);
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.5));
}

/* 刮刮乐 */
.pt-scratch-wrap { position: relative; margin: 16px auto 4px; width: 100%; max-width: 300px; }
.pt-scratch-under {
  height: 150px; border-radius: 14px;
  background: linear-gradient(140deg, #FFC53D, #F59E0B);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #3a2b06;
}
.pt-scratch-under .v { font-size: 42px; font-weight: 900; letter-spacing: -1px; }
.pt-scratch-under .l { font-size: 12.5px; font-weight: 700; opacity: .8; }
.pt-scratch {
  position: absolute; inset: 0; border-radius: 14px;
  cursor: crosshair; touch-action: none;
}

/* 金币雨 */
.pt-rain-area {
  position: relative; height: 320px; margin: 12px 0 0;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, #101828, #1a1230);
  border: 1px solid var(--line);
}
.pt-rain-coin {
  position: absolute; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; cursor: pointer; user-select: none;
  animation: ptFall linear forwards;
}
@keyframes ptFall {
  from { transform: translateY(-46px) rotate(0deg); }
  to { transform: translateY(330px) rotate(300deg); }
}
.pt-rain-hud {
  position: absolute; left: 10px; top: 10px; z-index: 3;
  display: flex; gap: 8px; align-items: center;
  font-size: 13px; font-weight: 800;
  background: rgba(0,0,0,.42); padding: 5px 11px; border-radius: 999px;
}
.pt-rain-hud .tm { color: var(--gold); }
.pt-rain-pop {
  position: absolute; font-size: 14px; font-weight: 900; color: var(--gold);
  pointer-events: none; animation: ptPop .7s ease-out forwards;
}
@keyframes ptPop { to { transform: translateY(-38px); opacity: 0; } }

/* 翻牌 */
.pt-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
  margin: 16px 0 4px;
}
.pt-cardc {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: linear-gradient(150deg, #6D28D9, #A855F7);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  transition: transform .22s, background .3s;
  cursor: pointer;
}
.pt-cardc:active { transform: scale(.94); }
.pt-cardc.open {
  background: linear-gradient(150deg, #F59E0B, #FFC53D);
  color: #3a2b06; font-size: 19px;
  cursor: default;
}
.pt-cardc.dim { opacity: .3; pointer-events: none; }

/* 中奖结果 */
.pt-win { padding: 6px 0 2px; }
.pt-win .em { font-size: 52px; line-height: 1; margin-bottom: 10px; animation: ptBounce .7s ease; }
@keyframes ptBounce {
  0% { transform: scale(.4); opacity: 0; }
  60% { transform: scale(1.16); opacity: 1; }
  100% { transform: scale(1); }
}
.pt-win .v { font-size: 34px; font-weight: 900; color: var(--gold); letter-spacing: -1px; }
.pt-win .v small { font-size: 14px; font-weight: 700; }

/* 广告模拟 */
.pt-ad {
  height: 210px; border-radius: 14px; margin: 14px 0;
  background: linear-gradient(140deg, #1F2937, #111827);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.pt-ad .shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.07) 50%, transparent 70%);
  animation: ptShimmer 1.6s linear infinite;
}
@keyframes ptShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.pt-ad .lb { font-size: 12.5px; color: var(--txt-2); letter-spacing: 1px; }
.pt-ad .cd { font-size: 40px; font-weight: 900; color: var(--gold); margin-top: 8px; }
.pt-ad .bar { width: 60%; height: 4px; border-radius: 4px; background: var(--bg-3); margin-top: 12px; overflow: hidden; }
.pt-ad .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); width: 0; transition: width 1s linear; }

/* 金币飞入动画 */
.pt-fly {
  position: fixed; z-index: 9500; pointer-events: none;
  font-size: 22px; animation: ptFly .9s ease-out forwards;
}
@keyframes ptFly {
  0% { transform: translate(0,0) scale(.6); opacity: 0; }
  25% { transform: translate(0,-22px) scale(1.15); opacity: 1; }
  100% { transform: translate(var(--fx,0), var(--fy,-140px)) scale(.5); opacity: 0; }
}

/* 顶栏金币按钮可点 */
.app-top .icon-btn.coin-btn, .icon-btn.top-coin {
  background: linear-gradient(135deg, rgba(255,197,61,.18), rgba(255,46,77,.14));
  border: 1px solid rgba(255,197,61,.3);
}

/* 网站端顶栏入口 */
.nav-pts {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 15px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,197,61,.16), rgba(255,46,77,.14));
  border: 1px solid rgba(255,197,61,.28);
  font-size: 13.5px; font-weight: 800; color: var(--gold);
  white-space: nowrap;
}
.nav-pts:active { transform: scale(.96); }
@media (max-width: 700px) { .nav-pts span { display: none; } .nav-pts { padding: 0 11px; } }
