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

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f4f4f5;
    color: #18181b;
    transition: background 0.3s, color 0.3s;
}

.app {
    width: 90%;
    max-width: 650px;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: background 0.3s;
}

header {
    text-align: center;
    margin-bottom: 25px;
}

header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

header p {
    color: #71717a;
}

.theme-toggle {
    margin-top: 15px;
    width: 42px;
    height: 42px;

    border: 1px solid #d4d4d8;
    border-radius: 10px;

    background: transparent;
    color: inherit;

    cursor: pointer;
    font-size: 19px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition: 0.2s;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.task-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.task-input input {
    flex: 1;
    min-width: 0;
    padding: 14px;

    border: 1px solid #d4d4d8;
    border-radius: 10px;

    font-size: 16px;
    outline: none;
}

.task-input input:focus {
    border-color: #18181b;
}

.task-input select,
.filter-box select {
    padding: 12px;

    border: 1px solid #d4d4d8;
    border-radius: 10px;

    background: white;
    color: #18181b;

    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.task-input select:focus,
.filter-box select:focus {
    border-color: #18181b;
}

.task-input button {
    width: 50px;
    border: none;
    border-radius: 10px;

    background: #18181b;
    color: white;

    font-size: 25px;
    cursor: pointer;
}

.task-input button:hover {
    opacity: 0.85;
}

.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 14px;

    border: 1px solid #d4d4d8;
    border-radius: 10px;

    font-size: 15px;
    outline: none;
}

.search-box input:focus {
    border-color: #18181b;
}

.filter-box {
    margin-bottom: 15px;
}

.filter-box select {
    width: 100%;
}

#taskList {
    list-style: none;
}

.task {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px;

    border-bottom: 1px solid #e4e4e7;
}

.task-content {
    flex: 1;

    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-content span {
    font-size: 16px;
}

.task.completed .task-content span {
    text-decoration: line-through;
    color: #a1a1aa;
}

.complete-btn,
.delete-btn {
    border: none;
    background: transparent;

    cursor: pointer;
    font-size: 18px;
}

.delete-btn {
    color: #ef4444;
}

.category-badge {
    color: #71717a;
    font-size: 12px;
}

footer {
    margin-top: 20px;

    color: #71717a;
    font-size: 14px;
}

/* Dark Mode */

body.dark {
    background: #18181b;
    color: #f4f4f5;
}

body.dark .app {
    background: #27272a;
}

body.dark header p,
body.dark footer {
    color: #a1a1aa;
}

body.dark .task-input input,
body.dark .search-box input,
body.dark .task-input select,
body.dark .filter-box select {
    background: #3f3f46;
    color: #f4f4f5;
    border-color: #52525b;
}

body.dark .task-input input::placeholder,
body.dark .search-box input::placeholder {
    color: #a1a1aa;
}

body.dark .task {
    border-color: #3f3f46;
}

body.dark .task-input button {
    background: #f4f4f5;
    color: #18181b;
}

body.dark .category-badge {
    color: #a1a1aa;
}

body.dark .theme-toggle {
    border-color: #52525b;
}

