* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { background: #070b18; color: #e6ecff; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
.live-app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: linear-gradient(160deg, #0a1124 0%, #070b18 60%); padding-bottom: 64px; }

/* 顶部栏 */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.brand { font-weight: 700; color: #6fe3ff; letter-spacing: 1px; }
.live-tag { font-size: 12px; color: #ff7a9c; display: flex; align-items: center; gap: 6px; }
.live-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 8px #ff4d6d; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* 播放器 */
.player { position: relative; background: #000; width: 100%; padding-top: 56.25%; /* 16:9 兼容旧微信 */ }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player-err { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; color: #9fb0d8; font-size: 13px; background: #0c1428; z-index: 98; }
.player-err[hidden] { display: none !important; }
.player-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9fb0d8; font-size: 13px; background: #000; z-index: 96; }
.player-loading[hidden] { display: none !important; }
.play-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(0,0,0,.55); z-index: 97; cursor: pointer; }
.play-overlay[hidden] { display: none !important; }
.play-overlay .play-btn { width: 60px; height: 60px; border-radius: 50%; background: rgba(43,214,255,.9); color: #04122e; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 0 22px rgba(43,214,255,.55); }
.play-overlay .play-tip { color: #e6ecff; font-size: 13px; }

/* 弹幕层 */
.danmu-layer{position:absolute;left:0;right:0;top:0;bottom:0;overflow:hidden;pointer-events:none;z-index:5}
.danmu-item{position:absolute;left:0;white-space:nowrap;font-size:13px;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.9);padding:2px 9px;background:rgba(0,0,0,.22);border-radius:12px;will-change:transform}

/* 直播间信息 */
.room-info { padding: 14px 16px 4px; }
.room-info h1 { font-size: 18px; font-weight: 700; }
.room-info p { font-size: 13px; color: #93a4cc; margin-top: 4px; }

/* 商品橱窗 */
.shop { padding: 14px 16px; }
.shop-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.shop-title { font-size: 16px; font-weight: 700; color: #fff; }
.shop-sub { font-size: 12px; color: #7d8cb5; }
.goods-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.goods-list::-webkit-scrollbar { height: 4px; }
.goods-list::-webkit-scrollbar-thumb { background: #2a3a66; border-radius: 4px; }
.goods-card { flex: 0 0 200px; background: #0f1830; border: 1px solid #1e2c52; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.goods-img { height: 110px; background: linear-gradient(135deg, #16306b, #0c1a3d); display: flex; align-items: center; justify-content: center; font-size: 30px; color: #6fe3ff; }
.goods-img img { width: 100%; height: 100%; object-fit: cover; }
.goods-body { padding: 10px 12px 12px; }
.goods-name { font-size: 14px; font-weight: 600; line-height: 1.35; min-height: 38px; }
.goods-desc { font-size: 11px; color: #8a9ac4; margin: 6px 0 8px; line-height: 1.4; min-height: 30px; }
.goods-foot { display: flex; align-items: center; justify-content: space-between; }
.goods-price { color: #ff7a9c; font-weight: 700; font-size: 17px; }
.goods-price small { font-size: 12px; font-weight: 400; }
.buy-now { background: linear-gradient(135deg, #2bd6ff, #4f7bff); color: #04122e; border: none; border-radius: 20px; padding: 7px 16px; font-size: 13px; font-weight: 700; }
.buy-now:active { transform: scale(.96); }
.loading { color: #7d8cb5; font-size: 13px; padding: 20px; }

.foot { text-align: center; color: #4d5d85; font-size: 12px; margin-top: 10px; }

/* 弹幕输入栏 */
.danmu-bar{position:fixed;left:0;right:0;bottom:0;display:flex;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:rgba(8,12,26,.94);border-top:1px solid #1e2c52;z-index:30}
.danmu-input{flex:1;background:#0f1830;border:1px solid #23356a;border-radius:22px;padding:10px 14px;color:#e6ecff;font-size:14px;outline:none}
.danmu-input:focus{border-color:#2bd6ff}
.danmu-send{background:linear-gradient(135deg,#2bd6ff,#4f7bff);color:#04122e;border:none;border-radius:22px;padding:0 18px;font-weight:700;font-size:14px}
.danmu-send:active{transform:scale(.96)}

/* 购买弹层 */
.buy-mask { position: fixed; inset: 0; background: rgba(2,6,18,.72); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.buy-mask[hidden] { display: none !important; }
.buy-card { width: 100%; max-width: 480px; background: #0d1730; border-radius: 18px 18px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid #23356a; }
.buy-row { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: 700; }
.buy-close { background: none; border: none; color: #8a9ac4; font-size: 24px; line-height: 1; }
.buy-price { color: #ff7a9c; font-size: 24px; font-weight: 800; margin: 10px 0; }
.buy-desc { font-size: 12px; color: #93a4cc; line-height: 1.5; margin-bottom: 16px; }
.buy-btn { width: 100%; background: linear-gradient(135deg, #2bd6ff, #4f7bff); color: #04122e; border: none; border-radius: 26px; padding: 13px; font-size: 16px; font-weight: 800; }
.buy-btn:active { transform: scale(.98); }
.buy-btn:disabled { opacity: .6; }
.buy-tip { text-align: center; font-size: 12px; color: #8a9ac4; margin-top: 10px; min-height: 16px; }

/* 提示 toast */
.toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: rgba(10,18,40,.94); color: #e6ecff; padding: 10px 18px; border-radius: 22px; font-size: 13px; border: 1px solid #2a3c6e; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 99; max-width: 80%; text-align: center; }
.toast.show { opacity: 1; }
