/* ============================================================
   living.css · 直播中（顶部状态区 + 底部操作栏）
   参考截图 IMG_0652，风格与观众端播放器一致
   ============================================================ */

/* ============ 顶部状态区 ============ */
.live-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 54px 20px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    z-index: 20;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
}

/* 主播端顶部第一行复用观众端主播信息、在线观众与关闭入口的视觉实现。 */
.audience-live-header.host-live-header {
    z-index: 1;
    padding-right: 4px;
}

.host-viewer-presence {
    z-index: 1;
}

/* 主播端直播间信息附属入口：暖橙粉丝团 + 下方礼物榜。 */
.host-fan-club-button,
.host-gift-ranking-button {
    border: 0;
    color: #fff;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.host-fan-club-button {
    width: 42px;
    height: 28px;
    margin-left: 2px;
    padding: 0;
    flex: 0 0 42px;
    overflow: hidden;
    border-radius: 14px;
    background:
        radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.3), transparent 34%),
        linear-gradient(135deg, #ffbc17 0%, #ff9708 48%, #ff7500 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 3px 10px rgba(255, 126, 0, 0.3);
    cursor: pointer;
    transition: transform 140ms ease, filter 140ms ease;
}

.host-fan-club-button svg {
    display: block;
    width: 40px;
    height: 28px;
    margin: 0 auto;
    overflow: visible;
}

.host-fan-club-button:active {
    transform: scale(0.92);
    filter: brightness(0.95);
}

.host-fan-heart {
    stroke: rgba(255, 247, 172, 0.96);
    stroke-width: 0.9;
    stroke-linejoin: round;
}

.host-fan-heart-back {
    fill: url("#hostFanHeartBackGradient");
    filter: drop-shadow(0 2px 1px rgba(168, 81, 0, 0.38));
}

.host-fan-heart-front {
    fill: url("#hostFanHeartFrontGradient");
    filter: drop-shadow(0 2px 1.5px rgba(160, 73, 0, 0.46));
}

.host-fan-heart-highlight {
    fill: none;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 1.25;
    stroke-linecap: round;
    filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.2));
}

.host-fan-heart-highlight-back {
    opacity: 0.72;
}

.host-fan-heart-highlight-front {
    opacity: 0.95;
}

.host-gift-ranking-button {
    position: absolute;
    z-index: 1;
    top: 88px;
    left: 12px;
    height: 19px;
    padding: 0 10px;
    border-radius: 9.5px;
    background: rgba(10, 12, 18, 0.22);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(4px) saturate(115%);
    -webkit-backdrop-filter: blur(4px) saturate(115%);
    font-size: 11px;
    font-weight: 500;
    line-height: 19px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.32);
    cursor: pointer;
    transition: transform 140ms ease, background 140ms ease;
}

.host-gift-ranking-button:active {
    background: rgba(10, 12, 18, 0.34);
    transform: scale(0.94);
}

.audience-viewer-close.host-viewer-close {
    pointer-events: auto;
    cursor: pointer;
}

.host-viewer-close:active {
    transform: scale(0.9);
    opacity: 0.7;
}

/* ============ 暂停直播：整页深色遮罩 ============ */
.live-pause-layer {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.live-pause-layer.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 220ms ease, visibility 0s;
}

.live-pause-center {
    position: absolute;
    top: 37.5%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-50%);
}

.live-pause-title {
    color: rgba(255, 255, 255, 0.92);
    font-size: 21px;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0.3px;
}

.live-pause-time {
    margin-top: 22px;
    color: #fff;
    font-size: 36px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

.live-resume-btn {
    position: absolute;
    left: 50%;
    bottom: 76px;
    width: 205px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.2px;
    transform: translateX(-50%);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 150ms ease, background 150ms ease;
}

.live-resume-btn:active {
    transform: translateX(-50%) scale(0.97);
    background: rgba(255, 255, 255, 0.88);
}

/* ============ 直播分享二维码弹窗 ============ */
.share-modal {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 268px;
    padding: 22px 22px 24px;
    border-radius: 22px;
    z-index: 30;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 115%, color-mix(in srgb, var(--brand-2) 20%, transparent), transparent 52%),
        linear-gradient(155deg, rgba(28, 31, 43, 0.97), rgba(10, 11, 17, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(36px) saturate(160%);
    -webkit-backdrop-filter: blur(36px) saturate(160%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -46%) scale(0.94);
    transition: opacity 200ms ease, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 260ms;
}

.share-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 200ms ease, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}

.share-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.58);
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}

