* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}
.loadingcontainer{
position: fixed;
inset: 0;
background-color: black;
z-index: 999;
display: grid;
place-items: center;
animation: fadeOut 0.5s ease-in 2s forwards;
} 

@keyframes fadeOut {
    from {
        opacity: 1;
        visibility: visible;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.loading{
width: 50px;
height: 50px;
border-radius: 50%;
border: 5px solid blue;
animation: spin 1s linear infinite;
border-top: 5px solid white;
} 

@keyframes spin{
    0%{transform:rotate(0deg);}
    100%{transform:rotate(360deg);}

}
ul{
    list-style: none;
}

a{
    text-decoration: none;
    color: inherit;
}
a:hover,
a:focus{
    color: orange;
    transition: color 0.5s;
}


body{
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 60px;
    text-align: center;
}

.header{
    background-color: rgb(177, 229, 179);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 400;
} 

.header_content{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    height: 60px;
}

.nav{ 
 transition: all 0.4s ease-in-out;
}

.logo{
    color: black;
    font-size: 23px;
    letter-spacing: -1.5px;
    font-weight: 500;

}


.nav_list{
 display: flex;
 column-gap: 40px;
}



.nav_link{
 color: rgba(0, 0, 0, 0.60);
 font-size: 15px;
 transition: all 0.5s ease-in;
}

.nav_link:hover,
.nav_link:focus {
    color: rgba(0, 0, 0, 1);

}
.hamburger{
    display: none;
    cursor: pointer;

}

.bar{
 list-style: none;
 height: 2px;
 width: 27px;
 background:  black;
 margin: 5px 0;
 opacity: 0.8;
 transition: all 0.3s ease-in-out;
}
.nav_open{
    transform: translate(0) !important;
}
.hamburger_open .bar:nth-child(1){
    transform: translateY(7px) rotate(45deg);
}
.hamburger_open .bar:nth-child(2){
 opacity: 0;
}
.hamburger_open .bar:nth-child(3){
  transform: translateY(-7px) rotate(-45deg) ;
}
.title{
    display: grid;
    place-items: center;
    background-color: #6f9b93;
    height: 90px
}
h1{
    background-color: #6f9b93;
    text-align: center;
    padding-left: 10px;
    color: yellow;
}
h2{
    padding-bottom: 20px;
}
p{
    padding-bottom: 20px;
}



@media(max-width: 600px){
   .nav{
    position: fixed;
    top: 60px; 
    left: 0;
   background-color: rgb(177, 229, 179);
    width: 100%;
    padding: 10px 0 25px;
    transform: translateX(-100%);
   }
   .nav_list{
     flex-direction: column;
     align-items: center;
     row-gap: 20px;
   }
   .nav_link{
    font-size: 14px;
   }

   .hamburger{
    display: block;
   }
}
.list{
 cursor: pointer;
 background: none;
 border: none;
}

.list h2{
    display: inline-block;
    margin: 0;
}

.arrowtoggle{ 
    margin-left: 2px;
    display: inline-block;
    transform: rotate(90deg);
    font-size: 24px;
    font-weight: bold;
    transition: transform 0.5s ease-in;
}

.arrowtoggle.arrow-open{
    transform: rotate(-90deg);
}

.list:hover h2, 
.list:hover .arrowtoggle{
    color: orange;
    transition: 0.5s ease-in;
}
@keyframes rgbLights{
    0%{border-color: red}
    25%{border-color: green}
    75%{border-color: blue}
}

.game-nav.open{
    display: grid;
    max-height: 300px;
    transition: max-height 1s ease-out;
}
.game-nav{
    max-height: 0;
    overflow: hidden;
    margin-bottom: 20px;
    transition: max-height 1s ease-out;
    display: grid;
    grid-template-columns: repeat(4,1fr);
    justify-items: center;
    column-gap: 10px;
}
.game-nav img{
   width: 100%;
   object-fit: cover;
}

.game-nav img:hover{
    cursor: pointer;
    border-style: solid;
    border-width: 5px;
    animation: rgbLights 1s linear infinite;
}
#games{
    display: grid;
    justify-items: center;
    margin-bottom: 20px;
}
#games > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#games > *.is-visible {
    opacity: 1;
    transform: translateY(0);
}


