@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');

body{
    font-family: Poppins;
    background-color: #000;
    color: #eee;
    margin: 0;
    font-size: 12px;
}

a{
    text-decoration: none;
    color: #eee;
}

header{
    width: 1140px;
    max-width: 80%;
    margin: auto;
    height: 50px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 100;
}

header a{
    margin-right: 40px;
}

.carousel{
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    margin-top: -50px;
    position: relative;
}

.carousel .list .item{
    position: absolute;
    inset: 0 0 0 0;
}

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

.carousel .list .item .content{
    position: absolute;
    top: 20%;
    left: 5%;
    width: fit-content;
    max-width: 520px;
    padding: 32px 36px;
    box-sizing: border-box;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);

    /* Frosted glass card */
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.carousel .list .item .content .author{
    font-weight: bold;
    font-size: 2em;
    letter-spacing: 10px;
    color: rgba(255, 255, 255, 0.75);
}

.carousel .list .item .content .title,
.carousel .list .item .content .topic{
    font-weight: bold;
    font-size: 5em;
    list-style: 1.3em;
}

.carousel .list .item .content .topic{
    color: #f1683a;
}

.carousel .list .item .content .buttons{
    display: grid;
    grid-template-columns: repeat(2, 130px);
    grid-template-rows: 40px;
    gap: 5px;
    margin-top: 20px;
}

.carousel .list .item .content button{
    border: none;
    background-color: #ffffff;
    color: #111;
    letter-spacing: 3px;
    font-family: Poppins;
    font-weight: 600;
    font-size: 0.85em;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.carousel .list .item .content button:hover{
    background-color: #f1683a;
    color: #fff;
}

.carousel .list .item .content button:nth-child(2){
    background-color: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.8);
    font-weight: 600;
}

.carousel .list .item .content button:nth-child(2):hover{
    background-color: #fff;
    color: #111;
    border-color: #fff;
}

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

.thumbnail .item{
    width: 150px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
}

.thumbnail .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail .item .content{
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}

.thumbnail .item .content .title{
    font-weight: bold;
}

.arrows{
    position: absolute;
    bottom: 90px;
    left: calc(50% - 160px);
    z-index: 100;
    display: flex;
    gap: 10px;
    align-items: center;
}

.arrows button{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    font-family: monospace;
    color: #111;
    font-weight: bold;
    font-size: large;
    transition: .3s;
    z-index: 100;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.arrows button:hover{
    background-color: #f1683a;
    color: #fff;
    transform: scale(1.1);
}

.carousel .list .item:nth-child(1){
    z-index: 1;
}

.carousel .list .item:nth-child(1) .author,
.carousel .list .item:nth-child(1) .title,
.carousel .list .item:nth-child(1) .topic,
.carousel .list .item:nth-child(1) .des,
.carousel .list .item:nth-child(1) .buttons{
    transform: translateY(50px);
    filter: blur(20px);
    opacity: 0;
    animation: showContent 0.5s 1s linear 1 forwards;
}
@keyframes showContent{
    to{
        opacity: 1;
        filter: blur(0);
        transform: translateY(0px);
    }
}

.carousel .list .item:nth-child(1) .title{
    animation-delay: 1.2s;
}

.carousel .list .item:nth-child(1) .topic{
    animation-delay: 1.4s;
}

.carousel .list .item:nth-child(1) .des{
    animation-delay: 1.6s;
}

.carousel .list .item:nth-child(1) .buttons{
    animation-delay: 1.8s;
}

/* effect next click */
.carousel.next .list .item:nth-child(1) img{
    width: 150px;
    height: 220px;
    position: absolute;
    left: 50%;
    bottom: 50px;
    border-radius: 20px;
    animation: showImage .5s linear 1 forwards;
}
@keyframes showImage{
    to{
        width: 100%;
        height: 100%;
        left: 0;
        bottom: 0;
        border-radius: 0;
    }
}

.carousel.next .thumbnail .item:nth-last-child(1){
    overflow: hidden;
    animation: showThumbnail .5s linear 1 forwards;
}
.carousel.prev .list .item img{
    z-index: 100;
}
@keyframes showThumbnail{
    from{
        width: 0;
        opacity: 0;
    }
}

.carousel.next .thumbnail{
    animation: effectNext .5s linear 1 forwards;
}
@keyframes effectNext{
    from{
        transform: translateX(150px);
    }
}

/* effect prev click */
.carousel.prev .list .item:nth-child(2){
    z-index: 2;
}

.carousel.prev .list .item:nth-child(2) img{
    position: absolute;
    bottom: 0;
    left: 0;
    animation: outFrame .5s linear 1 forwards;
}
@keyframes outFrame{
    to{
        width: 150px;;
        height: 220px;
        border-radius: 20px;
        left: 50%;
        bottom: 50px;
    }
}

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

.carousel.prev .list .item:nth-child(2) .author,
.carousel.prev .list .item:nth-child(2) .title,
.carousel.prev .list .item:nth-child(2) .topic,
.carousel.prev .list .item:nth-child(2) .des,
.carousel.prev .list .item:nth-child(2) .buttons{
    animation: contentOut 1.5s linear 1 forwards;
}
@keyframes contentOut{
    to{
        transform: translateY(-150px);
        filter: blur(20px);
        opacity: 0;
    }
}

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

/* Time */
.carousel .time{
    position: absolute;
    z-index: 1000;
    width: 0%;
    height: 3px;
    background-color: #f1683a;
    left: 0;
    top: 0;
}

.carousel.next .time,
.carousel.prev .time{
    animation: runningTime 3s linear 1 forwards;
}
@keyframes runningTime{
    from{ width: 100%}
    to{width: 0}
}

@media screen and (max-width: 678px) {
    .carousel .list .item .content{
        left: 4%;
        right: 4%;
        max-width: 92%;
        padding: 20px 18px;
    }
    .carousel .list .item .content .title{
        font-size: 30px;
    }
}