.share-modal-title {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}

.share-qr-frame {
    position: relative;
    z-index: 1;
    width: 184px;
    height: 184px;
    padding: 10px;
    margin: 0 auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 32px rgba(var(--brand-1-rgb), 0.24), 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.share-qr-frame img {
    display: block;
    width: 100%;
    height: 100%;
}

/* ============ 底部主控栏：左下角彩色「PK + 连麦」；右下角次级操作 ============ */
.live-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 12px 40px;
    background: #0A0A0F;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    z-index: 20;
}

.live-primary-actions {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.live-color-action {
    position: relative;
    width: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.live-action-icon {
    position: relative;
    width: 34px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 220ms ease;
}

.live-action-icon::after {
    content: '';
    position: absolute;
    left: 7px;
    right: 7px;
    bottom: -1px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(255, 45, 157, 0.2), rgba(69, 214, 255, 0.22));
    filter: blur(5px);
    opacity: 0.8;
}

.live-action-icon svg {
    position: relative;
    z-index: 1;
    width: 34px;
    height: 25px;
    overflow: visible;
    filter: drop-shadow(0 2px 5px rgba(89, 79, 255, 0.3));
}

.pk-action .live-action-icon svg {
    top: 2px;
}

.live-action-icon .pk-stroke-glow {
    fill: none;
    stroke: url(#pkGradient);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#pkGlow);
    opacity: 0.5;
}

.comic-action .live-action-icon .comic-bubble-glow {
    fill: none;
    stroke: #795CFF;
    stroke-width: 5.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#comicGlow);
    opacity: 0.62;
}

.live-action-icon .pk-stroke {
    fill: none;
    stroke: url(#pkGradient);
    stroke-width: 3.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.live-action-icon .comic-bubble {
    fill: none;
    stroke-width: 3.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.live-action-icon .comic-bubble.back {
    stroke: url(#comicGradientBack);
}

.live-action-icon .comic-bubble.front {
    stroke: url(#comicGradientFront);
}

.comic-unread-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    z-index: 3;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FF3B4F;
    border: 1.5px solid #090A0F;
    box-shadow: 0 0 8px rgba(255, 59, 79, 0.72);
    pointer-events: none;
}

.live-action-label {
    font-size: 11px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
    white-space: nowrap;
}

.live-color-action:hover .live-action-icon {
    transform: translateY(-1px) scale(1.04);
    filter: saturate(1.14);
}

.live-color-action:active .live-action-icon {
    transform: translateY(1px) scale(0.92);
}

.more-action .live-action-icon::after {
    display: none;
}

.more-action .live-action-icon svg {
    width: 27px;
    height: 27px;
    color: rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.55));
    transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
}

.more-action.open .live-action-icon svg {
    transform: scale(0.86);
    opacity: 0.7;
}

/* 主播端支持与观众端一致的连续双击点赞，避免移动端把手势解释为页面缩放。 */
.phone[data-stage="living"] #videoStage {
    touch-action: manipulation;
}

/* 观众端或主播端屏幕双击点赞后，从「更多」按钮上方飘出同款小图标。 */
.phone .host-like-layer {
    z-index: 21;
}

.phone:not([data-stage="living"]) .host-like-layer {
    display: none;
}

/* ============ 结束直播确认弹层（复用 .drawer 玻璃底，此处只覆盖内边距与按钮布局） ============ */
.end-live-confirm {
    /* 单独抬高 z-index，覆盖到其他抽屉之上（不影响 .drawer 自身默认层级） */
    z-index: 32;
    /* 顶部沿用 .drawer 默认 10px（与其他抽屉一致，让 handle 位置齐平），
       两侧适度加宽，底部加大到 48px 让按钮离屏幕底部更远、整体更宽敞 */
    padding: 10px 24px 48px;
}

/* 顶部说明文案 —— 注意：这不是标题，只是一段引导文案，因此字号/字重都比 .drawer-title 弱，
   与顶部 handle 之间再补 20px（+ handle 自带 16px 下 margin，共约 36px 视觉距离） */
.end-live-confirm-text {
    position: relative;
    z-index: 1;
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.2px;
    margin: 20px 0 40px;
    padding: 0 4px;
}

.end-live-confirm-viewers {
    color: rgba(255, 255, 255, 0.76);
}

.end-live-confirm-viewers strong {
    display: inline-block;
    min-width: 24px;
    margin: 0 2px;
    color: var(--brand-text-strong);
    font-size: 23px;
    font-weight: 750;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 14px color-mix(in srgb, var(--brand-2) 45%, transparent);
    vertical-align: -2px;
}

.end-live-confirm-question {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.94);
    font-size: 15px;
    font-weight: 600;
}

.end-live-confirm-actions {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 0 4px;
}

.end-live-btn {
    /* 不再平分整行；按内容自适应，宽度收紧 */
    flex: 0 0 auto;
    min-width: 108px;
    height: 44px;
    padding: 0 24px;
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 160ms ease, transform 120ms ease;
}

.end-live-btn:active {
    transform: scale(0.97);
    opacity: 0.85;
}

.end-live-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.92);
}

