/* ===== 抖音直播间风格 ===== */
:root {
    --bg-black: #000000;
    --bg-dark: #111111;
    --text-white: #ffffff;
    --text-gray: rgba(255,255,255,0.6);
    --text-light: rgba(255,255,255,0.4);
    --accent-pink: #fe2c55;
    --accent-pink-light: #ff4f72;
    --accent-gradient: linear-gradient(135deg, #fe2c55, #ff6a88);
    --notice-gold: #ffc107;
    --notice-gold-bg: rgba(255,193,7,0.15);
    --bubble-bg: rgba(0,0,0,0.45);
    --overlay-dark: rgba(0,0,0,0.65);
    --glass-bg: rgba(0,0,0,0.35);
    --glass-border: rgba(255,255,255,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

html, body {
    height: 100%;
    height: calc(var(--vh, 1vh) * 100);
    height: 100dvh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-black);
    color: var(--text-white);
    font-size: 14px;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    position: relative;
    margin: 0;
    padding: 0;
}


/* ===== 全屏视频层 ===== */
.video-layer {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--bg-black);
}
.video-container {
    width: 100%;
    height: 100%;
    position: relative;
}
.video-placeholder {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-black);
    z-index: 1;
}
.placeholder-pulse {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.08); opacity: 1; }
}
.placeholder-text {
    color: var(--text-gray);
    font-size: 15px;
    font-weight: 400;
}
.placeholder-retry-btn {
    margin-top: 16px;
    padding: 8px 20px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    color: var(--text-gray);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.placeholder-retry-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.placeholder-loading .placeholder-pulse {
    animation-duration: 1s;
}
.placeholder-loading .placeholder-text {
    color: rgba(255,255,255,0.6);
}
#remoteVideoView {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
}
#remoteVideoView video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}
#localVideoView {
    width: 100%;
    height: 100%;
}
#localVideoView video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* 横屏模式：手机横过来，视频填满屏幕 */
.landscape-mode .video-layer,
.landscape-mode .video-container,
.landscape-mode #remoteVideoView {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
}
.landscape-mode #remoteVideoView video {
    object-fit: contain;
}

/* 全屏旋转按钮 */
.rotate-btn {
    position: fixed;
    bottom: 120px;
    right: 16px;
    z-index: 20;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.rotate-btn:active {
    background: rgba(255,255,255,0.2);
}

/* ===== 顶部/底部渐变遮罩 ===== */
.top-gradient {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 160px;
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.2) 70%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}
.bottom-gradient {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 220px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.2) 70%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

