/* --- Üldine seadistus ja muutujad --- */
:root {
    --bg-color: #f8f9fa;
    --container-bg: #ffffff;
    --text-color: #212529;
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --border-color: #dee2e6;
    --done-color: #6c757d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

/* --- Konteiner --- */
.container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

header h1 {
    margin: 0;
}

header p {
    margin: 0.25rem 0 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* --- Vorm --- */
.task-form {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
}

.task-form input[type="text"] {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.task-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.task-form button {
    padding: 12px 20px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

.task-form button:hover {
    background-color: var(--primary-hover);
}

.cancel-btn {
    display: flex;
    align-items: center;
    padding: 0 20px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: background-color 0.2s;
}
.cancel-btn:hover {
    background-color: #5a6268;
}


/* --- Ülesannete nimekiri --- */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.task-item:last-child {
    border-bottom: none;
}

.task-item:hover {
    background-color: #f8f9fa;
}

.task-item.done .task-text {
    text-decoration: line-through;
    color: var(--done-color);
}

.task-actions {
    display: flex;
    gap: 15px;
}

.task-actions a {
    text-decoration: none;
    font-size: 1.2rem;
    color: #6c757d;
    transition: color 0.2s;
}

.task-actions a:hover {
    color: var(--text-color);
}
.task-actions a[title="Märgi tehtuks/tegemata"]:hover { color: #28a745; }
.task-actions a[title="Muuda"]:hover { color: #ffc107; }
.task-actions a[title="Kustuta"]:hover { color: #dc3545; }

.empty-list {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

/* --- Responsiivsus --- */
@media (max-width: 640px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 1rem;
        margin: 1rem auto;
    }
    .task-form {
        flex-direction: column;
    }
}