#slide3 {
    /* background-image: url("../img/BG4.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed; */
    overflow: hidden;
    position: relative;
}

/* 全屏背景视频样式 - 填充整个slide3 */
.slide3-background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    background: #000;
    -webkit-object-fit: cover;
    -moz-object-fit: cover;
    -o-object-fit: cover;
}

/* 隐藏video控制界面 */
.slide3-background-video::-webkit-media-controls {
    display: none !important;
}

.slide3-background-video::-webkit-media-controls-enclosure {
    display: none !important;
}

/* video无法加载时的fallback处理 */
.slide3-background-video:not([src]),
.slide3-background-video[src=""] {
    display: none;
}

/* 当video加载失败时，确保静态背景图片可见 */
#slide3:has(.slide3-background-video[src=""]) {
    background-image: url(../img/BG4.jpg);
}

/* 响应式video背景优化 */
@media screen and (max-width: 1920px) {
    .slide3-background-video {
        object-position: center center;
    }
}

@media screen and (max-width: 1366px) {
    .slide3-background-video {
        object-position: center center;
    }
}

.character {
    display: flex;
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #000;
    /* 添加黑色背景作为fallback */
    z-index: 2;
    /* 确保在video背景之上 */
}

.character-left {
    width: 20vw;
    height: 60vh;
    /* background: forestgreen; */
    box-sizing: border-box;
    padding: 0;
    overflow: hidden;
    position: absolute;
    z-index: 50;
    left: 1vw;
    bottom: 10%;
}

/* 角色轮播容器样式 */
.characterpc {
    width: 100%;
    height: 100%;
}

.character-left img {
    height: 6.5rem;
    object-fit: cover;
}

.character-left-role-r,
.character-left-role-l {
    position: relative;
    left: 0;
}

.character-left .swiper-slide img {
    display: block;
    margin-left: 0;
    transform: translateX(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.character-left .swiper-slide-active img,
.character-left .swiper-slide-duplicate-active img {
    transform: translateX(2rem);
}

.charactertop {
    position: absolute;
    background-color: aliceblue;
    width: 50;
    height: 50%;
    top: 10%;
    left: 50%;
}

/* .character-right {
    width: 100%;
    height: 100%;
     background: url("../img/b.png") no-repeat center; 
    display: flex;
    justify-content: center;
    box-sizing: border-box;
} */

.character-right {
    width: 75%;
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 10;
    /* 确保在video背景之上 */
}

.character-right-left {
    width: 100%;
    /* background: url("../img/role/1bg.png") no-repeat center; */
    background-size: 110%;
    height: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
    left: 0;
    z-index: 15;
    /* 确保在video背景之上 */
}

/* 角色背景视频样式 - 作为背景填充 */
.character-background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    object-fit: cover;
    background: #000;
}

/* video加载失败时的fallback处理 */
.character-background-video:not([src]),
.character-background-video[src=""] {
    display: none;
}

/* 当video无法播放时，确保背景图片可见 */
.character-right-left:not(:has(video[src*=".mp4"])) .character-background-img:nth-child(2) {
    z-index: 1;
}

/* 响应式video背景 */
@media screen and (max-width: 1920px) {
    .character-background-video {
        min-width: 110%;
        min-height: 110%;
    }
}

@media screen and (max-width: 1366px) {
    .character-background-video {
        min-width: 120%;
        min-height: 120%;
    }
}

/* 角色背景图片样式 */
.character-background-img {
    height: 110%;
    object-fit: cover;
    position: absolute;
    z-index: 2;
}

.character-right-left img {
    height: 110%;
    object-fit: cover;
    position: absolute;
}

.character-background-img:nth-child(2),
.character-right-left img:nth-child(2) {
    width: 60rem;
    object-fit: cover;
    position: absolute;
    left: -30px;
    top: -56px;
    z-index: 2;
}

.character-background-img:nth-child(3),
.character-right-left img:nth-child(3) {
    width: 60rem;
    object-fit: cover;
    position: absolute;
    left: -30px;
    top: -56px;
    z-index: 2;
}

.character-right-right {
    height: 100%;
    width: 48vw;
    /* 限制宽度为35%的视口宽度 */
    position: absolute;
    right: 0;
    /* 固定在右侧 */
    top: 0;
    z-index: 51;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box;
}

/* 角色信息容器 - 包含标题和文本 */
.character-info-container {
    position: absolute;
    bottom: 12%;
    width: 100%;
    height: 15vw;
    background: url("../img/character_bg.png") no-repeat right;
    background-size: 100% 100%;
    padding: 2vh 2vw 2vh 2vw;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1vh;
}

.character-right-right-title {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.role-name-container {
    position: absolute;
    top: 5%;
    right: 20%;
    display: flex;
    align-items: center;
    gap: 1vw;
    pointer-events: auto;
    flex-wrap: wrap;
}

.role-name {
    font-size: 4vw;
    font-weight: bold;
    color: #FF454B;
}

.voice-icon {
    width: 3vw;
    margin-top: 1vw;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-icon:hover {
    transform: scale(1.1);
}

.voice-icon.voice-playing {
    animation: voicePulse 1s ease-in-out infinite;
}

.character-right-right-title #roleQuality {
    position: absolute;
    top: 1vh;
    right: 1vw;
    width: 4rem;
    height: 4rem;
}

.character-right-right-str {
    position: absolute;
    top:40%;
    left:20%;
    width: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    text-align: left;
    line-height: 1.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    padding: 1vw;
}

.character-right-right-button {
    display: flex;
    /* justify-content: space-around; */
}

.character-right-right-button-left {
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: url("../img/voicebg.png") no-repeat center; */

    background-size: 100%;
}

.character-right-right-button-left>img {
    width: 5.1875rem;
}

.character-right-right-button-right>img {
    width: 6.5rem;
}

#roleVoice:hover {
    animation-name: bigIcon;
    animation-duration: 0.8s;
}

#roleLive:hover {
    animation-name: bigIcon;
    animation-duration: 0.8s;
}

#roleVoiceing:hover {
    animation-name: bigIcon;
    animation-duration: 0.8s;
}

#roleLiveing:hover {
    animation-name: bigIcon;
    animation-duration: 0.8s;
}

.character-canvas {
    height: 61rem;
    position: absolute;
    bottom: 0;
    z-index: 3;
}

/* #player-container{
    position: absolute;
    width: 100%;
    height: 150%;
} */

/* 当video加载失败时的处理 */
.character-background-video::-webkit-media-controls {
    display: none !important;
}

.character-background-video::-webkit-media-controls-enclosure {
    display: none !important;
}