@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Play:wght@400;700&display=swap');

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden; 
}

html {
    font-size: clamp(0.875rem, 0.5rem + 1vw, 1.125rem);
}

body{
    font-family: 'Play', sans-serif;
    background: rgb(186, 226, 231);
    transition: background 0.5s ease;
    
    display: flex;
    flex-direction: column;
}
:root{
    --item1-transform: translateX(-100%) translateY(-5%) scale(1.5);
    --item1-filter: blur(30px);
    --item1-zIndex: 11;
    --item1-opacity: 0;

    --item2-transform: translateX(0);
    --item2-filter: blur(0px);
    --item2-zIndex: 10;
    --item2-opacity: 1;

    --item3-transform: translate(50%,10%) scale(0.8);
    --item3-filter: blur(10px);
    --item3-zIndex: 9;
    --item3-opacity: 1;

    --item4-transform: translate(90%,20%) scale(0.5);
    --item4-filter: blur(30px);
    --item4-zIndex: 8;
    --item4-opacity: 1;
    
    --item5-transform: translate(120%,30%) scale(0.3);
    --item5-filter: blur(40px);
    --item5-zIndex: 7;
    --item5-opacity: 0;
}
header{
    width: 100%; 
    padding: 0 5%; 
    box-sizing: border-box; 
    display: flex;
    justify-content: space-between;
    height: 50px;
    align-items: center;
    flex-shrink: 0; 
}
header .logo{
    font-weight: bold;
    color: #555; 
    font-size: 1.5rem; 
}
header nav a{
    margin-left: 30px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.5s ease;
    font-size: 1.1rem; 
}
.carousel{
    position: relative;
    flex-grow: 1; 
    overflow: hidden;
}
.carousel .list{
    position: absolute;
    width: 1140px;
    max-width: 90%;
    height: 80%;
    left: 50%;
    transform: translateX(-50%);
}
.carousel .list .item{
    position: absolute;
    left: 0%;
    width: 70%;
    height: 100%;
    font-size: clamp(0.9rem, 1vw, 1.1rem); 
    transition: left 0.5s, opacity 0.5s, width 0.5s;
}
.carousel .list .item:nth-child(n + 6){
    opacity: 0;
}
.carousel .list .item:nth-child(2){
    z-index: 10;
    transform: translateX(0);
}
.carousel .list .item img{
    width: 110%;
    position: absolute;
    right: -55%;
    top: 50%;
    transform: translateY(-50%);
    transition: right 1.5s;
}
.carousel .list .item .introduce{
    opacity: 0;
    pointer-events: none;
    
}

.carousel .list .item:nth-child(2) .introduce{
    opacity: 1;
    pointer-events: auto;
    width: 400px;
    position: absolute;
    top: 50%;
    transform:  translateY(-50%);
    transition: opacity 0.5s;
}
.carousel .list .item .introduce .title{
    font-size: clamp(1.5rem, 2vw, 2.2rem); 
    font-weight: 500;
    line-height: 1em;
    transition: color 0.5s ease;
}
.carousel .list .item .introduce .topic{
    font-size: clamp(3rem, 5vw, 5rem); 
    font-weight: 500;
    transition: color 0.5s ease;
}
.carousel .list .item .introduce .des{
    font-size: clamp(0.9rem, 1vw, 1.1rem); 
    color: #5559;
    transition: color 0.5s ease;
}
.carousel .list .item .introduce .seeMore {
    position: relative;
    background-color: #262626; 
    height: 4rem; 
    width: 16rem; 
    border: 1px solid transparent; 
    text-align: left; 
    padding: 0.75rem; 
    color: #f9fafb; 
    font-size: clamp(0.9rem, 1vw, 1rem); 
    font-weight: 700; 
    font-family: 'Play', sans-serif; 
    border-radius: 0.5rem; 
    overflow: hidden; 
    transition-duration: 500ms; 
    text-decoration-line: none;
    transform-origin: left; 
    cursor: pointer;

    margin-top: 1.2em;
    
    letter-spacing: normal;
}