/* ===== 滚动公告条（金色） ===== */
.notice-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 34px;
    background: linear-gradient(90deg, rgba(255,193,7,0.18), rgba(255,152,0,0.12));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,193,7,0.15);
    z-index: 100;
    display: flex;
    align-items: center;
}
.notice-bar-inner {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 14px;
    gap: 8px;
}
.notice-icon {
    color: var(--notice-gold);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    font-size: 18px;
    height: 34px;
}
.notice-icon svg { width: 18px; height: 18px; }
.notice-scroll {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    height: 34px;
    line-height: 34px;
}
.notice-scroll span {
    display: inline-block;
    line-height: 34px;
    height: 34px;
    animation: scrollNotice 25s linear infinite;
    color: var(--notice-gold);
    font-size: 20px;
    font-weight: 700;
    vertical-align: middle;
}
@keyframes scrollNotice {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
.notice-close {
    background: none;
    border: none;
    color: rgba(255,193,7,0.6);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 4px;
    height: 34px;
    font-size: 16px;
}
.notice-close svg { width: 16px; height: 16px; }
.notice-close:hover { color: var(--notice-gold); }

/* ===== 顶部主播信息栏 ===== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 50;
}
.has-notice .top-bar {
    top: 34px;
}
.top-bar-left {
    display: flex;
    align-items: center;
}
.top-bar-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.top-bar-right-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
/* 右上角连麦按钮：宽度 = 分享按钮 + 间隙 + 全屏按钮 */
.top-cohost-row {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}
.top-cohost-btn {
    width: calc(32px + 6px + 32px); /* 分享按钮宽 + gap + 全屏按钮宽 */
    padding: 5px 8px;
    background: rgba(254, 44, 85, 0.9);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.top-cohost-btn:hover {
    background: rgba(254, 44, 85, 1);
}
.top-cohost-btn.cohost-applying {
    background: rgba(255, 159, 67, 0.9);
}
.top-cohost-btn.cohost-connected {
    background: rgba(46, 213, 115, 0.9);
}


/* 主播徽章 */
.streamer-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 28px;
    padding: 4px 14px 4px 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.streamer-badge:hover {
    background: rgba(255,255,255,0.12);
}
.avatar-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    padding: 2px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #fe2c55, #ff6a88, #ffc107, #ff6a88, #fe2c55);
    animation: avatarRingRotate 8s linear infinite;
}
/* 头像内层白底，防止渐变透到头像上 */
.avatar-wrap::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 50%;
    background: #000;
    z-index: 0;
}
@keyframes avatarRingRotate {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}
.streamer-avatar {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.live-ring {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fe2c55;
    border: 2px solid #000;
    z-index: 2;
    animation: liveDotPulse 1.5s ease-in-out infinite;
}
.live-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}
@keyframes liveDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.15); }
}
    50% { opacity: 0.6; transform: scale(1.05); }
}
.streamer-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2px;
}
.streamer-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.room-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    line-height: 1.2;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-left: 6px;
    padding-left: 6px;
    border-left: 1px solid rgba(255,255,255,0.3);
}

/* 观众数徽章 */
.viewer-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 5px 10px;
    font-size: 12px;
    color: var(--text-white);
}

