@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background-color: hsl(230, 17%, 14%);
    padding: 0 10vw;
}

.white {
    background-color: white;
}

body::after {
    content: "";
    width: 100%;
    height: 30%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: hsl(232, 19%, 15%);
    border-radius: 0 0 30px 30px;
    z-index: -1;
}

body.white::after {
    background-color: #F8F9FE;
}

h1, h2, h3 {
    color: white;
}

.light_head {
    color: black;
}

h2 {
    margin-bottom: 25px;
    font-size: 1.6rem;
}

.para {
    color: hsl(228, 34%, 66%);
    font-weight: 700;
}

.headingtwo {
    color: hsl(228, 12%, 44%);
}

.green_arrow {
    position: relative;
    color: hsl(163, 72%, 41%);
    font-weight: 700;
}

.green_arrow::before {
    content: url(./images/icon-up.svg);
    position: absolute;
    bottom: 20%;
    left: -10px;   
}

.red_arrow {
    position: relative;
    color: hsl(356, 69%, 56%);
    font-weight: 700;
}

.red_arrow::before {
    content: url(./images/icon-down.svg);
    position: absolute;
    bottom: 10%;
    left: -10px;   
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 0;
}

nav h1 {
    font-size: 1.87rem;
}

nav p {
    font-weight: 700;
}

nav div {
    display: flex;
    align-items: center;
}

nav button {
    position: relative;
    margin-left: 10px;
    width: 45px;
    height: 22px;
    border: none;
    outline: none;
    border-radius: 22px;
    background-image: linear-gradient(to right, hsl(210, 78%, 56%), hsl(146, 68%, 55%));
    cursor: pointer;
}

nav button:hover {
    background-image: linear-gradient(to right, hsl(210, 78%, 56%), hsl(146, 68%, 55%));
}

.switch {
    background-image: linear-gradient(to right, hsla(228, 12%, 44%, 0.4), hsla(228, 12%, 44%, 0.4));
}

nav button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background-color: hsl(230, 17%, 14%);
}

nav button.switch::after {
    left: 25px;
    background-color: hsl(0, 0%, 100%);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.square_card {
    height: 250px;
    background-color: hsl(228, 28%, 20%); 
    text-align: center;
    border-radius: 5px;
    padding: 0 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

.square_card:hover {
    background-color: #333A56; 
}

.square_card.hovereffect:hover {
    background-color: #E1E3F0; 
}

.square_card:nth-of-type(1) {
    border-top: 4px solid hsl(208, 92%, 53%);
}

.square_card:nth-of-type(2) {
    border-top: 4px solid hsl(203, 89%, 53%);
}

.square_card:nth-of-type(3) {
    position: relative;
}

.square_card:nth-of-type(3)::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-image: linear-gradient(to right, hsl(37, 97%, 70%), hsl(329, 70%, 58%));
    border-radius: 5px 5px 0 0;
}

.square_card:nth-of-type(4) {
    border-top: 4px solid hsl(348, 97%, 39%);
}

.square_card h3 {
    font-weight: 700;
    font-size: 50px;
}

.square_card .follow {
    text-transform: uppercase;
    letter-spacing: 4px;
}

.username {
    display: flex;
    justify-content: center;
    align-items: center;
}

.username p {
    margin-left: 10px;
}

.rect_card {
    background-color: hsl(228, 28%, 20%);
    height: 120px;
    border-radius: 5px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.rect_card:hover {
    background-color: #333A56; 
}

.rect_card.hovereffect:hover {
    background-color: #E1E3F0; 
}

.bg {
    background-color: #F0F3FA;
}

.rect_card .view_pg {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rect_card h3 {
    font-size: 30px;
}

@media screen and (max-width: 600px) {
    nav {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
        padding: 2.5rem 0;
    }

    header {
        margin-bottom: 20px;
    }

    nav h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }
    
    nav div {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}





