
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    margin: 0;
    min-height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 480px;
    background: #fff;
    padding: 32px 24px 24px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

h1 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 28px;
    color: #22223b;
}

form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

#taskInput {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.2s;
}
#taskInput:focus {
    border-color: #6366f1;
    outline: none;
}

button {
    padding: 10px 18px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
button:hover {
    background: #4338ca;
}

#taskList {
    list-style: none;
    padding: 0;
    margin: 0;
}
#taskList li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s, color 0.2s;
}
#taskList li:hover {
    background: #eef;
}
body.dark #taskList li:hover {
    background: #232946;
    color: #fff;
}
body.dark #taskList li:hover span {
    color: #fff;
}

#taskList li:last-child {
    border-bottom: none;
}
#taskList li.completed span {
    text-decoration: line-through;
    color: #94a3b8;
}
#taskList li.completed {
    background: #f1f5f9;
}
body.dark #taskList li.completed {
    background: #e5e7eb;
}
body.dark #taskList li.completed span {
    color: #d1d5db;
}

#messages {
    margin-bottom: 14px;
    color: #d00;
    min-height: 22px;
    font-size: 1.1rem;
    text-align: center;
}

.settings {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

input[type="checkbox"] {
    accent-color: #6366f1;
    width: 18px;
    height: 18px;
}

input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border 0.2s;
}
input[type="text"]:focus {
    border-color: #6366f1;
    outline: none;
}

@media (max-width: 600px) {
    .container {
        max-width: 98vw;
        padding: 18px 6vw 18px 6vw;
    }
    h1 {
        font-size: 1.4rem;
    }
    form {
        flex-direction: column;
        gap: 8px;
    }
    .settings {
        flex-direction: column;
        gap: 8px;
    }
}

body.dark {
    background: linear-gradient(135deg, #232946 0%, #1a1a2e 100%);
    color: #eee;
}
body.dark .container {
    background: #232946;
    color: #eee;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
body.dark h1 {
    color: #fff;
    text-shadow: 0 2px 8px #1a1a2e;
}
body.dark input, body.dark button {
    background: #232946;
    color: #eee;
    border: 1px solid #6366f1;
}
