/*author: 葉研万事屋*/
/*BilibiliSpace: https://space.bilibili.com/3546741129349750*/
/*QQGroup: 1056692175*/
#page3 {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    color: white;
    font-size: 24px;
    text-align: center;
    width: 100%;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.zodiac-content {
    width: 100%;
    max-width: 1620px;
    margin: 0 auto;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.title-switcher {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
    /* 确保子元素可以正确显示动画 */
    overflow: visible;
    /* 添加3D变换支持 */
    transform-style: preserve-3d;
    perspective: 1000px;
    z-index: 2;
}

.title-wrapper-3 {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.title-ellipse-bg {
    position: absolute;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 70%);
    z-index: -1;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.title-ellipse-bg-zodiac {
    top: 41px;
    left: 92px;
    width: 291px;
    height: 125px;
}

.title-ellipse-bg-netherworld {
    top: 33px;
    left: 99px;
    width: 279px;
    height: 112px;
}

.title-wrapper-3.active .title-ellipse-bg {
    opacity: 1;
}

.title-item {
    font-family: 'SourceHanSemiBold', serif;
    font-size: 32px;
    cursor: pointer;
    border-radius: 5px;
    align-self: flex-start;
    margin: 0;
    position: relative;
    opacity: 0.7;
    /* 添加变换属性以支持动画 */
    transform: translateY(0) scale(1) translateZ(0);
    will-change: transform, opacity;
    /* 确保 zIndex 可以正常工作 */
    z-index: 1;
    /* 添加3D变换样式 */
    transform-style: preserve-3d;
    transition: transform 0.5s ease, opacity 0.5s ease;
    background: none;
}

.zodiac-title {
    left: 45px;
}

.netherworld-title {
    left: 53px;
    top: -5px;
}

.title-wrapper-3.active .title-item {
    color: white;
    opacity: 1;
    z-index: 2;
}

.title-wrapper-3:not(.active) .title-item:hover {
    opacity: 1;
}

.title-bg-container {
    position: absolute;
    width: 161px;
    height: 42px;
    z-index: -1; /* 确保在标题后面 */
    transition: opacity 0.5s ease;
    top: 0;
    left: 0;
}

.zodiac-title-bg {
    background-image: url('../img/3-1-zodiac-netherworld/zodiac-title.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    left: -22px;
    top: 15px;
    height: 51px;
}

.netherworld-title-bg {
    background-image: url('../img/3-1-zodiac-netherworld/netherworld-title.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    left: 11px;
    top: 11px;
    height: 42px;
}

.title-wrapper-3.active .zodiac-title-bg{
    /*background-image: url('../img/3-1-zodiac-netherworld/zodiac-title-active.png');*/
    background-image: url('../img/3-1-zodiac-netherworld/zodiac-title-active-shadow.png');
    left: -27px;
    top: -21px;
    height: 124px;
    width: 172px;
}

.title-wrapper-3.active .netherworld-title-bg{
    /*background-image: url('../img/3-1-zodiac-netherworld/netherworld-title-active.png');{*/
    background-image: url('../img/3-1-zodiac-netherworld/netherworld-title-active-shadow.png');
    left: -25px;
    top: -25px;
    height: 115px;
    width: 234px;
}

.main-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    min-height: 0;
}

.content-container {
    width: 100%;
    flex: 5 0 0;
    /* 防止被子元素撑开 */
    overflow: hidden;
    margin-left: 20px;
}

.content-section {
    display: none;
    height: 100%;
    flex-direction: row;
    gap: 30px;
    opacity: 0;
    transition: opacity 0.4s ease;
    /* 添加硬件加速 */
    transform: translateZ(0);
    will-change: opacity;
    border: 2px solid #a98553;
    box-sizing: border-box;
}

.content-section.active {
    display: flex;
    opacity: 1;
}

.content-section.fade-out {
    opacity: 0;
}

.carousel-container {
    flex: 5;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.image-carousel {
    width: 100%;
    flex: 1;
    min-height: 400px;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.2);
}

.carousel-track {
    display: flex;
    height: calc(100% - 40px); /* 减去上下padding */
    transition: transform 0.5s ease;
    padding: 20px 0; /* 添加上下内边距 */
    gap: 70px;
}

.carousel-item {
    flex: 0 0 auto;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
    flex-shrink: 0; /* 防止图片压缩 */
    position: relative;
    transform: scale(1);
}

.carousel-item:not(.active) {
    isolation: isolate;
}

.carousel-item-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.carousel-item.active .carousel-item-mask {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mask-bottom {
    position: absolute;
    height: 45%;
    width: 94%;
    left: 3%;
    bottom: 18.5%;
    background-color: rgba(0, 0, 0, 1);
}

.mask-top {
    position: absolute;
    height: 37.3%;
    width: 94%;
    top: 18.5%;
    background-color: rgba(0, 0, 0, 1);
    border-radius: 50%;
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1.3);
}

.zodiac-layers-container {
    position: relative;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zodiac-layer {
    position: absolute;
    left: 0;
    height: 65%;
    object-fit: contain;
}

.black-background {
    background-color: black;
    z-index: 1;
    height: 45%;
    width: 94%;
    left: 3%;
    bottom: 18.5%;
}

.black-background:before {
    content: '';
    display: block;
    position: absolute;
    background-color: black;
    z-index: 1;
    height: 83%;
    width: 100%;
    top: -40%;
    border-radius: 50%;
}

.background-layer {
    z-index: 2;
    height: 50%;
    transform: translateX(9%);
}

.illustration-layer {
    z-index: 3;
    height: 62.5%;
    left: 3%;
}

.frame-layer {
    z-index: 4;
    position: relative;
}

.symbol-layer {
    z-index: 5;
    top: 18.5%;
    height: 4.8%;
    transform: translateX(360%);
}

.zodiac-constellation-layer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 17%;
    object-fit: contain;
    z-index: 10;
}

.carousel-item.active .zodiac-constellation-layer {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 主播姓名标题容器 - 最外层容器 */
.anchor-name-container-3 {
    position: absolute;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    bottom: 27%;
    left: 50%;
    transform: translateX(-50%);
    width: 58%;
}

/* 主播姓名遮罩容器 - 最后一层容器 */
.anchor-name-mask {
    position: absolute;
    width: 100%;
    height: 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%);
}

/* 主播姓名内容容器 - 中间层容器 */
.anchor-name-content {
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border-top: 2px solid #a98553;
    border-bottom: 2px solid #a98553;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* 英文主播姓名 - 第二层 */
.anchor-name-en {
    font-family: 'Adagio-Pro', sans-serif;
    font-size: 30px;
    color: #a98553;
    letter-spacing: 2px;
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* 中文主播姓名 - 最上层 */
.anchor-name-cn {
    font-family: 'SourceHanSemiBold', serif;
    font-size: 22px;
    color: white;
    letter-spacing: 1px;
    z-index: 3;
    margin-top: 6px;
    margin-bottom: 4px;
}

.zodiac-social-buttons {
    position: absolute;
    bottom: 11%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 6;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-item.active .zodiac-social-buttons {
    opacity: 1;
}

.social-button {
    position: relative;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.social-button:hover {
    transform: scale(1.1);
}

.button-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.button-star {
    position: absolute;
    width: 25px;
    height: 25px;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tiktok-button .button-star {
    top: 10px;
    right: -6px;
}

.camera-button .button-star {
    top: 0px;
    left: -13px;
}

.mail-button .button-star {
    top: -7px;
    right: -9px;
}

.social-button:hover .button-star {
    opacity: 1;
}

.black-background-netherworld {
    background-color: black;
    z-index: 1;
    height: 63%;
    width: 94%;
    left: 3%;
    bottom: 18.5%;
    border-radius: 20px;
}

.zodiac-social-buttons-netherworld {
    bottom: 11%;
    left: 50%;
    transform: translateX(-50%);
}

.netherworld-layer {
    height: 65%;
    left: -22px;
}

.netherworld-button {
    position: absolute;
    width: 40px;
    height: 40px;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    top: 0;
    left: 0;
}

.social-button:hover .netherworld-button {
    opacity: 1;
}

.anchor-name-top {
    font-family: 'SourceHanSemiBold', serif;
    font-size: 15px;
    color: #a98553;
    position: absolute;
    z-index: -1;
    left: 50%;
    top: -9px;
    transform: translate(-50%, -50%);
    text-shadow: 0 0 9px black, 0 0 9px black, 0 0 5px black;
    white-space: nowrap;
}

.description {
    flex: 3;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow-y: auto;
    max-height: 100%;
    overscroll-behavior: contain; /* 防止滚动溢出到父元素 */
    /* 隐藏滚动条 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    /* 优化滚动体验 */
    scroll-behavior: smooth;
    /* 添加滚动链控制 */
    overscroll-behavior-y: contain;
    position: relative;
    isolation: isolate; /* 创建层叠上下文 */
    display: flex;
    flex-direction: column;
    background-image: url('../img/3-1-zodiac-netherworld/netherworld-logo.png');
    background-position: 90% 90%;
    background-repeat: no-repeat;
    background-size: auto;
}

/* 隐藏 Webkit 浏览器的滚动条 */
.description::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

/* 固定标题部分 */
.description h3,
.description h5 {
    flex-shrink: 0; /* 防止标题被压缩 */
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 20px 0 0 20px;
}

.description h3 {
    font-family: 'SourceHanSemiBold', serif;
    font-size: 26px;
    color: white;
}

.description h5 {
    margin-top: 0;
    font-family: 'SourceHan', serif;
    font-size: 16px;
    font-weight: normal;
    color: #a98553;
}

.description p {
    font-family: 'SourceHan', serif;
    font-size: 18px;
    line-height: 1.25;
    margin: 0;
    padding: 0;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 4px black, 0 0 4px black, 0 0 4px black;
}

/* 光晕文字效果 */
.glow-text {
    font-size: 18px;
    line-height: 1.6;
    position: relative;
    overflow-y: auto;
    flex-grow: 1;
    padding: 10px 0;
    /* 隐藏滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
}

/* 隐藏 Webkit 浏览器的滚动条 */
.glow-text::-webkit-scrollbar {
    display: none;
}

.text-line {
    position: relative;
    display: inline-block;
    cursor: default;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 2;
    max-width: 100%;
    text-overflow: ellipsis;
    transform: translate(0, 0) scale(1);
    transform-origin: center center;
    margin-left: 20px;
}

/* 全局光晕容器 */
.glow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.glow-effect {
    position: absolute;
    pointer-events: none;
    z-index: 1001;
}

.glow-effect::before,
.glow-effect::after,
.glow-effect .glow-layer-1,
.glow-effect .glow-layer-2,
.glow-effect .glow-layer-3 {
    content: '';
    position: absolute;
    top: 50%;
    left: -5%;
    width: 110%;
    height: 3%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(-50%) scaleX(0);
}

.glow-effect::before {
    height: 3%;
    top: 45%;
    transform: translateY(-70%) scaleX(0); /* 上层光晕 */
    filter: blur(7px);
    opacity: 0;
}

.glow-effect::after {
    content: '';
    height: 3%;
    top: 88%;
    transform: translateY(-30%) scaleX(0); /* 下层光晕 */
    filter: blur(5px);
    opacity: 0;
}

.glow-effect .glow-layer-1 {
    height: 2%;
    width: 100%;
    left: 0;
    top: 15%;
    transform: translateY(-50%) scaleX(10);
    filter: blur(3px);
}

.glow-effect .glow-layer-2 {
    height: 1%;
    width: 80%;
    left: 10%;
    top: 90%;
    transform: translateY(-120%) scaleX(10);
    filter: blur(3px);
}

.glow-effect .glow-layer-3 {
    height: 1%;
    width: 80%;
    left: 10%;
    top: 10%;
    transform: translateY(20%) scaleX(10);
    filter: blur(2px);
}

.glow-effect.active::before,
.glow-effect.active::after,
.glow-effect.active .glow-layer-1,
.glow-effect.active .glow-layer-2,
.glow-effect.active .glow-layer-3 {
    opacity: 0.9;
    transform: translateY(calc(-70% + var(--vertical-offset-top, 0px)))
               scaleX(1);
}

.glow-effect.active::after {
    opacity: 0.7;
    transform: translateY(calc(-30% + var(--vertical-offset-bottom, 0px)))
               scaleX(1);
}

.glow-effect.active .glow-layer-1 {
    opacity: 0.8;
    transform: translateY(calc(-50% + var(--vertical-offset, 0px))) 
               scaleX(1);
}

.glow-effect.active .glow-layer-2 {
    opacity: 0.6;
    transform: translateY(calc(-120% + var(--vertical-offset-top, 0px)))
               scaleX(0.8);
}

.glow-effect.active .glow-layer-3 {
    opacity: 0.6;
    transform: translateY(calc(20% + var(--vertical-offset-bottom, 0px)))
               scaleX(0.8);
}

.color-1::before,
.color-1::after,
.color-1 .glow-layer-1,
.color-1 .glow-layer-2,
.color-1 .glow-layer-3 { background: rgb(0, 196, 255);  }

.color-2::before,
.color-2::after,
.color-2 .glow-layer-1,
.color-2 .glow-layer-2,
.color-2 .glow-layer-3 { background: rgb(0, 191, 255); }

.color-3::before,
.color-3::after,
.color-3 .glow-layer-1,
.color-3 .glow-layer-2,
.color-3 .glow-layer-3 { background: rgb(139, 226, 255);  }

.color-4::before,
.color-4::after,
.color-4 .glow-layer-1,
.color-4 .glow-layer-2,
.color-4 .glow-layer-3 { background: rgb(108, 155, 255);  }

.color-5::before,
.color-5::after,
.color-5 .glow-layer-1,
.color-5 .glow-layer-2,
.color-5 .glow-layer-3 { background: rgb(146, 197, 255);  }