/* 沉稳的暗红（砖红），不刺眼；阴影同色系压深、不发光 */
.end-live-btn-danger {
    background: #C44450;
    color: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

/* ============ 主播端观众管理 ============
   关注收进资料区右侧胶囊；禁言与拉黑作为直播治理保留独立双卡区域。 */
.host-viewer-manage-sheet {
    min-height: 250px;
    padding: 10px 18px 28px;
}

.host-viewer-manage-sheet .drawer-handle {
    margin-bottom: 18px;
}

.host-viewer-manage-profile {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 4px 2px 12px;
}

.host-viewer-manage-avatar {
    position: relative;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 58px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: rgba(25, 27, 34, 0.9);
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--brand-2) 10%, transparent),
        0 8px 22px rgba(0, 0, 0, 0.3);
}

.host-viewer-manage-avatar::before {
    content: attr(data-emoji);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.host-viewer-manage-avatar img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: 0;
    transition: opacity 100ms ease;
}

.host-viewer-manage-avatar img.is-loaded {
    opacity: 1;
}

.host-viewer-manage-identity {
    min-width: 0;
    flex: 1 1 auto;
}

.host-viewer-manage-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.host-viewer-manage-name-row > strong {
    min-width: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.94);
    font-size: 17px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.host-viewer-manage-name-row .live-level-badge {
    flex: 0 0 auto;
}

.host-viewer-manage-meta {
    display: block;
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.host-viewer-manage-follow-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 54px;
    height: 27px;
    padding: 0 11px;
    border: 1px solid color-mix(in srgb, var(--brand-2) 42%, rgba(255, 255, 255, 0.12));
    border-radius: 999px;
    color: var(--brand-text-strong);
    background: color-mix(in srgb, var(--brand-2) 16%, rgba(255, 255, 255, 0.055));
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 140ms ease, color 180ms ease, border-color 180ms ease,
        background 180ms ease;
}

.host-viewer-manage-follow-pill:active {
    transform: scale(0.96);
}

.host-viewer-manage-follow-pill.is-active {
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.64);
    background: rgba(255, 255, 255, 0.065);
}

.host-viewer-moderation-action {
    position: relative;
    z-index: 1;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 140ms ease, border-color 180ms ease, background 180ms ease;
}

.host-viewer-moderation-action:active {
    transform: scale(0.98);
}

.host-viewer-manage-action-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    border-radius: 12px;
    color: var(--brand-text-strong);
    background: color-mix(in srgb, var(--brand-2) 18%, rgba(255, 255, 255, 0.06));
}

.host-viewer-manage-action-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.host-viewer-manage-action-copy {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
}

.host-viewer-manage-action-copy strong {
    font-size: 14px;
    font-weight: 650;
}

.host-viewer-manage-action-copy small {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.44);
    font-size: 10px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.host-viewer-manage-section-title {
    position: relative;
    z-index: 1;
    margin: 10px 2px 9px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
}

.host-viewer-moderation-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.host-viewer-moderation-action {
    min-height: 82px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 12px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.host-viewer-moderation-action .host-viewer-manage-action-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 11px;
}

.host-viewer-moderation-action.is-mute .host-viewer-manage-action-icon {
    color: #f2c36a;
    background: rgba(218, 158, 55, 0.12);
}

.host-viewer-moderation-action.is-block .host-viewer-manage-action-icon {
    color: #e47a83;
    background: rgba(196, 68, 80, 0.13);
}

.host-viewer-moderation-action.is-mute.is-active {
    border-color: rgba(218, 158, 55, 0.34);
    background: rgba(151, 101, 27, 0.14);
}

.host-viewer-moderation-action.is-block.is-active {
    border-color: rgba(196, 68, 80, 0.38);
    background: rgba(145, 40, 50, 0.16);
}

.host-viewer-moderation-action.is-active .host-viewer-manage-action-copy small {
    color: rgba(255, 255, 255, 0.62);
}