.reddead2{
    background-color: #e9c8c8; 
    border-radius: 10px;
    padding: 15px;
    box-shadow: 5px 5px 10px #888888;
    margin-left: auto;
    margin-right:auto;
    margin-bottom: 20px;
}

.diablo{
    background-color: #ea9a61; 
    border-radius: 10px;
    padding: 15px;
    box-shadow: 5px 5px 10px #888888;
    margin-left: auto;
    margin-right:auto;
    margin-bottom: 20px;
}

.gta{
    background-color: #c9bebe; 
    border-radius: 10px;
    padding: 15px;
    box-shadow: 5px 5px 10px #888888;
    margin-left: auto;
    margin-right:auto;
    margin-bottom: 20px;
}

.infinity{
    background-color: #c0e9ee; 
    border-radius: 10px;
    padding: 15px;
    box-shadow: 5px 5px 10px #888888;
    margin-left: auto;
    margin-right:auto;
    margin-bottom: 20px;

}

:is(.reddead2, .diablo, .gta, .infinity) {
    text-align: left;
}

#gametitle img{
  max-height: 200px;
  width: auto;
  height: auto;
}

#gametitle img:hover{
    cursor: pointer;
    border-style: solid;
    border-width: 5px;
    animation: rgbLights 1s linear infinite;
}

#gametitle{
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 20px ;
    align-items: center;
}
 
#gametitle p{
    background-color: white; 
    border-radius: 10px;
    padding: 15px;
    max-width: 500px;
    max-height: 225px;
    text-align: left;
    margin-bottom: 35px;
    overflow-y: auto;
}

#gallery{
    display: grid;
    grid-template-columns: auto auto auto auto;
    gap: 3rem;
}

#gallery img{
  width: 100%;
  object-fit: cover;
  aspect-ratio: 16/9;
}
#gallery img:hover{
    cursor: pointer;
    border-style: solid;
    border-width: 5px;
    animation: rgbLights 1s linear infinite;
}
h3{
    margin-bottom: 25px;
}



@media(min-width: 1200px){
:is(.reddead2,.diablo,.gta,.infinity){
    max-width: 50%;
}
}

@media(min-width: 1000px){
:is(.reddead2,.diablo, .gta, .infinity){
    max-width: 60%;
}


}

@media(min-width: 800px){
 :is(.reddead2,.diablo, .gta, .infinity){
 max-width: 70%;
 }
}

@media (max-width: 600px) {
    .game-nav{
        width: 100%;
        overflow-x: scroll;
        grid-template-columns: repeat(4,50%);
    }
    #gallery{
        width: 100%;
       overflow-x: scroll;
       grid-template-columns: repeat(4,50%);
    }
    #gametitle{
        grid-template-columns: 1fr;
        justify-items: center;
    }
    #gametitle figure{
        margin-bottom: 10px;
    }
    .game-nav img{
        width: 100%;
}
}

dialog{
    display: none;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    border: none;
    margin: auto;
    padding: 0;
    transition: all 0.4s ease-out allow-discrete;
    place-items: center;

}
dialog[open] {
    display: grid;
    opacity: 1;
    transform: scale(1) translateY(0);
}
@starting-style{
    dialog[open] {
        opacity: 0;
        transform: scale(1) translateY(20px);
    }
}

dialog::backdrop{
    background-color: rgb( 0 0 0 / 0);
    transition: all 0.4s ease-out, display 0.4s allow-discrete, overlay 0.4s allow-discrete;

}
@starting-style{
 dialog[open]::backdrop{
    background-color: rgb( 0 0 0 / 0); ;
}
}
dialog[open]::backdrop{
    background-color: rgb(0 0 0 / 0.8);
}
dialog button{
    background: none;
    border: 2px solid darkorchid;
    color: darkorchid;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    padding: 0.482rem;
}

dialog form{
    width: 100%;
    text-align: center;
    padding: 0 1.2 0.6rem;
}
dialog button:hover{
    background-color: darkorchid;
    color:white
}

dialog button:active{
    transform:scale(0.95);
}

dialog button:focus{
    outline: none;
    border-color: darkorchid;
}

dialog img{
  max-width: 100%;
  width: 100%;
  max-height: 80vh;
}

footer{
    background-color: rgb(177, 229, 179);
}

footer p{
    padding: 15px;
    
}