* {
    box-sizing: border-box;
}

.root-container {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    --main-bg: url('https://blog-assets.umbracore.online/FinalAssignment2605/cg1.png?key=louis322664');
}

.root-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, transparent 55%, rgba(0, 0, 0, 1.0) 100%),
    var(--main-bg, url('https://blog-assets.umbracore.online/FinalAssignment2605/cg1.png'));
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    z-index: -1;
}

.root-container.is-active::before {
    filter: blur(5px) brightness(0.5);
    transform: scale(1.1);
}

#title-container {
    position: relative;
    height: 25vh;
    background: linear-gradient(to bottom, #000000 0%, #00000000 50%);
    align-items: center;
    flex-wrap: nowrap;
}

#title-rogue {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    min-height: 25vh;
}

#options-container {
    padding: 1%;
    height: 70vh;
}

.main-option {
    cursor: pointer;
    height: 50vh;
    border-left: rgba(0, 0, 0, 0.75) solid 2px;
    border-right: rgba(0, 0, 0, 0.75) solid 2px;
    background-color: rgba(0, 0, 0,0.5);
    margin: 5px;
    width: 12%;
    z-index: 1;
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-position: center bottom;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 40%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 40%);
    transition: all 0.4s ease;
}

.main-option:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(255, 127, 172, 0.8), inset 0 0 80px rgba(255, 127, 172, 0.6);
    filter: brightness(1.1);
    z-index: 999;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
}

#rg5-cg {
    background-image: url("/assets/img/option1.png");
}

#rg5-copper {
    background-image: url("/assets/img/option2.png");
}

#rg5-story {
    background-image: url("/assets/img/option3.png");
}

#rg5-music {
    background-image: url("/assets/img/option4.png");
}

#rg5-cg-container {
    height: 60vh;
    position: relative;
    background-size: cover;
    background-position: bottom left;
    background-repeat: no-repeat;
    mask-image: linear-gradient(90deg,
    transparent,
    black 0%,
    black 85%,
    transparent
    );
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

#rg5-cg-info {
    position: absolute;
    bottom: 5%;
}

#btn-change-rootbg {
    cursor: pointer;
}

#rg5-cg-description {
    position: relative;
    padding: 0.25rem 0.5em 0.25em 2.5em;
    display: inline-block;
    z-index: 1;
}

#rg5-cg-description::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: rgba(0, 0, 0, 0.6);
    -webkit-mask-image: -webkit-linear-gradient(left,
    transparent,
    black 10%,
    black 85%,
    transparent
    );
    mask-image: linear-gradient(90deg,
    transparent,
    black 15%,
    black 85%,
    transparent
    );
}

#rg5-cg-options {
    position: absolute;
    right: 2%;
    width: 20%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#rg5-cg-options .list-group-item {
    background: none !important;
    position: relative;
    border: none;
    color: white;
    transition: all 0.3s ease;
}

#rg5-cg-options .list-group-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: rgba(33, 37, 41, 0.7);
    -webkit-mask-image: -webkit-linear-gradient(left,
    transparent,
    black 25%,
    black 75%,
    transparent
    );
    mask-image: linear-gradient(90deg,
    transparent,
    black 25%,
    black 75%,
    transparent
    );
}

#rg5-cg-options .list-group-item:hover::before,
#rg5-cg-options .list-group-item.active::before {
    background-color: rgba(255, 255, 255, 0.2);
    -webkit-mask-image: -webkit-linear-gradient(left,
    transparent,
    black 5%,
    black 95%,
    transparent
    );
}

.btn-back {
    position: absolute;
    cursor: pointer;
    left: 8%;
    top: 23%;
    width: 8vw;
    z-index: 99;
    min-width: 100px;
}

#btn-sound {
    position: absolute;
    width: 32px;
    height: 32px;
    z-index: 999;
    right: 2.5%;
    top: 4%;
    opacity: 0.75;
    cursor: pointer;
    transition: all 0.3s ease;
}

#btn-sound:hover {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(255, 127, 172, 0.8));
}

