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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.task-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.task-form h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3em;
}

.task-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-form input,
.task-form textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
}

.task-form input:focus,
.task-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.task-form button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.task-form button:hover {
    background: #5568d3;
}

.task-form button:active {
    transform: scale(0.98);
}

.task-list-container h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3em;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.task-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.task-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.task-item.completed {
    opacity: 0.7;
    background: #e8f5e9;
}

.task-content {
    flex: 1;
}

.task-title {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    word-break: break-word;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #666;
}

.task-description {
    color: #666;
    margin-bottom: 10px;
    word-break: break-word;
}

.task-meta {
    font-size: 0.85em;
    color: #999;
}

.task-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.task-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-complete {
    background: #4caf50;
    color: white;
}

.btn-complete:hover {
    background: #45a049;
}

.btn-incomplete {
    background: #ff9800;
    color: white;
}

.btn-incomplete:hover {
    background: #f57c00;
}

.btn-delete {
    background: #f44336;
    color: white;
}

.btn-delete:hover {
    background: #da190b;
}

.btn-edit {
    background: #2196f3;
    color: white;
}

.btn-edit:hover {
    background: #0b7dda;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1em;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.message.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

.message.success {
    background: #4caf50;
}

.message.error {
    background: #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 2em;
    }

    .task-item {
        flex-direction: column;
    }

    .task-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

