/* @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); */

@font-face {
    font-family: 'Nocturne';
    src: url(../assets/fonts/NocturneSerif-Regular.ttf);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    margin: 0;
    background-color: #000;
    color: #eee;
}

/* sidebar */
.nav {
    position: fixed;
    top: 20px;
    left: 20px;
    bottom: 20px;
    width: 70px;
    border-radius: 10px;
    box-sizing: initial;
    border-left: 5px solid #1e2f61;
    background: #1e2f61;
    transition: 0.5s;
    overflow-x: hidden;
    z-index: 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;
}

.nav.active {
    width: 300px;
}

.nav ul {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding-left: 5px;
    padding-top: 75px;
}

.nav ul li {
    position: relative;
    display: block;
    width: 100%;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.tooltip {
    display: none;
    position: fixed;
    left: 117px;
    background: #272727;
    padding: 5px 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.tooltip::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: #272727;
    transform: rotateZ(45deg);
    top: 7.5px;
    left: -4px;
}

.sidebar-li:hover .tooltip {
    display: block;
}

.nav ul li.active {
    background: #6b99ea;
}

.nav ul li b:nth-child(1) {
    position: absolute;
    top: -20px;
    height: 20px;
    width: 100%;
    background-color: #6b99ea;
    display: none;
}

.nav ul li b:nth-child(1)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-bottom-right-radius: 20px;
    background: #1e2f61;
}

.nav ul li b:nth-child(2) {
    position: absolute;
    bottom: -20px;
    height: 20px;
    width: 100%;
    background: #6b99ea;
    display: none;
}

.nav ul li b:nth-child(2)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-top-right-radius: 20px;
    background: #1e2f61;
}

.nav ul li.active b:nth-child(1),
.nav ul li.active b:nth-child(2) {
    display: block;
}

.nav ul li a {
    position: relative;
    display: block;
    width: 100%;
    display: flex;
    text-decoration: none;
    color: #fff;
}

.nav ul li.active a {
    color: #fff;
}

.nav ul li a .icon {
    position: relative;
    display: block;
    min-width: 60px;
    height: 60px;
    line-height: 70px;
    text-align: center;
}

.nav ul li a .icon i {
    font-size: 26px;
    color: #8ad7fe;
}

.nav ul li a .title {
    position: relative;
    display: block;
    padding-left: 10px;
    height: 60px;
    line-height: 60px;
    white-space: normal;
}

.toggle {
    position: fixed;
    top: 40px;
    left: 40px;
    float: left;
    z-index: 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999;
}

.toggle.active {
    left: 270px;
}

.genshin-text {
    display: none;
    position: absolute;
    top: 10px;
    width: 180px;
    left: 35px;
}

.toggle span img,
.toggle span i {
    position: absolute;
    color: #8ad7fe;
    width: 34px;
    height: 34px;
    font-size: 34px;
    display: none;
}

.toggle span i {
    top: 12px;
}

.toggle span img.open,
.toggle.active span i.close {
    display: block;
}

.toggle.active span img.open,
.toggle span i.close {
    display: none;
}

/*nations*/
.carousel {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    font-family: Poppins;
}

.carousel .nations-li .item {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0 0 0 0;
}

.carousel .nations-li .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel .nations-li .item .content {
    position: absolute;
    top: 40px;
    max-width: 60%;
    width:auto;
    left: 35%;
    transform: translateX(-40%);
    padding: 2rem;
    box-sizing: border-box;
    color: #fff;
    text-shadow: 0 5px 10px #0004;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;   
}

.carousel .nations-li .item .author {
    font-weight: bold;
    letter-spacing: 10px;
}

.carousel .nations-li .item .title,
.carousel .nations-li .item .topic {
    font-size: 5em;
    font-weight: bold;
    line-height: 0.8em;
    font-family: 'Nocturne';
    margin-top: 10px;
}

.carousel .nations-li .mondstadt .topic {
    color: #00d4ff;
}

.carousel .nations-li .liyue .topic {
    color: #f1683a;
}

.carousel .nations-li .inazuma .topic {
    color: #e605ff;
}

.carousel .nations-li .sumeru .topic {
    color: #28d464;
}

.carousel .nations-li .fontaine .topic {
    color: #00d4ff;
}

.carousel .nations-li .natlan .topic {
    color: #d93232;
}


.carousel .nations-li .item .des {
    margin-top: 10px;
    font-size: 16px;
}

.card-nation-info-irchonment {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    width: fit-content;
    margin-top: 1rem;
}

.card-nation-info-irchonment span {
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    height: 56px;
    gap: 10px;
}

.content .card-nation-info-irchonment span img {
    border-radius: 50%;
}

