:root {

    --background: #0f172a;
    --card: #1e293b;
    --text: #f8fafc;
    --border: #334155;
    --primary: #6366f1;
    --font: Arial;
    --radius: 12px;
    --font-size: 16px;

}


* {
    box-sizing: border-box;
}


body {

    margin: 0;

    padding: 30px 15px;

    background: var(--background);

    color: var(--text);

    font-family: var(--font);

    font-size: var(--font-size);

    transition: 0.3s;

}


.app {

    width: min(900px, 100%);

    margin: auto;

}


/* HEADER */

header {

    text-align: center;

    margin-bottom: 30px;

}


header h1 {

    font-size: 40px;

    margin-bottom: 5px;

    animation: titleAppear 0.7s ease;

}


header p {

    opacity: 0.7;

}


/* ADD BOX */

.add-box {

    display: grid;

    grid-template-columns:
        1fr
        auto
        auto
        auto
        auto;

    gap: 10px;

    background: var(--card);

    padding: 15px;

    border-radius: var(--radius);

    border: 1px solid var(--border);

}


input,
select,
button {

    font: inherit;

}


input,
select {

    padding: 12px;

    border-radius: var(--radius);

    border: 1px solid var(--border);

    background: var(--background);

    color: var(--text);

    outline: none;

}


input:focus,
select:focus {

    border-color: var(--primary);

}


/* BUTTONS */

button {

    border: none;

    padding: 11px 15px;

    border-radius: var(--radius);

    background: var(--primary);

    color: white;

    cursor: pointer;

    transition: 0.2s;

}


button:hover {

    transform: translateY(-2px);

    filter: brightness(1.15);

}


button:active {

    transform: scale(0.96);

}


/* NOTIFICATION BUTTON */

#notificationButton {

    background: #f59e0b;

}


#notificationButton.enabled {

    background: #22c55e;

}


/* SEARCH */

.search-box {

    margin-top: 20px;

}


.search-box input {

    width: 100%;

}


/* FILTERS */

.filters {

    display: flex;

    gap: 10px;

    margin: 20px 0;

    flex-wrap: wrap;

}


.filter {

    background: var(--card);

    border: 1px solid var(--border);

}


.filter.active {

    background: var(--primary);

}


/* PROGRESS */

.progress-box {

    background: var(--card);

    padding: 18px;

    border-radius: var(--radius);

    border: 1px solid var(--border);

}


.progress-text {

    display: flex;

    justify-content: space-between;

    margin-bottom: 10px;

}


.progress-bar {

    height: 12px;

    background: var(--background);

    border-radius: 20px;

    overflow: hidden;

}


#progressFill {

    height: 100%;

    width: 0%;

    background: var(--primary);

    border-radius: 20px;

    transition: width 0.5s ease;

}


/* TASK INFO */

.task-info {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin: 20px 0 10px;

}


#clearCompleted {

    background: #ef4444;

}


/* TASK LIST */

#taskList {

    list-style: none;

    padding: 0;

    margin: 0;

}


.task {

    display: flex;

    align-items: center;

    gap: 12px;

    background: var(--card);

    border: 1px solid var(--border);

    padding: 15px;

    margin-bottom: 10px;

    border-radius: var(--radius);

    animation: taskAppear 0.3s ease;

    transition: 0.2s;

}


.task:hover {

    transform: translateX(4px);

}


.task.completed {

    opacity: 0.6;

}


.task.completed .task-text {

    text-decoration: line-through;

}


.task-checkbox {

    width: 20px;

    height: 20px;

    accent-color: var(--primary);

    cursor: pointer;

}


.task-content {

    flex: 1;

}


.task-text {

    font-weight: bold;

    word-break: break-word;

}


.task-details {

    display: flex;

    gap: 8px;

    flex-wrap: wrap;

    margin-top: 7px;

    font-size: 0.8em;

}


.badge {

    padding: 4px 8px;

    border-radius: 20px;

    background: var(--background);

}


.reminder-badge {

    background: #8b5cf6;

    color: white;

}


.priority-high {

    border-left: 5px solid #ef4444;

}


.priority-medium {

    border-left: 5px solid #eab308;

}


.priority-low {

    border-left: 5px solid #22c55e;

}


.task-actions {

    display: flex;

    gap: 5px;

}


.task-actions button {

    padding: 7px 9px;

}


.edit-button {

    background: #eab308;

}


.delete-button {

    background: #ef4444;

}


.pin-button {

    background: #64748b;

}


.pin-button.pinned {

    background: #f59e0b;

}


/* EMPTY */

.empty {

    text-align: center;

    padding: 40px;

    opacity: 0.6;

}


/* STATS */

.stats {

    margin-top: 30px;

    background: var(--card);

    padding: 20px;

    border-radius: var(--radius);

    border: 1px solid var(--border);

}


.stats h2 {

    text-align: center;

}


.stats-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 10px;

}


.stats-grid div {

    text-align: center;

    padding: 15px;

    background: var(--background);

    border-radius: var(--radius);

}


.stats-grid strong {

    display: block;

    font-size: 25px;

    color: var(--primary);

}


.stats-grid span {

    opacity: 0.7;

}


/* SETTINGS */

.settings {

    margin-top: 30px;

    background: var(--card);

    padding: 20px;

    border-radius: var(--radius);

    border: 1px solid var(--border);

}


.settings h2 {

    text-align: center;

}


.settings label {

    display: block;

    margin-top: 15px;

    margin-bottom: 6px;

}


.settings select {

    width: 100%;

}


.settings input[type="range"] {

    width: 100%;

}


.settings input[type="color"] {

    width: 100%;

    height: 45px;

    padding: 3px;

}


.settings button {

    width: 100%;

    margin-top: 20px;

}


.import-label {

    display: block;

    padding: 12px;

    background: var(--primary);

    border-radius: var(--radius);

    text-align: center;

    cursor: pointer;

    color: white;

}


.import-label input {

    display: none;

}


/* FOOTER */

footer {

    text-align: center;

    opacity: 0.5;

    margin-top: 30px;

}


/* ANIMATIONS */

@keyframes titleAppear {

    from {

        opacity: 0;

        transform:
            translateY(-20px);

    }

    to {

        opacity: 1;

        transform:
            translateY(0);

    }

}


@keyframes taskAppear {

    from {

        opacity: 0;

        transform:
            translateX(-20px);

    }

    to {

        opacity: 1;

        transform:
            translateX(0);

    }

}


/* MOBILE */

@media (max-width: 700px) {

    body {

        padding: 15px;

    }


    header h1 {

        font-size: 30px;

    }


    .add-box {

        grid-template-columns: 1fr;

    }


    .task {

        align-items: flex-start;

    }


    .task-actions {

        flex-direction: column;

    }


    .stats-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }

}