/* =================== LINKING FONT =========================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins' ,sans-serif;
}

:root {
     --bg-color: #000430;
     --input-color: #112e42;
     --main-color: #00abf0;
     --hover-color: rgb(192, 64, 85);
     --footer-bg-color: #000;
}

body {
    background: var(--bg-color);
    color: var(--main-color);
}

body::-webkit-scrollbar {
    display: none;
}

h1 {
    text-align: center;
    margin: 100px auto 50px;
    font-weight: 600;
}

/* ================= LOADER ================= */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-text {
    position: absolute;
    bottom: 5px;
    color: var(--main-color);
    font-size: 4rem;
    text-align: center;
    font-weight: bolder;
}

.spinner {
    position: absolute;
    top: 50;
    width: 60px;
    height: 60px;
    border: 6px solid var(--main-color);
    border-top: 6px solid var(--bg-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-image {
    width: 100vh;   /* adjust size */
    height: auto;
    margin-bottom: 1rem;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

form {
    width: 90%;
    max-width: 600px;
    margin: auto;
    height: 80px;
    background: var(--input-color);
    display: flex;
    border-radius: 8px;
    align-items: center;
}

form input {
    flex: 1;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--main-color);
    font-size: 18px;
    padding: 0 30px;
}

form button {
    padding: 0 40px;
    height: 100%;
    background: var(--main-color);
    color: var(--input-color);
    font-size: 18px;
    border: 0;
    outline: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    cursor: pointer;
}

::placeholder {
    color: var(--main-color);
    font-size: 14px;
}

#show-more-btn {
    background: var(--main-color);
    color: var(--bg-color);
    border: 0;
    outline: 0;
    padding: 10px 20px;
    border-radius: 4px;
    margin: 10px auto 100px;
    cursor: pointer;
    display: none;
}

#search-result {
    width: 80%;
    margin: 100px auto 50px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 40px;
}

#search-result img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 5px;
}


/* ============================ FOOTER LAYOUT ========================= */
.footer{
    position: absolute;
    top: 2050%;
    width: 100%;
    margin-top: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background: var(--footer-bg-color);
    padding: 2rem 9%;
    text-align: center;
    gap: 1rem;
}

.footer a {
    text-decoration: none;
    color: var(--main-color);
}

.footer-text p{
    font-size: 16px;
    color: var(--main-color);
}

.footer span {
    color: var(--main-color);
    font-size: 16px;
    margin: 0 0;
    cursor: pointer;
}

.footer span:hover {
    color: var(--hover-color);
}





/* ======================= MEDIA QUARIES ===============  */
/* ============== BREAKPOINT =============== */
/* ================= TABLET ================= */
@media (max-width: 768px){

    h1{
        font-size: 26px;
        margin: 80px 20px 40px;
    }

    form{
        width: 90%;
        height: 65px;
    }

    form input{
        font-size: 16px;
        padding: 0 20px;
    }

    form button{
        padding: 0 25px;
        font-size: 16px;
    }

    #search-result{
        width: 90%;
        grid-template-columns: 1fr 1fr;
        grid-gap: 25px;
        margin: 60px auto 40px;
    }

    #search-result img{
        height: 200px;
    }
}


/* ================= MOBILE ================= */
@media (max-width: 480px){

    h1{
        font-size: 22px;
        margin: 70px 15px 30px;
    }

    form{
        width: 95%;
        height: 55px;
    }

    form input{
        font-size: 14px;
        padding: 0 15px;
    }

    form button{
        padding: 0 15px;
        font-size: 14px;
    }

    #search-result{
        width: 95%;
        grid-template-columns: 1fr 1fr; /* 2 images per row */
        grid-gap: 15px;
        margin: 50px auto 30px;
    }

    #search-result img{
        height: 150px;
    }

    #show-more-btn{
        padding: 8px 18px;
        font-size: 14px;
    }
}

/* ================= RESPONSIVE LOADER ================= */

@media (max-width: 768px) {

    .loader-image {
        width: 70vh;
    }

    .spinner {
        width: 50px;
        height: 50px;
        border-width: 5px;
    }

    .loader-text {
        font-size: 2.5rem;
        bottom: 70px;
    }
}

@media (max-width: 480px) {

    .loader-image {
        width: 60vh;
    }

    .spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }

    .loader-text {
        font-size: 1.8rem;
        bottom: 120px;
    }
}

@media (max-width: 295.99px) {
    body, html {
        display: none;
    }
}
