/* ============================================================
   超级通讯平台 · 进阶视图样式（A 阶段新增）
   登录 / 弹层 / 模态 / 分段 / 资料 / 通话 / 全屏视频 / 钱包
   —— 全部沿用 tokens.css 变量，独立成文件，不影响既有页面。
   ============================================================ */

/* 整屏模式：隐藏顶栏 + 底部Tab（登录/通话/全屏视频用） */
.phone.chrome-hidden .topbar,
.phone.chrome-hidden .tabbar { display: none; }

/* —— 启动/登录 —— */
.login {
  position: relative; height: 100%; display: flex; flex-direction: column;
  justify-content: space-between; padding: 64px 28px 40px; text-align: center; overflow: hidden;
}
.login::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(420px 280px at 50% 12%, rgba(59,130,246,0.30), transparent 60%),
    radial-gradient(360px 300px at 80% 90%, rgba(34,211,238,0.18), transparent 60%);
}
.login > * { position: relative; z-index: 1; }
.login .logo {
  width: 88px; height: 88px; border-radius: 26px; margin: 0 auto 22px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center; font-size: 44px;
  box-shadow: var(--glow-primary);
}
.login h1 { font-size: 30px; font-weight: 800; letter-spacing: 1px; }
.login .slo { color: var(--text-sub); margin-top: 12px; font-size: var(--fs-16); line-height: 1.7; }
.login .feat-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 24px; }
.login .cta { display: flex; flex-direction: column; gap: 12px; }
.login .agree { color: var(--text-faint); font-size: var(--fs-12); margin-top: 6px; }
.login .agree a { color: var(--accent); }

/* —— 底部弹层 Sheet —— */
.sheet-mask {
  position: absolute; inset: 0; background: var(--bg-overlay); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 50;
}
.sheet-mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 51;
  background: var(--bg-elevated); border-top-left-radius: 20px; border-top-right-radius: 20px;
  border-top: 1px solid var(--border-strong); padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .26s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg);
}
.sheet.show { transform: translateY(0); }
.sheet .grip { width: 40px; height: 4px; border-radius: 4px; background: var(--border-strong); margin: 6px auto 12px; }
.sheet .sheet-title { text-align: center; font-weight: 700; margin-bottom: 12px; }
.sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sheet-grid .si { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px; border-radius: var(--r-md); cursor: pointer; }
.sheet-grid .si:hover { background: var(--bg-card-2); }
.sheet-grid .si .e { width: 48px; height: 48px; border-radius: 14px; background: var(--bg-card-2); display: flex; align-items: center; justify-content: center; font-size: 24px; border: 1px solid var(--border); }
.sheet-grid .si .l { font-size: var(--fs-12); color: var(--text-sub); }
.sheet .sheet-list .list-item { border-radius: var(--r-md); }

/* —— 聊天输入工具条 —— */
.composer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  background: var(--bg-elevated); border-top: 1px solid var(--border);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px;
}
.composer .cbtn { width: 36px; height: 36px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-sub); }
.composer .cbtn:hover { background: var(--bg-card-2); color: var(--accent); }
.composer .cin { flex: 1; height: 38px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 0 14px; color: var(--text); }
.composer .cin:focus { outline: none; border-color: var(--primary); }
.chat-screen { padding-bottom: 64px; } /* 给输入条留位 */

