*, *::after, *::before {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    transition: 500ms ease-in;
}
html {
    background-color: #000;
}
body {
    font-family: Arial, Helvetica, sans-serif;
    background-image: url(https://source.unsplash.com/TWz5tBpXyaE);
    background-size: cover;
    /* min-height: 100vh; */
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
main {
    height: 90%;
    width: 90%;
    background-color: rgba(0, 0, 0, 0.445);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem;
    padding: 0.5rem;

}
.nav {
    background-color: black;
    box-shadow: 0 0 2px #fff;
    overflow: hidden;
}
.todo-list {
    background-color: brown;
}
.nav .header-text {
    color: #fff;
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    padding: 1rem 0 1rem 0;
    position: relative;
}

.small-screen-icon {
    display: none;
}

.nav ul {
    list-style: none;
}
.nav ul li {
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem;
    height: 30px;
    display: flex;
    align-items: center;
}
.search-form input[type="search"] {
    width: 75%;
    height: 100%;
    border: none;
    padding: 0 1rem;
}
.nav ul li button {
    font-weight: bold;
    height: 100%;
    width: 25%;
    border: none;
    cursor: pointer;
    background-color: gold;
    border: 1px solid rgba(0, 0, 0, 0.384);
}
.nav ul li .addTodo {
    width: 100%;
    height: 100%;
    cursor: pointer;
}
 .textarea, .update {
    height: 10rem;
    padding: 0 auto;
    display: none;
    flex-direction: column;
    position: relative;
    align-items: center;
    margin: 0 1rem;

}
.box-close, .x-close {
    position: absolute;
    right: 0;
    color: brown;
    width: 30px;
    height: 10px;
    padding: 0.5rem;
    font-weight: 900;
    cursor: pointer;
}

.box-close:hover, .x-close:hover {
    color: gold;
}
nav .textarea input, nav .update input {
    width: 100%;
    border-radius: 10px;
    height: 10rem;
    word-wrap: wrap;
    padding: 1rem;
    outline: none;
    overflow: hidden;

}
.nav  .textarea button, .nav  .update button {
    margin: 1rem;
    width: 40%;
    background-color: gold;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.384);
    padding: 0.5rem 1rem;
    
    border-radius: 50px;
    box-shadow: 0 0 5px #fff;
}
.todo-list {
    width: 100%;
    /* list-style: none; */
    background-color: rgba(255, 255, 255, 0.452);
    height: 90vh;
    
}

.todo-list li {
    background-color: #fff;
    box-shadow: 0 0 8px rgba(61, 58, 58, 0.26);
    border-radius:  0 50px 50px 0;

    display: flex;
    justify-content: space-evenly;
    height: 3rem;
    align-items: center;
    margin: 1rem;
    
    
}
.state {
    display: flex;
    flex-direction: column;
    font-size: x-small;
    align-items: center;
    justify-content: space-between;
}
.todo-list li .checkbox {
    background: #fff;
    color: #fff;
    height: 25px;
    width: 25px;
    border-radius: 100%;
    border: 1px solid rgb(44, 165, 44);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.checkbox ion-icon {
    font-size: 2rem;
    pointer-events: none;
}

.todo-list li p {
    width: 65%;
    word-wrap: wrap;
    height: auto;
    padding-left: 0.5rem;
}
.todo-list button {
    padding: 0.3rem 1rem;
    cursor: pointer;
    border: none;
    border-radius: 50px;
    /* box-shadow: 0 0 4px rgb(61, 58, 58); */

}
.todo-list button + button {
    margin: 0 1rem;
}
.todo-list li input {
    width: 50px;
    background-color: brown;
}
.edit {
    background-color: green;
    color: #fff;
}
.delete {
    background-color: red;
    color: #fff;
}
.nav-bottom {
    background-color: #fff;
    margin: 1rem;
    box-shadow: 0 0 15px gold;
    display: flex;
    flex-direction: column;
}
.title {
    background: #fff;
    display: block;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 1rem 0;
}


.title {
    font-weight: 900;
    font-size: 1.3rem;
    text-transform: uppercase;
    text-align: center;
    color: brown;
    text-shadow: 0 0 5px gold;
    cursor: pointer;
    display: block;
}

.history {
    display: none;
    border-top: 2px solid rgba(165, 42, 42, 0.185);
    transition: height 500ms ease-in-out;
}
.show {
    display: block;
    transition: height 500ms ease-in-out;
    height: 10rem;

}
.nav .history li  p {
    text-decoration: line-through;
}
.search-form {
    display: flex;
    align-items: center;
    height: 2rem;
}
.restore {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 1rem;
    color: green;
    cursor: pointer;
    z-index: 1;
    
}
.restore ion-icon {
    font-size: 35px;
}
.restoreText {
    font-size: smaller;
}
.todo-list .addInfo {
    display: flex;
    justify-content: space-between;
    background: transparent;
    box-shadow: none;
}
.todo-list .addInfo div {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.473);
    padding: 0.5rem 1rem;
    border-bottom: 4px solid gold;
}
.todo-list .addInfo div .stat {
    font-weight: 900;
    font-size: 1.5rem;
    text-shadow: 0 0 2px gold;

}

.main-list {
    overflow-y: auto;
    padding: 0.3rem;
}
.state span.completed {
    background: green;
}

/* Responsiveness */

@media (min-width: 481px) and (max-width: 960px) {
    main {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
        height: 100%;
    }
.todo-list button + button {
    padding: 0.3rem;
}
.todo-list li {
    background-color: #fff;
    box-shadow: 0 0 8px rgba(61, 58, 58, 0.26);
    border-radius: 0;
    display: flex;
    height: 3rem;
    align-items: center;
    padding: 0;
    margin: 0;
}

.restore ion-icon {
    pointer-events: none;
    background-color: orange;
}
.todo-list li.todoItem div {
    padding: 1rem;
}
.control {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
}
.lg-screen-text {
    display: none;
}
.small-screen-icon {
    display: block;
}
}
@media (max-width: 480px) {
    main {
        display: flex;
        flex-direction: column-reverse;
        width: 100%;
        padding: 0;
        margin: 0;
        height: 100%;
    }
    .nav {
        background-color: black;
        box-shadow: 0 0 2px #fff;
        overflow: hidden;
        margin-bottom: 5px;
        padding-bottom: 15px;
    }
    
.nav .header-text {
    font-size:  1.5rem;
}

.nav-bottom {
    margin: 0;
    height: 100%;
}
.todo-list {
    flex-grow: 1;
}
.main-list {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.todo-list button + button {
    padding: 0.3rem;
}
.nav header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    top: 3%;
}
.header-text {
    letter-spacing: 2px;
}

.control {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
}
.textarea:not(:focus-within){
    display: none;
}
.todo-list li {
    background-color: #fff;
    box-shadow: 0 0 8px rgba(61, 58, 58, 0.26);
    border-radius: 0;
    display: flex;
    height: 3rem;
    align-items: center;
    padding: 0;
    margin: 0;
}
.todo-list li.todoItem div {
    padding: 1rem;
}
.todo-list .addInfo div {
    padding: 0.3rem;
    font-size: xx-small;
} 
.lg-screen-text {
    display: none;
}
.small-screen-icon {
    display: block;
}
}