#rg5-copper-container {
    position: relative;
    height: 60vh;
    background: none !important;
    z-index: 1;
}

#rg5-copper-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 20%, transparent 45%);
    background-size: 100% auto, 100% auto;
    background-repeat: no-repeat, no-repeat;
    background-position: center center, center center;
    -webkit-mask-image: -webkit-linear-gradient(top,
    transparent 0%,
    black 15%,
    black 100%
    );
    mask-image: linear-gradient(180deg,
    transparent 0%,
    black 15%,
    black 100%
    );
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

#rg5-copper-info {
    position: absolute;
    left: 0;
    width: 40%;
    height: 100%;
    background-image: url("../assets/img/CopperBgType0.png");
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-position: top center;
}

#rg5-copper-view {
    position: relative;
    width: 100%;
    height: 48%;
    display: flex;
    overflow: hidden;
    justify-content: center;
    align-items: center;
}

#rg5-copper-view img {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    width: 25%;
    z-index: 1;
}

#rg5-copper-description-title {
    position: absolute;
    top: -10%;
    left: 50%;
    width: 50%;
    text-align: center;
    transform: translate(-55%, -50%);
    z-index: 1;
}

#rg5-copper-description-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000099;
    z-index: -1;
    -webkit-mask-image: -webkit-linear-gradient(left,
    transparent,
    black 20%,
    black 80%,
    transparent
    );
    mask-image: linear-gradient(90deg,
    transparent,
    black 15%,
    black 85%,
    transparent
    );
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.rg5-copper-description-title-type {
    transform: translate(5%, -5%) scale(0.6);
    vertical-align: middle;
}

#rg5-copper-description-title-text {
    color: white;
    vertical-align: middle;
    font-weight: 600;
}

#rg5-copper-description {
    position: relative;
    height: 52%;
}

#rg5-copper-description-text {
    padding: 15% 20%;
    line-height: 1.6;
}

#rg5-copper-description-text span {
    display: block;
}

#rg5-copper-description-text span:nth-of-type(1) {
    color: #dcdcdc;
    font-family: "KaiTi", "STKaiti", "华文楷体", serif;
    font-size: 1rem;
    font-style: italic;
    margin-bottom: 0.75em;
}

#rg5-copper-description-text span:nth-of-type(2) {
    color: #ffffff;
}

#rg5-copper-description-text br {
    display: none;
}

#rg5-copper-list {
    position: absolute;
    right: 0;
    width: 60%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: -webkit-linear-gradient(top,
    black 0%,
    black 85%,
    transparent 100%
    );
    mask-image: linear-gradient(180deg,
    black 0%,
    black 85%,
    transparent 100%
    );
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

#rg5-copper-list::-webkit-scrollbar {
    display: none;
}

.rg5-copper-list-row {
    padding: 0 5%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    align-items: center;
}

.rg5-copper-list-title {
    grid-column: span 5;
    display: block;
    margin: 15px auto 0px;
    scale: 0.8;
}

.rg5-copper-list-item {
    cursor: pointer;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-image: url("../assets/img/rg5_copper_list_item_bg.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
}

.rg5-copper-list-item img {
    width: 85%;
    height: 85%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    z-index: 2;
}

.rg5-copper-list-item.active::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../assets/img/rg5_copper_list_item_click.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
}

.rg5-story-carousel {
    padding-bottom: 40px;
    margin-top: 5vh;
}

.rg5-story-carousel-indicators {
    bottom: 10px;
    margin-bottom: 0;
}

.rg5-story-carousel-indicators .rg5-story-carousel-indicator-item {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border-top: none;
    border-bottom: none;
    background-color: rgba(255, 255, 255, 0.4);
    margin-left: 6px;
    margin-right: 6px;
    transition: all 0.3s ease;
}

.rg5-story-carousel-indicators .rg5-story-carousel-indicator-item.active {
    background-color: #ffffff;
    transform: scale(1.2);
}

.rg5-story-carousel-logo {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -40%);
    z-index: 10;
    pointer-events: none;
    object-fit: contain;
}

