@import url('https://fonts.googleapis.com/css2?family=Nunito&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    background: whitesmoke;
}

button {
    padding: 8px;
    outline: none;
    cursor: pointer;
    border: 1px solid lightgray;
    border-radius: 5px;
    background: whitesmoke;
}

button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.container {
    width: 1280px;
    margin: auto;
}

header {background-color: #fff;}

#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
    padding: 0 20px;
    background: #fff;
}

#header button {
    font-family: inherit;
    border: 1px solid red;
}

#create_card {
    display: none;
    width: 370px;
    margin:auto;
    padding: 20px;
    margin-top: 10px;
    background: whitesmoke;
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.9);
}

#create_card h2 {
    color: black;
    text-align: center;
}

#create_card textarea {
    width: 100%;
    border-radius: 5px;
    font-family: inherit;
    border: 1px solid lightgray;
    resize: none;
}

#create_card button {width: fit-content;}

#flashcards {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    margin: auto;
    margin-top: 10px;
    padding: 0px 10px;
}

.flashcard {
    width: 370px;
    height: 200px;
    word-wrap: break-word;
    margin: 10px; 
    background:#fff;
    cursor: pointer;
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.9);
    position: relative;
}

.flashcard h2 {font-size: 1rem;}

.fa-minus {
    top: 3%;
    right: 2%;
    position: absolute;
    color: #1a1a1a;
    transition: 0.3s ease-out;
}

.fa-minus:hover {color: red;}

@media(max-width:1280px) {
    .container{width: 100%;}
}

@media(max-width:768px) {
   .flashcard{margin: auto;}

    .flashcard{
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

@media(max-width:480px) {
    #header {
        padding: 20px;
        gap: 10px;
        flex-direction: column;
        align-items: center;
    }

    #create_card{width: 95%;}

    .flashcard{width: 100%;}
}