.audio-toggle-btn {
    background: rgba(0,0,0,0.5);
}
.audio-toggle-btn.audio-on .audio-on-icon { display: block; }
.audio-toggle-btn.audio-on .audio-off-icon { display: none; }
.audio-toggle-btn.audio-off .audio-on-icon { display: none; }
.audio-toggle-btn.audio-off .audio-off-icon { display: block; color: #ff4757; }
.top-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.top-icon-btn:hover {
    background: rgba(255,255,255,0.15);
}

/* ===== 弹幕/评论区（浮层） ===== */
.chat-overlay {
    position: fixed;
    left: 12px;
    bottom: 80px;
    width: auto;
    max-width: calc(100vw - 80px);
    max-height: calc(100vh - 200px);
    z-index: 30;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 100%;
    padding: 4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.chat-messages::-webkit-scrollbar { display: none; }

.system-msg {
    text-align: center;
    color: var(--text-light);
    font-size: 12px;
    padding: 6px 0;
}

/* 弹幕气泡 */
.danmaku-bubble {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    animation: bubbleIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: auto;
}
@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(20px); }
.danmaku-bubble.fade-out {
    animation: bubbleOut 0.4s ease-out forwards;
}
@keyframes bubbleOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}
    to { opacity: 1; transform: translateY(0); }
}
.danmaku-bubble .bubble-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
}
.danmaku-bubble .bubble-body {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px 16px 16px 6px;
    padding: 6px 14px;
    max-width: 70vw;
    line-height: 1.5;
    border: 1px solid rgba(255,255,255,0.08);
}
.danmaku-bubble .bubble-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    -webkit-text-stroke: 0.5px rgba(0,0,0,0.3);
}
/* 昵称颜色循环（通过 JS 添加 color 类实现，这里预留 class） */
.danmaku-bubble .bubble-name.color-1 { color: #ff6b6b; }
.danmaku-bubble .bubble-name.color-2 { color: #feca57; }
.danmaku-bubble .bubble-name.color-3 { color: #48dbfb; }
.danmaku-bubble .bubble-name.color-4 { color: #ff9ff3; }
.danmaku-bubble .bubble-name.color-5 { color: #1dd1a1; }
.danmaku-bubble .bubble-name.color-6 { color: #54a0ff; }
.danmaku-bubble .bubble-name.color-7 { color: #f368e0; }
.danmaku-bubble .bubble-name.color-8 { color: #ff9f43; }
.danmaku-bubble .bubble-text {
    font-size: 13px;
    color: #fff;
    word-break: break-all;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ===== 底部输入栏 ===== */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    padding: 0 12px 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    width: 100%;
    max-height: 90px;
    overflow: hidden;
}
.bottom-bar-inner {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.input-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-nickname {
    width: 120px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    color: var(--text-white);
    font-size: 11px;
    outline: none;
    transition: background 0.2s;
}
.chat-nickname::placeholder { color: var(--text-light); }
.chat-nickname:focus { background: rgba(255,255,255,0.12); }

.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-input {
    flex: 1;
    padding: 12px 18px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: background 0.2s, border-color 0.2s;
}
.chat-input:focus {
    background: rgba(0,0,0,0.65);
    border-color: rgba(254,44,85,0.4);
}
.chat-input::placeholder { color: var(--text-light); }
.chat-input:focus { background: rgba(255,255,255,0.15); }
.chat-input:disabled { opacity: 0.5; cursor: not-allowed; }

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fe2c55, #c44dff);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s, opacity 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(254,44,85,0.4);
}
.chat-send-btn:hover {
    box-shadow: 0 4px 16px rgba(254,44,85,0.5);
}
.chat-send-btn:hover { opacity: 0.9; transform: scale(1.05); }
.chat-send-btn:active { transform: scale(0.92); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* 互动按钮 */
.action-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-bottom: 2px;
    flex-shrink: 0;
    max-height: 100%;
    overflow: visible;
}
.action-btns .cohost-btn {
    order: 1;
}
.action-btns .like-btn {
    order: 2;
}
.action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background 0.2s;
}
.action-btn:hover { background: rgba(255,255,255,0.18); }
.like-btn svg { color: #fe2c55; fill: #fe2c55; stroke: #fe2c55; }
.like-btn {
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08);
    width: 48px;
    height: 48px;
    border-radius: 50%;
}
.like-btn:active {
    transform: scale(0.9);
}
.like-count {
    position: absolute;
    top: -8px;
    right: -4px;
    font-size: 10px;
    color: #fff;
    font-weight: 600;
    background: #fe2c55;
    border-radius: 10px;
    padding: 1px 5px;
    line-height: 1.4;
    text-shadow: none;
    z-index: 2;
    white-space: nowrap;
}

/* ===== 点赞爱心飘出动画 ===== */
.like-particles {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 60px;
    height: 300px;
    pointer-events: none;
    z-index: 45;
    overflow: visible;
}
.like-heart {
    position: absolute;
    bottom: 0;
    animation: floatUp 1.5s ease-out forwards;
    font-size: 24px;
    opacity: 0;
}
@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0) scale(0.5) rotate(0deg); }
    20% { opacity: 1; transform: translateY(-40px) scale(1.1) rotate(-10deg); }
    50% { opacity: 0.8; transform: translateY(-120px) scale(1) rotate(10deg); }
    100% { opacity: 0; transform: translateY(-260px) scale(0.6) rotate(-15deg); }
}

/* ===== 弹窗公告 ===== */
.popup-notice {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.popup-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--overlay-dark);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.popup-content {
    position: relative;
    background: #1c1c1e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 28px 24px 20px;
    max-width: 380px;
    width: 88%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    text-align: center;
}
.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: var(--text-gray);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.popup-close:hover { background: rgba(255,255,255,0.15); color: #fff; }
.popup-body {
    line-height: 1.8;
    color: var(--text-white);
    font-size: 14px;
    margin-bottom: 20px;
}
.popup-confirm-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.popup-confirm-btn:hover { opacity: 0.9; }

/* ===== 右下角小风车广告（抖音风格） ===== */
.windmill-ad {
    position: fixed;
    bottom: 80px;
    right: 12px;
    z-index: 35;
    width: 160px;
    animation: windmillSlideIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
}
@keyframes windmillSlideIn {
    0% { opacity: 0; transform: translateY(30px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 流光边框 */
.windmill-glow {
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 14px;
    background: conic-gradient(
        from 0deg,
        #fe2c55, #ff6a88, #ffc107, #ff6a88, #fe2c55,
        transparent, transparent, transparent, #fe2c55
    );
    animation: glowRotate 3s linear infinite;
    z-index: -1;
    opacity: 0.7;
}
@keyframes glowRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* 关闭按钮 */
.windmill-close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: none;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s;
}
.windmill-close:hover { background: rgba(0,0,0,0.8); color: #fff; }

/* 广告标签 */
.windmill-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.5);
    color: rgba(255,255,255,0.7);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    z-index: 2;
    letter-spacing: 0.5px;
}

/* 卡片主体 */
.windmill-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.2s;
}
.windmill-card:hover {
    transform: scale(1.03);
}
.windmill-card:active {
    transform: scale(0.97);
}

/* 图片区域 */
.windmill-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #2d1b4e);
}
.windmill-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.windmill-img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 10px 8px;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.windmill-ad-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.windmill-ad-subtitle {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* CTA 按钮 */
.windmill-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 0;
    background: linear-gradient(135deg, #fe2c55, #ff6a4a);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    animation: ctaPulse 2s ease-in-out infinite;
}
@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(254,44,85,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(254,44,85,0); }
}
.windmill-cta-text {
    letter-spacing: 0.5px;
}

/* ===== 分享弹窗 ===== */
.share-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.share-content {
    position: relative;
    background: #1c1c1e;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 24px;
    width: 380px;
    max-width: 88%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
.share-content h3 {
    margin-bottom: 16px;
    color: var(--text-white);
    font-size: 16px;
    text-align: center;
}
.share-url {
    display: flex;
    gap: 8px;
}
.share-url input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    color: var(--text-white);
    font-size: 13px;
    outline: none;
}
.share-url button {
    padding: 10px 18px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.share-url button:hover { opacity: 0.9; }

/* ===== 全屏模式 ===== */
.fullscreen .top-gradient,
.fullscreen .bottom-gradient,
.fullscreen .top-bar,
.fullscreen .notice-bar,
.fullscreen .chat-overlay,
.fullscreen .bottom-bar,
.fullscreen .action-btns {
    display: none;
}

/* 全屏时视频容器确保占满 */
.fullscreen .video-layer,
.fullscreen .video-container,
.fullscreen #remoteVideoView {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}
.fullscreen #remoteVideoView video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}
.fullscreen .video-placeholder {
    display: none;
}

/* 退出全屏浮动按钮（全屏时显示在右上角） */
.exit-fullscreen-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    display: none !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2147483647;
    transition: background 0.2s, opacity 0.3s;
    pointer-events: auto;
    opacity: 0;
}
.exit-fullscreen-btn:hover {
    background: rgba(0,0,0,0.9);
}
.fullscreen .exit-fullscreen-btn,
.pseudo-fullscreen .exit-fullscreen-btn,
.fullscreen-active .exit-fullscreen-btn {
    display: flex !important;
    opacity: 1;
}

/* 全屏提示：进入全屏时短暂显示"双击退出" */
.fullscreen-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 2147483646;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.fullscreen-tip.show {
    opacity: 1;
}

/* 伪全屏模式（不支持原生全屏的降级） */
.pseudo-fullscreen .video-layer,
.pseudo-fullscreen .video-container,
.pseudo-fullscreen #remoteVideoView {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
}
.pseudo-fullscreen #remoteVideoView video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}
.pseudo-fullscreen .top-gradient,
.pseudo-fullscreen .bottom-gradient,
.pseudo-fullscreen .top-bar,
.pseudo-fullscreen .notice-bar,
.pseudo-fullscreen .chat-overlay,
.pseudo-fullscreen .bottom-bar,
.pseudo-fullscreen .action-btns {
    display: none;
}
.pseudo-fullscreen .exit-fullscreen-btn {
    display: flex;
    z-index: 9999;
}

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
    .chat-overlay {
        left: 10px;
        right: 70px;
        width: auto;
        bottom: 70px;
        max-height: calc(100vh - 180px);
        max-width: calc(100vw - 90px);
    .danmaku-bubble .bubble-body {
        max-width: 60vw;
    }
    .streamer-badge {
        padding: 3px 10px 3px 3px;
    }
    .avatar-wrap {
        width: 36px;
        height: 36px;
    }
    .streamer-avatar {
        width: 100%;
        height: 100%;
    }
    .live-ring {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fe2c55;
    border: 2px solid #000;
    z-index: 2;
    animation: liveDotPulse 1.5s ease-in-out infinite;
}
.live-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}
    .streamer-name { font-size: 13px; }
    .room-subtitle { font-size: 10px; max-width: 70px; }
        .viewer-badge { padding: 4px 8px; font-size: 11px; }
    .audio-toggle-btn {
    background: rgba(0,0,0,0.5);
}
.audio-toggle-btn.audio-on .audio-on-icon { display: block; }
.audio-toggle-btn.audio-on .audio-off-icon { display: none; }
.audio-toggle-btn.audio-off .audio-on-icon { display: none; }
.audio-toggle-btn.audio-off .audio-off-icon { display: block; color: #ff4757; }
.top-icon-btn { width: 32px; height: 32px; }
    .chat-nickname { display: none; }
    .bottom-bar { padding: 0 10px 10px; }
    .chat-input { padding: 9px 14px; font-size: 13px; }
    .chat-send-btn { width: 36px; height: 36px; }
    .ad-float { bottom: 70px; right: 10px; }
    .windmill-ad { bottom: 70px; right: 8px; width: 130px; }
    .windmill-ad-title { font-size: 11px; }
    .windmill-ad-subtitle { font-size: 9px; }
    .windmill-cta { padding: 6px 0; font-size: 11px; }
    .like-particles { right: 16px; bottom: 70px; }
    
    /* 移动端视频铺满优化 */
    #remoteVideoView video {
        object-fit: cover;
    }
    
    /* 竖屏看横屏直播时显示旋转提示 */
    .video-rotate-tip {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 100;
        background: rgba(0,0,0,0.75);
        color: #fff;
        padding: 16px 24px;
        border-radius: 12px;
        font-size: 14px;
        text-align: center;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s;
    }
    .video-rotate-tip.show {
        opacity: 1;
        pointer-events: auto;
    }
    .video-rotate-tip .rotate-icon {
        font-size: 32px;
        margin-bottom: 8px;
        animation: rotatePhone 2s ease-in-out infinite;
    }
    @keyframes rotatePhone {
        0%, 100% { transform: rotate(0deg); }
        50% { transform: rotate(90deg); }
    }
}

@media (max-width: 480px) {
    .chat-overlay {
        right: 60px;
    }
    .danmaku-bubble .bubble-avatar {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    .danmaku-bubble .bubble-body {
        max-width: 160px;
        padding: 5px 10px;
    }
    .danmaku-bubble .bubble-text { font-size: 12px; }
    .room-subtitle { display: none; }
}

/* ==================== 版权栏 ==================== */
.copyright-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    text-align: center;
    padding: 6px 0;
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    z-index: 15;
    pointer-events: none;
}

/* ===== 弹幕角色标签 ===== */
.bubble-role {
    display: inline-block;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
    font-weight: 600;
    line-height: 1.4;
}
.role-streamer {
    background: linear-gradient(135deg, #fe2c55, #ff6a88);
    color: #fff;
}
.role-cohost {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #000;
}
/* 主播弹幕特殊样式 */
.bubble-streamer {
    border: 1px solid rgba(254, 44, 85, 0.3);
}
.bubble-streamer .bubble-avatar {
    box-shadow: 0 0 0 2px #fe2c55;
}
/* 连麦者弹幕特殊样式 */
.bubble-cohost {
    border: 1px solid rgba(255, 193, 7, 0.2);
}

/* ===== 用户资料区（底部栏左侧） ===== */
.user-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 8px 4px 4px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s;
    flex-shrink: 0;
    max-width: 140px;
}
.user-profile:hover {
    background: rgba(255, 255, 255, 0.12);
}
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
}
.user-nickname {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}
.user-edit-icon {
    opacity: 0.4;
    flex-shrink: 0;
}
.user-profile:hover .user-edit-icon {
    opacity: 0.8;
}

/* ===== 加入直播间/修改昵称弹窗 ===== */
.join-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.join-content {
    position: relative;
    z-index: 1;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 28px 24px;
    width: 320px;
    max-width: 90vw;
    text-align: center;
    animation: joinSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes joinSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.join-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fe2c55, #ff6a88);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #fff;
}
.join-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 6px;
}
.join-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 20px;
}
.join-input-wrap {
    margin-bottom: 16px;
}
.join-input {
    width: 100%;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 15px;
    padding: 0 18px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.join-input:focus {
    border-color: #fe2c55;
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.15);
}
.join-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}
.join-input.input-error {
    border-color: #fe2c55;
    animation: inputShake 0.4s ease;
}
@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.join-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 22px;
    background: linear-gradient(135deg, #fe2c55, #ff6a88);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}
.join-btn:hover {
    box-shadow: 0 4px 16px rgba(254, 44, 85, 0.4);
}
.join-btn:active {
    transform: scale(0.97);
}

/* 主播弹幕头像图片样式 */
.bubble-avatar-streamer {
    padding: 0;
    overflow: hidden;
}
.bubble-avatar-streamer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* 连麦按钮 */
.cohost-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
}
.cohost-btn:hover { background: rgba(255, 255, 255, 0.15); }
.cohost-btn:active { transform: scale(0.92); }
.cohost-btn-text {
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
}
.cohost-btn.cohost-applying {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffc107;
    animation: cohostPulse 1.5s infinite;
}
.cohost-btn.cohost-connected {
    background: rgba(254, 44, 85, 0.15);
    border-color: rgba(254, 44, 85, 0.3);
    color: #fe2c55;
}
@keyframes cohostPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 连麦确认弹窗 */
.cohost-modal, .cohost-disconnect-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cohost-modal-content {
    position: relative;
    z-index: 1;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 24px 24px;
    width: 300px;
    text-align: center;
}
.cohost-modal-icon {
    color: #fe2c55;
    margin-bottom: 16px;
}
.cohost-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}
.cohost-modal-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
    line-height: 1.5;
}
.cohost-modal-btns {
    display: flex;
    gap: 12px;
}
.cohost-modal-cancel {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}
.cohost-modal-cancel:hover { background: rgba(255, 255, 255, 0.05); }
.cohost-modal-confirm {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #fe2c55, #ff6a88);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.cohost-modal-confirm:hover { opacity: 0.9; }
.cohost-modal-confirm:active { transform: scale(0.96); }

/* 系统消息 */
.system-msg {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    margin: 4px 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .user-profile {
        max-width: 110px;
    }
    .user-nickname {
        max-width: 50px;
    }
    .join-content {
        padding: 24px 20px 20px;
        width: 280px;
    }
    .cohost-modal-content {
        width: 260px;
        padding: 24px 16px 16px;
    }
    .cohost-btn {
        padding: 4px 10px;
        width: auto;
        min-width: 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
    }
    .cohost-btn-text {
        font-size: 9px;
        line-height: 1;
        margin-top: -2px;
    }
}


    50% { opacity: 0.8; transform: translateY(-40px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-80px) scale(0.6); }
}