@media (orientation: portrait) {
    .rg5-story-carousel-logo {
        width: 25vw;
        height: auto;
    }
}

@media (orientation: landscape) {
    .rg5-story-carousel-logo {
        height: 20vh;
        width: auto;
    }
}

.rg5-story-carousel-control-prev,
.rg5-story-carousel-control-next {
    z-index: 12 !important;
}

.rg5-story-carousel-item{
    cursor: pointer;
}

#rg5-story-info-container {
    height: 65vh;
    position: relative;
    background-size: auto 150% ;
    background-repeat: no-repeat;
    background-position: calc(100% + 15vh) calc(0% - 25vh);
}

#rg5-story-info-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.8) 40%,
    rgba(0, 0, 0, 1) 100%
    );
    pointer-events: none;
}

#rg5-story-part-list {
    position: absolute;
    bottom: 0;
    left: 2%;
    width: 20%;
    height: 75%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    z-index: 2;
    padding-top: calc(2em + 1.25rem);
    box-sizing: border-box;
}

#rg5-story-part-list .list-group-item {
    background: none !important;
    position: relative;
    transition: all 0.3s ease;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

#rg5-story-part-list .list-group-item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-color: rgba(33, 37, 41, 0.7);
    mask-image: linear-gradient(90deg, transparent, black 20%, black 80%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 20%, black 80%, transparent);
}

#rg5-story-part-list .list-group-item:hover::before,
#rg5-story-part-list .list-group-item.active::before {
    background-color: rgba(255, 255, 255, 0.2);
    mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
}

#rg5-story-info {
    position: absolute;
    right: 2%;
    width: 75%;
    height: 75%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    -webkit-mask-image: -webkit-linear-gradient(top,
    black 0%,
    black 75%,
    transparent 100%
    );
    mask-image: linear-gradient(180deg,
    black 0%,
    black 75%,
    transparent 100%
    );
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

#rg5-story-info-title {
    flex-shrink: 0;
    text-align: right;
    padding-top: 1.5em;
    padding-bottom: 0.5em;
    padding-right: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}

#rg5-story-info-text {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    line-height: 1.6;
}

#rg5-story-info-text::-webkit-scrollbar {
    display: none;
}

#rg5-story-info-text p {
    text-indent: 2em;
    margin: 0 0 0.5em 0;
}

#rg5-story-info-text p:last-child {
    margin-bottom: 0;
}

#rg5-music-container{
    position: relative;
    height: 60vh;
}

#rg5-music-options {
    position: absolute;
    right: 2%;
    top: 0;
    width: 20%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#rg5-music-options .list-group-item {
    background: none !important;
    position: relative;
    border: none;
    color: white;
    transition: all 0.3s ease;
}

#rg5-music-options .list-group-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: rgba(33, 37, 41, 0.4);
    -webkit-mask-image: -webkit-linear-gradient(left,
    transparent,
    black 25%,
    black 75%,
    transparent
    );
    mask-image: linear-gradient(90deg,
    transparent,
    black 25%,
    black 75%,
    transparent
    );
}

#rg5-music-options .list-group-item:hover::before,
#rg5-music-options .list-group-item.active::before {
    background-color: rgba(255, 255, 255, 0.2);
    -webkit-mask-image: -webkit-linear-gradient(left,
    transparent,
    black 5%,
    black 95%,
    transparent
    );
}

#rg5-music-view{
    width: 70%;
    height: 60vh;
    position: relative;
}

#rg5-music-view img{
    width: 100%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes syncRotation {
    from {
        transform: translateY(-50%) rotate(0deg);
    }
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

#rg5-music-view img:nth-of-type(2),
#rg5-music-icon {
    animation: syncRotation 12s linear infinite;
    transform-origin: center center;
    will-change: transform;
}

#btn-change-rootbgm {
    cursor: pointer;
}

#rg5-music-info {
    position: absolute;
    bottom: 5%;
}

#btn-change-rootbgm{
    background-color: #ffffffaa;
}

#btn-change-rootbgm:hover {
    background-color: #ffffff;
}