:root {
    --dark: #374751;
    --darker: #1f2937;
    --darkest: #111827;
    --grey: #6b7280;
    --light: #eee;
    --pink: #ec4899;
    --purple: #8b5cf6;
}

*{
    box-sizing: border-box;
    margin: 0;
    font-family: 'Fira Sans', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--dark);
    color: #FFF;
}

header {
    padding: 2rem 1rem;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--grey);
    margin-bottom: 1rem;
}

#new-task-form {
    display: flex;
}

input, button {
    appearance: none;
    border: none;
    outline: none;
    background: none;
}

#new-task-input {
    flex: 1 1 0%;
    background-color: var(--darker);
    padding: 1rem;
    border-radius: 1rem;
    margin-right: 1rem;
    color: var(--light);
    font-size: 1.25rem;
}

#new-task-input::placeholder {
    color: var(--grey);
}

#new-task-submit {
    color: var(--pink);
    font-size: 1.25rem;
    font-weight: 700;
    background-image: linear-gradient(to right, var(--pink), var(--purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    transition: 0.4s;
}

#new-task-submit:hover {
    opacity: 0.8;
}

#new-task-submit:active {
    opacity: 0.6;
}

main {
    flex: 1 1 0%;
    padding: 2rem 1rem;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.task-list {
    padding: 1rem;
}

.completed-task-list {
    padding: 1rem;
}

.task-list h2 {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--grey);
    margin-bottom: 1rem;
}

.completed-task-list h2 {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--grey);
    margin-bottom: 1rem;
}

#tasks .task {
    display: flex;
    justify-content: space-between;
    background-color: var(--darkest);
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

#completed-tasks .task {
    display: flex;
    justify-content: space-between;
    background-color: var(--darkest);
    padding: 1rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

#tasks .task .content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
}

#completed-tasks .task .content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
}

#tasks .task .content .text {
    color: var(--light);
    font-size: 1.125rem;
    width: 100%;
    display: block;
    transition: 0.4s;
}

#completed-tasks .task .content .text {
    color: var(--light);
    font-size: 1.125rem;
    width: 100%;
    display: block;
    transition: 0.4s;
    text-decoration: line-through;
    opacity: 0.7;
    font-weight: 200;
}

#tasks .task .content .text:not(:read-only) {
    color: var(--pink);
}

#tasks .task .actions {
    display: flex;
    margin: 0 -0.5rem;
}

.task .actions button {
    cursor: pointer;
    margin: 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.4s;
}

.task .actions button:hover{
    opacity: 0.8;
}

.task .actions button:active {
    opacity: 0.6;
}

.task .actions .edit {
    background-image: linear-gradient(to right, var(--pink), var(--purple));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.task .actions .delete {
    color: crimson;
}

#completed-tasks .task .actions .edit {
    display: none;
}

#completed-tasks .task .actions .delete {
    color: var(--grey);
    opacity: 1;
}

.checkbox {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 20px;
    height: 20px;
    border: 1px solid #fff;
    border-radius: 50%;
    background-color: transparent;
    cursor: pointer;
}

.checkbox:checked:after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFF;
    font-size: 14px;
}
