/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #000000;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
}

/* 直播容器样式 */
.live-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #000000;
}

/* 直播视频样式 */
#liveVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
/* 弹幕容器样式 */
.danmu-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* 弹幕样式 */
.danmu {
    position: absolute;
    white-space: nowrap;
    font-size: 16px;
    line-height: 1.2;
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    animation: danmuMove linear forwards;
    will-change: transform;
}

/* 弹幕动画 */
@keyframes danmuMove {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}

/* 直播遮罩层 */
.live-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 2;
}

.live-title {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.viewers-count {
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    align-self: flex-end;
}

/* 弹幕控制区域 */
.danmu-control-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 25px;
    z-index: 100;
}

/* 相机控制区域 */
.camera-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
}

/* 移动端优化 - 确保弹幕图标在底部 */
@media (max-width: 768px) {
    .camera-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        transform: none;
        background-color: rgba(0, 0, 0, 0.8);
        padding: 10px 0;
        margin: 0;
    }
    
    .danmu-panel {
        position: fixed;
        bottom: 50px;
        left: 0;
        width: 100%;
        margin: 0;
        border-radius: 15px 15px 0 0;
    }
}

.danmu-panel {
    background-color: #333;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-block {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* 小尺寸弹幕按钮样式 - 适合直播端 */
.btn-danmu-toggle {
    width: 120px;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 4px;
    background-color: rgba(255, 107, 139, 0.8);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto; /* 居中显示 */
    display: block;
}

.btn-danmu-toggle:hover {
    background-color: rgba(255, 107, 139, 1);
    transform: scale(1.05);
}

.danmu-settings {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.form-control-color {
    width: 50px;
    height: 30px;
    padding: 0;
    border: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .live-container {
        height: 80vh;
    }
    
    .live-title {
        font-size: 20px;
    }
    
    .danmu {
        font-size: 14px;
    }
    
    .danmu-settings {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* 移动端优化 */
@media (max-width: 480px) {
    .live-container {
        height: 75vh;
    }
    
    .live-overlay {
        padding: 15px;
    }
    
    .danmu-control {
        padding: 10px;
    }
    
    .danmu {
        font-size: 12px;
    }
}