* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f2f3f5; color: #222; max-width: 480px; margin: 0 auto; }
.topbar { background: #ff2c55; color: #fff; padding: 12px 14px; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.topbar .anchor { font-size: 12px; font-weight: 400; opacity: .9; }

/* 列表 */
.room-list { padding: 12px; display: grid; gap: 12px; }
.card { background: #fff; border-radius: 10px; overflow: hidden; display: flex; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.card img { width: 120px; height: 90px; object-fit: cover; }
.card .info { padding: 10px; flex: 1; }
.card .title { font-size: 15px; font-weight: 600; }
.card .anchor { font-size: 12px; color: #888; margin-top: 6px; }
.card .status { margin-top: 8px; font-size: 12px; }
.card .live { color: #ff2c55; font-weight: 700; }

/* 播放器 */
.player-wrap { position: relative; background: #000; }
#player { width: 100%; height: 260px; background: #000; display: block; }
.hint { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.5); color: #fff; font-size: 11px; padding: 3px 6px; border-radius: 4px; }

/* 小黄车 */
.cart { background: #fff; margin: 10px; border-radius: 10px; padding: 10px; }
.cart h3 { font-size: 14px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.cart-tip { font-size: 11px; color: #999; font-weight: 400; }
.cart-list { display: grid; gap: 8px; }
.item { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid #f0f0f0; border-radius: 8px; }
.item.explaining { border-color: #ff2c55; background: #fff5f7; }
.item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.item .meta { flex: 1; }
.item .name { font-size: 13px; }
.item .tag { background: #ff2c55; color: #fff; font-size: 10px; padding: 1px 4px; border-radius: 3px; margin-left: 4px; }
.item .price { color: #ff2c55; font-size: 14px; font-weight: 700; margin-top: 2px; }
.item .price s { color: #bbb; font-size: 11px; font-weight: 400; margin-left: 4px; }
.item .stock { font-size: 11px; color: #999; }
.item button { background: #ff2c55; color: #fff; border: none; border-radius: 14px; padding: 6px 14px; font-size: 13px; }

/* 弹幕 */
.chat { background: #fff; margin: 10px; border-radius: 10px; padding: 10px; }
.danmu-box { height: 160px; overflow-y: auto; font-size: 13px; line-height: 1.7; }
.danmu-box .dm b { color: #ff2c55; }
.danmu-box .dm.sys { color: #ff9800; font-weight: 600; }
.dm-input { display: flex; gap: 6px; margin-top: 8px; }
.dm-input input { flex: 1; border: 1px solid #ddd; border-radius: 16px; padding: 8px 12px; outline: none; }
.dm-input button { background: #ff2c55; color: #fff; border: none; border-radius: 16px; padding: 0 16px; }

/* 真实推流/播流地址条 */
.urlbar { background: #fff; margin: 10px; border-radius: 10px; padding: 8px 10px; font-size: 12px; }
.urlbar .urow { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.urlbar .utag { background: #ffe9ef; color: #ff2c55; border-radius: 4px; padding: 2px 6px; font-size: 11px; white-space: nowrap; }
.urlbar code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #333; }
.urlbar button { background: #ff2c55; color: #fff; border: none; border-radius: 10px; padding: 3px 10px; font-size: 12px; }

/* 顶栏返回按钮 */
.topbar .back { color: #fff; text-decoration: none; font-size: 15px; white-space: nowrap; }
.topbar .topbar-ph { width: 36px; }
.topbar .room-title { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 入口 / 角色选择 */
.entry { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(160deg, #ff2c55 0%, #ff5e7e 45%, #ffd0db 100%); }
.entry-hero { text-align: center; color: #fff; padding: 56px 20px 26px; }
.entry-hero .logo { font-size: 50px; line-height: 1; }
.entry-hero h1 { font-size: 26px; margin-top: 12px; letter-spacing: 1px; }
.entry-sub { font-size: 13px; opacity: .92; margin-top: 8px; }
.entry-tip { display: inline-block; margin-top: 18px; font-size: 13px; background: rgba(255,255,255,.22); padding: 5px 16px; border-radius: 16px; }
.entry-roles { flex: 1; padding: 16px 18px; display: grid; gap: 14px; width: 100%; max-width: 440px; margin: 0 auto; align-content: start; }
.role-card { background: #fff; border-radius: 16px; padding: 20px; text-decoration: none; color: #222; box-shadow: 0 8px 24px rgba(0,0,0,.12); transition: transform .15s, box-shadow .15s; }
.role-card:active { transform: translateY(2px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.role-card.viewer { border-top: 3px solid #ff2c55; }
.role-card.anchor { border-top: 3px solid #7b5cff; }
.role-icon { font-size: 34px; }
.role-title { font-size: 19px; font-weight: 700; margin-top: 6px; }
.role-desc { font-size: 13px; color: #777; margin-top: 6px; line-height: 1.6; }
.role-go { margin-top: 14px; font-size: 14px; font-weight: 600; color: #ff2c55; }
.role-card.anchor .role-go { color: #7b5cff; }
.entry-foot { text-align: center; color: rgba(255,255,255,.85); font-size: 11px; padding: 18px; }

/* 主播开播台 */
.broadcast { padding: 14px; }
.bc-tip { background: #fff7f9; color: #ff2c55; font-size: 12px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; line-height: 1.6; }
.bc-form { display: flex; align-items: center; gap: 8px; background: #fff; padding: 12px; border-radius: 10px; }
.bc-form label { font-size: 13px; color: #555; white-space: nowrap; }
.bc-form input { flex: 1; border: 1px solid #eee; border-radius: 8px; padding: 8px; font-size: 15px; text-align: center; outline: none; }
.bc-load { background: #ff2c55; color: #fff; border: none; border-radius: 8px; padding: 8px 14px; font-size: 14px; white-space: nowrap; }
.bc-box { margin-top: 12px; }
.bc-start { display: block; width: 100%; background: #7b5cff; color: #fff; border: none; border-radius: 10px; padding: 12px; font-size: 15px; font-weight: 600; margin-top: 14px; }
.bc-start.stopping { background: #999; }
.bc-state { margin-top: 12px; text-align: center; font-size: 13px; color: #ff2c55; }
.bc-tabs { display: flex; gap: 8px; margin: 12px 0; }
.bc-tabs .tab { flex: 1; padding: 10px; border: 1px solid #eee; background: #fff; border-radius: 10px; font-size: 14px; color: #666; }
.bc-tabs .tab.on { border-color: #7b5cff; color: #7b5cff; font-weight: 600; }
.cam-preview { width: 100%; height: 240px; background: #000; border-radius: 10px; object-fit: cover; margin-bottom: 10px; }