.carousel .list .item .introduce .seeMore:hover {
    border-color: #fda4af; 
    color: #fda4af; 
    background: #262626; 
}

.carousel .list .item .introduce .seeMore::before {
    position: absolute;
    content: '';
    width: 3rem; 
    height: 3rem; 
    right: 0.25rem; 
    top: 0.25rem; 
    z-index: 10; 
    background-color: #8b5cf6; 
    border-radius: 9999px; 
    filter: blur(16px); 
    transition-duration: 500ms; 
}

.carousel .list .item .introduce .seeMore::after {
    position: absolute;
    content: '';
    z-index: 10; 
    width: 5rem; 
    height: 5rem; 
    background-color: #fda4af; 
    right: 2rem; 
    top: 0.75rem; 
    border-radius: 9999px; 
    filter: blur(16px); 
    transition-duration: 500ms; 
}

.carousel .list .item .introduce .seeMore:hover::before {
    box-shadow: 20px 20px 20px 30px #a21caf; 
    right: 3rem; 
    bottom: -2rem; 
    top: auto; 
    filter: blur(8px); 
}

.carousel .list .item .introduce .seeMore:hover::after {
    right: -2rem; 
}
.carousel .list .item:nth-child(1){
    transform: var(--item1-transform);
    filter: var(--item1-filter);
    z-index: var(--item1-zIndex);
    opacity: var(--item1-opacity);
    pointer-events: none;
}
.carousel .list .item:nth-child(3){
    transform: var(--item3-transform);
    filter: var(--item3-filter);
    z-index: var(--item3-zIndex);
}
.carousel .list .item:nth-child(4){
    transform: var(--item4-transform);
    filter: var(--item4-filter);
    z-index: var(--item4-zIndex);
}
.carousel .list .item:nth-child(5){
    transform: var(--item5-transform);
    filter: var(--item5-filter);
    opacity: var(--item5-opacity);
    pointer-events: none;
}
.carousel .list .item:nth-child(2) .introduce .title,
.carousel .list .item:nth-child(2) .introduce .topic,
.carousel .list .item:nth-child(2) .introduce .des,
.carousel .list .item:nth-child(2) .introduce .seeMore{
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
}
@keyframes showContent{
    from{
        transform: translateY(-30px);
        filter: blur(10px);
    }to{
        transform: translateY(0);
        opacity: 1;
        filter: blur(0px);
    }
}
.carousel .list .item:nth-child(2) .introduce .topic{
    animation-delay: 1.2s;
}
.carousel .list .item:nth-child(2) .introduce .des{
    animation-delay: 1.4s;
}
.carousel .list .item:nth-child(2) .introduce .seeMore{
    animation-delay: 1.6s;
}
.carousel.next .item:nth-child(1){
    animation: transformFromPosition2 0.5s ease-in-out 1 forwards;
}
@keyframes transformFromPosition2{
    from{
        transform: var(--item2-transform);
        filter: var(--item2-filter);
        opacity: var(--item2-opacity);
    }
}
.carousel.next .item:nth-child(2){
    animation: transformFromPosition3 0.7s ease-in-out 1 forwards;
}
@keyframes transformFromPosition3{
    from{
        transform: var(--item3-transform);
        filter: var(--item3-filter);
        opacity: var(--item3-opacity);
    }
}
.carousel.next .item:nth-child(3){
    animation: transformFromPosition4 0.9s ease-in-out 1 forwards;
}
@keyframes transformFromPosition4{
    from{
        transform: var(--item4-transform);
        filter: var(--item4-filter);
        opacity: var(--item4-opacity);
    }
}
.carousel.next .item:nth-child(4){
    animation: transformFromPosition5 1.1s ease-in-out 1 forwards;
}
@keyframes transformFromPosition5{
    from{
        transform: var(--item5-transform);
        filter: var(--item5-filter);
        opacity: var(--item5-opacity);
    }
}
.carousel.prev .list .item:nth-child(5){
    animation: transformFromPosition4 0.5s ease-in-out 1 forwards;
}
.carousel.prev .list .item:nth-child(4){
    animation: transformFromPosition3 0.7s ease-in-out 1 forwards;
}
.carousel.prev .list .item:nth-child(3){
    animation: transformFromPosition2 0.9s ease-in-out 1 forwards;
}
.carousel.prev .list .item:nth-child(2){
    animation: transformFromPosition1 1.1s ease-in-out 1 forwards;
}
@keyframes transformFromPosition1{
    from{
        transform: var(--item1-transform);
        filter: var(--item1-filter);
        opacity: var(--item1-opacity);        
    }
}
.carousel .list .item .detail{
    opacity: 0;
    pointer-events: none;
}
.carousel.showDetail .list .item:nth-child(3),
.carousel.showDetail .list .item:nth-child(4){
    left: 100%;
    opacity: 0;
    pointer-events: none;
}
.carousel.showDetail .list .item:nth-child(2){
    width: 100%;
}
.carousel.showDetail .list .item:nth-child(2) .introduce{
    opacity: 0;
    pointer-events: none;
}
.carousel.showDetail .list .item:nth-child(2) img{
    right: 50%;
}
.carousel.showDetail .list .item:nth-child(2) .detail{
    opacity: 1;
    width: 50%;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: right;
    pointer-events: auto;
}
.carousel.showDetail .list .item:nth-child(2) .detail .title{
    font-size: clamp(2.5rem, 4vw, 4rem); 
    transition: color 0.5s ease;
}
.carousel.showDetail .list .item:nth-child(2) .detail .des { 
    transition: color 0.5s ease;
    font-size: clamp(0.9rem, 1vw, 1.1rem); 
}
.carousel.showDetail .list .item:nth-child(2) .detail .specifications{
    display: flex;
    gap: 10px;
    width: 100%;
    border-top: 1px solid #5553;
    margin-top: 20px;
    transition: border-color 0.5s ease;
}
.carousel.showDetail .list .item:nth-child(2) .detail .specifications p { 
    transition: color 0.5s ease;
    font-size: clamp(0.85rem, 1vw, 1rem); 
}
.carousel.showDetail .list .item:nth-child(2) .detail .specifications div{
    width: 90px;
    text-align: center;
    flex-shrink: 0;
}
.carousel.showDetail .list .item:nth-child(2) .detail .specifications div p:nth-child(1){
    font-weight: bold;
}
.carousel.carousel.showDetail .list .item:nth-child(2) .checkout button{
    font-family: Poppins;
    background-color: transparent;
    border: 1px solid #5555;
    margin-left: 5px;
    padding: 5px 10px;
    letter-spacing: 2px;
    font-weight: 500;
    transition: color 0.5s ease, border-color 0.5s ease;
}
.carousel.carousel.showDetail .list .item:nth-child(2) .checkout button:nth-child(2){
    background-color: #693EFF;
    color: #eee;
}
.carousel.showDetail .list .item:nth-child(2) .detail  .title,
.carousel.showDetail .list .item:nth-child(2) .detail  .des,
.carousel.showDetail .list .item:nth-child(2) .detail .specifications,
.carousel.showDetail .list .item:nth-child(2) .detail .checkout{
    opacity: 0;
    animation: showContent 0.5s 1s ease-in-out 1 forwards;
}
.carousel.showDetail .list .item:nth-child(2) .detail  .des{
    animation-delay: 1.2s;
}
.carousel.showDetail .list .item:nth-child(2) .detail .specifications{
    animation-delay: 1.4s;
}
.carousel.showDetail .list .item:nth-child(2) .detail .checkout{
    animation-delay: 1.6s;
}
.arrows{
    position: absolute;
    bottom: 10px;
    width: 1140px;
    max-width: 90%;
    display: flex;
    justify-content: space-between;
    left: 50%;
    transform: translateX(-50%);
}
#prev,
#next{
    width: 150px;
    height: 60px;
    border-radius: 50px;
    background-image: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    box-shadow: 0 20px 30px -6px rgba(0, 58, 250, 0.5);
    outline:none;
    cursor: pointer;
    border: none;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: rgb(0, 0, 0);
    font-family: play, sans-serif;
    transition: all 0.3s ease-in-out;
    bottom: 20%;
    left: 10%;
}

