/* ------------------------- Reset ------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --b-color: #333;
    --c-color: rgb(102, 184, 102);
}

body {
    display: grid;
    font-family: sans-serif;
    background: #fff;
}

/* ------------------------- Loader Animation ------------------------- */
.ballUpandDown {
    display: flex;
    height: 100vh;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.ballUpandDown.block {
    display: none;
}

.ballUpandDown .ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--c-color);
    border: 1px solid var(--b-color);
    animation: jump 1s infinite alternate;
}

.ballUpandDown .ball:nth-child(1) { animation-duration: 0.8s; }
.ballUpandDown .ball:nth-child(2) { animation-duration: 1.2s; }
.ballUpandDown .ball:nth-child(3) { animation-duration: 1.5s; }

.ball.hide {
    display: none;
    width: 0;
    height: 0;
}

@keyframes jump {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

/* ------------------------- Container & Search Bar ------------------------- */
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 5em;
    gap: 30px;
    width: 100%;
    opacity: 0;
    transform: scale(0);
    transition: all ease-in-out 1s;
    display: none;
}

.container.add {
    display: flex;
    transform: scale(1);
    opacity: 1;
}

.container .heading {
    position: relative;
    padding: 10px;
}

.container .heading::after {
    content: '';
    position: absolute;
    left: 4em;
    bottom: 0;
    background: #333;
    width: 50%;
    height: 5px;
    border-radius: 50px;
}

.container .heading::before {
    content: '';
    position: absolute;
    bottom: -0.4em;
    left: 6.8em;
    background: var(--c-color);
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid #fff;
    z-index: 1;
}

.container .heading h1 span {
    color: var(--c-color);
}

.container .searchBar {
    display: flex;
    width: 50%;
    justify-content: center;
    align-items: center;
    position: relative;
}

.container .searchBar input {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid lightgrey;
    outline: none;
}

.container .searchBar button {
    padding: 15px;
    border: none;
    border-radius: 10px;
    position: absolute;
    right: 0;
    background: var(--b-color);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}


.profiles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px;
    opacity: 0;
    transition: all 0.5s ease-in-out;
}

.profiles.adda {
    display: flex;
    opacity: 1;
}

.profiles .box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-align: center;
    width: 400px;
    height: 400px;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: scale(0) rotate(45deg);
    transition: all ease-in-out 0.8s;
}

.box.boxAdd {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    width: 400px;
    height: 400px;
}

.profiles .box::after {
    content: '';
    position: absolute;
    top: 0;
    left: -8em;
    width: 300px;
    height: 100px;
    background: var(--c-color);
    transform: rotate(-45deg);
    z-index: -1;
}

.profiles .box::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: rgb(231,230,230);
    z-index: -2;
    transition: all ease-in-out 0.9s;
}

.profiles .box:hover::before {
    height: 100%;
}

.profiles .box img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid #333;
    object-fit: cover;
}

.profiles .box img:hover {
    animation: borde 3s infinite;
}

@keyframes borde {
    0%   { 
        border: 3px solid #333; 
    }
    50%  { 
        border: 10px solid #a19f9f; 
    }
    100% {
         border: 20px solid #e9e7e7; 
        }
}

.profiles .box a {
    display: inline-block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
    font-weight: 800;
    color: #333;
    background: transparent;
    transition: color 0.3s ease;
}

.profiles .box a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    background: #333;
    border-radius: 50%;
    z-index: -1;
    transition: all 0.5s ease-in-out;
}

.profiles .box a:hover {
    color: #fff;
}

.profiles .box a:hover::after {
    width: 100%;
    border-radius: 0;
}


@media (max-width: 900px) {
    .container .searchBar { width: 60%; }
    .box.boxAdd{
        width: 100%;
    }
}

@media (max-width: 600px) {
    .container .searchBar {
         width: 100%; 
        }
    input {
         width: 100%;
         }
    .box.boxAdd{
        width: 100%;
    }
}

@media (max-width: 400px) {
        .box.boxAdd{
        width: 100%;
    }
}

@media (max-width: 200px) {
        .box.boxAdd{
        width: 100%;
    }
}
