body {
    margin: 0;
}

/* ================= Loader ================= */
#loader {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    background: linear-gradient(0deg, rgba(255, 61, 0, 0.2) 33%, #ff3d00 100%);
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.loader::after {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}


.body {
    margin: 0;
    background: #005066;
    font-family: Segoe UI, sans-serif;
    text-align: center;
    color: #fff;
}



/* animation */
.anim {
    opacity: 0;
    transform: translateY(30px);
    animation: moveup 0.5s linear forwards;
}

@keyframes moveup {
    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

.title {
    /* margin-top: 35px; */
    font-size: 20px;
    padding-top: 35px;
}

/* search */
#searchInput {
    width: 320px;
    padding: 12px;
    margin: 20px auto;
    border-radius: 4px;
    border: none;
    font-size: 14px;
}

/* filter buttons */
.filter-btns {
    margin-bottom: 20px;
}

.filter-btns button {
    padding: 8px 18px;
    margin: 5px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.filter-btns .active {
    background: #ff8a00;
    color: white;
}

.templates {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    padding: 20px 80px;
    animation: moveup 1s linear forwards;
}

.template {
    /* background: white; */
    height: 550px;
    cursor: pointer;
    position: relative;
    transition: 0.3s;
    border-radius: 4px;
    overflow: hidden;
}

.template img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.template:hover {
    transform: scale(1.03);
}

.select-btn {
    position: absolute;
    bottom: 130px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff8a00;
    color: white;
    border: none;
    padding: 12px 26px;
    font-size: 14px;
    cursor: pointer;
    display: none;
    font-weight: bold;
}

.template.active {
    outline: 5px solid #00aaff;
}

.template.active .select-btn {
    display: block;
}

/* responsive */
@media(max-width:992px) {
    .templates {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:600px) {
    .templates {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media(max-width:425px) {
    .templates {
        padding: 0px 20px;
    }
}