/* ===== 移动端横屏适配 ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .top-bar { height: 44px; padding: 0 8px; }
    .has-notice .top-bar { top: 28px; }
    .notice-bar { height: 28px; }
    .notice-icon { height: 28px; font-size: 14px; }
    .notice-icon svg { width: 14px; height: 14px; }
    .notice-scroll span { line-height: 28px; font-size: 13px; }
    .notice-close { height: 28px; }
    .streamer-badge { padding: 2px 8px 2px 2px; gap: 6px; }
    .avatar-wrap { width: 28px; height: 28px; }
    .streamer-avatar { width: 28px; height: 28px; }
    .live-ring {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fe2c55;
    border: 2px solid #000;
    z-index: 2;
    animation: liveDotPulse 1.5s ease-in-out infinite;
}
.live-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}
    .streamer-name { font-size: 12px; }
    .room-subtitle { display: none; }
        .chat-overlay { bottom: 56px; max-height: calc(100vh - 120px); left: 8px; }
    /* ===== 移动端底部栏：强制限制高度，确保不超出屏幕 ===== */
    .bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 4px 16px 6px;
        padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
        z-index: 40;
        box-sizing: border-box;
        width: 100%;
        max-height: 72px;
        height: auto;
        overflow: hidden;
        background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 80%);
    }
    .bottom-bar-inner {
        display: flex;
        gap: 6px;
        align-items: flex-end;
        justify-content: space-between;
        height: 100%;
        max-height: 80px;
    }
    .input-wrap {
        min-width: 0;
        flex: 1 1 auto;
        max-width: 65%;
        padding-bottom: 2px;
    }
    .input-row { gap: 4px; align-items: center; }
    .chat-input {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 0;
        height: 34px;
        line-height: 1;
        border-radius: 17px;
    }
    .chat-send-btn {
        width: 34px;
        height: 34px;
        flex-shrink: 0;
    }
    .action-btns {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        flex-shrink: 0;
        padding-bottom: 4px;
        padding-right: 0;
        height: 100%;
        max-height: 90px;
        min-width: 40px;
    }
    .action-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    .like-btn {
        width: 38px;
        height: 38px;
    }
    .like-count {
        font-size: 9px;
        top: -5px;
        right: -3px;
        padding: 0 4px;
    }
    .like-particles { bottom: 60px; right: 8px; }
    .like-particles { bottom: 56px; right: 12px; height: 200px; }
    .user-profile { display: none; }
    .danmaku-bubble .bubble-body { max-width: 180px; padding: 4px 8px; }
    .danmaku-bubble .bubble-avatar { width: 22px; height: 22px; font-size: 9px; }
    .copyright-bar { display: none; }
    .join-content, .cohost-modal-content { padding: 20px 16px 16px; }
}

