body {
    display: flex;
    flex-direction: column;
    min-height: fit-content;
}

#menu{
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

#create_post_button {
    position: fixed; 
    bottom: 50px;    
    right: 50px;   
    height: 90px;    
    width: 90px;
    border-radius: 50%;
    background: url("/create_post") no-repeat center center; 
    background-size: 130px 130px;
    background-position-y: -22px;
    background-position-x: -19px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); 
    border: none; 
    cursor: pointer; 
    z-index: 1000; 
    transition: all 0.3s ease;
}

#create_post_button:hover {
    transform: scale(1.1);
    background-color: #f1f1f1;
}

#all_subjects_container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
}

#all_subjects_list{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 50px;
    padding: 10px;
}

.all_subjects_item{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bolder;
    margin: 50px;
    padding: 10px;
    width: 200px;
    height: 250px;
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.category_cards{
    display: flex;
    flex-wrap: wrap;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    margin: 50px;
    padding: 10px;
    width: 210px;
    height: 260px;
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s;
    transition: all 0.3s ease;
}

.category_cards:hover{
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    background-color: rgb(242, 242, 242);
}

.category_title{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 40px;
    font-size: 25px;
    font-weight: bold;
}

.category_description{
    font-size: 15px;
    margin: 20px;
}

.clickable_container{
    cursor: pointer;
}

#questionsList{
    display: flex;
    flex-direction: column;
    margin: 10px;
    animation: fadeIn 0.5s;
}

.question_checked {
    position: absolute;
    display: none;
    background: url("/checked");
    background-size: auto;
    background-size: auto;
    background-size: auto;
    background-size: cover;
    width: 55px;
    height: 45px;
    left: 100px;
    top: 10px;
}

.question_count, .question_count_all{
    position: absolute;
    margin-left: 220px;
    margin-top: -20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 180px;
    background-color: var(--darkblue);
    font-size: 20px;
    font-weight: bold;
}

#create_post_container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    width: fit-content;
    height: fit-content;
    margin-top: 30px;
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#black_background{
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.699);
    z-index: 1000;
    animation: fadeIn 0.3s;
}

#cross{
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    top: 15px;
    right: 20px;
    width: 100px;
    height: 50px;
    color: gray;
    cursor: pointer;
}

#cross:hover{
    color: red;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes threeSixty {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Media Queries for Phones */
@media (max-width: 600px) {
    #menu {
        flex-direction: column;
        align-items: center;
    }

    #create_post_button {
        bottom: 70px;
        right: 20px;
        height: 70px;
        width: 70px;
        background-size: 110px 110px;

    }

    #all_subjects_container {
        margin-top: 20px;
        margin-bottom: 100px;
    }

    #all_subjects_list, .all_subjects_item, .category_cards {
        margin: 20px;
        padding: 5px;
        width: 100%;
        height: auto;
    }

    .category_title {
        font-size: 20px;
    }

    .category_description {
        font-size: 14px;
        margin: 10px;
    }

    #questionsList {
        margin: 5px;
    }

    .question_count, .question_count_all {
        margin-left: 85vw;
        margin-top: -15px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    #create_post_container {
        width: fit-content;
        height: auto;
        padding: 5px;
    }

    #cross {
        top: 10px;
        right: 10px;
        width: 80px;
        height: 40px;
    }
}
