:root {
    --dark: #374151;
    --darker: #1F2937;
    --darkest: #111827;
    --light: #eee;
    --grey: #687280;
    --lightblue: #9BDCFF;
    --blue: #007BFF;
    --navyblue: #001F54;
}

* {
    box-sizing: border-box;
    margin: 0;
    font-family: sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: url('images/background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #fff;
    opacity: 70%;
}

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

header h1 {
    font-size: 3rem;
    font-weight: 300;
    color: black;
    margin-bottom: 3rem;
}

#new-task-form {
    display: flex;
    margin-left: 100px;
}

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-bottom: 1rem;
    color: var(--light);
    font-size: 1rem;
}

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

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

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

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

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

.task-list {
    padding: 1rem;
}

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

/* main.css */

.task-filter {
    margin-bottom: 1rem;
    text-align: center;
}

.task-filter label {
    font-size: 1rem;
    color: var(--grey);
}

.task-filter select {
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-left: 0.5rem;
    background-color: var(--darker);
    color: var(--light);
    border: 1px solid var(--grey);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.task-filter select:hover,
.task-filter select:focus {
    border-color: var(--blue);
    outline: none;
}

.task-filter select option {
    background-color: var(--dark);
    color: var(--light);
}

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

#tasks .task.completed .content .text {
    color: green;
    display: flex;
}

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

#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: 1rem;
    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(--blue), var(--lightblue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.task .actions .complete {
    color: var(--light);
}

#tasks .task .content {
    flex: 1;
}

.completed-tag {
    font-size: 0.675rem;
    color: var(--lightblue);
}

/* Mobile styles */
@media only screen and (max-width: 600px) {
    body {
        opacity: 1;
    }

    header {
        padding: 1rem;
        text-align: center;
    }

    header h1 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    #new-task-form {
        padding: 00px;
        justify-content: center;
        margin-left: 0;
        margin-top: 20px;
        flex-basis: 100%;
        flex-direction: column;
    }

    #new-task-input {
        font-size: 1rem;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }

    #new-task-submit {
        font-size: 1rem;
    }

    main {
        padding: 1rem;
    }

    .task-list h2 {
        font-size: 1.5rem;
    }

    .task .actions button {
        font-size: 0.875rem;
    }

    #tasks .task .content .text {
        font-size: 0.875rem;
    }
}

/* Tablet styles */
@media only screen and (min-width: 601px) and (max-width: 1024px) {
    header h1 {
        font-size: 2.5rem;
    }

    #new-task-input {
        font-size: 1.125rem;
    }

    #new-task-submit {
        font-size: 1.125rem;
    }

    .task-list h2 {
        font-size: 1.75rem;
    }

    .task .actions button {
        font-size: 1rem;
    }

    #tasks .task .content .text {
        font-size: 1rem;
    }
}