/* 直播间沉浸式布局 */
.live-room-section {
    padding: 30px 0;
    background: #0f0f13;
}

.live-room-wrap {
    background: #15151c;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-wrap: wrap;
    min-height: 620px;
}

/* 左侧视频区 */
.live-video-area {
    flex: 1 1 65%;
    position: relative;
    background: #000;
    min-height: 480px;
}

.live-video-area video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    min-height: 480px;
    background: #000;
}

/* 左上角直播徽章 */
.live-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(90deg, #ff2d55, #ff6b6b);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(255, 45, 85, 0.4);
}

.live-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: livePulse 1.2s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* 右上角在线人数 */
.live-viewers {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 20px;
    z-index: 5;
    backdrop-filter: blur(4px);
}

/* 弹幕层 */
.danmaku-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 4;
}

.danmaku-layer.hidden {
    display: none;
}

.danmaku-item {
    position: absolute;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    animation: danmakuMove 10s linear forwards;
    will-change: transform;
}

@keyframes danmakuMove {
    from { transform: translateX(100vw); }
    to { transform: translateX(-100%); }
}

/* 左下角主播信息 */
.live-host-info {
    position: absolute;
    bottom: 90px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.45);
    padding: 8px 14px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

.host-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.host-meta {
    color: #fff;
}

.host-name {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.host-fans {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.btn-follow {
    background: linear-gradient(90deg, #ff2d55, #ff6b6b);
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    margin-left: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-follow:hover {
    transform: scale(1.05);
}

/* 底部互动按钮栏 */
.live-actions {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: center;
    gap: 14px;
    z-index: 6;
}

.live-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 110px;
    padding: 10px 18px;
    border-radius: 28px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
}

.live-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    color: #fff;
}

.live-action-btn:active {
    transform: translateY(0);
}

.btn-gift { background: linear-gradient(90deg, #ffb800, #ffcf33); color: #4a3b00; }
.btn-gift:hover { color: #4a3b00; }
.btn-like { background: linear-gradient(90deg, #ff2d55, #ff5e7d); }
.btn-danmaku { background: linear-gradient(90deg, #00c6ff, #0072ff); }
.btn-danmaku.off { background: linear-gradient(90deg, #6c757d, #495057); }
.btn-share { background: linear-gradient(90deg, #00d26a, #00b894); }

/* 右侧聊天面板 */
.live-chat-panel {
    flex: 1 1 35%;
    min-width: 300px;
    background: #1a1a23;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #252532;
}

.live-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #252532;
}

.live-chat-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.live-chat-tabs {
    display: flex;
    gap: 14px;
}

.live-chat-tab {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.live-chat-tab:hover,
.live-chat-tab.active {
    color: #00c6ff;
}

.live-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.chat-message {
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.chat-message .chat-user {
    color: #00c6ff;
    font-weight: 700;
    margin-right: 6px;
}

.chat-message .chat-user.gold { color: #ffd700; }
.chat-message .chat-user.pink { color: #ff69b4; }
.chat-message .chat-user.yellow { color: #ffcc00; }

.chat-message .chat-text {
    color: rgba(255, 255, 255, 0.85);
}

.live-chat-input {
    padding: 12px 16px;
    border-top: 1px solid #252532;
    display: flex;
    gap: 10px;
    background: #15151c;
}

.live-chat-input input {
    flex: 1;
    background: #252532;
    border: 1px solid #2f2f3e;
    border-radius: 22px;
    padding: 8px 16px;
    color: #fff;
    font-size: 13px;
    outline: none;
}

.live-chat-input input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.live-chat-input button {
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* 爱心特效 */
.heart-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.2);
    font-size: 120px;
    color: #ff2d55;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    text-shadow: 0 0 40px rgba(255, 45, 85, 0.6);
}

.heart-effect.animate {
    animation: heartPop 0.9s ease-out forwards;
}

@keyframes heartPop {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
    30% { opacity: 1; transform: translate(-50%, -55%) scale(1.3); }
    60% { opacity: 0.9; transform: translate(-50%, -60%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(0.5); }
}

/* 小爱心飘升特效 */
.floating-heart {
    position: fixed;
    left: 50%;
    top: 50%;
    font-size: 28px;
    color: #ff2d55;
    pointer-events: none;
    z-index: 9998;
    animation: floatHeart 1.2s ease-out forwards;
}

@keyframes floatHeart {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 0; transform: translate(-50%, -180%) scale(1.2); }
}

/* 响应式 */
@media (max-width: 991px) {
    .live-room-wrap {
        flex-direction: column;
    }
    .live-video-area {
        flex: 1 1 100%;
        min-height: 320px;
    }
    .live-video-area video {
        min-height: 320px;
    }
    .live-chat-panel {
        flex: 1 1 100%;
        min-height: 280px;
        border-left: none;
        border-top: 1px solid #252532;
    }
    .live-actions {
        gap: 8px;
    }
    .live-action-btn {
        min-width: auto;
        flex: 1;
        padding: 9px 10px;
        font-size: 12px;
    }
    .danmaku-item {
        font-size: 13px;
    }
}
