body,
html,
* {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: "Rubik", sans-serif;
    background-color: #222;
    overflow-x: hidden;
    overflow-y: scroll;
    margin: 0;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    color: #fff;
}

.page {
    min-height: 100vh;
    height: auto;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    margin: 0 !important;
    padding: 10px;
    background: #222;
    overflow: scroll;
}

#backgroundCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    z-index: 0;
}

.card {
    font-family: 'Arial', sans-serif;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95vw;
    max-width: 450px;
    aspect-ratio: 1.59;
    border-radius: min(30px, (95vw / 18));
    background: linear-gradient(135deg, #111, #333, #222);
    color: #1B1F23;
    background-position: 50% 50%;
    background-size: 200% 200%;
    box-shadow: 10px 10px 100px rgba(255, 255, 255, .2);
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.4), transparent);
    mix-blend-mode: overlay;
    pointer-events: none;
}


.card .bt {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-weight: 900;
    text-align-last: right;
    font-size: 20px;
    
    display: flex;
    align-items: center;
    cursor: pointer;
}

.card .title {
    position: relative;
    font-weight: 900;
    font-size: 40px;
    margin-left: 20px;
    align-items: left;
    cursor: default;
}

.card .card-btns-container {
    position: absolute;
    height: 20px;
    bottom: 10px;
    left: 10px;
    width: 60%;
    height: 32px;
    overflow-y: hidden;
    overflow-x: scroll;
    display: flex;
}

svg {
    margin-right: 10px;
    padding: 0;
    cursor: pointer;
}

.top-part {
    position: absolute;
    left: 50%;
    top: 20px;
    transform: translate(-50%, 0) scale(0.8);
    height: 60px;
    background: linear-gradient(135deg, #111, #333, #222);
    border: solid 2px #666;
    justify-content: center;
    display: flex;
    gap: 12px;
    border-radius: 100px;
    overflow-x: auto;
    padding: 0 16px;
    scroll-padding: 0 10px;
    opacity: 0;
    transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.2, 2), opacity 0.1s ease-out;
    z-index: 2;
}

.top-part::-webkit-scrollbar {
    display: none; /* hides scrollbar */
}

.top-part button {
    background: rgba(50, 50, 50, .1);
    border: solid 3px #333;
    border-radius: 50px;
    height: 50px;
    color: #fff;
    font-size: 20px;
    padding: 10px 20px;
    margin-top: 5px;
    font-weight: 900;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.2, 2), background 0.1s ease-in;
}

.top-part button:hover {
    background: rgba(50, 50, 50, .6);
    transform: scale(1.05);
}

.top-part button:active {
    background: rgba(128, 128, 128, .9);
    transform: scale(1.15);
}

.top-part button:first-child {
    margin-left: -10px;
}
.top-part button:last-child {
    margin-right: -10px;
}

.grid-container {
    margin-top: -20px;
    margin-left: -10px;
    padding-top: 30px;
    width: 100vw;
    gap: 15px;
    font-weight: 600;
    letter-spacing: -1px;
    line-height: -1px;
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-item {
    position: relative;
    background: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    aspect-ratio: 1;
    width: 300px;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.2, 2), background 0.3s ease-in, padding 0.2s ease-out;
    backdrop-filter: blur(2px);
    z-index: 10;
}

.grid-item:hover {
    background: rgba(50, 50, 50, 0.2);
    transform: scale(1.05) translateY(-15px);
    transition: transform 0.2s cubic-bezier(0.1, 0.8, 0.2, 2), background 0.1s ease-out, padding 0.2s ease-out;
}

.grid-item .see-more-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    background: rgba(50, 50, 50, .1);
    backdrop-filter: blur(10px) brightness(0.7);
    border: none;
    border-radius: 0px 10px 0px 10px;
    height: 30px;
    color: #fff;
    font-size: 20px;
    padding: 10px 20px 30px 20px;
    font-weight: 900;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 11;
    transition: all 0.2s cubic-bezier(0.1, 0.8, 0.2, 2);
}

.grid-item img {
    position: absolute;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: all;
    cursor: pointer;
}

@media (max-aspect-ratio: 1/1.25) {
    .grid-container {
        overflow-x: scroll;
        overflow-y: hidden;
    }

    .grid-item {
        max-width: 80vw;
        width: 80vw;
        max-width: 100%;
        box-sizing: border-box;
        height: 80vh;
        margin: 0;
    }

    .grid-item img {
        height: auto;
        width: 100%;
    }
}

@media (min-aspect-ratio: 1/1.25) {
    .grid-container {
        flex-wrap: wrap;
        overflow: hidden;
    }

    .grid-item {
        max-width: 80vw;
        width: 80vw;
        max-width: 100%;
        box-sizing: border-box;
        height: 40vh;
        margin: 0;
    }

    .grid-item:nth-child(odd) {
        border-radius: 0px 10px 10px 10px;
        align-self: flex-start;
    }

    .grid-item:nth-child(even) {
        border-radius: 10px 0px 0px 10px;
        align-self: flex-end;
    }

    .grid-item:nth-child(odd):hover {
        transform: scale(1.05) translateY(-15px) translateX(28px);
    }

    .grid-item:nth-child(even):hover {
        transform: scale(1.05) translateY(-15px) translateX(-28px);
    }
}

.grid-item .buttoncontainer {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: right;
    align-items: right;
    z-index: 2;
}

.grid-item .see-more-btn:hover {
    background: rgba(50, 50, 50, .3);
    transform: translateX(5px) translateY(-5px);
}

.grid-item .title {
    font-size: 2rem;
}

.subtext.date {
    position: absolute;
    bottom: 0;
    right: 0;
    text-align: right;
    padding: 10px;
    background: rgba(50, 50, 50, .4);
    backdrop-filter: blur(10px) brightness(0.7);
    border-radius: 10px 0 0 0;
}