/*/////////////// Fonts //////////////////////*/
@font-face {
    font-family: 'SubwayLogo';
    src:
            url('../fonts/Subway Logo.ttf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Archive-Regular';
    src:
            url('../fonts/Archive-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/*////////////// Root & Body ///////////////*/

:root{
    --background: #201440;
    --font: #e5e8ff;
    --animation-font: black;
    --bars-gradient: linear-gradient(180deg, #673d92, #44188d);
    --boxes: #aa54ed;
    --hover-boxes: #7c3dad;

}

body{
    background-color:  var(--background);
    color: var(--font);
    margin: 0;
    padding: 0;
    overflow-x: hidden ;
}

h1, h2{
    font-family: 'SubwayLogo', sans-serif;
    letter-spacing: 0.1rem;
}

button{
    font-family: 'Archive-Regular', sans-serif;
}

/*///////////////HEADER/////////////////////*/

.codeAnimationHeader {
    position: relative;
    width:100%;
}

.codeAnimationHeader h1{
    margin: 0.625rem;
    text-align: center;
    font-size: clamp(2rem, 8vw, 5rem);
    width: 100%;
}

.codeAnimationHeader button{
    position: absolute;
    right: clamp(1rem, 5vw, 3.125rem);
    top: 50%;
    transform: translateY(-50%);
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.75rem, 3vw, 1.5625rem);
    background-color: var(--boxes);
    border: 0.1rem solid rgb(50, 50, 50);;
    border-bottom: 0.2rem solid rgb(50, 50, 50);
    box-shadow: 0 0.05rem 0.3rem 0 rgb(158, 129, 254);
    border-radius: 1.875rem;
    cursor: pointer;
    font-size: clamp(0.875rem, 2vw, 1.25rem);
    transition: background 0.2s;
    color: var(--font);
    white-space: nowrap;
}

.codeAnimationHeader button:hover{
    background-color: var(--hover-boxes);
}

.codeAnimationHeader button:active {
    transform: translateY(-50%) translate(0, 0);
    border-bottom: 0.125rem solid rgb(50, 50, 50);
}

/*////////////////Category bar///////////////////*/

.category {
    background: var(--bars-gradient);
    padding: 0.5rem 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

.category h2 {
    text-align: left;
    padding-left: 1rem;
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 4rem);
}

/*////////////////Boxes///////////////////*/
.animation-grid h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.animation-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
}

.animation-box {
    padding: 3rem 1.5rem 3rem 1.5rem;
    background-color: var(--boxes);
    border-radius: 2rem;
    border: 0.125rem solid rgb(50, 50, 50);
    border-bottom: 0.3125rem solid rgb(50, 50, 50);
    box-shadow: 0 0.0625rem 0.375rem 0 rgb(158, 129, 254);
    transform: translate(0, -3px);
    cursor: pointer;
    font-size: 1.5rem;
    transition: background 0.1s;
    transition-timing-function: linear;
    color: var(--font);
    text-align: center;
}

.animation-box:hover {
    background-color: var(--hover-boxes);
}

.animation-box:active {
    transform: translate(0, 0);
    border-bottom: 0.125rem solid rgb(50, 50, 50);
}
.animation-box-exercise {
    background-color: rgba(170, 84, 237, 0.57);
    color: #9EED53;
}

/*////////////////Explanation///////////////////*/
#explanation{
    margin: 50px;
}

#explanation p{
    padding: 10px 25px;
    max-width: 500px;
}

li p{
    padding-left: 20px;
    display: none;
}

#explanationLayoutBox{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 20px;
}

#basics{
    flex: 1;
    max-width: 300px;
    padding: 20px;
}

#explanationContainer{
    flex: 2;
    padding: 20px;
}

/*/////////////Responsiveness/////////////////////*/

@media (max-width:1170px) {

    /*////////header/////////////*/

    .codeAnimationHeader {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .codeAnimationHeader button {
        position: static;
        transform: none;
        margin: 1rem auto;
        display: block;
    }

}

@media (max-width: 768px) {
    .animation-boxes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .animation-boxes {
        grid-template-columns: 1fr;
    }
}





