* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #222;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
}

header {
    background: #1f2937;
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
}

header h1 {
    margin-bottom: 8px;
}

header p {
    color: #d1d5db;
}

.task-form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

input,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.form-buttons {
    display: flex;
    gap: 10px;
}

button {
    border: none;
    padding: 11px 18px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 15px;
    background: #2563eb;
    color: white;
}

button:hover {
    opacity: 0.9;
}

button.cancel {
    background: #6b7280;
    display: none;
}

h2 {
    margin-bottom: 15px;
}

#loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.task {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.08);
}

.task.completed {
    opacity: 0.7;
    border-left: 5px solid #16a34a;
}

.task h3 {
    margin-bottom: 8px;
}

.task p {
    color: #555;
    margin-bottom: 15px;
    white-space: pre-wrap;
}

.task-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.task-actions .complete {
    background: #16a34a;
}

.task-actions .edit {
    background: #f59e0b;
}

.task-actions .delete {
    background: #dc2626;
}

.status {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 15px;
    font-size: 13px;
    background: #e5e7eb;
    margin-bottom: 12px;
}

.status.completed {
    background: #dcfce7;
    color: #166534;
}

@media (max-width: 600px) {
    .container {
        width: 95%;
        margin: 20px auto;
    }

    header {
        padding: 20px;
    }

    .task-form {
        padding: 18px;
    }
}