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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    margin: 0;
}

/* Styling for headings */
h1, h2 {
    text-align: center;
    color: #2c3e50;
    font-weight: 300;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

h2 {
    font-size: 2rem;
    margin: 40px 0 20px;
}

/* Form styling */
form {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

form input[type="text"] {
    font-size: 1rem;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    width: 200px;
    margin-right: 10px;
    transition: border-color 0.3s ease;
}

form input[type="text"]:focus {
    border-color: #3498db;
    outline: none;
}

form button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #2980b9;
}

/* List and item styling */
ul {
    list-style-type: none;
    padding: 0;
    width: 100%;
    max-width: 600px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

ul li {
    padding: 20px;
    font-size: 1.2rem;
    color: #34495e;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

ul li:last-child {
    border-bottom: none;
}

/* Button styles inside list items */
ul li form {
    display: inline;
}

ul li button {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: 10px;
}

ul li button:hover {
    background-color: #27ae60;
}

/* Style for 'Remove' buttons */
ul li form:nth-of-type(2) button {
    background-color: #e74c3c;
}

ul li form:nth-of-type(2) button:hover {
    background-color: #c0392b;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    ul li {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    ul li button {
        margin: 5px 0;
        width: 100%;
    }
}
