body {
    padding: 0;
    margin: 0;
    background-color: rgb(17, 121, 196);
    font-family: Arial, Helvetica, sans-serif;
    color: white;
}

body * {
    transition: 0.2s all cubic-bezier(0.075, 0.82, 0.165, 1)
}

header {
    height: 64px;
    background: linear-gradient(rgb(34, 100, 144), rgb(33, 68, 98));
    display: flex;
    align-items: center;
}

.logo {
    background-image: url('kewlgames.webp');
    aspect-ratio: 223/42;
    width: 192px;
    background-repeat: no-repeat;
    background-size: contain;
}

header .logo {
    margin-left: 20px;
    margin-top: 4px;
}

#games-grid-container {
    box-sizing: border-box;
    width: 98%;
    padding: 10px 0px;
    margin: 0px auto;
}

#games-grid-container .games-grid {
    width: 100%;
    min-height: 100%;
    position: relative;
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(224px, 1fr));
    grid-auto-rows: 1fr;
    gap: clamp(2px, 1vw, 4px);
}

.games-grid div {
    cursor: pointer;
    aspect-ratio: 16/9;
    background-color: red;
    width: 100%;
    background-size: cover !important;
    border-radius: 4px;
    border-bottom: 1px rgb(62, 78, 96) solid;
}

.games-grid div p {
    background: linear-gradient(rgba(0, 0, 0, 0.75), transparent, transparent);
    border-radius: 4px;
    margin: 0;
    padding: 8px;
    height: 100%;
}

.games-grid div:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px 4px rgba(0, 0, 0, 0.526);
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

button {
    box-sizing: border-box;
    min-height: 26px;
    min-width: 26px;
    border: none;
    margin: 2px;
    border-radius: 4px;
    background-color: rgb(255, 159, 43);
    border-bottom: 1px solid rgba(255, 238, 164, 0.288);
    color: black;
}

button:hover {
    background-color: rgb(255, 185, 88);
    cursor: pointer;
}

button:disabled {
    background-color: rgb(147, 109, 56);
    cursor: auto;
}

.header-centered-container {
    position: absolute;
    width: 100%;
}

.playmode-button {
    width: 48px;
    border-radius: 12px;
    background-color: rgb(33, 57, 72) !important;
}

.playmode .on:before {
    content: '';
    width: 17px;
    height: 16px;
    background-color: rgb(255, 159, 43);
    border-bottom: 1px solid rgba(255, 238, 164, 0.288);
    border-radius: 8px;
    position: absolute;
    top: 6px;
    left: auto;
    animation: 0.3s playmode-off-animation forwards cubic-bezier(0.075, 0.82, 0.165, 1);
}

.playmode .off:before {
    content: '';
    width: 17px;
    height: 16px;
    background-color: rgb(255, 159, 43);
    border-bottom: 1px solid rgba(255, 238, 164, 0.288);
    border-radius: 8px;
    position: absolute;
    top: 6px;
    left: auto;
    animation: 0.3s playmode-on-animation forwards cubic-bezier(0.075, 0.82, 0.165, 1);
}

@keyframes playmode-on-animation {
    0% {
        transform: translateX(3px);
    }

    100% {
        transform: translateX(-20px);
    }
}

@keyframes playmode-off-animation {
    0% {
        transform: translateX(-20px);
    }

    100% {
        transform: translateX(3px);
    }
}

.playmode-container {
    margin-left: 2px;
    display: flex;
    align-items: center;
    background-color: rgb(25, 42, 68);
    border-radius: 16px;
    padding: 0 6px 0 6px;
    border-bottom: 1px solid rgba(164, 185, 255, 0.288);
    font-size: 13px;
}

body.playenter, body.playenter > header{
    animation: 0.2s playmode-enter forwards; 
}

body.playenter .games-grid div, body.playenter .header-centered-container{
    animation: 0.2s playmode-enter-game forwards;
}

@keyframes playmode-enter {
    100% {
        filter:brightness(0.55) contrast(1.2);
        background-color: black;
    }
}

@keyframes playmode-enter-game {
    0% {
        opacity: 100%;
    }
    100% {
        opacity: 0%;
    }
}