/* Basic reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2rem;
    color: #2c3e50;
}

main {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#grocery-form {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

#grocery-input {
    flex: 1;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 44px; /* Touch-friendly */
}

#grocery-form button[type="submit"] {
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    min-height: 44px;
}

#grocery-form button[type="submit"]:hover {
    background-color: #2980b9;
}

#grocery-list {
    list-style-type: none;
    margin-bottom: 20px;
}

#grocery-list li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#clear-list {
    width: 100%;
    padding: 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    min-height: 44px;
}

#clear-list:hover {
    background-color: #c0392b;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    main {
        padding: 15px;
    }

    #grocery-form {
        flex-direction: column;
    }

    #grocery-form button[type="submit"] {
        width: 100%;
    }
}