/* 富气泡：红包/转账卡 */
.pay-card { width: 200px; border-radius: 12px; overflow: hidden; cursor: pointer; }
.pay-card .pc-top { padding: 14px; display: flex; align-items: center; gap: 10px; color: #fff; }
.pay-card.redpacket .pc-top { background: linear-gradient(135deg, #E0574E, #C0392B); }
.pay-card.transfer .pc-top { background: linear-gradient(135deg, #2563EB, #3B82F6); }
.pay-card .pc-emoji { font-size: 26px; }
.pay-card .pc-amt { font-weight: 700; font-size: var(--fs-16); }
.pay-card .pc-tip { font-size: var(--fs-12); opacity: .9; }
.pay-card .pc-bottom { background: var(--bg-card-2); padding: 6px 12px; font-size: var(--fs-12); color: var(--text-faint); }
.voice-bubble { display: flex; align-items: center; gap: 8px; min-width: 90px; }
.voice-bubble .wave { letter-spacing: 2px; }
.img-bubble { width: 160px; height: 110px; border-radius: 12px; background: linear-gradient(135deg, #1e2a44, #141b2d); border: 1px solid var(--border); }

/* —— 顶部分段切换 segmented —— */
.segmented { display: flex; gap: 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 4px; }
.segmented .seg { flex: 1; text-align: center; padding: 8px 0; border-radius: var(--r-pill); font-size: var(--fs-13); color: var(--text-sub); cursor: pointer; transition: all .15s; }
.segmented .seg.active { background: var(--primary); color: #fff; }

/* —— 资料 / 个人主页 —— */
.profile-hero {
  position: relative; padding: 28px 20px 20px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, #1c2742, #0f1626); border: 1px solid var(--border); text-align: center;
}
.profile-hero .pa { margin: 0 auto 12px; }
.profile-hero .pn { font-size: var(--fs-22); font-weight: 800; }
.profile-hero .pid { color: var(--text-sub); font-size: var(--fs-13); margin-top: 4px; }
.profile-hero .pbio { color: var(--text-sub); font-size: var(--fs-13); margin-top: 10px; }
.profile-stats { display: flex; justify-content: space-around; margin: 14px 0; }
.profile-stats .ps .n { font-weight: 800; font-size: var(--fs-18); }
.profile-stats .ps .l { color: var(--text-sub); font-size: var(--fs-12); }

/* —— 通话界面 —— */
.call {
  height: 100%; position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 60px 24px 48px; text-align: center;
  background: radial-gradient(600px 400px at 50% 20%, rgba(59,130,246,0.22), transparent 60%), var(--bg-base);
}
.call .ca { width: 110px; height: 110px; border-radius: 32px; margin-bottom: 20px; font-size: 54px;
  background: linear-gradient(135deg, #243049, #161d30); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); }
.call .cn { font-size: var(--fs-22); font-weight: 700; }
.call .cs { color: var(--accent); margin-top: 8px; font-size: var(--fs-14); }
.call .self-pip { position: absolute; top: 24px; right: 20px; width: 84px; height: 120px; border-radius: 14px;
  background: linear-gradient(135deg, #223; #112); border: 1px solid var(--border-strong); background:#11192b; display:flex;align-items:center;justify-content:center;color:var(--text-faint); }
.call .controls { margin-top: auto; display: flex; gap: 22px; }
.call .cc { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--bg-card-2); border: 1px solid var(--border); }
.call .cc.hang { background: var(--danger); border-color: transparent; }
.call .cc.accept { background: var(--success); border-color: transparent; }

/* —— 全屏短视频 —— */
.shorts { position: relative; height: 100%; background: #05070d; }
.shorts .reel { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 16px 28px; background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.55)); }
.shorts .reel .bg { position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(160deg, #16223b, #0a1120); }
.shorts .reel .center-play { position:absolute; inset:0; display:flex;align-items:center;justify-content:center; color:rgba(255,255,255,.35); font-size:64px; z-index:1;}
.shorts .reel > .meta { position: relative; z-index: 2; }
.shorts .reel .author { font-weight: 700; font-size: var(--fs-16); }
.shorts .reel .desc { font-size: var(--fs-13); color: #cdd5e6; margin-top: 6px; }
.shorts .side { position: absolute; right: 14px; bottom: 90px; z-index: 3; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.shorts .side .sb { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: var(--fs-12); color: #fff; }
.shorts .side .sb .ic { font-size: 26px; }
.shorts .top-tabs { position: absolute; top: 14px; left: 0; right: 0; z-index: 4; display: flex; justify-content: center; gap: 18px; color: rgba(255,255,255,.6); font-size: var(--fs-14); }
.shorts .top-tabs .t.active { color: #fff; font-weight: 700; border-bottom: 2px solid var(--accent); padding-bottom: 4px; }
.shorts .close-fs { position: absolute; top: 12px; left: 14px; z-index: 5; color: #fff; width: 32px; height: 32px; display:flex;align-items:center;justify-content:center; background: rgba(0,0,0,.3); border-radius: 50%; }

/* —— 钱包：账单 / 定价卡 —— */
.bill-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.bill-row .bi { width: 40px; height: 40px; border-radius: 12px; background: var(--bg-card-2); display:flex;align-items:center;justify-content:center; font-size:18px; border:1px solid var(--border); }
.bill-row .amt { font-weight: 700; }
.bill-row .amt.in { color: var(--success); }
.bill-row .amt.out { color: var(--text); }
.price-cards { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.price-card { flex: 0 0 150px; border-radius: var(--r-lg); padding: 16px; border: 1px solid var(--border);
  background: linear-gradient(160deg, #1b2640, #121a2c); }
.price-card.hot { border-color: var(--primary); box-shadow: var(--glow-primary); }
.price-card .lvl { font-weight: 800; font-size: var(--fs-16); }
.price-card .price { font-size: 24px; font-weight: 800; margin: 8px 0; }
.price-card .price small { font-size: var(--fs-12); color: var(--text-sub); font-weight: 400; }
.price-card ul { color: var(--text-sub); font-size: var(--fs-12); line-height: 1.9; margin-top: 6px; }

/* QR 占位 */
.qr-box { width: 180px; height: 180px; margin: 0 auto; border-radius: var(--r-md); background:
  repeating-conic-gradient(#0c1322 0% 25%, #18223a 0% 50%) 0 0/20px 20px; border: 6px solid #fff; }