/* thumbail */
.thumbnail {
    position: absolute;
    bottom: 25px;
    left: 50%;
    width: max-content;
    z-index: 100;
    display: flex;
    gap: 20px;
}

.thumbnail .item {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 150px;
    width: 120px;
    flex-shrink: 0;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
}

.thumbnail .item img {
    width: 80%;
    height: 80%;
    object-fit: cover;
    border-radius: 20px;
}

.thumbnail .item .content {
    color: #fff;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    text-align: center;
}

.thumbnail .item .content .title {
    font-weight: 500;
    font-size: 12px;
}

.thumbnail .item .content .description {
    font-weight: 300;
}

/* arrows */
.arrows {
    position: absolute;
    top: 80%;
    right: 52%;
    z-index: 100;
    width: 300px;
    max-width: 30%;
    display: flex;
    gap: 10px;
    align-items: center;
}

.arrows button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee4;
    border: none;
    color: #fff;
    font-family: monospace;
    font-weight: 800;
    transition: 0.5s;
}

.arrows button:hover {
    background-color: #fff;
    color: #000;
    font-weight: 1000;
}

/* animation */
.carousel .nations-li .item:nth-child(1) {
    z-index: 1;
}

/* animation text in first item */
.carousel .nations-li .item:nth-child(1) .content .author,
.carousel .nations-li .item:nth-child(1) .content .title,
.carousel .nations-li .item:nth-child(1) .content .topic,
.carousel .nations-li .item:nth-child(1) .content .des,
.carousel .nations-li .item:nth-child(1) .content .card-nation-info-irchonment,
.carousel .nations-li .item:nth-child(1) .content .card-nation-info-irchonment span {
    transform: translateY(50px);
    filter: blur(20px);
    opacity: 0;
    animation: showContent 0.5s 1s linear 1 forwards;
}

@keyframes showContent {
    to {
        transform: translateY(0px);
        filter: blur(0px);
        opacity: 1;
    }
}

.carousel .nations-li .item:nth-child(1) .content .title {
    animation-delay: 1.2s !important;
}

.carousel .nations-li .item:nth-child(1) .content .topic {
    animation-delay: 1.4s !important;
}

.carousel .nations-li .item:nth-child(1) .content .des {
    animation-delay: 1.6s !important;
}

.carousel .nations-li .item:nth-child(1) .content .card-nation-info-irchonment {
    animation-delay: 1.8s !important;
}

/* create animation when next click */
.carousel.next .nations-li .item:nth-child(1) img {
    width: 120px;
    height: 150px;
    position: absolute;
    bottom: 25px;
    left: 50%;
    border-radius: 30px;
    animation: showImage 0.5s linear 1 forwards;
}

@keyframes showImage {
    to {
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

.carousel.next .thumbnail .item:nth-last-child(1) {
    overflow: hidden;
    animation: showThumbnail 0.5s linear 1 forwards;
}

.carousel.prev .nations-li .item img {
    z-index: 100;
}

@keyframes showThumbnail {
    from {
        width: 0;
        opacity: 0;
    }
}

.carousel.next .thumbnail {
    animation: effectNext 0.5s linear 1 forwards;
}

@keyframes effectNext {
    from {
        transform: translateX(100px);
    }
}

/* prev click */

.carousel.prev .nations-li .item:nth-child(2) {
    z-index: 2;
}

.carousel.prev .nations-li .item:nth-child(2) img {
    animation: outFrame 0.5s linear 1 forwards;
    position: absolute;
    bottom: 0;
    left: 0;
}

@keyframes outFrame {
    to {
        width: 120px;
        height: 150px;
        bottom: 25px;
        left: 50%;
        border-radius: 20px;
    }
}

.carousel.prev .thumbnail .item:nth-child(1) {
    overflow: hidden;
    opacity: 0;
    animation: showThumbnail 0.5s linear 1 forwards;
}

.carousel.next .arrows button,
.carousel.prev .arrows button {
    pointer-events: none;
}

.carousel.prev .nations-li .item:nth-child(2) .content .author,
.carousel.prev .nations-li .item:nth-child(2) .content .title,
.carousel.prev .nations-li .item:nth-child(2) .content .topic,
.carousel.prev .nations-li .item:nth-child(2) .content .des,
.carousel.prev .nations-li .item:nth-child(2) .content .card-nation-info-irchonment {
/* .carousel.prev .nations-li .item:nth-child(1) .content .card-nation-info-irchonment span { */
    animation: contentOut 0.2s linear 1 forwards !important;

}

@keyframes contentOut {
    to {
        transform: translateY(-100px);
        filter: blur(20px);
        opacity: 0;
    }
}

@media screen and (max-width: 678px) {
    .carousel .nations-li .item .content {
        padding-right: 0;
    }

    .carousel .nations-li .item .content .title {
        font-size: 30px;
    }
}