#back{
    width: 150px;
    height: 60px;
    border-radius: 50px;
    background-image: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    box-shadow: 0 20px 30px -6px rgba(0, 58, 250, 0.5);
    outline:none;
    cursor: pointer;
    border: none;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: rgb(0, 0, 0); 
    font-family: play, sans-serif;
    transition: all 0.3s ease-in-out;
    position: absolute;
    z-index: 100;
    bottom: 0%;
    left: 50%;
    transform: translateX(-50%);
    background-color: unset;
    padding: 0;
    font-weight: normal;
    letter-spacing: normal;
    opacity: 0;
    pointer-events: none;
}

#prev:hover,
#next:hover{
    background-image: linear-gradient(135deg, #b1b1b1 0%, #bebebe 100%);
    color: white;
    transform: translateY(3px);
    box-shadow: none;

}

#back:hover {
    transform: translateX(-50%) translateY(3px);
    box-shadow: none;
}

#prev:active,
#next:active,
#back:active{
    opacity: 0.5;
}

.carousel.showDetail #back{
    opacity: 1;
    pointer-events: auto;
}
.carousel.showDetail #prev,
.carousel.showDetail #next{
    opacity: 0;
    pointer-events: none;
}
.carousel::before{
    width: 500px;
    height: 300px;
    content: '';
    background: var(--carousel-glow, linear-gradient(70deg, #06010f, blue, WHITE));
    position: absolute;
    z-index: -1;
    border-radius: 20% 30% 80% 10%;
    filter: blur(150px);
    top: 50%;
    left: 50%;
    transform: translate(-10%, -50%);
    transition: 1s;
}
.carousel.showDetail::before{
    transform: translate(-100%, -50%) rotate(90deg);
    filter: blur(130px);
}
@media screen and (max-width: 991px){
    .carousel .list .item{
        width: 90%;
    }
    .carousel.showDetail .list .item:nth-child(2) .detail .specifications{
        overflow: auto;
    }
    .carousel.showDetail .list .item:nth-child(2) .detail .title{
        font-size: clamp(2rem, 4vw, 3rem);
    }
}
@media screen and (max-width: 767px){
    .carousel .list .item{
        width: 100%;
    }
    .carousel .list{
        height: 100%;
    }
    .carousel .list .item:nth-child(2) .introduce{
        width: 50%;
    }
    .carousel .list .item img{
        width: 60%;
    }
    .carousel.showDetail .list .item:nth-child(2) .detail{
        backdrop-filter: blur(10px);
    }
    .carousel .list .item:nth-child(2) .introduce .des,
    .carousel.showDetail .list .item:nth-child(2) .detail .des{
        height: 100px;
        overflow: auto;
    }
    .carousel.showDetail .list .item:nth-child(2) .detail .checkout{
        display: flex;
        width: max-content;
        float: right;
    }
}

body.dark-theme header .logo {
    color: #f0f0f0;
}
body.dark-theme header nav a {
    color: #f0f0f0;
}
body.dark-theme .carousel .list .item .introduce .title,
body.dark-theme .carousel .list .item .introduce .topic {
    color: #ffffff;
}
body.dark-theme .carousel .list .item .introduce .des {
    color: rgba(240, 240, 240, 0.7);
}

body.dark-theme .carousel.showDetail .list .item:nth-child(2) .detail .title,
body.dark-theme .carousel.showDetail .list .item:nth-child(2) .detail .des,
body.dark-theme .carousel.showDetail .list .item:nth-child(2) .detail .specifications p {
    color: #f0f0f0;
}
body.dark-theme .carousel.showDetail .list .item:nth-child(2) .detail .specifications {
    border-top-color: rgba(240, 240, 240, 0.3);
}
body.dark-theme .carousel.carousel.showDetail .list .item:nth-child(2) .checkout button {
    color: #f0f0f0;
    border-color: rgba(240, 240, 240, 0.3);
}
body.dark-theme #prev,
body.dark-theme #next {
    color: #020202;
}
body.dark-theme #back {
    color: #020202; 
}