/* ========== 抖音风格连麦申请面板 ========== */
.cohost-apply-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}
.cohost-apply-panel.show { display: block; }
.cohost-apply-panel .popup-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.cohost-apply-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-radius: 20px 20px 0 0;
    padding: 0 0 28px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: slideUp .3s cubic-bezier(.2,.8,.2,1);
}
.cohost-apply-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 16px 12px;
}
.cohost-apply-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.2);
}
.cohost-apply-header h3 {
    margin: 8px 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}
.cohost-apply-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cohost-apply-close:active { background: rgba(255,255,255,0.2); }

.cohost-apply-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    margin: 0 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}
.cohost-apply-status-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fe2c55, #ff6b81);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.cohost-apply-status-text {
    font-size: 14px;
    color: #fff;
    flex: 1;
}

.cohost-queue-section {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 8px;
    -webkit-overflow-scrolling: touch;
}
.cohost-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 10px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}
.cohost-queue-count {
    color: #fe2c55;
    font-weight: 500;
}
.cohost-queue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cohost-queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
}
.cohost-queue-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.cohost-queue-name {
    flex: 1;
    font-size: 14px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cohost-queue-badge {
    font-size: 11px;
    color: #fe2c55;
    background: rgba(254,44,85,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}
.cohost-queue-empty {
    text-align: center;
    padding: 30px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
}

.cohost-apply-actions {
    padding: 12px 16px 0;
}
.cohost-apply-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 24px;
    background: linear-gradient(90deg, #fe2c55, #ff6b81);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.cohost-apply-btn:active { opacity: 0.85; }
.cohost-apply-btn.cancel {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.cohost-apply-btn.connected {
    background: #25f4ee;
    color: #000;
}
.cohost-apply-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 面板手机端适配 */
@media (max-width: 768px) {
    .cohost-apply-content { max-height: 75vh; }
    .cohost-queue-section { padding: 12px 16px 4px; }
}

/* ===== 连麦控制按钮（观众端连麦中）===== */
.cohost-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}
.cohost-mic-btn {
    color: #fff;
    background: rgba(255,255,255,0.15);
    transition: all 0.2s;
}
.cohost-mic-btn.mic-off {
    color: #ff4757;
    background: rgba(255,71,87,0.2);
}
.cohost-hangup-btn {
    color: #fff;
    background: linear-gradient(135deg, #ff4757, #ff6b81);
}
.cohost-hangup-btn:hover {
    transform: scale(1.05);
}

/* ===== 右上角连麦用户列表 ===== */
.cohost-users-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.4);
    border-radius: 20px;
    margin-right: 8px;
    backdrop-filter: blur(10px);
}
.cohost-users-list {
    display: flex;
    align-items: center;
}
.cohost-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    border: 2px solid rgba(37,244,238,0.8);
    margin-left: -6px;
    background: #667eea;
}
.cohost-user-avatar:first-child {
    margin-left: 0;
}
.cohost-user-avatar.more {
    background: rgba(255,255,255,0.2);
    font-size: 11px;
    border-color: rgba(255,255,255,0.4);
}

/* ===== 全局 Toast 通知 ===== */
.global-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 24px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    border-radius: 24px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
}
.global-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.global-toast.toast-success {
    background: rgba(37,244,238,0.9);
    color: #000;
    font-weight: 600;
}
.global-toast.toast-error {
    background: rgba(255,71,87,0.9);
}
/* ===== 移动端安全区适配（防止底部按钮超出屏幕） ===== */
@media (max-width: 768px) {
    .bottom-bar {
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }
    .like-particles {
        bottom: calc(50px + env(safe-area-inset-bottom, 0px));
    }
    .ad-float {
        bottom: calc(50px + env(safe-area-inset-bottom, 0px));
    }
    .windmill-ad {
        bottom: calc(50px + env(safe-area-inset-bottom, 0px));
    }
}

/* 修复移动端地址栏/安全区导致底部按钮超出屏幕
   方案：JS 动态计算 --vh，优先使用 100%（相对于视口高度），
   fixed 定位的底部栏直接 bottom:0，靠 padding-bottom 适配安全区 */
html, body {
    height: 100%;
    overflow: hidden;
    position: relative;
}
/* 用 JS 动态计算的真实视口高度，防止安卓/iOS 地址栏挤占 */
body {
    height: calc(var(--vh, 1vh) * 100);
}

/* ===== iOS有声播放解锁引导层 ===== */
.ios-audio-unlock {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ios-unlock-content {
    text-align: center;
    color: #fff;
    animation: iosUnlockPulse 2s ease-in-out infinite;
}

.ios-unlock-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.5);
    padding-left: 6px;
    box-sizing: border-box;
}

.ios-unlock-text {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ios-unlock-tip {
    font-size: 14px;
    opacity: 0.6;
}

@keyframes iosUnlockPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
