html, body{
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans';
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    background: #0a0c12;
    padding-top: 2%;
}


#background, #bglayer{
    position: fixed;
    top: 50%;
    left: 50%;
    width: 110vw;
    transform: translate(-50%, -50%);
    z-index: -3;
}

#bglayer {
    height:110vh;
    background: rgba(0,0,0,0.4);
    z-index: -1;
}

#main-container {
    position: relative;
    z-index: 1;
}

.section strong {
    color:#d1b0de;
    font-size: clamp(1rem, 3vw, 1.5rem);
}


h1 {
    position: relative;
    left: 50%;
    transform: translate(-50%, 30%);
    width: fit-content;
    font-size: 3rem;
    color:#c39edb;
    text-shadow: 0 0 10px rgb(56, 43, 59);
}


.section {
    width: 55%;
    margin: 100px auto;
    padding: 2.5rem;
    font-size: clamp(0.8rem, 2.5vw, 1.2rem);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(100, 120, 150, 0.3);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 8px 32px rgba(134, 100, 150, 0.822);
}


.section.active {
    opacity: 1;
    transform: translateY(0);
}

.section:nth-child(odd) {margin-left: 25%;}
.section:nth-child(even) {margin-right: 25%;}
.section:nth-child(3) {margin-top: -7%; }
.section:nth-child(4) {margin-top: -3%; }




.section h2 {
    color: #b49ac5;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid #624a72;
    padding-left: 1rem;
}

.Row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 3vw;
    width: 100%;
}

#scare {
    width:50%; 
    aspect-ratio:2/1.5;
}


.scene {
    margin: 0;
    opacity: 0;
    width: 20vw;
    height: 10vw;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    perspective: 600px;
}

.scene.active {
    opacity: 1;
    transform: translateY(0);
}



.card {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    position: relative;
  
  
    animation: flipCard 2s infinite ease-in-out; 
}

  
  
  
.card__face {
    position: absolute;
    width: 100%;
    height: 100%;
    line-height: 260px;
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 40px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
  
.card__face--front {
    background-image: url("../resource/insane.gif");
    background-size: cover;
}
  
.card__face--back {
    background-image: url("../resource/insane1.gif");
    background-size: cover;
    transform: rotateY(180deg);
}


@keyframes flipCard {
    0% {
      transform: rotateY(0deg);
    }
    50% {
      transform: rotateY(180deg);
    }
    100% {
      transform: rotateY(360deg); 
    }
}

@media screen and (max-width: 1920px){
    #background {
        width: 1920px;
    }
}


a{
    color: white;
    text-decoration: none;
    font-size: 2rem;
    transition: all 0.3s ease;
}

a:hover {
    transform: translateY(-3px);
    text-shadow: 0 4px 20px rgb(217, 236, 255);
    
}


#Link {
    display: flex;
    justify-content: center;
}

img {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.02); 
}




@media screen and (max-width: 1200px){


    .Row {
        flex-direction: column;
    }

    #scare, .scene {
        width:80%;
        aspect-ratio:none;
    }

    .scene {
        height: 30vw;
    }

}

@media screen and (max-width: 768px){
    body {
        padding-top: 60px;
    }

    .section {
        width: 90% !important;
        margin: 60px auto !important;
    }
}